From 736d5e19b01e116d551d47e3782234ca3b62f0b4 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 01 四月 2024 19:35:08 +0800
Subject: [PATCH] 拣料出库任务号变更

---
 src/main/java/com/zy/asrs/controller/OrderController.java        |   44 ++++++++++------------
 src/main/webapp/static/js/mat/mat.js                             |    6 +-
 src/main/webapp/static/js/order/order.js                         |   16 ++++----
 src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java |    3 +
 src/main/webapp/static/js/common.js                              |   12 +++---
 src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java           |    2 
 src/main/webapp/views/order/order.html                           |    2 
 7 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OrderController.java b/src/main/java/com/zy/asrs/controller/OrderController.java
index 7db8719..3caedd3 100644
--- a/src/main/java/com/zy/asrs/controller/OrderController.java
+++ b/src/main/java/com/zy/asrs/controller/OrderController.java
@@ -439,43 +439,37 @@
         DataFormatter dataFormatter = new DataFormatter();
         for (int i = 1; i < totalRows; i++) {
             Row row = sheet.getRow(i);
-            // 璁㈠崟缂栧彿
-            String uuid = dataFormatter.formatCellValue(row.getCell(0));
-            // 鐗╂枡鍙�
-            String maktx = dataFormatter.formatCellValue(row.getCell(1));
-            // 鐗╂枡鍙�
+            //鍗曟嵁绫诲瀷
+            String docName =  dataFormatter.formatCellValue(row.getCell(0));
+            //鍗曟嵁缂栧彿
+            String uuid = dataFormatter.formatCellValue(row.getCell(1));
+            //鐗╂枡鍙�
             String matnr = dataFormatter.formatCellValue(row.getCell(2));
+            //閿�鍞崟鍙�
+            String csocode = dataFormatter.formatCellValue(row.getCell(3));
+            //鑷敱椤�
+            String isocode = dataFormatter.formatCellValue(row.getCell(4));
             // 鏁伴噺
-            Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(3)));
-            // 涓嬪崟鏃堕棿
-            String timeStr = dataFormatter.formatCellValue(row.getCell(4));
-            // 閿�鍞鍗曞彿
-            String csocode = dataFormatter.formatCellValue(row.getCell(5));
-            // 閿�鍞鍗曡鍙�
-            String isocode = dataFormatter.formatCellValue(row.getCell(6));
-            Date time = null;
-            try {
-                time = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss_F);
-            } catch (Exception e) {
-                throw new CoolException("绗�" + i + "琛屼笅鐨勯偅鏃堕棿瑙f瀽澶辫触锛岃閲嶆柊瀵煎叆锛�");
+            if(Cools.isEmpty(dataFormatter.formatCellValue(row.getCell(5)))){
+                continue;
             }
-            // 鍟嗗搧绯诲垪
-            String tagName = dataFormatter.formatCellValue(row.getCell(5));
-            // 瑙勬牸
-            String specs = dataFormatter.formatCellValue(row.getCell(6));
-
+            Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(5)));
             Mat mat = matService.selectByMatnr(matnr);
             if (null == mat) {
                 throw new CoolException(matnr + "鍟嗗搧缂栫爜鐨勫晢鍝佷笉瀛樺湪锛岃閲嶆柊瀵煎叆锛�");
             }
