From b253ddd53f9073f944983dff1e6800abff1413e2 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期三, 03 七月 2024 11:24:35 +0800
Subject: [PATCH] some debug

---
 pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java |   98 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 94 insertions(+), 4 deletions(-)

diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
index 7fd51c1..19e17db 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
@@ -3,9 +3,10 @@
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.pmsGlobal.pojoBa.BaUser;
-import com.dy.pmsGlobal.pojoPlt.PltProductionLine;
+import com.dy.pmsGlobal.pojoPlt.PltProduct;
 import com.dy.pmsGlobal.pojoPlt.PltStation;
 import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
+import com.dy.pmsGlobal.pojoPr.PrProductionNode;
 import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
 import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
@@ -47,6 +48,16 @@
         return BaseResponseUtils.buildSuccess(stationInfo);
     }
     /**
+     * 鏌ヨ宸ョ珯鏄惁宸茬粡琚崰鐢�
+     * @param
+     * @return
+     */
+    @GetMapping(path="checkStationUsed")
+    public BaseResponse<StaAssemblyWorkLast> checkStationUsed(String stationId){
+        StaAssemblyWorkLast stationInfo  = sv.checkStationUsed(stationId);
+        return BaseResponseUtils.buildSuccess(stationInfo);
+    }
+    /**
      * 鏌ヨ鍏ㄩ儴鎵ц涓殑缁勮浠诲姟娓呭崟
      * @param
      * @return
@@ -71,20 +82,99 @@
         return BaseResponseUtils.buildSuccess(list);
     }*/
     /**
-     * 鏌ヨ鍏ㄩ儴鎵ц涓殑缁勮浠诲姟娓呭崟
+     * 淇濆瓨鐧诲綍淇℃伅
      * @param
      * @return
      */
     @PostMapping(path="save")
-    public BaseResponse<Boolean> save(@RequestBody @Valid QueryVo last){
-        int count = sv.save(last);
+    public BaseResponse<StaAssemblyWorkLast> save(@RequestBody @Valid QueryVo last){
+        StaAssemblyWorkLast result = sv.save(last);
+        return BaseResponseUtils.buildSuccess(result);
+    }
+
+    /**
+     * 淇濆瓨鐧诲嚭淇℃伅
+     * @param
+     * @return
+     */
+    @PostMapping(path="logout")
+    public BaseResponse<Boolean> logout(String id){
+        int count = sv.logout(id);
         if (count <= 0) {
             return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
         } else {
             return BaseResponseUtils.buildSuccess(true);
         }
     }
+    /**
+     * 娣诲姞鍗曚釜杈呭姪浜哄憳
+     * @param
+     * @return
+     */
+    @PostMapping(path="addAssistant")
+    public BaseResponse<Boolean> addAssistant(String workId ,String assistant){
+        int  count = sv.addAssistant(workId,assistant);
+        if (count <= 0) {
+            return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+        } else {
+            return BaseResponseUtils.buildSuccess(true);
+        }
+    }
+    /**
+     * 鍒犻櫎鍗曚釜杈呭姪浜哄憳
+     * @param
+     * @return
+     */
+    @PostMapping(path="removeAssistant")
+    public BaseResponse<Boolean> removeAssistant(String workId ,String assistant){
+        int  count = sv.removeAssistant(workId,assistant);
+        if (count <= 0) {
+            return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+        } else {
+            return BaseResponseUtils.buildSuccess(true);
+        }
+    }
+    /**
+     * 鏌ヨ杈呭姪浜哄憳淇℃伅琛�
+     * @param
+     * @return
+     */
+    @GetMapping(path="getAssistantList")
+    public BaseResponse<List<BaUser>> getAssistantList(String workId){
+        List<BaUser> result = sv.getAssistantList(workId);
+        return BaseResponseUtils.buildSuccess(result);
+    }
 
+    /**
+     * 淇濆瓨鐧诲綍淇℃伅
+     * @param
+     * @return
+     */
+    @PostMapping(path="updateAssistant")
+    public BaseResponse<List<BaUser>> updateAssistant(@RequestBody QueryVo vo){
+        List<BaUser> result = sv.updateAssistant(vo);
+        return BaseResponseUtils.buildSuccess(result);
+    }
+    /**
+     * 鏍规嵁鑺傜偣鐨勬煡鍑鸿妭鐐逛綔涓氭寚瀵间功
+     * @param
+     * @return
+     */
+    @GetMapping(path="getSopByNodeId")
+    public BaseResponse<PrProductionNode> getSopByNodeId(String nodeId){
+        PrProductionNode result = sv.getSopByNodeId(nodeId);
+        return BaseResponseUtils.buildSuccess(result);
+    }
+    /**
+     * 鏍规嵁浜у搧鏌ュ嚭浜у搧鏂囦欢 涓昏鎶�鏈弬鏁�
+     * @param
+     * @return
+     */
+    @GetMapping(path="getFileByProId")
+    public BaseResponse<PltProduct> getFileByProId(String proId){
+        PltProduct result = sv.getFileByProId(proId);
+        return BaseResponseUtils.buildSuccess(result);
+    }
     @GetMapping(path = "test")
     public BaseResponse test() {
         log.info("test");

--
Gitblit v1.8.0