From 3954c28bb43412328694afd56bbf3946be60749a Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 19 六月 2025 13:35:14 +0800
Subject: [PATCH] #订单导入等界面功能修改

---
 src/main/java/com/zy/asrs/controller/OutController.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OutController.java b/src/main/java/com/zy/asrs/controller/OutController.java
index b3fb092..3cd93bf 100644
--- a/src/main/java/com/zy/asrs/controller/OutController.java
+++ b/src/main/java/com/zy/asrs/controller/OutController.java
@@ -100,8 +100,9 @@
                     locDto.setLocNo(locDetls.get(0).getLocNo());
 //                    wrkDetl.setMatnr(roll.getSpecs()); // 瑙勬牸
 //                    wrkDetl.setMaktx(roll.getSpecs()); //瑙勬牸
-//                    locDto.setBatch(locDetl.getBatch()); // 绠卞彿
-//                    locDto.setModel(locDetl.getModel()); // 鍗峰彿
+                    locDto.setUnit(locDetls.get(0).getUnit()); // 绠卞彿
+                    locDto.setModel(locDetls.get(0).getModel()); // 鍗峰彿
+                    locDto.setThreeCode(locDetls.get(0).getThreeCode());
                     locDto.setBrand(orderDetl.getBrand()); // 鍖呰缁勫彿
 //                    locDto.setOrigin(locDetl.getOrigin()); // 鏈ㄧ鍦ㄦ墭鐩樹綅缃�
 //                    locDto.setWeight(locDetl.getWeight()); // 鍑�閲�
@@ -251,7 +252,12 @@
             for (StockOutParam.LocDetl paramLocDetl : stockOutParam.getLocDetls()) {
                 LocDetl one = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no",paramLocDetl.getLocNo())
                         .eq("brand",paramLocDetl.getBrand()).eq("model",paramLocDetl.getModel()));
-                if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(), stockOutParam.getOrderNo()));
+                if (null != one) {
+                    if(!"鍚堟牸".equals(one.getThreeCode())) {
+                        throw new CoolException(one.getModel() + "鍗蜂笉鍚堟牸:" + one.getThreeCode() );
+                    }
+                    locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(), stockOutParam.getOrderNo()));
+                }
             }
             if (!locDetlDtos.isEmpty()) {
                 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetlDtos.get(0).getLocDetl().getLocNo()));
@@ -260,7 +266,7 @@
                     Order order = orderService.selectByNo(stockOutParam.getOrderNo());
 
                     // 鍚姩鍑哄簱寮�濮�
-                    workService.stockOut(staNo, locDetlDtos, order.getDocType() ==  22 ? IoWorkType.CHECK_OUT : null, getUserId());
+                    workService.stockOut(staNo, locDetlDtos, order.getDocType() ==  23 ? IoWorkType.CHECK_OUT : null, getUserId());
                 }else {
                     throw new CoolException("鎵�閫夊簱浣嶅瓨鍦ㄧ姸鎬佷笉涓篎銆丏鐨勫簱浣嶏紝搴撲綅鍙凤細"+locMast.getLocNo()+" 銆佸綋鍓嶇姸鎬侊細"+locMast.getLocSts()+"-"+locMast.getLocSts$());
                 }

--
Gitblit v1.9.1