From 2bf957a2e0379386934491563f81c90ebceee143 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期五, 26 九月 2025 12:44:05 +0800
Subject: [PATCH] 对接

---
 src/main/java/com/zy/asrs/entity/param/CombParam.java          |    2 
 src/main/java/com/zy/asrs/entity/param/MobileAdjustParam.java  |    5 +
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java  |  197 +++++++++++++++++++++++++-------------
 src/main/java/com/zy/common/model/DetlDto.java                 |    2 
 src/main/java/com/zy/asrs/controller/MobileController.java     |   54 ++++++++--
 src/main/java/com/zy/asrs/entity/param/EmptyPlateOutParam.java |    3 
 src/main/resources/license.lic                                 |    0 
 src/main/java/com/zy/asrs/service/MobileService.java           |    4 
 8 files changed, 186 insertions(+), 81 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index 254b39c..b2ab2ba 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -2,7 +2,6 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.core.annotations.ManagerAuth;
 import com.core.common.BaseRes;
 import com.core.common.Cools;
@@ -16,7 +15,6 @@
 import com.zy.common.model.WrkDto;
 import com.zy.common.service.CommonService;
 import com.zy.common.web.BaseController;
-import com.zy.system.entity.license.AbstractServerInfos;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -24,7 +22,6 @@
 import org.springframework.web.bind.annotation.*;
 
 import java.util.*;
