From 51ee242a62364a98af86b9bd3b9d191cd75c2f18 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期二, 13 一月 2026 17:29:06 +0800
Subject: [PATCH] no message

---
 src/main/webapp/static/js/pack/pack.js                      |    2 
 src/main/webapp/views/orderPakin/order.html                 |    2 
 src/main/webapp/views/pda/stockIn.html                      |    2 
 src/main/webapp/static/js/taskLog/taskLog.js                |    2 
 src/main/webapp/static/js/saas/locDetl.js                   |    4 +-
 src/main/webapp/views/pda/comb.html                         |    2 
 src/main/webapp/static/js/wrkMast/wrkMast.js                |    2 
 src/main/webapp/views/orderPakout/order.html                |    2 
 src/main/webapp/views/order/order.html                      |    2 
 src/main/webapp/static/js/orderPakout/out.js                |   16 ++++----
 src/main/webapp/static/js/wrkMastLog/wrkMastLog.js          |    2 
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |   54 ++++++++++++++++++++++++++-
 src/main/webapp/static/js/task/task.js                      |    2 
 src/main/webapp/views/taskDetlLog/taskDetlLog.html          |    4 +-
 src/main/webapp/views/pack/pack.html                        |    2 
 15 files changed, 75 insertions(+), 25 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 9dfce08..8e80ad0 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -443,6 +443,54 @@
      * @date 2026/1/9 20:16
      */
     private void generateOutStock(TaskDto taskDto, Long userId, int workNo, String wrkCode, Date now, int ioType, LocMast locMast, StaDesc staDesc, String deviceNo) {
+        if (Objects.isNull(deviceNo)) {
+            throw new CoolException("鏈哄彴鍙蜂笉鑳戒负绌猴紒锛�");
+        }
+        BasDevice basDevice = basDeviceService.selectOne(new EntityWrapper<BasDevice>()
+                .eq("status", 1)
+                .eq("dev_no", deviceNo));
+        if (Objects.isNull(basDevice)) {
+            throw new CoolException("鏈哄彴淇℃伅涓嶅瓨鍦ㄦ垨宸茬鐢紒锛�");
+        }
+
+        List<LocAroundBind> binds = locAroundBindService.selectList( new EntityWrapper<LocAroundBind>()
+                .eq("dev_no", basDevice.getDevNo())
+                .eq("is_default", 1));
+
+        if (Objects.isNull(binds) || binds.isEmpty()) {
+            throw new CoolException("鏈哄彴鏈缃粯璁ゅ伐浣滀綅锛侊紒");
+        }
+
+        Set<String> locs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet());
+
+        LocMast locMasts = locMastService.selectOne(new EntityWrapper<LocMast>()
+                .in("loc_no", locs)
+                .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
+                .orderAsc(Arrays.asList("loc_no"))
+                .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY"));
+
+        if (Objects.isNull(locMasts)) {
+            binds = locAroundBindService.selectList(new EntityWrapper<LocAroundBind>()
+                    .eq("dev_no", basDevice.getDevNo()));
+
+            Set<String> nlocs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet());
+
+            locMasts = locMastService.selectOne(new EntityWrapper<LocMast>()
+                    .in("loc_no", nlocs)
+                    .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
+                    .orderAsc(Arrays.asList("loc_no"))
+                    .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY"));
+            if (Objects.isNull(locMasts)) {
+                throw new CoolException("鏆傛棤鍙敤宸ヤ綔浣嶏紒锛�");
+            }
+        }
+
+        
+
+
+        List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(), 1);
+        //TODO 1. 鑾峰彇鍏ュ簱绔欑偣锛� 鐩爣搴撲綅  3. 灏嗗嚭搴撴槑缁嗘坊鍔犺嚦鍏ュ簱鏄庣粏
+        Integer staNo = staNos.stream().findFirst().get();
         // 鐢熸垚宸ヤ綔妗�
         WrkMast wrkMast = new WrkMast();
         wrkMast.setWrkNo(workNo);
