From be26d5065b4a07123638c220c0792e9250a458e6 Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期四, 11 一月 2024 09:41:27 +0800
Subject: [PATCH] 批次上料

---
 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java
index 0db2488..4fff3f5 100644
--- a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java
+++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java
@@ -171,17 +171,20 @@
         List<ProductionOrderBatchInfo> checkLocationCodeList = getCheckLocationCodeList(productionOrderBatchInfoParam);
         ProductionOrderBatchInfo batchInfo = checkLocationCodeList.get(0);
         ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(batchInfo.getId());
-        byId.setSpareField1(productionOrderBatchInfoParam.getSpareField1());
-        if(batchInfo.getState().equals("鏄�")){
-            if(!productionOrderBatchInfoParam.getLoadingCode().equals(batchInfo.getLoadingCode())){
+        byId.setQuantity(productionOrderBatchInfoParam.getQuantity());
+        byId.setResidueQuantity(productionOrderBatchInfoParam.getResidueQuantity());
+        if(batchInfo.getStatus().equals("鏄�")){
+            if(!productionOrderBatchInfoParam.getBatch().equals(batchInfo.getBatch())){
                 return  ResponseData.success("0");
             }else {
-                Integer count1 = Integer.parseInt(productionOrderBatchInfoParam.getSpareField1())+Integer.parseInt(batchInfo.getSpareField1());
-                byId.setSpareField1(count1.toString());
+                Integer count1 = productionOrderBatchInfoParam.getQuantity()+batchInfo.getQuantity();
+                Integer count2 = batchInfo.getResidueQuantity()+productionOrderBatchInfoParam.getResidueQuantity();
+                byId.setQuantity(count1);
+                byId.setResidueQuantity(count2);
             }
         }
-        byId.setState("鏄�");
-        byId.setLoadingCode(productionOrderBatchInfoParam.getLoadingCode());
+        byId.setStatus("鏄�");
+        byId.setBatch(productionOrderBatchInfoParam.getBatch());
         productionOrderBatchInfoService.saveOrUpdate(byId);
         return ResponseData.success("1");
     }
@@ -190,9 +193,10 @@
     @RequestMapping("/resetting")
     public ResponseData resetting(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) {
         ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(productionOrderBatchInfoParam.getId());
-        byId.setState("鍚�");
-        byId.setSpareField1("0");
-        byId.setLoadingCode("");
+        byId.setStatus("鍚�");
+        byId.setQuantity(0);
+        byId.setResidueQuantity(0);
+        byId.setBatch("");
         productionOrderBatchInfoService.saveOrUpdate(byId);
         return ResponseData.success();
     }

--
Gitblit v1.9.3