+
+            //String timeStr = DateUtils.convert(new Date());
+
+            DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_name", docName));
 
             Order order = orderService.selectByNo(uuid);
             if (null == order) {
                 order = new Order(
                         String.valueOf(snowflakeIdWorker.nextId()),    // 缂栧彿[闈炵┖]
                         uuid,    // 璁㈠崟缂栧彿
-                        timeStr,    // 鍗曟嵁鏃ユ湡
-                        14L,    // 鍗曟嵁绫诲瀷
+                        null,    // 鍗曟嵁鏃ユ湡
+                        docType.getDocId(),    // 鍗曟嵁绫诲瀷
                         null,    // 椤圭洰缂栧彿
                         null,    //
                         null,    // 璋冩嫧椤圭洰缂栧彿
@@ -524,6 +518,8 @@
                 orderDetl.setCreateTime(now);
                 orderDetl.setUpdateBy(userId);
                 orderDetl.setUpdateTime(now);
+                orderDetl.setThreeCode(csocode);
+                orderDetl.setDeadTime(isocode);
                 orderDetl.setStatus(1);
                 orderDetl.setQty(0.0D);
                 if (!orderDetlService.insert(orderDetl)) {
diff --git a/src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java b/src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java
index f2aee4b..9397864 100644
--- a/src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java
@@ -24,7 +24,7 @@
     @Select("select station_code from agv_bas_devp where cache_shelves = 'N' and in_enable = 'Y' group by station_code")
     List<String> selectCacheShelvesStationCodeByFloor(@Param("floor") int floor);
 
-    @Select("select dev_no from agv_bas_devp where loc_type1 = #{locType}")
+    @Select("select dev_no from agv_bas_devp where loc_type1 = #{locType} and out_enable = 'Y'")
     List<String> selectCacheShelvesStationCodeByLocType(@Param("locType") Short locType);
 
     @Select("SELECT\n" +
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java b/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
index c2b575b..5a25ca3 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
@@ -169,6 +169,9 @@
 //        //鐩爣浣�
 //        agvTaskParamList.add(new AgvTaskParam(agvWrkMast.getLocNo()));
 
+        if(agvWrkMast.getIoType() == 53 || agvWrkMast.getIoType() == 57 ){
+            agvWrkMast.setWrkNo(-agvWrkMast.getWrkNo());
+        }
         agvTaskCreateParam.setTaskCode(agvWrkMast.getWrkNo().toString());
         agvTaskCreateParam.setTaskTyp("F01");
         agvTaskCreateParam.setPositionCodePath(agvTaskParamList);
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 4bd50f0..3f10237 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -184,18 +184,18 @@
     {field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 180}
     //,{field: 'name', align: 'center',title: '绉诲姩绫诲瀷', hide: true}
     ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 150}
-    ,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: false}
+    ,{field: 'name', align: 'center',title: '鐢熶骇閮ㄩ棬鍚嶇О', hide: false}
     ,{field: 'beBatch$', align: 'center',title: '鐗╂枡棰戠巼', hide: false}
     ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
     // ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: false}
     // ,{field: 'weight', align: 'center',title: '閲嶉噺', hide: false}
     // ,{field: 'units', align: 'center',title: '鏀暟', hide: false}
     // ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
-    ,{field: 'brand', align: 'center',title: '鍟嗗搧鍒嗙被缂栫爜', hide: true}
-    ,{field: 'color', align: 'center',title: '鍟嗗搧鍒嗙被鍚嶇О', hide: true}
-    ,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
-    ,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
-    ,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
+    ,{field: 'brand', align: 'center',title: '瀛樿揣澶х被鍚嶇О', hide: true}
+    ,{field: 'color', align: 'center',title: '鏄惁鍐呴攢', hide: true}
+    ,{field: 'unit', align: 'center',title: '涓昏閲忓崟浣嶅悕绉�', hide: true}
+    ,{field: 'price', align: 'center',title: '杩涢」绋庣巼%', hide: true}
+    ,{field: 'units', align: 'center',title: '閿�椤圭◣鐜�%', hide: true}
     ,{field: 'dsDate', align: 'center',title: '鍚敤鏃ユ湡', hide: true}
     ,{field: 'supp', align: 'center',title: '寤烘。浜�', hide: true}
     ,{field: 'dInvCreateDatetime', align: 'center',title: '寤烘。鏃ユ湡', hide: true}
diff --git a/src/main/webapp/static/js/mat/mat.js b/src/main/webapp/static/js/mat/mat.js
index 6c1723a..5e5b971 100644
--- a/src/main/webapp/static/js/mat/mat.js
+++ b/src/main/webapp/static/js/mat/mat.js
@@ -5,9 +5,9 @@
     var cols = [
         {type: 'checkbox'}
         ,{field: 'tagId$', align: 'center',title: '褰掔被', templet: '#tagTpl'}
-        ,{field: 'storeMax', align: 'center',title: '搴撳瓨涓婇檺',width: 90}
-        ,{field: 'storeMin', align: 'center',title: '搴撳瓨涓嬮檺',width: 90}
-        ,{field: 'storeMaxDate', align: 'center',title: '搴撻緞涓婇檺(澶�)',width: 90}
+        // ,{field: 'storeMax', align: 'center',title: '搴撳瓨涓婇檺',width: 90}
+        // ,{field: 'storeMin', align: 'center',title: '搴撳瓨涓嬮檺',width: 90}
+        // ,{field: 'storeMaxDate', align: 'center',title: '搴撻緞涓婇檺(澶�)',width: 90}
         ,{field: 'status$', align: 'center',title: '鐘舵��'}
     ];
     cols.push.apply(cols, matCols);
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 546c384..c25652e 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -45,9 +45,9 @@
         cols: [[
             {type: 'numbers'},
             {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'},
-            {field: 'itemName', align: 'center', title: '鏍哥畻涓讳綋'},
+            //{field: 'itemName', align: 'center', title: '鏍哥畻涓讳綋'},
             {field: 'docType$', align: 'center', title: '鍗曟嵁绫诲瀷'},
-            {field: 'defNumber', align: 'center', title: '涓氬姟绫诲瀷'},
+            //{field: 'defNumber', align: 'center', title: '涓氬姟绫诲瀷'},
             //{field: 'postFee', align: 'center', title: '鎬绘暟閲�',  minWidth: 130, width: 130},
             {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160},
             {field: 'createTime$', title: '鍒涘缓鏃堕棿'},
@@ -142,7 +142,7 @@
                             {type: 'numbers'},
                             {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
                             {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
-                            {field: 'batch', title: '鎵瑰彿'},
+                            //{field: 'batch', title: '鎵瑰彿'},
                             {field: 'anfme', title: '鏁伴噺'},
                             {field: 'qty', title: '浣滀笟鏁伴噺', style: 'font-weight: bold'},
                             // {field: 'unit', title: '鍗曚綅'},
@@ -153,12 +153,12 @@
                             // },
                             // {field: 'inQty', title: '宸插叆搴撻噺'},
                             // {field: 'color', title: '棰滆壊'},
-                            {field: 'specs', title: '瑙勬牸鍨嬪彿'},
+                            //{field: 'specs', title: '瑙勬牸鍨嬪彿'},
                             {field: 'unit', title: '璁¢噺鍗曚綅'},
-                            {field: 'manu', title: '琛屽彿'},
-                            {field: 'threeCode', title: '閿�鍞鍗曞彿'},
-                            {field: 'deadTime', title: '閿�鍞鍗曡鍙�'},
-                            {field: 'itemNum', title: '琛屽敮涓�鏍囪瘑'}
+                            //{field: 'manu', title: '琛屽彿'},
+                            {field: 'threeCode', title: '閿�鍞崟鍙�'},
+                            {field: 'deadTime', title: '鑷敱椤�'},
+                            //{field: 'itemNum', title: '琛屽敮涓�鏍囪瘑'}
                         ]],
                         request: {
                             pageName: 'curr',
diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html
index 64fc2aa..b46e4f1 100644
--- a/src/main/webapp/views/order/order.html
+++ b/src/main/webapp/views/order/order.html
@@ -84,7 +84,7 @@
                             <i class="layui-icon">&#xe654;</i>娣诲姞
                         </button>
                         <button id="importOrder" class="layui-btn icon-btn btn-add">
-                            <i class="layui-icon layui-icon-upload"></i>&nbsp;瀵煎叆閿�鍞崟
+                            <i class="layui-icon layui-icon-upload"></i>&nbsp;瀵煎叆鍗曟嵁
                         </button>
                         <input style="display:none" id="importExcel" type="file" onchange="upload(this)" >
                     </div>

--
Gitblit v1.9.1