From 7be9b534dcd5cbdb8c24c908d1a738aeec6f52a9 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 04 十月 2024 16:18:35 +0800
Subject: [PATCH] 添加工程打印明细

---
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java |  324 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 282 insertions(+), 42 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 cbc1ec4..3ffe382 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,7 +1,9 @@
 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;
 import com.example.erp.entity.sd.Order;
 import com.example.erp.common.Result;
 import com.example.erp.entity.sd.OrderDetail;
@@ -17,7 +19,7 @@
 import java.util.Map;
 
 @RestController
-@Api(value="娴佺▼鍗ontroller",tags={"娴佺▼鍗℃搷浣滄帴鍙�"})
+@Api(value = "娴佺▼鍗ontroller", tags = {"娴佺▼鍗℃搷浣滄帴鍙�"})
 @RequestMapping("/processCard")
 public class ProcessCardController {
     @Autowired
@@ -25,123 +27,361 @@
 
     //娴佺▼鍗$鐞嗘煡璇�
     @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("鍒犻櫎娴佺▼鍗℃帴鍙�")
-    @PostMapping("/deleteFlowCard/{orderId}/{processId}")
+    @SaCheckPermission("selectProcessCard.delete")
+    @PostMapping("/deleteFlowCard/{orderId}/{processId}/{userId}/{userName}")
     public Result deleteOrderWork(
             @PathVariable String orderId,
-            @PathVariable String processId
-    ){
-        if(flowCardService.deleteFlowCardSv(orderId,processId)){
-            return Result.seccess();
-        }else {
-            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚﹀凡鎶ュ伐");
-
-        }
+            @PathVariable String processId,
+            @PathVariable String userId,
+            @PathVariable String userName
+    ) {
+//        if(flowCardService.deleteFlowCardSv(orderId,processId)){
+//            return Result.seccess();
+//        }else {
+//            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚﹀凡鎶ュ伐");
+//
+//        }
+        return Result.seccess(flowCardService.deleteFlowCardSv(orderId, processId,userId,userName));
     }
 
     //淇敼鎺掔増鐘舵��
     @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("娴佺▼鍗℃墦鍗版煡璇㈡帴鍙�")
+    @SaCheckPermission("selectPrintFlowCard.search")
+    @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}")
+    public Result selectPrintFlowCard(
+            @PathVariable Date selectTime1,
+            @PathVariable Date selectTime2,
+            @PathVariable String orderId,
+            @PathVariable String project,
+            @PathVariable String userId,
+            @RequestBody FlowCard flowCard) {
+        return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId, flowCard));
+    }
+
+    @ApiOperation("娴佺▼鍗℃槑缁嗘煡璇㈡帴鍙�")
+    @SaCheckPermission("printFlowCard.search")
+    @PostMapping("/selectPrint/{inquiryMode}")
+    public Result selectPrint(
+            @PathVariable String inquiryMode,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.selectPrintSv(object,inquiryMode));
+
+    }
+
+    @ApiOperation("鎵撳嵃娴佺▼鍗℃暟鎹煡璇㈡帴鍙�")
+    @PostMapping("/getSelectPrinting/{printMerge}/{printLike}")
+    public Result getSelectPrinting(
+            @PathVariable String printMerge,
+            @PathVariable String printLike,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike));
+    }
+
+    @ApiOperation("鎵撳嵃鏍囩鏁版嵁鏌ヨ鎺ュ彛")
+    @PostMapping("/getSelectPrintLabel/{projectNo}/{type}")
+    public Result getSelectPrintLabel(@PathVariable String projectNo,@PathVariable String type) {
+        return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo,type));
+    }
+
+    @ApiOperation("鎵撳嵃鏍囩鏌ヨ鎺ュ彛")
+    @PostMapping("/getSelectPrintLabel1")
+    public Result getSelectPrintLabel1(@RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrintLabelSv1(object));
+    }
+
+    @ApiOperation("鎵撳嵃鏍囩鏄庣粏鏌ヨ鎺ュ彛")
+    @PostMapping("/getSelectPrintLabelDetails")
+    public Result getSelectPrintLabelDetails(@RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrintLabelDetails(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}/{process}")
+    public Result printFlowCardDetails(@PathVariable String processId,
+                                       @PathVariable String technologyNumber,
+                                       @PathVariable String process,
+                                       @RequestBody FlowCard flowCard) {
+        return Result.seccess(flowCardService.printFlowCardDetailsSv(processId, technologyNumber,process, 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));
+    }
+
+    @ApiOperation("淇敼鏄惁鎵撳嵃鐘舵��")
+    @PostMapping("/updatePrintState/{printState}")
+    public Result updatePrintState(
+            @PathVariable Integer printState,
+            @RequestBody Map<String, Object> object
+    ) {
+
+        return Result.seccess(flowCardService.updatePrintStateSv(printState,object));
+    }
+
+    @ApiOperation("娴佺▼鍗℃墦鍗拌鍗曟暟鎹帓搴忔煡璇㈡帴鍙�")
+    @PostMapping("/printFlowCardOrderSort/{orderId}")
+    public Result printFlowCardOrderSort(@PathVariable String orderId,
+                                       @RequestBody FlowCard flowCard) {
+        return Result.seccess(flowCardService.printFlowCardOrderSortSv(orderId, flowCard));
+    }
+
+    @ApiOperation("淇濆瓨鎵撳嵃璁㈠崟鎺掑簭鎺ュ彛")
+    @PostMapping("/printOrderSort")
+    public Result printOrderSort(@RequestBody Map<String, Object> object) {
+        if (flowCardService.printOrderSort(object)) {
+            return Result.seccess();
+        } else {
+            throw new ServiceException(Constants.Code_500, "淇濆瓨澶辫触");
+
+        }
+    }
+
+    @ApiOperation("鎵撳嵃娴佺▼鍗¤ˉ鐗囨暟鎹煡璇㈡帴鍙�")
+    @PostMapping("/getSelectPrintingRefund/{printMerge}/{printLike}/{mergeTechnologyNumber}")
+    public Result getSelectPrintingRefund(
+            @PathVariable String printMerge,
+            @PathVariable String printLike,
+            @PathVariable String mergeTechnologyNumber,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrintingRefundSv(object,printMerge,printLike,mergeTechnologyNumber));
+    }
+
+    @ApiOperation("鎵撳嵃娴佺▼鍗¤繑宸ユ暟鎹煡璇㈡帴鍙�")
+    @PostMapping("/getSelectPrinRework/{printMerge}/{printLike}")
+    public Result getSelectPrinRework(
+            @PathVariable String printMerge,
+            @PathVariable String printLike,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrinReworkSv(object,printMerge,printLike));
+    }
+
+    @ApiOperation("娴佺▼鍗℃槑缁嗘寜缂栧彿鏌ヨ鎺ュ彛")
+    @PostMapping("/selectPrintDetails/{inquiryMode}/{type}")
+    public Result selectPrintDetails(
+            @PathVariable String inquiryMode,
+            @PathVariable Integer type,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.selectPrintDetailsSv(object,inquiryMode,type));
+
+    }
+
+    @ApiOperation("鎵撳嵃鑷畾涔夋爣绛炬暟鎹寜缂栧彿鏌ヨ鎺ュ彛")
+    @PostMapping("/getSelectPrintCustomLabelDetails/{type}/{lableType}")
+    public Result getSelectPrintCustomLabelDetails( @PathVariable String type,
+                                             @PathVariable Integer lableType,
+                                             @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getSelectPrintCustomLabelDetailsSv(type,lableType,object));
+
+    }
+
+    @ApiOperation("鎵撳嵃鑷畾涔夋爣绛炬暟鎹寜宸ョ▼鏌ヨ鎺ュ彛")
+    @PostMapping("/getPrintCustomDataProjectNo/{type}/{projectNo}")
+    public Result getPrintCustomDataProjectNo( @PathVariable String type,
+                                                    @PathVariable String projectNo) {
+        return Result.seccess(flowCardService.getPrintCustomDataProjectNo(type,projectNo));
+
+    }
+
+    @ApiOperation("鎺掑簭姹囨�绘煡璇㈡帴鍙�")
+    @PostMapping("/selectSortTable")
+    public Result selectSortTable(
+                                  @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.selectSortTableSv(object));
+    }
+
+    @ApiOperation("鍚堝苟娴佺▼鍗℃帴鍙�")
+    @PostMapping("/mergeFlowCard")
+    public Result mergeFlowCard(@RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.mergeFlowCard(object));
+    }
+    @ApiOperation("姹夌幓鑾峰彇娴佺▼鍗℃帴鍙�")
+    @PostMapping("/getProcessCardList/hanbo")
+    public Result getProcessCard(@RequestBody Map<String,String> processCards)  {
+        return Result.seccess(flowCardService.getProcessCard(processCards));
+    }
+
+    @ApiOperation("澶嶉�夋鍒犻櫎娴佺▼鍗�")
+    @SaCheckPermission("selectProcessCard.delete")
+    @PostMapping("/checkboxDelete")
+    public Result checkboxDelete(
+            @RequestBody Map<String, Object> object
+    ) {
+
+        return Result.seccess(flowCardService.checkboxDeleteSv(object));
+    }
+
+    @ApiOperation("宸ョ▼鏄庣粏鎵撳嵃鏌ヨ")
+    @PostMapping("/selectPrintProjectDetails/{projectNo}")
+    public Result selectPrintProjectDetails(
+                                               @PathVariable String projectNo) {
+        return Result.seccess(flowCardService.getPrintProjectDetails(projectNo));
+
+    }
+    @ApiOperation("宸ョ▼鏄庣粏鎵撳嵃鏍囩鏌ヨ")
+    @PostMapping("/getPrintCustomDataProjectNoDetail/{type}")
+    public Result getPrintCustomDataProjectNoDetail(
+            @PathVariable String type,
+            @RequestBody Map<String, Object> object) {
+        return Result.seccess(flowCardService.getPrintCustomDataProjectNoDetailSv(type,object));
+
+    }
+
 }

--
Gitblit v1.8.0