From 5586a80e6aa1d14b11979bb25fa2a96b3f4056a8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期日, 07 四月 2024 09:33:20 +0800
Subject: [PATCH] 查询基础数据设置

---
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java |   60 ++++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 40 insertions(+), 20 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 6fd4571..cbc1ec4 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
@@ -8,6 +8,8 @@
 import com.example.erp.entity.sd.OrderGlassDetail;
 import com.example.erp.exception.ServiceException;
 import com.example.erp.service.pp.FlowCardService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -15,64 +17,71 @@
 import java.util.Map;
 
 @RestController
+@Api(value="娴佺▼鍗ontroller",tags={"娴佺▼鍗℃搷浣滄帴鍙�"})
 @RequestMapping("/processCard")
 public class ProcessCardController {
     @Autowired
     FlowCardService flowCardService;
 
     //娴佺▼鍗$鐞嗘煡璇�
-    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}")
-    public Result DateProcess(
+    @ApiOperation("娴佺▼鍗$鐞嗘煡璇㈡帴鍙�")
+    @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(selectTime1,selectTime2,flowCard));
+        return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard));
         
     }
 
     //鍒嗘灦鏌ヨ
+    @ApiOperation("鍒嗘灦鏌ヨ鎺ュ彛")
     @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
-    public Result SelectAddProcess(
+    public Result selectAddProcess(
             @PathVariable Date selectTime1,
             @PathVariable Date selectTime2,
             @RequestBody FlowCard  flowCard){
-    //    System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
         return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard));
 
     }
 
     //鍒嗘灦鏄庣粏鏌ヨ
+    @ApiOperation("鍒嗘灦鏄庣粏鏌ヨ鎺ュ彛")
     @PostMapping  ("/detailsSelect/{orderId}")
 
-    public Result DetailsSelect(
+    public Result detailsSelect(
             @PathVariable String orderId,
             @RequestBody FlowCard flowCard){
-        return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard));
+        return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard));
 
     }
 
 
-    //鍒犻櫎宸ュ崟
+    //鍒犻櫎娴佺▼鍗�
+    @ApiOperation("鍒犻櫎娴佺▼鍗℃帴鍙�")
     @PostMapping("/deleteFlowCard/{orderId}/{processId}")
     public Result deleteOrderWork(
             @PathVariable String orderId,
             @PathVariable String processId
     ){
-        if(flowCardService.DeleteFlowCardSv(orderId,processId)){
+        if(flowCardService.deleteFlowCardSv(orderId,processId)){
             return Result.seccess();
         }else {
-            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触");
+            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触,璇锋鏌ユ槸鍚﹀凡鎶ュ伐");
 
         }
     }
 
     //淇敼鎺掔増鐘舵��
-    @PostMapping("/updateLayoutStatus/{processId}")
+    @ApiOperation("淇敼鎺掔増鐘舵�佹帴鍙�")
+    @PostMapping("/updateLayoutStatus/{processId}/{state}")
     public Result updateLayoutStatus(
-            @PathVariable String processId
+            @PathVariable String processId,
+            @PathVariable Integer state
     ){
-        System.out.println(flowCardService.UpdateLayoutStatusSv(processId));
-        if(flowCardService.UpdateLayoutStatusSv(processId)){
+        if(flowCardService.updateLayoutStatusSv(processId,state)){
             return Result.seccess();
         }else {
             throw new ServiceException(Constants.Code_500,"淇敼澶辫触");
@@ -81,20 +90,21 @@
     }
 
     //鍒嗘灦鏂板鏄庣粏鏌ヨ
+    @ApiOperation("鍒嗘灦鏄庣粏鏂板鎺ュ彛")
     @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
     public Result SelectNoCard(
             @PathVariable String orderId,
             @PathVariable String productionId,
             @RequestBody FlowCard flowCard){
-        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
+        return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard));
 
     }
 
     //娣诲姞娴佺▼鍗�
+    @ApiOperation("娴佺▼鍗″垱寤烘帴鍙�")
     @PostMapping("/addFlowCard")
     public Result AddOrderWork( @RequestBody Map<String,Object> object){
-        System.out.println("obj:"+object);
-        if(flowCardService.AddFlowCardSv(object)){
+        if(flowCardService.addFlowCardSv(object)){
             return Result.seccess();
         }else {
             throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触");
@@ -102,7 +112,8 @@
         }
     }
 
-    //鏌ヨ绗竴娆℃帓鐗堟暟鎹�
+    //鏌ヨ绗竴娆℃帓浜ф暟鎹�
+    @ApiOperation("鎺掍骇鐣岄潰鍔犺浇鏌ヨ鎺ュ彛")
     @PostMapping  ("/selectLastScheduling/{selectTime1}/{selectTime2}")
     public Result selectLastScheduling(
             @PathVariable String selectTime1,
@@ -111,7 +122,8 @@
         return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard));
 
     }
-    //鏌ヨ鎺掔増鏁版嵁
+    //鏌ヨ鎺掍骇鏁版嵁
+    @ApiOperation("鎺掍骇鐐瑰嚮鎸夐挳鏌ヨ鎺ュ彛")
     @PostMapping  ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
     public Result selectScheduling(
             @PathVariable String selectTime1,
@@ -120,8 +132,16 @@
             @PathVariable String processes,
             @PathVariable Integer state,
             @RequestBody FlowCard flowCard){
-        return Result.seccess(flowCardService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard));
+        return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard));
 
     }
+    //娴佺▼鍗℃槑缁嗘煡璇�
+    @ApiOperation("娴佺▼鍗℃槑缁嗘煡璇㈡帴鍙�")
+    @PostMapping  ("/flowCardDetail/{processId}")
+    public Result flowCardDetail(
+            @PathVariable String processId,
+            @RequestBody FlowCard flowCard){
+        return Result.seccess(flowCardService.flowCardDetailSv(processId,flowCard));
 
+    }
 }

--
Gitblit v1.8.0