@@ -454,7 +502,9 @@
         wrkMast.setIoPri(13D); // 浼樺厛绾э細13
         wrkMast.setCrnNo(locMast.getCrnNo());
         wrkMast.setSourceStaNo(staDesc.getCrnStn() + ""); // 婧愮珯
-        wrkMast.setStaNo(staDesc.getStnNo() + ""); // 鐩爣绔�
+//        wrkMast.setStaNo(staDesc.getStnNo() + ""); // 鐩爣绔�
+        wrkMast.setStaNo(staNo + ""); // 鐩爣绔�
+        wrkMast.setLocNo(locMasts.getLocNo());
         wrkMast.setSourceLocNo(taskDto.getLocNo()); // 婧愬簱浣�
         wrkMast.setFullPlt("Y"); // 婊℃澘锛歒
         wrkMast.setPicking("N"); // 鎷f枡
@@ -1493,7 +1543,7 @@
             throw new CoolException("褰撳墠鏈哄彴锛屾棤鍙敤宸ヤ綔鍙帮紒锛�");
         }
         int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(1));
-        List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(),1);
+        List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(), 1);
         //TODO 1. 鑾峰彇鍏ュ簱绔欑偣锛� 鐩爣搴撲綅  3. 灏嗗嚭搴撴槑缁嗘坊鍔犺嚦鍏ュ簱鏄庣粏
         Integer staNo = staNos.stream().findFirst().get();
 
