From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 25 六月 2025 11:51:38 +0800 Subject: [PATCH] Merge branch 'mdc_hyjs_master' --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java | 126 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 126 insertions(+), 0 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java new file mode 100644 index 0000000..0c59cb5 --- /dev/null +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java @@ -0,0 +1,126 @@ +package org.jeecg.modules.dnc.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +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 = "鍒�鍏蜂俊鎭�") +@RestController +@RequestMapping("/nc/cutter") +public class CutterController extends JeecgController<Cutter, ICutterService> { + + /** + * 鏌ヨ鍒�鍏峰垪琛� + * @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); + } + + /** + * 鏂板鍒�鍏蜂俊鎭� + * @param cutter + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-鏂板鍒�鍏蜂俊鎭�") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-鏂板鍒�鍏蜂俊鎭�", notes = "鍒�鍏蜂俊鎭�-鏂板鍒�鍏蜂俊鎭�") + @PostMapping("/add") + public Result<?> add(@RequestBody Cutter cutter){ + return service.add(cutter); + } + + /** + * 缂栬緫鍒�鍏蜂俊鎭� + * @param cutter + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-缂栬緫鍒�鍏蜂俊鎭�") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-缂栬緫鍒�鍏蜂俊鎭�", notes = "鍒�鍏蜂俊鎭�-缂栬緫鍒�鍏蜂俊鎭�") + @PutMapping("/edit") + public Result<?> edit(@RequestBody Cutter cutter){ + return service.edit(cutter); + } + + /** + * 鏍规嵁id鍒犻櫎鍒�鍏蜂俊鎭� + * @param id + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-鏍规嵁id鍒犻櫎鍒�鍏蜂俊鎭�") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-鏍规嵁id鍒犻櫎鍒�鍏蜂俊鎭�", notes = "鍒�鍏蜂俊鎭�-鏍规嵁id鍒犻櫎鍒�鍏蜂俊鎭�") + @DeleteMapping("/delete") + 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); + } + + /** + * 鎻愬彇鍒�鍏� + * @param docId 鏂囨。Id + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-鎻愬彇鍒�鍏�") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-鎻愬彇鍒�鍏�", notes = "鍒�鍏蜂俊鎭�-鎻愬彇鍒�鍏�") + @GetMapping("/extractCutterInfo/{docId}/{attributionType}/{attributionId}") + public Result<?> extractCutterInfo(@PathVariable("docId") String docId + ,@PathVariable("attributionType") Integer attributionType + ,@PathVariable("attributionId") String attributionId) { + return service.extractAndSaveFromContent(docId,attributionId,attributionType); + } + + /** + * 鍙戦�佸垁鍏风郴缁� + * @param docId 鏂囨。Id + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-鍙戦�佸垁鍏风郴缁�") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-鍙戦�佸垁鍏风郴缁�", notes = "鍒�鍏蜂俊鎭�-鍙戦�佸垁鍏风郴缁�") + @GetMapping("/sendCutterInfo/{docId}/{attributionType}/{attributionId}") + public Result<?> sendCutterInfo(@PathVariable("docId") String docId + ,@PathVariable("attributionType") Integer attributionType + ,@PathVariable("attributionId") String attributionId) { + return service.sendToCutterSystem(docId,attributionId,attributionType); + } +} -- Gitblit v1.9.3