From a055753d27e82a2cd1371f0241001ab6b8786069 Mon Sep 17 00:00:00 2001
From: zwl <zwl123>
Date: 星期日, 24 九月 2023 16:21:41 +0800
Subject: [PATCH] Changes

---
 src/main/resources/mapper/OrderMapper.xml                      |    2 
 src/main/java/com/zy/asrs/mapper/LocDetlMapper.java            |    1 
 src/main/resources/mapper/LocDetlMapper.xml                    |    5 
 src/main/webapp/views/pakStore/locDetlQuery.html               |   15 
 src/main/java/com/zy/asrs/utils/MesSyncUtil.java               |   21 +
 src/main/java/com/zy/asrs/task/MesPakinScheduler.java          |   31 +
 src/main/webapp/static/js/order/out.js                         |    8 
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java    |    2 
 src/main/webapp/views/index.html                               |    4 
 src/main/java/com/zy/asrs/task/handler/MesMatSyncHandler.java  |  143 +++++++
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java  |   12 
 src/main/java/com/zy/asrs/task/handler/MesPakoutHandler.java   |   37 ++
 src/main/java/com/zy/asrs/task/MesMatSyncScheduler.java        |   35 +
 src/main/webapp/static/js/common.js                            |  120 +++---
 src/main/java/com/zy/asrs/entity/OrderDetl.java                |   22 +
 src/main/java/com/zy/asrs/service/LocDetlService.java          |    2 
 src/main/java/com/zy/asrs/controller/LocDetlController.java    |    9 
 src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java |    5 
 src/main/java/com/zy/asrs/task/OrderSyncScheduler.java         |    2 
 src/main/java/com/zy/asrs/task/MesPakoutScheduler.java         |   34 +
 src/main/webapp/static/js/locDetl/locDetl.js                   |   67 ++-
 /dev/null                                                      |    0 
 src/main/java/com/zy/asrs/entity/DiaphragmInfo.java            |   53 ++
 src/main/webapp/static/image/favicon.ico                       |    0 
 src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java   |  138 +++++++
 src/main/webapp/views/login.html                               |    2 
 src/main/java/com/zy/asrs/entity/MaterialInfo.java             |   50 ++
 src/main/java/com/zy/asrs/task/handler/MesPakinHandler.java    |  209 +++++++++++
 src/main/resources/application.yml                             |   34 +
 src/main/webapp/static/image/logo.png                          |    0 
 30 files changed, 952 insertions(+), 111 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java
index 6eba1f6..c1bd3db 100644
--- a/src/main/java/com/zy/asrs/controller/LocDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -275,4 +275,13 @@
         return R.ok(sum);
     }
 
+    @RequestMapping(value = "/stock/out/list/{locNo}/auth")
+    @ManagerAuth
+    public R stockOutList(@PathVariable("locNo") String locNo){
+        if (Cools.isEmpty(locNo)){
+            return R.error();
+        }
+        return R.ok(locDetlService.selectLocDetl(locNo));
+    }
+
 }
diff --git a/src/main/java/com/zy/asrs/entity/DiaphragmInfo.java b/src/main/java/com/zy/asrs/entity/DiaphragmInfo.java
new file mode 100644
index 0000000..d66d9af
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/DiaphragmInfo.java
@@ -0,0 +1,53 @@
+package com.zy.asrs.entity;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 姝ょ被涓洪殧鑶滃嵎淇℃伅锛岀敤浜庢帴鏀禡ES绯荤粺鎺ュ彛鎻愪緵鐨勯殧鑶滃嵎淇℃伅
+ */
+@Data
+public class DiaphragmInfo {
+
+    //鐢熶骇鎵瑰彿
+    private String batchNo;
+
+    //鐗╂枡缂栫爜
+    private String itemCode;
+
+    //鐗╂枡鍚嶇О
+    private String itemName;
+
+    //鏉″舰鐮�
+    private String barCode;
+
+    //澶у嵎浣嶇疆
+    private String position;
+
+    //灏忓嵎浣嶇疆
+    private String position2;
+
+    //鏁伴噺
+    private BigDecimal quantity;
+
+    //杈呮暟閲�
+    private BigDecimal assQuantity;
+
+    //瑙勬牸/鍨嬪彿
+    private String std;
+
+    //绛夌骇
+    private String grade;
+
+    //澶囨敞
+    private String note;
+
+    //鏀跺嵎寮�濮嬫棩鏈�
+    private Date startDate;
+
+    //鏀跺嵎缁撴潫鏃ユ湡
+    private Date endDate;
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/zy/asrs/entity/MaterialInfo.java b/src/main/java/com/zy/asrs/entity/MaterialInfo.java
new file mode 100644
index 0000000..2674285
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/MaterialInfo.java
@@ -0,0 +1,50 @@
+package com.zy.asrs.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 姝ょ被涓虹墿鏂欐。妗堜俊鎭紝鐢ㄤ簬鎺ユ敹MES绯荤粺鎺ュ彛鎻愪緵鐨勭墿鏂欐。妗堜俊鎭�
+ */
+@Data
+public class MaterialInfo {
+
+    //鏇存柊鏃堕棿
+    private Date mdate;
+
+    //鐗╂枡缂栫爜
+    private String itemCode;
+
+    //鐗╂枡鍚嶇О
+    private String itemName;
+
+    //瑙勬牸
+    private String std;
+
+    //鏉愯川
+    private String material;
+
+    //鍝佺墝
+    private String brand;
+
+    //澶囨敞
+    private String note;
+
+    //涓诲崟浣�
+    private String unitName;
+
+    //杈呭崟浣�
+    private String assUnitName;
+
+    //涓昏緟鍏崇郴
+    private BigDecimal rate;
+
+    //瀹�
+    private BigDecimal width;
+
+    //鍘�
+    private BigDecimal thickness;
+}
diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java
index 311979d..2ad4d0d 100644
--- a/src/main/java/com/zy/asrs/entity/OrderDetl.java
+++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -144,6 +144,12 @@
     private String barcode;
 
     /**
+     * 瀛樺偍闅旇啘绯荤粺涓殧鑶滃嵎淇℃伅鐨勬潯褰㈢爜
+     */
+    @ApiModelProperty(value= "鏉″舰鐮�")
+    private String qrCode;
+
+    /**
      * 浜у湴
      */
     @ApiModelProperty(value= "浜у湴")
@@ -290,6 +296,22 @@
     private Date updateTime;
 
     /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "鏀跺嵎寮�濮嬫棩鏈�")