diff --git a/src/main/webapp/static/js/orderPakout/out.js b/src/main/webapp/static/js/orderPakout/out.js
index a10a2d3..61fd8e5 100644
--- a/src/main/webapp/static/js/orderPakout/out.js
+++ b/src/main/webapp/static/js/orderPakout/out.js
@@ -159,7 +159,7 @@
                                     // {type: 'checkbox', merge: ['orderNo']},
                                     {field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'},
                                     {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
-                                    // {field: 'standby1', title: '鏈哄彴鍙�', align: 'center'},
+                                    {field: 'standby1', title: '鏈哄彴鍙�', align: 'center'},
                                     {
                                         field: 'anfme',
                                         title: '鏁伴噺',
@@ -182,13 +182,13 @@
                                         width: 90,
                                         templet: '#locFrozenLoc'
                                     },
-                                    {
-                                        field: 'standby1',
-                                        align: 'center',
-                                        title: '鏈哄彴',
-                                        merge: ['deviceNo'],
-                                        templet: '#tbBasicTbStaNos'
-                                    },
+                                    // {
+                                    //     field: 'standby1',
+                                    //     align: 'center',
+                                    //     title: '鏈哄彴',
+                                    //     merge: ['deviceNo'],
+                                    //     templet: '#tbBasicTbStaNos'
+                                    // },
                                     {
                                         field: 'locNo',
                                         align: 'center',
diff --git a/src/main/webapp/static/js/pack/pack.js b/src/main/webapp/static/js/pack/pack.js
index 7236aae..8edd3cf 100644
--- a/src/main/webapp/static/js/pack/pack.js
+++ b/src/main/webapp/static/js/pack/pack.js
@@ -23,7 +23,7 @@
         cols: [[
             {type: 'checkbox'}
             // ,{field: 'id', align: 'center',title: 'ID'}
-            ,{field: 'barcode',title: '鏉$爜'}
+            ,{field: 'barcode',title: 'SN'}
             ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', minWidth: 250, width: 250}
             ,{field: 'batch', align: 'center',title: '鎵瑰彿', hide: true}
             ,{field: 'settle$', align: 'center',title: '鐘舵��', templet: '#settleTpl',  minWidth: 160, width: 160}
diff --git a/src/main/webapp/static/js/saas/locDetl.js b/src/main/webapp/static/js/saas/locDetl.js
index 9bd259e..bb89af7 100644
--- a/src/main/webapp/static/js/saas/locDetl.js
+++ b/src/main/webapp/static/js/saas/locDetl.js
@@ -7,7 +7,7 @@
         ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false, hide: true}
         ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true , hide: true}
         ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-        ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true}
+        ,{field: 'zpallet', align: 'center',title: 'SN', hide: true}
         ,{field: 'specs', align: 'center',title: '閰嶇疆' , hide: true}
         ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
         ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
@@ -16,7 +16,7 @@
         ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
         ,{field: 'sku', align: 'center',title: 'sku', hide: true}
         ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
-        ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+        ,{field: 'barcode', align: 'center',title: 'SN', hide: true}
         ,{field: 'origin', align: 'center',title: '浜у湴', hide: true}
         ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
         ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
diff --git a/src/main/webapp/static/js/task/task.js b/src/main/webapp/static/js/task/task.js
index 6235ea8..e4ae971 100644
--- a/src/main/webapp/static/js/task/task.js
+++ b/src/main/webapp/static/js/task/task.js
@@ -33,7 +33,7 @@
             , {field: 'staNo$', align: 'center', title: '鐩爣绔�', width: 120}
             , {field: 'sourceLocNo', align: 'center', title: '婧愬簱浣�', width: 120}
             , {field: 'locNo', align: 'center', title: '鐩爣搴撲綅', width: 120}
-            , {field: 'barcode', align: 'center', title: '鏉$爜', width: 110}
+            , {field: 'barcode', align: 'center', title: 'SN', width: 110}
             , {field: 'preHave', align: 'center', title: '鍏堝叆鍝�', hide: true}
             , {field: 'takeNone', align: 'center', title: '绌烘搷浣�', hide: true}
             , {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
diff --git a/src/main/webapp/static/js/taskLog/taskLog.js b/src/main/webapp/static/js/taskLog/taskLog.js
index 762510f..91a0c16 100644
--- a/src/main/webapp/static/js/taskLog/taskLog.js
+++ b/src/main/webapp/static/js/taskLog/taskLog.js
@@ -32,7 +32,7 @@
             , {field: 'locNo$', align: 'center', title: '鐩爣搴撲綅'}
             , {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
             , {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
-            , {field: 'barcode', align: 'center', title: '鏉$爜'}
+            , {field: 'barcode', align: 'center', title: 'SN'}
             , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}
         ]],
         request: {
diff --git a/src/main/webapp/static/js/wrkMast/wrkMast.js b/src/main/webapp/static/js/wrkMast/wrkMast.js
index fc14496..f9674da 100644
--- a/src/main/webapp/static/js/wrkMast/wrkMast.js
+++ b/src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -27,7 +27,7 @@
             ,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�', width: 140}
             ,{field: 'ioPri', align: 'center',title: '浼樺厛绾�', width: 95}
             // ,{field: 'taskType$', align: 'center',title: '浠诲姟绫诲瀷', width: 95}
-            ,{field: 'barcode', align: 'center',title: '鏉$爜', width: 120}
+            ,{field: 'barcode', align: 'center',title: 'SN', width: 120}
             ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈�', width: 95}
             ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯', width: 95}
             ,{field: 'staNo$', align: 'center',title: '鐩爣绔�', width: 95}
diff --git a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
index 9f7c461..11ea5a1 100644
--- a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
+++ b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
@@ -59,7 +59,7 @@
             ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true}
             // ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'cursor:pointer'}
             // ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-            ,{field: 'barcode', align: 'center',title: '鏉$爜'}
+            ,{field: 'barcode', align: 'center',title: 'SN'}
             // ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){
             //         var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
             //         if(row.fullPlt === 'Y'){html += " checked ";}
diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html
index 1d80dbc..03ce188 100644
--- a/src/main/webapp/views/order/order.html
+++ b/src/main/webapp/views/order/order.html
@@ -299,7 +299,7 @@
                                 <td style="font-weight: bold">{{ wrkDetl.anfme }}</td>
                             </tr>
                             <tr style="background: none">
-                                <td>鏉$爜锛�</td>
+                                <td>SN锛�</td>
                                 <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td>
                             </tr>
                             {{#  }); }}
diff --git a/src/main/webapp/views/orderPakin/order.html b/src/main/webapp/views/orderPakin/order.html
index 22e7828..6a19c46 100644
--- a/src/main/webapp/views/orderPakin/order.html
+++ b/src/main/webapp/views/orderPakin/order.html
@@ -279,7 +279,7 @@
                                 <td style="font-weight: bold">{{ wrkDetl.anfme }}</td>
                             </tr>
                             <tr style="background: none">
-                                <td>鏉$爜锛�</td>
+                                <td>SN锛�</td>
                                 <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td>
                             </tr>
                             {{#  }); }}
diff --git a/src/main/webapp/views/orderPakout/order.html b/src/main/webapp/views/orderPakout/order.html
index 7584f2e..cdda7da 100644
--- a/src/main/webapp/views/orderPakout/order.html
+++ b/src/main/webapp/views/orderPakout/order.html
@@ -279,7 +279,7 @@
                                 <td style="font-weight: bold">{{ wrkDetl.anfme }}</td>
                             </tr>
                             <tr style="background: none">
-                                <td>鏉$爜锛�</td>
+                                <td>SN锛�</td>
                                 <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td>
                             </tr>
                             {{#  }); }}
diff --git a/src/main/webapp/views/pack/pack.html b/src/main/webapp/views/pack/pack.html
index a0acf45..b377528 100644
--- a/src/main/webapp/views/pack/pack.html
+++ b/src/main/webapp/views/pack/pack.html
@@ -91,7 +91,7 @@
         <div class="layui-row">
             <div class="layui-col-md12">
                 <div class="layui-form-item">
-                    <label class="layui-form-label layui-form-required">鏉$爜: </label>
+                    <label class="layui-form-label layui-form-required">SN: </label>
                     <div class="layui-input-block">
                         <input class="layui-input" name="barcode" placeholder="璇疯緭鍏ユ潯鐮�" lay-vertype="tips" lay-verify="required">
                     </div>
diff --git a/src/main/webapp/views/pda/comb.html b/src/main/webapp/views/pda/comb.html
index 4739ffb..8e3e469 100644
--- a/src/main/webapp/views/pda/comb.html
+++ b/src/main/webapp/views/pda/comb.html
@@ -19,7 +19,7 @@
 <!-- 澶撮儴 -->
 <header>
     <div class="layui-input-inline">
-        <label class="layui-form-label">鏉$爜</label>
+        <label class="layui-form-label">SN</label>
         <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
     </div>
     <div style="margin: 5px 5px">
diff --git a/src/main/webapp/views/pda/stockIn.html b/src/main/webapp/views/pda/stockIn.html
index 9384793..55a6557 100644
--- a/src/main/webapp/views/pda/stockIn.html
+++ b/src/main/webapp/views/pda/stockIn.html
@@ -71,7 +71,7 @@
 <!-- 澶撮儴 -->
 <header>
     <div class="layui-input-inline">
-        <label class="layui-form-label">鏉$爜</label>
+        <label class="layui-form-label">SN</label>
         <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="鎵爜 / 杈撳叆" autocomplete="off">
     </div>
     <div style="margin: 5px 5px" class="layui-form">
diff --git a/src/main/webapp/views/taskDetlLog/taskDetlLog.html b/src/main/webapp/views/taskDetlLog/taskDetlLog.html
index a6efb6b..4099090 100644
--- a/src/main/webapp/views/taskDetlLog/taskDetlLog.html
+++ b/src/main/webapp/views/taskDetlLog/taskDetlLog.html
@@ -91,7 +91,7 @@
                     </div>
                 </div>
                 <div class="layui-form-item">
-                    <label class="layui-form-label">鎵樼洏鏉$爜: </label>
+                    <label class="layui-form-label">SN: </label>
                     <div class="layui-input-block">
                         <input class="layui-input" name="zpallet" placeholder="璇疯緭鍏ユ墭鐩樻潯鐮�">
                     </div>
@@ -169,7 +169,7 @@
                     </div>
                 </div>
                 <div class="layui-form-item">
-                    <label class="layui-form-label">鏉$爜: </label>
+                    <label class="layui-form-label">SN: </label>
                     <div class="layui-input-block">
                         <input class="layui-input" name="barcode" placeholder="璇疯緭鍏ユ潯鐮�">
                     </div>

--
Gitblit v1.9.1