From 0d91c32f348565109b40c5e1c516bfdd28538bd3 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期二, 02 七月 2024 11:50:17 +0800 Subject: [PATCH] 补充语言,修改成品标签打印 --- north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java | 174 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 128 insertions(+), 46 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java index 09ae89a..1a66b50 100644 --- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java +++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java @@ -1,5 +1,6 @@ package com.example.erp.controller.pp; +import cn.dev33.satoken.annotation.SaCheckPermission; import com.example.erp.common.Constants; import com.example.erp.entity.pp.FlowCard; import com.example.erp.entity.sd.DeliveryDetail; @@ -18,7 +19,7 @@ import java.util.Map; @RestController -@Api(value="娴佺▼鍗ontroller",tags={"娴佺▼鍗℃搷浣滄帴鍙�"}) +@Api(value = "娴佺▼鍗ontroller", tags = {"娴佺▼鍗℃搷浣滄帴鍙�"}) @RequestMapping("/processCard") public class ProcessCardController { @Autowired @@ -26,148 +27,229 @@ //娴佺▼鍗$鐞嗘煡璇� @ApiOperation("娴佺▼鍗$鐞嗘煡璇㈡帴鍙�") - @PostMapping ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") + @SaCheckPermission("SelectProcessCard.search") + @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") public Result dateProcess( @PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard)); - + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard)); + } //鍒嗘灦鏌ヨ @ApiOperation("鍒嗘灦鏌ヨ鎺ュ彛") - @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") + @SaCheckPermission("SelectAddProcess.search") + @PostMapping("/selectAddProcess/{selectTime1}/{selectTime2}") public Result selectAddProcess( @PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectAddProcess(selectTime1, selectTime2, flowCard)); } //鍒嗘灦鏄庣粏鏌ヨ @ApiOperation("鍒嗘灦鏄庣粏鏌ヨ鎺ュ彛") - @PostMapping ("/detailsSelect/{orderId}") - + @SaCheckPermission("SplittingDetails.search") + @PostMapping("/detailsSelect/{orderId}") public Result detailsSelect( @PathVariable String orderId, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.detailsSelectSv(orderId, flowCard)); } //鍒犻櫎娴佺▼鍗� @ApiOperation("鍒犻櫎娴佺▼鍗℃帴鍙�") + @SaCheckPermission("SelectProcessCard.delete") @PostMapping("/deleteFlowCard/{orderId}/{processId}") public Result deleteOrderWork( @PathVariable String orderId, @PathVariable String processId - ){ - if(flowCardService.deleteFlowCardSv(orderId,processId)){ - return Result.seccess(); - }else { - throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚﹀凡鎶ュ伐"); - - } + ) { +// if(flowCardService.deleteFlowCardSv(orderId,processId)){ +// return Result.seccess(); +// }else { +// throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚﹀凡鎶ュ伐"); +// +// } + return Result.seccess(flowCardService.deleteFlowCardSv(orderId, processId)); } //淇敼鎺掔増鐘舵�� @ApiOperation("淇敼鎺掔増鐘舵�佹帴鍙�") + @SaCheckPermission("SelectProcessCard.review") @PostMapping("/updateLayoutStatus/{processId}/{state}") public Result updateLayoutStatus( @PathVariable String processId, @PathVariable Integer state - ){ - if(flowCardService.updateLayoutStatusSv(processId,state)){ + ) { + if (flowCardService.updateLayoutStatusSv(processId, state)) { return Result.seccess(); - }else { - throw new ServiceException(Constants.Code_500,"淇敼澶辫触"); + } else { + throw new ServiceException(Constants.Code_500, "淇敼澶辫触"); } } //鍒嗘灦鏂板鏄庣粏鏌ヨ @ApiOperation("鍒嗘灦鏄庣粏鏂板鎺ュ彛") - @PostMapping ("/selectNoCard/{orderId}/{productionId}") + @PostMapping("/selectNoCard/{orderId}/{productionId}") public Result SelectNoCard( @PathVariable String orderId, @PathVariable String productionId, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectNoCardSv(orderId, productionId, flowCard)); } //娣诲姞娴佺▼鍗� @ApiOperation("娴佺▼鍗″垱寤烘帴鍙�") + @SaCheckPermission("AddProcessCard.add") @PostMapping("/addFlowCard") - public Result AddOrderWork( @RequestBody Map<String,Object> object){ - if(flowCardService.addFlowCardSv(object)){ + public Result AddOrderWork(@RequestBody Map<String, Object> object) { + if (flowCardService.addFlowCardSv(object)) { return Result.seccess(); - }else { - throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触"); + } else { + throw new ServiceException(Constants.Code_500, "淇濆瓨澶辫触"); } } //鏌ヨ绗竴娆℃帓浜ф暟鎹� @ApiOperation("鎺掍骇鐣岄潰鍔犺浇鏌ヨ鎺ュ彛") - @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") + @PostMapping("/selectLastScheduling/{selectTime1}/{selectTime2}") public Result selectLastScheduling( @PathVariable String selectTime1, @PathVariable String selectTime2, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectLastScheduling(selectTime1, selectTime2, flowCard)); } + //鏌ヨ鎺掍骇鏁版嵁 @ApiOperation("鎺掍骇鐐瑰嚮鎸夐挳鏌ヨ鎺ュ彛") - @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") + @PostMapping("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") public Result selectScheduling( @PathVariable String selectTime1, @PathVariable String selectTime2, @PathVariable String orderId, @PathVariable String processes, @PathVariable Integer state, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectSchedulingSv(selectTime1, selectTime2, orderId, processes, state, flowCard)); } + //娴佺▼鍗℃槑缁嗘煡璇� @ApiOperation("娴佺▼鍗℃槑缁嗘煡璇㈡帴鍙�") - @PostMapping ("/flowCardDetail/{processId}") + @SaCheckPermission("SelectDetailProcessCard.search") + @PostMapping("/flowCardDetail/{processId}") public Result flowCardDetail( @PathVariable String processId, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.flowCardDetailSv(processId,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.flowCardDetailSv(processId, flowCard)); } @ApiOperation("娴佺▼鍗℃墦鍗版煡璇㈡帴鍙�") - @PostMapping ("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") + @SaCheckPermission("SelectPrintFlowCard.search") + @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") public Result selectPrintFlowCard( @PathVariable Date selectTime1, @PathVariable Date selectTime2, @PathVariable String orderId, @PathVariable String project, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1,selectTime2,orderId,project,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project, flowCard)); } @ApiOperation("娴佺▼鍗℃槑缁嗘煡璇㈡帴鍙�") - @PostMapping ("/selectPrint/{orderId}") + @SaCheckPermission("PrintFlowCard.search") + @PostMapping("/selectPrint/{orderId}") public Result selectPrint( @PathVariable String orderId, - @RequestBody FlowCard flowCard){ - return Result.seccess(flowCardService.selectPrintSv(orderId,flowCard)); + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.selectPrintSv(orderId, flowCard)); } @ApiOperation("鎵撳嵃娴佺▼鍗℃暟鎹煡璇㈡帴鍙�") @PostMapping("/getSelectPrinting") - public Result getSelectPrinting( @RequestBody Map<String,Object> object){ + public Result getSelectPrinting(@RequestBody Map<String, Object> object) { return Result.seccess(flowCardService.getSelectPrintingSv(object)); } + + @ApiOperation("鎵撳嵃鏍囩鏁版嵁鏌ヨ鎺ュ彛") + @PostMapping("/getSelectPrintLabel/{projectNo}") + public Result getSelectPrintLabel(@PathVariable String projectNo) { + return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo)); + } + + @ApiOperation("鎵撳嵃鏍囩鏌ヨ鎺ュ彛") + @PostMapping("/getSelectPrintLabel1") + public Result getSelectPrintLabel1(@RequestBody Map<String, Object> object) { + return Result.seccess(flowCardService.getSelectPrintLabelSv1(object)); + } + + @ApiOperation("鎵撳嵃鑷畾涔夋爣绛炬暟鎹煡璇㈡帴鍙�") + @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}") + public Result getSelectPrintCustomLabel( @PathVariable String type, + @PathVariable Integer lableType, + @RequestBody Map<String, Object> object) { + return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,lableType,object)); + + } + + @ApiOperation("澶嶉�夋淇敼鎺掔増鐘舵��") + @SaCheckPermission("SelectProcessCard.review") + @PostMapping("/updateComposing") + public Result updateComposing( + @RequestBody Map<String, Object> object + ) { + + return Result.seccess(flowCardService.updateComposingSv(object)); + } + + @ApiOperation("娴佺▼鍗℃墦鍗版槑缁嗘暟鎹帓搴忔煡璇㈡帴鍙�") + @PostMapping("/printFlowCardDetails/{processId}/{technologyNumber}") + public Result printFlowCardDetails(@PathVariable String processId, + @PathVariable String technologyNumber, + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.printFlowCardDetailsSv(processId, technologyNumber, flowCard)); + } + + @ApiOperation("淇濆瓨鎵撳嵃鎺掑簭鎺ュ彛") + @PostMapping("/printSort") + public Result printSort(@RequestBody Map<String, Object> object) { + if (flowCardService.printSortSv(object)) { + return Result.seccess(); + } else { + throw new ServiceException(Constants.Code_500, "淇濆瓨澶辫触"); + + } + } + + @ApiOperation("鑷畾涔夋爣绛炬墦鍗版槑缁嗘帴鍙�") + @PostMapping("/getCustomLabelDetail/{name}/{form}/{id}") + public Result getCustomLabelDetail( + @PathVariable String name, + @PathVariable String form, + @PathVariable String id, + @RequestBody FlowCard flowCard) { + return Result.seccess(flowCardService.getCustomLabelDetailSv(name,form,id, flowCard)); + + } + + @ApiOperation("宸ョ▼鎵撳嵃鏌ヨ鎺ュ彛") + @SaCheckPermission("SelectPrintFlowCard.search") + @PostMapping("/selectPrintPrintProject/{selectTime1}/{selectTime2}") + public Result selectPrintFlowCard( + @PathVariable Date selectTime1, + @PathVariable Date selectTime2) { + return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2)); + } } -- Gitblit v1.8.0