-import java.util.List;
 
 /**
  * 绉诲姩绔帴鍙f帶鍒跺櫒
@@ -64,6 +61,8 @@
     private MatBarcodeService matBarcodeService;
     @Autowired
     private CommonService commonService;
+    @Autowired
+    private WorkService workService;
 
 
     private static Logger logger = LogManager.getLogger(MobileController.class);
@@ -162,7 +161,7 @@
     @RequestMapping("/comb/auth")
     @ManagerAuth(memo = "缁勬墭")
     public R comb(@RequestBody CombParam combParam) {
-        logger.info("缁勬墭鍙傛暟锛歿}",combParam);
+        logger.info("缁勬墭鍙傛暟锛歿}", combParam);
         if (Cools.isEmpty(combParam.getOrderNo())) {
             combParam.setOrderNo(combParam.getBillNo());
         }
@@ -178,10 +177,10 @@
 
     @RequestMapping("/pickIn/auth")
 //    @ManagerAuth(memo="鐩樼偣鍏ュ簱")
-    public R pickIn(@RequestParam String barcode){
+    public R pickIn(@RequestParam String barcode) {
         WrkMast wrkMast = wrkMastService.selectByBarcode(barcode);
         List<PickInParam> param = wrkDetlService.selectDetByBarcode(barcode);
-        for(PickInParam pickInParam : param){
+        for (PickInParam pickInParam : param) {
             pickInParam.setStaNo(wrkMast.getStaNo());
             pickInParam.setWorkNo(wrkMast.getWrkNo());
         }
@@ -496,26 +495,26 @@
     @ManagerAuth(memo = "PDA鍛煎彨鎵樼洏鍑哄簱")
     public R callBarcode(@RequestBody CombParam combParam) {
         logger.info("PDA鍛煎彨鎵樼洏鍑哄簱");
-        if (combParam == null){
+        if (combParam == null) {
             return R.parse(BaseRes.PARAM);
         }
         combParam.getCombMats().forEach(combMat -> {
             Mat mat = matService.selectByMatnr(combMat.getMatnr());
-            if (mat == null){
+            if (mat == null) {
                 throw new CoolException("鍟嗗搧妗f涓嶅瓨鍦�");
             }
             MatBarcode matBarcode = matBarcodeService.selectbyMatnr(combMat.getMatnr());
-            if (matBarcode == null){
+            if (matBarcode == null) {
                 throw new CoolException("璇ョ墿鏂欐湭涓庢墭鐩樼粦瀹�");
             }
-            LocMast locMast=locMastService.selectByBarcode(matBarcode.getZpallet());
-            if (locMast == null){
+            LocMast locMast = locMastService.selectByBarcode(matBarcode.getZpallet());
+            if (locMast == null) {
                 throw new CoolException("鏈壘鍒颁笌璇ョ墿鏂欑粦瀹氱殑鎵樼洏");
             }
-            int wrkNo=commonService.getWorkNo(0);
+            int wrkNo = commonService.getWorkNo(0);
             Date now = new Date();
             //鐢熸垚宸ヤ綔妗�
-            WrkMast wrkMast=new WrkMast();
+            WrkMast wrkMast = new WrkMast();
             wrkMast.setWrkNo(wrkNo);
             wrkMast.setIoTime(new Date());
             wrkMast.setWrkSts(11L);//宸ヤ綔鐘舵�侊細鐢熸垚鍑哄簱ID
@@ -552,4 +551,33 @@
         });
         return R.ok();
     }
+
+
+    @RequestMapping("/combMeger/auth")
+    @ManagerAuth(memo = "骞舵澘")
+    public synchronized R adjustNewV2(@RequestBody MobileAdjustParam combParam) {
+        mobileService.adjustNew(combParam, Boolean.TRUE, getUserId());
+        return R.ok("骞舵澘鎴愬姛");
+    }
+
+    @RequestMapping("/empty/plate/out/start")
+    @ManagerAuth(memo = "绌烘澘鍑哄簱")
+    public R emptyPlateOutStart(EmptyPlateOutParam param) {
+        List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("loc_type1", param.getType()).in("row1", 2, 3));
+        if (locMasts == null || locMasts.isEmpty()) {
+            locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("loc_type1", param.getType()).in("row1", 1, 4));
+        }
+        if (locMasts == null || locMasts.isEmpty()){
+            return R.error("鏃犵┖鏉垮簱浣�");
+        }
+        param.setOutSite(1103);
+        List<String> locNos = param.getLocNos();
+        if (locNos == null){
+            locNos = new ArrayList<>();
+        }
+        locNos.add(locMasts.get(0).getLocNo());
+        param.setLocNos(locNos);
+        workService.emptyPlateOut(param, getUserId());
+        return R.ok("鍑哄簱鍚姩鎴愬姛");
+    }
 }
diff --git a/src/main/java/com/zy/asrs/entity/param/CombParam.java b/src/main/java/com/zy/asrs/entity/param/CombParam.java
index 31e1b42..1422edb 100644
--- a/src/main/java/com/zy/asrs/entity/param/CombParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/CombParam.java
@@ -57,6 +57,8 @@
 
         private String outOrderNo;
 
+        private String memo;
+
     }
 
 }
diff --git a/src/main/java/com/zy/asrs/entity/param/EmptyPlateOutParam.java b/src/main/java/com/zy/asrs/entity/param/EmptyPlateOutParam.java
index b226ce2..f9fde9c 100644
--- a/src/main/java/com/zy/asrs/entity/param/EmptyPlateOutParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/EmptyPlateOutParam.java
@@ -13,6 +13,9 @@
     // 鍑虹珯鍙�
     private Integer outSite;
 
+    //
+    private Integer type;
+
     // 鍟嗗搧id
     private Integer matId;
 
diff --git a/src/main/java/com/zy/asrs/entity/param/MobileAdjustParam.java b/src/main/java/com/zy/asrs/entity/param/MobileAdjustParam.java
index 87f9c6f..8c5cce9 100644
--- a/src/main/java/com/zy/asrs/entity/param/MobileAdjustParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/MobileAdjustParam.java
@@ -15,6 +15,11 @@
 
     private Integer wrkNo;
 
+    private String barcode;
+
+
     private List<WrkDetl> wrkDetls;
 
+    private List<CombParam.CombMat> combMats;
+
 }
diff --git a/src/main/java/com/zy/asrs/service/MobileService.java b/src/main/java/com/zy/asrs/service/MobileService.java
index 3b13e61..8871512 100644
--- a/src/main/java/com/zy/asrs/service/MobileService.java
+++ b/src/main/java/com/zy/asrs/service/MobileService.java
@@ -38,4 +38,8 @@
 
     void stockOut(OrderDetl orderDetl, BasDevp staNo, LocDetl locDetl,
                   Double curOutQty, Integer ioType, Long userId, Date now);
+
+
+    void adjustNew(MobileAdjustParam param, Boolean re, Long userId);
+
 }
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 581552b..59f0af9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -73,6 +73,8 @@
     private ManLocDetlMapper manLocDetlMapper;
     @Autowired
     private MatBarcodeService matBarcodeService;
+    @Autowired
+    private AdjDetlService adjDetlService;
 
 
     @Override
@@ -112,7 +114,8 @@
             // 鐢熸垚鍏ュ簱閫氱煡妗�
             List<DetlDto> detlDtos = new ArrayList<>();
             param.getCombMats().forEach(elem -> {
-                DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getProType(),elem.getTemp2(),elem.getOutOrderNo());
+                DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getProType(), elem.getTemp2(), elem.getOutOrderNo());
+                detlDto.setMemo(detlDto.getMemo());
                 if (DetlDto.has(detlDtos, detlDto)) {
                     DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
                     assert one != null;
@@ -130,10 +133,10 @@
                 }
                 //鏍¢獙褰撳墠鐗╂枡涓庢墭鐩樼粦瀹氫俊鎭槸鍚︽纭�
                 MatBarcode matBarcode = new MatBarcode();
-                MatBarcode mb=matBarcodeService.selectbyMatnr(detlDto.getMatnr());
-                if (mb != null && !mb.getZpallet().equals(param.getBarcode())){
-                    throw new CoolException(detlDto.getMatnr()+"璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛岃鍏堣В缁�");
-                }else{
+                MatBarcode mb = matBarcodeService.selectbyMatnr(detlDto.getMatnr());
+                if (mb != null && !mb.getZpallet().equals(param.getBarcode())) {
+                    throw new CoolException(detlDto.getMatnr() + "璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛岃鍏堣В缁�");
+                } else {
                     matBarcode.setZpallet(param.getBarcode());//鎵樼洏鐮�
                     matBarcode.setMatnr(mat.getMatnr());//鐗╂枡鍙�
                     matBarcode.setMaktx(mat.getMaktx());//鐗╂枡鍚嶇О
@@ -154,80 +157,81 @@
                 waitPakin.setAppeTime(now);
                 waitPakin.setModiUser(userId);
                 waitPakin.setModiTime(now);
+                waitPakin.setMemo(detlDto.getMemo());
                 if (!waitPakinService.insert(waitPakin)) {
                     throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
                 }
-                if (!matBarcodeService.insert(matBarcode)){
+                if (!matBarcodeService.insert(matBarcode)) {
                     throw new CoolException("鐗╂枡涓庢墭鐩樼粦瀹氬け璐�");
                 }
             }
             // 鍏宠仈缁勬墭
         } else {
 
-                Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", param.getOrderNo()));
-                if (Cools.isEmpty(order) || order.getSettle() > 2) {
-                    throw new CoolException("鍗曟嵁缂栧彿宸茶繃鏈�");
+            Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", param.getOrderNo()));
+            if (Cools.isEmpty(order) || order.getSettle() > 2) {
+                throw new CoolException("鍗曟嵁缂栧彿宸茶繃鏈�");
+            }
+            // 鐢熸垚鍏ュ簱閫氱煡妗�
+            List<DetlDto> detlDtos = new ArrayList<>();
+            param.getCombMats().forEach(elem -> {
+
+                // 璁㈠崟鏄庣粏鏁伴噺鏍¢獙
+                //OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch(),elem.getAnfme() );
+                OrderDetl orderDetl = orderDetlService.selectById(elem.getDetlId());
+                if (elem.getAnfme() > orderDetl.getEnableQty()) {
+                    throw new CoolException(orderDetl.getMatnr() + "鍏ュ簱鏁伴噺涓嶅悎娉�");
                 }
-                // 鐢熸垚鍏ュ簱閫氱煡妗�
-                List<DetlDto> detlDtos = new ArrayList<>();
-                param.getCombMats().forEach(elem -> {
+                // 淇敼璁㈠崟浣滀笟鏁伴噺
+                if (!orderDetlService.increaseWorkQty(orderDetl, elem.getAnfme())) {
+                    throw new CoolException("淇敼鍗曟嵁浣滀笟鏁伴噺澶辫触");
+                }
 
-                    // 璁㈠崟鏄庣粏鏁伴噺鏍¢獙
-                    //OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch(),elem.getAnfme() );
-                    OrderDetl orderDetl = orderDetlService.selectById(elem.getDetlId());
-                    if (elem.getAnfme() > orderDetl.getEnableQty()) {
-                        throw new CoolException(orderDetl.getMatnr() + "鍏ュ簱鏁伴噺涓嶅悎娉�");
-                    }
-                    // 淇敼璁㈠崟浣滀笟鏁伴噺
-                    if (!orderDetlService.increaseWorkQty(orderDetl, elem.getAnfme())) {
-                        throw new CoolException("淇敼鍗曟嵁浣滀笟鏁伴噺澶辫触");
-                    }
+                Mat mat = matService.selectByMatnr(orderDetl.getMatnr());
+                if (Cools.isEmpty(mat)) {
+                    throw new CoolException(orderDetl.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
+                }
+                //鏍¢獙褰撳墠鐗╂枡涓庢墭鐩樼粦瀹氫俊鎭槸鍚︽纭�
+                MatBarcode matBarcode = new MatBarcode();
+                MatBarcode mb = matBarcodeService.selectbyMatnr(orderDetl.getMatnr());
+                if (mb != null && !mb.getZpallet().equals(param.getBarcode())) {
+                    throw new CoolException(orderDetl.getMatnr() + "璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛岃鍏堣В缁�");
+                } else {
+                    matBarcode.setZpallet(param.getBarcode());//鎵樼洏鐮�
+                    matBarcode.setMatnr(mat.getMatnr());//鐗╂枡鍙�
+                    matBarcode.setMaktx(mat.getMaktx());//鐗╂枡鍚嶇О
+                    matBarcode.setSpecs(mat.getSpecs());//瑙勬牸
+                    matBarcode.setModel(mat.getModel());//鍨嬪彿
+                }
+                WaitPakin waitPakin = new WaitPakin();
+                waitPakin.sync(mat);
+                waitPakin.setOrderNo(order.getOrderNo());   // 鍗曟嵁缂栧彿
+                waitPakin.setBatch(orderDetl.getBatch());     // 搴忓垪鐮�
+                waitPakin.setZpallet(param.getBarcode());   // 鎵樼洏鐮�
+                waitPakin.setIoStatus("N");     // 鍏ュ嚭鐘舵��
+                waitPakin.setAnfme(elem.getAnfme());  // 鏁伴噺
+                waitPakin.setStatus("Y");    // 鐘舵��
+                waitPakin.setAppeUser(userId);
+                waitPakin.setAppeTime(now);
+                waitPakin.setModiUser(userId);
+                waitPakin.setModiTime(now);
 
-                    Mat mat = matService.selectByMatnr(orderDetl.getMatnr());
-                    if (Cools.isEmpty(mat)) {
-                        throw new CoolException(orderDetl.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
-                    }
-                    //鏍¢獙褰撳墠鐗╂枡涓庢墭鐩樼粦瀹氫俊鎭槸鍚︽纭�
-                    MatBarcode matBarcode = new MatBarcode();
-                    MatBarcode mb=matBarcodeService.selectbyMatnr(orderDetl.getMatnr());
-                    if (mb != null && !mb.getZpallet().equals(param.getBarcode())){
-                        throw new CoolException(orderDetl.getMatnr()+"璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛岃鍏堣В缁�");
-                    }else{
-                        matBarcode.setZpallet(param.getBarcode());//鎵樼洏鐮�
-                        matBarcode.setMatnr(mat.getMatnr());//鐗╂枡鍙�
-                        matBarcode.setMaktx(mat.getMaktx());//鐗╂枡鍚嶇О
-                        matBarcode.setSpecs(mat.getSpecs());//瑙勬牸
-                        matBarcode.setModel(mat.getModel());//鍨嬪彿
-                    }
-                    WaitPakin waitPakin = new WaitPakin();
-                    waitPakin.sync(mat);
-                    waitPakin.setOrderNo(order.getOrderNo());   // 鍗曟嵁缂栧彿
-                    waitPakin.setBatch(orderDetl.getBatch());     // 搴忓垪鐮�
-                    waitPakin.setZpallet(param.getBarcode());   // 鎵樼洏鐮�
-                    waitPakin.setIoStatus("N");     // 鍏ュ嚭鐘舵��
-                    waitPakin.setAnfme(elem.getAnfme());  // 鏁伴噺
-                    waitPakin.setStatus("Y");    // 鐘舵��
-                    waitPakin.setAppeUser(userId);
-                    waitPakin.setAppeTime(now);
-                    waitPakin.setModiUser(userId);
-                    waitPakin.setModiTime(now);
+                waitPakin.setBatch(orderDetl.getBatch());
+                waitPakin.setSPgNO(orderDetl.getSPgNO());
+                waitPakin.setOutOrderNo(orderDetl.getOutOrderNo());
+                waitPakin.setProType(orderDetl.getProType());
+                waitPakin.setLuHao(orderDetl.getLuHao());
+                waitPakin.setPacking(orderDetl.getPacking());
+                if (!waitPakinService.insert(waitPakin)) {
+                    throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
+                }
+                if (!matBarcodeService.insert(matBarcode)) {
+                    throw new CoolException("鐗╂枡涓庢墭鐩樼粦瀹氬け璐�");
+                }
+            });
 
-                    waitPakin.setBatch(orderDetl.getBatch());
-                    waitPakin.setSPgNO(orderDetl.getSPgNO());
-                    waitPakin.setOutOrderNo(orderDetl.getOutOrderNo());
-                    waitPakin.setProType(orderDetl.getProType());
-                    waitPakin.setLuHao(orderDetl.getLuHao());
-                    waitPakin.setPacking(orderDetl.getPacking());
-                    if (!waitPakinService.insert(waitPakin)) {
-                        throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
-                    }
-                    if (!matBarcodeService.insert(matBarcode)){
-                        throw new CoolException("鐗╂枡涓庢墭鐩樼粦瀹氬け璐�");
-                    }
-                });
-
-                orderService.updateSettle(order.getId(), 2L, userId);
-          }
+            orderService.updateSettle(order.getId(), 2L, userId);
+        }
 
     }
 
@@ -401,7 +405,8 @@
 //                Mat analyse = MatUtils.analyseMat(elem.getMatnr());
 //                // 鏉$爜銆佺墿鏂欎唬鐮併�佸簭鍒楀彿銆佹暟閲�
 //                DetlDto detlDto = new DetlDto(elem.getMatnr(), analyse.getMatnr(), analyse.getBarcode(), elem.getAnfme());
-////                DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+
+    /// /                DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
 //                if (DetlDto.has(detlDtos, detlDto)) {
 //                    DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
 //                    assert one != null;
@@ -526,7 +531,6 @@
 //
 //        }
 //    }
-
     @Override
     @Transactional
     public void pakoutByOrder(JSONObject param, Long userId) {
@@ -665,4 +669,61 @@
             throw new CoolException(locDetl.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
         }
     }
+
+
+    @Override
+    @Transactional
+    public void adjustNew(MobileAdjustParam param, Boolean re, Long userId) {
+        WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", param.getBarcode()));
+        if (Cools.isEmpty(wrkMast)) {
+            throw new CoolException("鎵樼洏鐮�:" + param.getBarcode() + " 鏃犳湁鏁堝伐浣滄。");
+        }
+
+
+        List<CombParam.CombMat> combMats = param.getCombMats();
+        String recordRecordLog = "鎵樼洏鐮�" + param.getBarcode() + "鐩樼偣璁板綍锛�";
+        AdjDetl adjDetl = new AdjDetl();
+        adjDetl.setAppeTime(new Date());
+        adjDetl.setAppeUser(userId);
+        adjDetl.setModiTime(new Date());
+        adjDetl.setModiUser(userId);
+        adjDetl.setLocNo(wrkMast.getSourceLocNo());
+
+        for (CombParam.CombMat wrkDetl : combMats) {
+            WrkDetl wrkDetlOld = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>()
+                            .eq("wrk_no", wrkMast.getWrkNo())
+                            .eq("matnr", wrkDetl.getMatnr())
+//                    .eq("batch",Cools.isEmpty(wrkDetl.getBatch())?"":wrkDetl.getBatch())
+            );
+
+
+            adjDetl.setMatnr(wrkDetl.getMatnr());
+            adjDetl.setBatch(wrkDetl.getBatch());
+            adjDetl.setAdjQty(wrkDetl.getAnfme());
+
+            if (Cools.isEmpty(wrkDetlOld)) {
+                WrkDetl detl = new WrkDetl();
+                detl.sync(wrkDetl);
+                detl.setWrkNo(wrkMast.getWrkNo());
+                detl.setZpallet(wrkMast.getBarcode());
+                wrkDetlService.insert(detl);
+                recordRecordLog = recordRecordLog + "\n" + "鏂板涓�鏉℃槑缁�:" + "\t鍟嗗搧缂栧彿锛�" + wrkDetl.getMatnr() + "\t鎵瑰彿锛�" + wrkDetl.getBatch() + "\t鏁伴噺锛�" + wrkDetl.getAnfme();
+                adjDetl.setOriQty(0.0);
+                adjDetlService.insert(adjDetl);
+
+            } else if (wrkDetlOld.getAnfme() != wrkDetl.getAnfme()) {
+                wrkDetlService.updateAnfme(wrkDetl.getAnfme(), wrkMast.getWrkNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
+                recordRecordLog = recordRecordLog + "\n" + "鏇存柊涓�鏉℃槑缁�:" + "\t鍟嗗搧缂栧彿锛�" + wrkDetl.getMatnr() + "\t鎵瑰彿锛�" + wrkDetl.getBatch() + "\t鍘熸暟閲忥細" + wrkDetlOld.getAnfme() + "\t鏂版暟閲忥細" + wrkDetl.getAnfme();
+                adjDetl.setOriQty(wrkDetlOld.getAnfme());
+                adjDetlService.insert(adjDetl);
+
+            } else if (wrkDetlOld.getAnfme() == wrkDetl.getAnfme()) {
+                recordRecordLog = recordRecordLog + "\n" + "涓�鏉℃槑缁嗕繚鎸佷笉鍙�:" + "\t鍟嗗搧缂栧彿锛�" + wrkDetl.getMatnr() + "\t鎵瑰彿锛�" + wrkDetl.getBatch() + "\t鏁伴噺锛�" + wrkDetlOld.getAnfme();
+                continue;
+            } else {
+                throw new CoolException("鎵樼洏鐮�:" + param.getBarcode() + " 鏈煡寮傚父锛岃鑱旂郴绠$悊鍛�");
+            }
+        }
+        log.info(recordRecordLog);
+    }
 }
diff --git a/src/main/java/com/zy/common/model/DetlDto.java b/src/main/java/com/zy/common/model/DetlDto.java
index 7389760..e45b5e7 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -26,6 +26,8 @@
 
     private String outOrderNo;
 
+    private String memo;
+
     public DetlDto() {
     }
 
diff --git a/src/main/resources/license.lic b/src/main/resources/license.lic
index 5bef4bc..ded14f3 100644
--- a/src/main/resources/license.lic
+++ b/src/main/resources/license.lic
Binary files differ

--
Gitblit v1.9.1