| | |
| | | import org.jeecg.modules.dnc.entity.Cutter; |
| | | import org.jeecg.modules.dnc.service.ICutterService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "刀具信息") |
| | |
| | | @RequestMapping("/nc/cutter") |
| | | public class CutterController extends JeecgController<Cutter, ICutterService> { |
| | | |
| | | // /** |
| | | // * 根据业务id查询刀具列表 |
| | | // * @param businessId |
| | | // * @param pageNo |
| | | // * @param pageSize |
| | | // * @return |
| | | // */ |
| | | // @GetMapping("/getByBusinessId") |
| | | // public Result<?> getByBusinessId(String businessId,Integer pageNo,Integer pageSize){ |
| | | // return Result.OK(service.getByBusinessId(businessId,pageNo,pageSize)); |
| | | // } |
| | | /** |
| | | * 查询刀具列表 |
| | | * @param cutter |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-查询刀具列表") |
| | | @ApiOperation(value = "刀具信息-查询刀具列表", notes = "刀具信息-查询刀具列表") |
| | | @GetMapping("/getByBusinessId") |
| | | public Result<?> getByBusinessId( Cutter cutter,Integer pageNo,Integer pageSize){ |
| | | return service.query(cutter,pageNo,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 新增刀具信息 |
| | |
| | | @ApiOperation(value = "刀具信息-新增刀具信息", notes = "刀具信息-新增刀具信息") |
| | | @PostMapping("/add") |
| | | public Result<?> add(@RequestBody Cutter cutter){ |
| | | return Result.OK(service.add(cutter)); |
| | | return service.add(cutter); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "刀具信息-编辑刀具信息", notes = "刀具信息-编辑刀具信息") |
| | | @PutMapping("/edit") |
| | | public Result<?> edit(@RequestBody Cutter cutter){ |
| | | return Result.OK(service.edit(cutter)); |
| | | return service.edit(cutter); |
| | | } |
| | | |
| | | /** |
| | |
| | | @AutoLog(value = "刀具信息-根据id删除刀具信息") |
| | | @ApiOperation(value = "刀具信息-根据id删除刀具信息", notes = "刀具信息-根据id删除刀具信息") |
| | | @DeleteMapping("/delete") |
| | | public Result<?> delete(@RequestBody String id){ |
| | | return Result.OK(service.delete(id)); |
| | | public Result<?> delete(String id){ |
| | | return service.delete(id); |
| | | } |
| | | |
| | | /** |
| | | * 导出excel |
| | | * @param request |
| | | * @param cutter |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-导出excel") |
| | | @ApiOperation(value = "刀具信息-导出excel", notes = "刀具信息-导出excel") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, Cutter cutter) { |
| | | return super.exportXls(request, cutter, Cutter.class, "刀具信息"); |
| | | } |
| | | |
| | | /** |
| | | * 导入excel |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "刀具信息-导入excel") |
| | | @ApiOperation(value = "刀具信息-导入excel", notes = "刀具信息-导入excel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, Cutter.class); |
| | | } |
| | | } |