+    @TableField("start_date")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date startDate;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "鏀跺嵎缁撴潫鏃ユ湡")
+    @TableField("end_date")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date endDate;
+
+    /**
      * 澶囨敞
      */
     @ApiModelProperty(value= "澶囨敞")
diff --git a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
index 771b750..47562db 100644
--- a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -69,4 +69,5 @@
 
     void updateMatTurn(@Param("matnrOld")String matnrOld,@Param("matnr")String matnr);
 
+    List<LocDetl> selectLocDetl(String locNo);
 }
diff --git a/src/main/java/com/zy/asrs/service/LocDetlService.java b/src/main/java/com/zy/asrs/service/LocDetlService.java
index ee17ba1..d19506c 100644
--- a/src/main/java/com/zy/asrs/service/LocDetlService.java
+++ b/src/main/java/com/zy/asrs/service/LocDetlService.java
@@ -57,4 +57,6 @@
     Double getLocDetlSumQty(String locNo);
 
     void updateMatTurn(String matnrOld,String matnr);
+
+    List<LocDetl> selectLocDetl(String locNo);
 }
diff --git a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
index 3880962..c8a5263 100644
--- a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -121,4 +121,9 @@
     public void updateMatTurn(String matnrOld,String matnr){
         this.baseMapper.updateMatTurn(matnrOld,matnr);
     }
+
+    @Override
+    public List<LocDetl> selectLocDetl(String locNo) {
+        return this.baseMapper.selectLocDetl(locNo);
+    }
 }
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 e37ebd6..52b1e21 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -85,9 +85,9 @@
         if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
             throw new CoolException(BaseRes.PARAM);
         }
-        if(param.getCombMats().size()>1){
-            throw new CoolException("璇锋彁鍙栦竴涓晢鍝侊紝鎴栬�呭埛鏂伴噸鏂扮粍鎵橈紒");
-        }
+//        if(param.getCombMats().size()>1){
+//            throw new CoolException("璇锋彁鍙栦竴涓晢鍝侊紝鎴栬�呭埛鏂伴噸鏂扮粍鎵橈紒");
+//        }
         // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
         if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                 eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
@@ -97,9 +97,9 @@
         if(param.getBarcode().length()!=8){
             throw new CoolException("鏉$爜闀垮害涓嶆槸8浣�===>>" + param.getBarcode());
         }
-        if (param.getCombMats().size()>1){
-            throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
-        }
+//        if (param.getCombMats().size()>1){
+//            throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
+//        }
 
         int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
         int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
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 875140f..b0a575b 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -987,7 +987,7 @@
         // 鑾峰彇鐩爣绔�
         Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                 .eq("type_no", wrkMast.getIoType() - 50)
