From 7182f72ba4781c620eebdf501ca46b3f69f5585d Mon Sep 17 00:00:00 2001
From: wang..123 <brook_w@163.com>
Date: 星期二, 15 二月 2022 11:11:09 +0800
Subject: [PATCH] 字段添加完成,测试完成

---
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 3753ebd..e604b6d 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -125,7 +125,7 @@
         // 鐢熸垚宸ヤ綔妗f槑缁�
         List<MatCodeCountDto> matDtos = new ArrayList<>();
         param.getList().forEach(elem -> {
-            matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount()));
+            matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount(),elem.getMemo(),elem.getSource(),elem.getVendor()));
         });
         wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId);
         // 鏇存柊婧愮珯鐐逛俊鎭�
@@ -276,6 +276,7 @@
                 wrkDetl.setAppeUser(userId);
                 wrkDetl.setModiTime(new Date());
                 wrkDetl.setModiUser(userId);
+                wrkDetl.setMemo(detlDto.getLocDetl().getMemo());
                 if (!wrkDetlService.insert(wrkDetl)) {
                     throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
                 }
@@ -504,6 +505,7 @@
 
     @Override
     @Transactional
+    //绉诲簱
     public void locMove(String sourceLocNo, String locNo, Long userId) {
         LocMast sourceLoc = locMastService.selectById(sourceLocNo);
         if (Cools.isEmpty(sourceLoc)){
@@ -650,6 +652,7 @@
             LocDetl sqlParam = new LocDetl();
             sqlParam.setLocNo(locMast.getLocNo());
             sqlParam.setMatNo(adjust.getMatNo());
+            sqlParam.setSupplier(adjust.getSupplier());
             LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam));
             // 淇濆瓨鏂板簱瀛樻槑缁�
             if (Cools.isEmpty(one)) {
@@ -661,6 +664,15 @@
                 locDetl.setLocNo(locMast.getLocNo());
                 locDetl.setQty(adjust.getCount()); // 鏁伴噺
                 VersionUtils.setLocDetl(locDetl, matCode); // 鐗堟湰鎺у埗
+
+                if (Cools.isEmpty(adjust.getSupplier())){
+                    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+                    locDetl.setSupplier(sdf.format(new Date()));
+                }else {
+                    locDetl.setSupplier(adjust.getSupplier());
+                }
+
+
                 locDetl.setModiUser(userId); // 鎿嶄綔浜哄憳淇℃伅
                 locDetl.setModiTime(new Date());
                 locDetl.setAppeUser(userId);
@@ -688,11 +700,13 @@
                     } else {
                         LocDetl sqlParam1 = new LocDetl();
                         sqlParam1.setQty(adjust.getCount());
+                        sqlParam1.setSupplier(adjust.getSupplier());
                         sqlParam1.setModiTime(new Date());
                         sqlParam1.setModiUser(userId);
                         if (!locDetlService.update(sqlParam1, new EntityWrapper<LocDetl>()
                                 .eq("loc_no", locMast.getLocNo())
-                                .eq("mat_no", adjust.getMatNo()))) {
+                                .eq("mat_no", adjust.getMatNo())
+                                .eq("supplier",adjust.getSupplier()))) {
                             throw new CoolException("淇敼搴撳瓨鏄庣粏澶辫触");
                         }
                     }

--
Gitblit v1.9.1