-                .eq("stn_no", wrkMast.getStaNo()) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯
+                .eq("stn_no",wrkMast.getStaNo() ) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯
                 .eq("crn_no", wrkMast.getCrnNo()); // 鍫嗗灈鏈哄彿
         StaDesc staDesc = staDescService.selectOne(wrapper);
         if (Cools.isEmpty(staDesc)) {
diff --git a/src/main/java/com/zy/asrs/task/MesMatSyncScheduler.java b/src/main/java/com/zy/asrs/task/MesMatSyncScheduler.java
new file mode 100644
index 0000000..a0baa3a
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/MesMatSyncScheduler.java
@@ -0,0 +1,35 @@
+package com.zy.asrs.task;
+
+import com.zy.asrs.task.core.ReturnT;
+import com.zy.asrs.task.handler.MesMatSyncHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+
+/**
+ * 杞MES鎺ュ彛锛屽悓姝ョ墿鏂欐。妗堜俊鎭�
+ */
+@Slf4j
+@Component
+public class MesMatSyncScheduler {
+
+    @Autowired
+    MesMatSyncHandler handler;
+
+    //@Scheduled(cron = "0/30 * * * * ?")
+    private void execute() {
+
+        ReturnT<String> result = null;
+        try {
+            result = handler.start();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        if (!result.isSuccess()) {
+            log.error("");
+        }
+    }
+}
diff --git a/src/main/java/com/zy/asrs/task/MesPakinScheduler.java b/src/main/java/com/zy/asrs/task/MesPakinScheduler.java
new file mode 100644
index 0000000..4daa36e
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/MesPakinScheduler.java
@@ -0,0 +1,31 @@
+package com.zy.asrs.task;
+
+import com.zy.asrs.task.core.ReturnT;
+import com.zy.asrs.task.handler.MesPakinHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 杞MES鎺ュ彛锛岀敓鎴愬叆搴撳崟鎹�
+ */
+@Slf4j
+@Component
+public class MesPakinScheduler {
+
+    @Autowired
+    MesPakinHandler handler;
+
+    //@Scheduled(cron = "0/30 * * * * ?")
+    private void execute() {
+
+        ReturnT<String> result = null;
+
+        result = handler.start();
+
+        if (!result.isSuccess()) {
+            log.error("");
+        }
+    }
+
+}
diff --git a/src/main/java/com/zy/asrs/task/MesPakoutScheduler.java b/src/main/java/com/zy/asrs/task/MesPakoutScheduler.java
new file mode 100644
index 0000000..0c37223
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/MesPakoutScheduler.java
@@ -0,0 +1,34 @@
+package com.zy.asrs.task;
+
+import com.zy.asrs.task.core.ReturnT;
+import com.zy.asrs.task.handler.MesPakoutHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+
+/**
+ * 杞MES鎺ュ彛锛岀敓鎴愬嚭搴撳崟鎹�
+ */
+@Slf4j
+@Component
+public class MesPakoutScheduler {
+
+    @Autowired
+    MesPakoutHandler handler;
+
+    //@Scheduled(cron = "0/30 * * * * ?")
+    private void execute() {
+
+        ReturnT<String> result = null;
+        try {
+            result = handler.start();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        if (!result.isSuccess()) {
+            log.error("");
+        }
+    }
+}
diff --git a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
index 61004e9..1b9db5f 100644
--- a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
+++ b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -38,7 +38,7 @@
         }
     }
 
-//    @Scheduled(cron = "0/5 * * * * ? ")
+    //@Scheduled(cron = "0/5 * * * * ? ")
     @Async("orderThreadPool")
     public void completeAndReport(){
         String erpReport = Parameter.get().getErpReport();
diff --git a/src/main/java/com/zy/asrs/task/handler/MesMatSyncHandler.java b/src/main/java/com/zy/asrs/task/handler/MesMatSyncHandler.java
new file mode 100644
index 0000000..152c6d1
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/handler/MesMatSyncHandler.java
@@ -0,0 +1,143 @@
+package com.zy.asrs.task.handler;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.zy.asrs.entity.Mat;
+import com.zy.asrs.entity.MaterialInfo;
+import com.zy.asrs.service.ApiLogService;
+import com.zy.asrs.service.MatService;
+import com.zy.asrs.task.AbstractHandler;
+import com.zy.asrs.task.core.ReturnT;
+import com.zy.asrs.utils.MesSyncUtil;
+import com.zy.common.utils.HttpHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.DigestUtils;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class MesMatSyncHandler extends AbstractHandler<String> {
+
+    @Value("${mes.mat-sync.url}")
+    private String url;
+
+    @Value("${mes.mat-sync.path}")
+    private String path;
+
+    @Autowired
+    private ApiLogService apiLogService;
+
+    @Autowired
+    MatService matService;
+
+    @Transactional
+    public ReturnT<String> start() throws IOException {
+        boolean success = true;
+        log.info("url:" + url + path);
+        JSONObject jsonObject = doGetJsonData();
+
+        int code = jsonObject.getInteger("code");
+
+        if(code == 200){
+            insertOrUpdateMat(jsonObject);
+
+        }else {
+            success = false;
+            log.error("璇锋眰mes鎺ュ彛鍝嶅簲閿欒锛屽搷搴旂爜涓�: " + code);
+        }
+        saveApiLog(jsonObject.toJSONString(),success);
+        return SUCCESS;
+    }
+
+    /*
+    淇濆瓨璇锋眰鏃ュ織
+     */
+    private void saveApiLog(String response, boolean success) {
+        apiLogService.save(
+                "鍟嗗搧淇℃伅鍚屾",
+                url + path,
+                null,
+                "127.0.0.1",
+                null,
+                response,
+                success
+        );
+    }
+
+    /*
+    鍙戣捣涓�涓猟oGet璇锋眰
+     */
+    private JSONObject doGetJsonData() throws IOException {
+
+        return JSON.parseObject( new HttpHandler.Builder()
+                .setUri(url)
+                .setPath(path)
+                .setParams(MesSyncUtil.getRequestParamMap())
+                .build()
+                .doGet());
+    }
+
+    /*
+    鎻掑叆鎴栨洿鏀筸at淇℃伅
+     */
+    private void insertOrUpdateMat(JSONObject jsonObject){
+        List<MaterialInfo> dataList =  JSONObject.parseArray(jsonObject.getString("data"),MaterialInfo.class);
+        //MaterialInfo data = jsonObject.getObject("data",MaterialInfo.class);
+        dataList.forEach(data -> {
+            Mat m = matService.selectByMatnr(data.getItemCode());
+            if(m == null){
+                m = new Mat();
+                m.setCreateTime(jsonObject.getDate("createDate"));
+                matMapping(data,m);
+                matService.insert(m);
+            }else {
+                matMapping(data,m);
+                EntityWrapper<Mat> wrapper = new EntityWrapper<>();
+                wrapper.eq("matnr",m.getMatnr());
+                matService.update(m,wrapper);
+            }
+        });
+    }
+
+    /*
+    鏄犲皠mat鍜岀墿鏂欐。妗堜俊鎭瓧娈�
+     */
+    private void matMapping(MaterialInfo data, Mat m){
+        //淇敼鏃堕棿 -- 鏇存柊鏃堕棿
+        m.setUpdateTime(data.getMdate());
+        //鍟嗗搧缂栫爜 -- 鐗╂枡缂栫爜
+        m.setMatnr(data.getItemCode());
+        //鍟嗗搧鍚嶇О -- 鐗╂枡鍚嶇О
+        m.setMaktx(data.getItemName());
+        //瑙勬牸 -- 瑙勬牸
+        m.setSpecs(data.getStd());
+        //鍨嬪彿 -- 鏉愯川
+        m.setModel(data.getMaterial());
+        //鍝佺墝 -- 鍝佺墝
+        m.setBrand(data.getBrand());
+        //澶囨敞 --澶囨敞
+        m.setMemo(data.getNote());
+        //鍗曚綅 -- 涓诲崟浣�
+        m.setUnit(data.getUnitName());
+        //鍝侀」鏁� -- 杈呭崟浣�
+        m.setItemNum(data.getAssUnitName());
+        //鍗曚綅閲� -- 涓昏緟鍏崇郴
+        m.setUnits(data.getRate() == null ? null : data.getRate().doubleValue());
+        //闀垮害 -- 瀹�
+        m.setLength(data.getWidth() == null ? null : data.getWidth().doubleValue());
+        //浣撶Н -- 鍘�
+        m.setVolume(data.getThickness() == null ? null : data.getThickness().doubleValue());
+
+    }
+}
diff --git a/src/main/java/com/zy/asrs/task/handler/MesPakinHandler.java b/src/main/java/com/zy/asrs/task/handler/MesPakinHandler.java
new file mode 100644
index 0000000..7d68b60
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/handler/MesPakinHandler.java
@@ -0,0 +1,209 @@
+package com.zy.asrs.task.handler;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.core.common.Cools;
+import com.core.common.SnowflakeIdWorker;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.DiaphragmInfo;
+import com.zy.asrs.entity.DocType;
+import com.zy.asrs.entity.Order;
+import com.zy.asrs.entity.OrderDetl;
+import com.zy.asrs.service.ApiLogService;
+import com.zy.asrs.service.DocTypeService;
+import com.zy.asrs.service.OrderDetlService;
+import com.zy.asrs.service.OrderService;
+import com.zy.asrs.task.AbstractHandler;
+import com.zy.asrs.task.core.ReturnT;
+import com.zy.asrs.utils.MesSyncUtil;
+import com.zy.common.constant.MesConstant;
+import com.zy.common.utils.HttpHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Service
+public class MesPakinHandler extends AbstractHandler<String> {
+    @Value("${mes.pakin.url}")
+    private String url;
+
+    @Value("${mes.pakin.path}")
+    private String path;
+
+    @Autowired
+    private DocTypeService docTypeService;
+
+    @Autowired
+    private SnowflakeIdWorker snowflakeIdWorker;
+
+    @Autowired
+    private OrderService orderService;
+
+    @Autowired
+    private ApiLogService apiLogService;
+
+    @Autowired
+    private OrderDetlService orderDetlService;
+
+    @Transactional
+    public ReturnT<String> start() {
+        boolean success = true;
+        log.info("url:" + url + path);
+        JSONObject jsonObject = null;
+        String respone;
+        try {
+            jsonObject = doGetJsonData();
+        } catch (IOException e) {
+            success = false;
+            e.printStackTrace();
+        }
+
+        int code = jsonObject.getInteger("code");
+
+        if(code == 200){
+            JSONObject jsonData = jsonObject.getJSONObject("data");
+            String orderNo = jsonData.getString("orderNo");
+            Order o = insertOrder(jsonData,orderNo);
+            insertOrUpdateOrderDetl(jsonData, o);
+
+        }else {
+            success = false;
+            log.error("璇锋眰mes鎺ュ彛鍝嶅簲閿欒锛屽搷搴旂爜涓�: " + code);
+        }
+        saveApiLog(jsonObject.toJSONString(),success);
+        return SUCCESS;
+    }
+
+    /*
+    淇濆瓨鏃ュ織
+     */
+    private void saveApiLog(String response, boolean success){
+        apiLogService.save(
+                "鐢熸垚鍏ュ簱鍗曟嵁",
+                url + path,
+                null,
+                "127.0.0.1",
+                null,
+                response,
+                success
+        );
+    }
+
+    /*
+    鍙戣捣涓�涓猟oGet璇锋眰
+     */
+    private JSONObject doGetJsonData() throws IOException {
+        return JSON.parseObject( new HttpHandler.Builder()
+                .setUri(url)
+                .setPath(path)
+                .setParams(MesSyncUtil.getRequestParamMap())
+                .build()
+                .doGet());
+    }
+
+    /*
+    鏂板order淇℃伅
+     */
+    private Order insertOrder(JSONObject jsonData, String orderNo){
+        Order o = orderService.selectByNo(orderNo);
+        if (!Cools.isEmpty(o)) {
+            throw new CoolException(jsonData.getString("orderNo") + "鍗曟嵁宸插瓨鍦紝璇峰嬁閲嶅鎻愪氦");
+        }
+
+        o = orderMapping(jsonData);
+        if (!orderService.insert(o)) {
+            throw new CoolException("鐢熸垚鍗曟嵁涓绘。澶辫触锛岃鑱旂郴绠$悊鍛�");
+        }
+        return o;
+    }
+
+    /*
+    鏍规嵁orderNo銆乵atnr銆乥atch锛屾柊澧炴垨鑰呮洿鏀筼rderDetl淇℃伅
+     */
+    private void insertOrUpdateOrderDetl(JSONObject jsonData, Order o){
+        List<DiaphragmInfo> diaphragmInfoList =  JSONObject.parseArray(jsonData.getString("orderDetails"),DiaphragmInfo.class);
+
+        diaphragmInfoList.forEach(d -> {
+            EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>();
+            wrapper.eq("order_no",o.getOrderNo()).eq("matnr",d.getItemCode()).eq("batch",d.getBatchNo());
+            OrderDetl od = orderDetlService.selectOne(wrapper);
+            if(od == null){
+                od = new OrderDetl();
+                od.setOrderNo(o.getOrderNo());
+                od.setOrderId(o.getId());
+                orderDetlMapping(d,od);
+                orderDetlService.insert(od);
+            }else {
+                od.setQty(od.getQty() + d.getQuantity().doubleValue());
+                od.setAnfme(od.getAnfme() + d.getAssQuantity().doubleValue());
+                od.setUpdateTime(new Date());
+                orderDetlService.updateById(od);
+            }
+        });
+    }
+
+    /*
+    鏄犲皠Order绫诲拰jsonData鐨勫瓧娈�
+     */
+    private Order orderMapping(JSONObject jsonData){
+        Order o = new Order();
+        o.setStatus(1);
+        //璁剧疆璁㈠崟鐘舵�� --- 鍒濆鍖栫姸鎬�
+        o.setSettle(0L);
+        //uuid
+        o.setUuid(String.valueOf(snowflakeIdWorker.nextId()));
+        //鍗曟嵁缂栧彿
+        o.setOrderNo(jsonData.getString("orderNo"));
+        //鍗曟嵁鏃堕棿
+        o.setOrderTime(jsonData.getString("orderTime"));
+        //鍗曟嵁绫诲瀷
+        DocType docType = docTypeService.selectOrAdd(jsonData.getString("orderType"), Boolean.TRUE);
+        o.setDocType(docType.getDocId());
+        o.setCreateTime(new Date());
+        o.setUpdateTime(new Date());
+        return o;
+    }
+
+    /*
+    鏄犲皠OrderDetl涓庨殧鑶滀俊鎭被鐨勫瓧娈靛叧绯�
+     */
+    private void orderDetlMapping(DiaphragmInfo d, OrderDetl od){
+        //鎵瑰彿 -- 鐢熶骇鎵瑰彿
+        od.setBatch(d.getBatchNo());
+        //鍟嗗搧缂栫爜 -- 鐗╂枡缂栫爜
+        od.setMatnr(d.getItemCode());
+        //鍟嗗搧鍚嶇О -- 鐗╂枡鍚嶇О
+        od.setMaktx(d.getItemName());
+        //鏁伴噺 -- 鏁伴噺
+        od.setAnfme(d.getQuantity() == null ? null : d.getQuantity().doubleValue());
+        //瀹屾垚鏁伴噺 -- 杈呮暟閲�
+        od.setQty(d.getAssQuantity() == null ? null : d.getAssQuantity().doubleValue());
+        //瑙勬牸 -- 瑙勬牸/鍨嬪彿
+        od.setSpecs(d.getStd());
+        //澶囨敞 -- 澶囨敞
+        od.setMemo(d.getNote());
+        //鏉″舰鐮� -- 鏉″舰鐮�
+        od.setQrCode(d.getBarCode());
+        //棰滆壊 -- 澶у嵎浣嶇疆
+        od.setColor(d.getPosition());
+        //鍨嬪彿 -- 灏忓嵎浣嶇疆
+        od.setModel(d.getPosition2());
+        //鍝佺墝 -- 绛夌骇
+        od.setBrand(d.getGrade());
+        //鏀跺嵎寮�濮嬫棩鏈�
+        od.setStartDate(d.getStartDate());
+        //鏀跺嵎缁撴潫鏃ユ湡
+        od.setEndDate(d.getEndDate());
+
+        od.setCreateTime(new Date());
+        od.setUpdateTime(new Date());
+    }
+}
diff --git a/src/main/java/com/zy/asrs/task/handler/MesPakoutHandler.java b/src/main/java/com/zy/asrs/task/handler/MesPakoutHandler.java
new file mode 100644
index 0000000..96b0484
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/handler/MesPakoutHandler.java
@@ -0,0 +1,37 @@
+package com.zy.asrs.task.handler;
+
+import com.zy.asrs.service.DocTypeService;
+import com.zy.asrs.service.OrderDetlService;
+import com.zy.asrs.service.OrderService;
+import com.zy.asrs.task.AbstractHandler;
+import com.zy.asrs.task.core.ReturnT;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+
+@Slf4j
+@Service
+public class MesPakoutHandler extends AbstractHandler<String> {
+    @Value("${mes.pakin.url}")
+    private String url;
+
+    @Value("${mes.pakin.path}")
+    private String path;
+
+    @Autowired
+    private DocTypeService docTypeService;
+
+    @Autowired
+    private OrderService orderService;
+
+    @Autowired
+    private OrderDetlService orderDetlService;
+
+    public ReturnT<String> start() throws IOException {
+
+        return SUCCESS;
+    }
+}
diff --git a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
index 43b50b1..e79b79a 100644
--- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -5,6 +5,8 @@
 import com.core.common.Cools;
 import com.core.common.DateUtils;
 import com.core.exception.CoolException;
+import com.sun.org.apache.xpath.internal.operations.Or;
+import com.zy.asrs.entity.DiaphragmInfo;
 import com.zy.asrs.entity.DocType;
 import com.zy.asrs.entity.Order;
 import com.zy.asrs.entity.OrderDetl;
@@ -19,12 +21,19 @@
 import com.zy.common.model.MesPakoutParam;
 import com.zy.common.utils.HttpHandler;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * Created by vincent on 2020/7/7
@@ -44,6 +53,18 @@
     @Autowired
     private DocTypeService docTypeService;
 
+    @Value("${mes.pakin-sync.url}")
+    private String pakinUrl;
+
+    @Value("${mes.pakin-sync.path}")
+    private String pakinPath;
+
+    @Value("${mes.pakout-sync.url}")
+    private String pakoutUrl;
+
+    @Value("${mes.pakout-sync.path}")
+    private String pakoutPath;
+
     @Transactional
     public ReturnT<String> start(Order order) {
         DocType docType = docTypeService.selectById(order.getDocType());
@@ -53,6 +74,7 @@
         List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
         // 鍏ュ簱瀹屾垚涓婃姤
         if (docType.getPakin() == 1) {
+            /*
             MesPakinParam pakinParam = new MesPakinParam();
             pakinParam.setPakinTime(DateUtils.convert(order.getUpdateTime()));
             pakinParam.setLgortFrom("5008");
@@ -98,10 +120,13 @@
                             success
                     );
                 } catch (Exception e) { log.error("", e); }
-            }
+            } */
+
+            return orderPakinSync(order,docType.getDocName(),orderDetls);
         }
         // 鍑哄簱瀹屾垚涓婃姤
         if (docType.getPakout() == 1) {
+            /*
             MesPakoutParam pakoutParam = new MesPakoutParam();
             pakoutParam.setTag(!order.getDocType$().equalsIgnoreCase("鎵嬪姩鍑哄簱鍗�"));
             pakoutParam.setPakoutTime(DateUtils.convert(order.getUpdateTime()));
@@ -153,8 +178,119 @@
                     );
                 } catch (Exception e) { log.error("", e); }
             }
+             */
+
+            return orderPakoutSync(order,docType.getDocName(),orderDetls);
         }
         return SUCCESS;
     }
 
+    private  ReturnT<String> orderPakoutSync (Order order, String orderType, List<OrderDetl> orderDetls){
+        Map<String,Object> requestMap = getRequestMap(order,orderType,orderDetls);
+        String response = "";
+        boolean success = false;
+        try {
+            response = new HttpHandler.Builder()
+                    .setUri(pakoutUrl)
+                    .setPath(pakoutPath)
+                    .setJson(JSON.toJSONString(requestMap))
+                    .build()
+                    .doPost();
+            success = orderSettleUpdate(response,order);
+        } catch (Exception e) {
+            log.error("fail", e);
+//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return FAIL.setMsg(e.getMessage());
+        } finally {
+            try {
+                // 淇濆瓨鎺ュ彛鏃ュ織
+                apiLogService.save(
+                        "鎴愬搧搴撳嚭搴撲笂鎶�",
+                        pakoutUrl + pakoutPath,
+                        null,
+                        "127.0.0.1",
+                        JSON.toJSONString(requestMap),
+                        response,
+                        success
+                );
+            } catch (Exception e) { log.error("", e); }
+        }
+
+        return SUCCESS;
+    }
+
+    private  ReturnT<String> orderPakinSync (Order order, String orderType, List<OrderDetl> orderDetls){
+        Map<String,Object> requestMap = getRequestMap(order,orderType,orderDetls);
+
+        String response = "";
+        boolean success = false;
+
+        try {
+            response = new HttpHandler.Builder()
+                    .setUri(pakinUrl)
+                    .setPath(pakinPath)
+                    .setJson(JSON.toJSONString(requestMap))
+                    .build()
+                    .doPost();
+            success = orderSettleUpdate(response,order);
+        } catch (Exception e) {
+            log.error("fail", e);
+//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return FAIL.setMsg(e.getMessage());
+        } finally {
+            try {
+                // 淇濆瓨鎺ュ彛鏃ュ織
+                apiLogService.save(
+                        "鎴愬搧搴撳叆搴撲笂鎶�",
+                        pakinUrl + pakinPath,
+                        null,
+                        "127.0.0.1",
+                        JSON.toJSONString(requestMap),
+                        response,
+                        success
+                );
+            } catch (Exception e) { log.error("", e); }
+        }
+
+        return SUCCESS;
+
+    }
+
+    private Map<String,Object> getRequestMap(Order order,String orderType, List<OrderDetl> orderDetls){
+        Map<String,Object> requestMap = new HashMap<>();
+        requestMap.put("orderNo",order.getOrderNo());
+        requestMap.put("orderTime",order.getOrderTime());
+        requestMap.put("orderType",orderType);
+
+        List<DiaphragmInfo> diaphragmInfoList = orderDetls.stream().map(od -> {
+            DiaphragmInfo diaphragmInfo = new DiaphragmInfo();
+            diaphragmInfo.setBatchNo(od.getBatch());
+            diaphragmInfo.setItemCode(od.getMatnr());
+            diaphragmInfo.setBarCode(od.getQrCode());
+            diaphragmInfo.setQuantity(new BigDecimal(od.getAnfme()));
+            diaphragmInfo.setAssQuantity(new BigDecimal(od.getQty()));
+            return diaphragmInfo;
+        }).collect(Collectors.toList());
+
+        requestMap.put("orderDetails",diaphragmInfoList);
+
+        return requestMap;
+    }
+
+    private boolean orderSettleUpdate(String response, Order order){
+        JSONObject jsonObject = JSON.parseObject(response);
+        if (jsonObject.getInteger("code").equals(200)) {
+            //success = true;
+            // 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
+            if (!orderService.updateSettle(order.getId(), 6L, null)) {
+                throw new CoolException("鏈嶅姟鍣ㄥ唴閮ㄩ敊璇紝璇疯仈绯荤鐞嗗憳");
+            }
+        } else {
+            //log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(requestMap), response);
+            throw new CoolException("涓婃姤mes绯荤粺澶辫触");
+        }
+
+        return true;
+    }
+
 }
diff --git a/src/main/java/com/zy/asrs/utils/MesSyncUtil.java b/src/main/java/com/zy/asrs/utils/MesSyncUtil.java
new file mode 100644
index 0000000..5856a28
--- /dev/null
+++ b/src/main/java/com/zy/asrs/utils/MesSyncUtil.java
@@ -0,0 +1,21 @@
+package com.zy.asrs.utils;
+
+import org.springframework.util.DigestUtils;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+public class MesSyncUtil {
+
+    public static Map<String,Object> getRequestParamMap(){
+        Date date = new Date();
+        String ts = date.getTime() + "";
+        String key = DigestUtils.md5DigestAsHex(("appkey" + ts).getBytes(StandardCharsets.UTF_8));
+        Map<String,Object> requestParamMap = new HashMap<>();
+        requestParamMap.put("ts",ts);
+        requestParamMap.put("key",key);
+        return requestParamMap;
+    }
+}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 218a280..e48e312 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8082
   servlet:
     context-path: /@pom.build.finalName@
 
@@ -10,7 +10,7 @@
     enabled: false
   datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://192.168.4.15:1433;databasename=sxlktasrs
+    url: jdbc:sqlserver://localhost:1433;databasename=sxlktasrs
     username: sa
     password: sa@123
   mvc:
@@ -19,11 +19,18 @@
     host: localhost
     port: 6379
     database: 0
-#    password: xltys1995
+  #    password: xltys1995
   servlet:
     multipart:
       maxFileSize: 100MB
       maxRequestSize: 100MB
+#  rabbitmq:
+#    host: 121.41.63.25 # rabbitMQ鐨刬p鍦板潃
+#    port: 5672 # 绔彛
+#    username: zyx
+#    password: zyx123456
+#    virtual-host: /
+
 
 mybatis-plus:
   mapper-locations: classpath:mapper/*.xml
@@ -42,7 +49,6 @@
   # 鍙屾繁
   doubleDeep: true
   # 鍙屾繁搴撲綅鎺掑彿
-#  doubleLocs: 1,4,11,14,21,24
   doubleLocs: 1,4,5,8,9,12
   # 涓�涓爢鍨涙満璐熻矗鐨勮揣鏋舵帓鏁�
   groupCount: 4
@@ -52,4 +58,22 @@
   doubleLocsRight : 4,8,12
 
 comb:
-  limit: 5000
\ No newline at end of file
+  limit: 5000
+
+mes:
+  mat-sync:
+    url: localhost:8080
+    path: /test/getMat
+  pakin:
+    url: localhost:8080
+    path: /test/getOrder
+  pakout:
+    url: localhost:8080
+    path: /test/getOrder
+  pakin-sync:
+    url: localhost:8080
+    path: /test/syncOrderPakin
+  pakout-sync:
+    url: localhost:8080
+    path: /test/syncOrderPakout
+
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index d41392b..d6bc758 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -336,5 +336,10 @@
         INNER JOIN man_mat b ON a.matnr=#{matnrOld} AND b.matnr=#{matnr};
     </update>
 
+    <select id="selectLocDetl" resultMap="BaseResultMap">
+        select *
+        from asr_loc_detl
+        where loc_no=#{locNo}
+    </select>
 
 </mapper>
diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml
index f704b63..08fee36 100644
--- a/src/main/resources/mapper/OrderMapper.xml
+++ b/src/main/resources/mapper/OrderMapper.xml
@@ -54,7 +54,7 @@
     </update>
 
     <select id="selectComplete" resultMap="BaseResultMap">
-        select top 5 *
+        select top 6 *
         from man_order
         where 1=1
         and settle = 4
diff --git a/src/main/webapp/static/image/favicon.ico b/src/main/webapp/static/image/favicon.ico
index 86d5e0a..5a43759 100644
--- a/src/main/webapp/static/image/favicon.ico
+++ b/src/main/webapp/static/image/favicon.ico
Binary files differ
diff --git a/src/main/webapp/static/image/logo.png b/src/main/webapp/static/image/logo.png
index e2fc662..44ef80b 100644
--- a/src/main/webapp/static/image/logo.png
+++ b/src/main/webapp/static/image/logo.png
Binary files differ
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 9787025..211ab67 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -181,38 +181,38 @@
 }
 
 var matCols = [
-    {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿锛堝搧鍙凤級', width: 180}
+    {field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜', width: 180}
     // {field: 'id', align: 'center',title: 'ID'}
     // ,{field: 'uuid', align: 'center',title: '缂栧彿'}
     // ,{field: 'tagId$', align: 'center',title: '鎵�灞炲綊绫�'}
-    ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О锛堝搧鍚嶏級', width: 200}
+    ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', width: 200}
     // ,{field: 'name', align: 'center',title: '鍒悕'}
     ,{field: 'specs', align: 'center',title: '瑙勬牸'}
-    ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
-    ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
-    ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
-    ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
-    ,{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: 'origin', align: 'center',title: '浜у湴', hide: true}
-    ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
-    ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
-    ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
-    ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
-    ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
-    ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
-    ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
-    ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
-    ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
-    ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
-    ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
-    ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
-    ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
-    ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
-    ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
-    ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+    ,{field: 'model', align: 'center',title: '鏉愯川', hide: true}
+    //,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+    //,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+    ,{field: 'unit', align: 'center',title: '涓诲崟浣�', hide: false}
+    //,{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: 'origin', align: 'center',title: '浜у湴', hide: true}
+    //,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+    //,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
+    ,{field: 'itemNum', align: 'center',title: '杈呭崟浣�', hide: true}
+   // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+   // ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+    ,{field: 'length', align: 'center',title: '瀹�', hide: true}
+    ,{field: 'volume', align: 'center',title: '鍘�', hide: true}
+   // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+   // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+   // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+   // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+   // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+   // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+   // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+   // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+   // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
     // ,{field: 'status$', align: 'center',title: '鐘舵��'}
     // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
     // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
@@ -222,38 +222,42 @@
 ]
 
 var detlCols = [
-    {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿锛堝搧鍙凤級', sort:true}
-    ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О锛堝搧鍚嶏級', sort:true}
+    {field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜', sort:true}
+    ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', sort:true}
     ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
-    ,{field: 'batch', align: 'center',title: '璐у搧鐗瑰緛', sort:true}
-    ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false}
-    ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false}
-
-    ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false}
-    ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
-    ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
-    ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
-    ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
-    ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
-    ,{field: 'sku', align: 'center',title: 'sku', hide: true}
-    ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
+   // ,{field: 'batch', align: 'center',title: '璐у搧鐗瑰緛', sort:true}
+    ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: true}
+    ,{field: 'qty', align: 'center',title: '杈呮暟閲�', hide: true}
+    ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true}
+    ,{field: 'specs', align: 'center',title: '瑙勬牸/鍨嬪彿', hide: false}
+    ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+    ,{field: 'qrCode', align: 'center',title: '鏉″舰鐮�', hide: false}
+    ,{field: 'model', align: 'center',title: '灏忓嵎浣嶇疆', hide: false}
+    ,{field: 'color', align: 'center',title: '澶у嵎浣嶇疆', hide: false}
+    ,{field: 'brand', align: 'center',title: '绛夌骇', hide: false}
+    ,{field: 'startDate', align: 'center',title: '鏀跺嵎寮�濮嬫棩鏈�', hide: false}
+    ,{field: 'endDate', align: 'center',title: '鏀跺嵎缁撴潫鏃ユ湡', hide: false}
+   // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
+   // ,{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: 'origin', align: 'center',title: '浜у湴', hide: true}
-    ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
-    ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
-    ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
-    ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
-    ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
-    ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
-    ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
-    ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
-    ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
-    ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
-    ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
-    ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
-    ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
-    ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
-    ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
-    ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+   // ,{field: 'origin', align: 'center',title: '浜у湴', hide: true}
+   // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+   // ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
+   // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+   // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+   // ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+   // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+   // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+   // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+   // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+   // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+   // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+   // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+   // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+   // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+   // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+   // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
 ]
 
diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js
index 820c6c7..2cda8d6 100644
--- a/src/main/webapp/static/js/locDetl/locDetl.js
+++ b/src/main/webapp/static/js/locDetl/locDetl.js
@@ -1,39 +1,44 @@
 var pageCurr;
 function getCol() {
     var cols = [
-        {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'},
-        {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true}
-        ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true}
+        {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+        ,{field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜', sort:true}
+        ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', sort:true}
         ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
         ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true}
-        ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-        ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
-        ,{field: 'specs', align: 'center',title: '瑙勬牸'}
-        ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
-        ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
-        ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
-        ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
-        ,{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: 'origin', align: 'center',title: '浜у湴', hide: true}
-        ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
-        ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
-        ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
-        ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
-        ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
-        ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
-        ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
-        ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
-        ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
-        ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
-        ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
-        ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
-        ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
-        ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
-        ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
-        ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+        ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: true}
+        ,{field: 'qty', align: 'center',title: '杈呮暟閲�', hide: true}
+        ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true}
+        ,{field: 'specs', align: 'center',title: '瑙勬牸/鍨嬪彿', hide: true}
+        ,{field: 'model', align: 'center',title: '灏忓嵎浣嶇疆', hide: true}
+        ,{field: 'color', align: 'center',title: '澶у嵎浣嶇疆', hide: true}
+        ,{field: 'brand', align: 'center',title: '绛夌骇', hide: true}
+        ,{field: 'qrCode', align: 'center',title: '鏉″舰鐮�', hide: true}
+        ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+        ,{field: 'startDate', align: 'center',title: '鏀跺嵎寮�濮嬫棩鏈�', hide: true}
+        ,{field: 'endDate', align: 'center',title: '鏀跺嵎缁撴潫鏃ユ湡', hide: true}
+        // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+        // ,{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: 'origin', align: 'center',title: '浜у湴', hide: true}
+        // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+        // ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
+        // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+        // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+        // ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+        // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+        // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+        // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+        // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+        // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+        // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+        // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+        // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+        // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+        // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+        // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
 
     ];
 
diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js
index be85831..657f10e 100644
--- a/src/main/webapp/static/js/order/out.js
+++ b/src/main/webapp/static/js/order/out.js
@@ -32,10 +32,10 @@
             {type: 'checkbox'}
             ,{type: 'numbers', title: '#'}
             ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
-            ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160}
-            ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200}
-            ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
-            ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+            ,{field: 'matnr', align: 'center',title: '鐗╂枡缂栫爜', width: 160}
+            ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', width: 200}
+            ,{field: 'batch', align: 'center',title: '鐢熶骇鎵瑰彿'}
+            ,{field: 'specs', align: 'center',title: '瑙勬牸/鍨嬪彿'}
             // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
             // ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'}
             ,{field: 'enableQty', align: 'center',title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'}
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 2e28e8f..732ed6a 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
   <meta charset="utf-8">
-  <title>涓壃 - 鑷姩鍖栫珛浣撲粨搴� - AS / RS</title>
+  <title>钃濈閫� - 鑷姩鍖栫珛浣撲粨搴� - AS / RS</title>
   <meta name="renderer" content="webkit">
   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
   <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
@@ -75,7 +75,7 @@
   <div class="layui-body"></div>
   <!-- 搴曢儴 -->
   <div class="layui-footer layui-text">
-    copyright 漏 2022 <a href="https://www.superton.cn/" target="_blank">娴欐睙涓壃绔嬪簱鏈夐檺鍏徃</a> all rights reserved.
+    copyright 漏 2022 <a href="https://www.superton.cn/" target="_blank">鑻忓窞鍐犻缚鏅鸿兘瑁呭鏈夐檺鍏徃</a> all rights reserved.
     <span class="pull-right">Version 1.0.0</span>
   </div>
 
diff --git a/src/main/webapp/views/login.html b/src/main/webapp/views/login.html
index 1cbd22c..710f651 100644
--- a/src/main/webapp/views/login.html
+++ b/src/main/webapp/views/login.html
@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <title>涓壃 鈹� login of zoneyung wms</title>
+    <title>钃濈閫� 鈹� login of Luckt wms</title>
     <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1">
     <meta name="description" content="study of Instancing with three.js">
     <meta name="keywords" content="undefined, Yoichi Kobayashi, WebGL, three.js">
diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index 68f73d3..fbf49fc 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -171,6 +171,21 @@
         table.on('toolbar(stockOut)', function (obj) {
             var checkStatus = table.checkStatus(obj.config.id);
             var data = checkStatus.data;
+            let tmp = []
+            data.forEach((item,index) => {
+                $.ajax({
+                    url: baseUrl+"/stock/out/list/" + item.locNo + "/auth",
+                    headers: {'token': localStorage.getItem('token')},
+                    method: 'POST',
+                    async: false,
+                    success: function (res) {
+                        res.data.forEach((val,idx) => {
+                            tmp.push(val)
+                        })
+                    }
+                })
+            })
+            data = tmp
             switch(obj.event) {
                 case 'confirm':
                     if (data.length === 0){
diff --git a/version/bak/lfdasrs b/version/bak/lfdasrs
deleted file mode 100644
index 1e823af..0000000
--- a/version/bak/lfdasrs
+++ /dev/null
Binary files differ
diff --git a/version/bak/lfdasrs_LogBackup_2023-02-02_17-03-48.bak b/version/bak/lfdasrs_LogBackup_2023-02-02_17-03-48.bak
deleted file mode 100644
index 4d3c8b1..0000000
--- a/version/bak/lfdasrs_LogBackup_2023-02-02_17-03-48.bak
+++ /dev/null
Binary files differ

--
Gitblit v1.9.1