From 02eb447f5b70008f23851391073033293056e5ca Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 21 六月 2023 13:59:51 +0800
Subject: [PATCH] 增加轮询MES接口功能,增加物料档案类与隔膜信息类,增加orderdetl qr_code,startdate,enddate三个字段

---
 src/main/java/com/zy/asrs/entity/OrderDetl.java               |   22 +
 src/main/java/com/zy/asrs/utils/MesSyncUtil.java              |   21 +
 src/main/java/com/zy/asrs/task/MesPakinScheduler.java         |   31 +
 src/main/java/com/zy/asrs/task/MesPakoutScheduler.java        |   34 +
 src/main/webapp/static/js/locDetl/locDetl.js                  |   67 ++-
 src/main/java/com/zy/asrs/entity/DiaphragmInfo.java           |   53 ++
 src/main/webapp/static/image/favicon.ico                      |    0 
 src/main/webapp/static/js/order/out.js                        |    8 
 src/main/webapp/views/index.html                              |    2 
 src/main/java/com/zy/asrs/task/handler/MesMatSyncHandler.java |  143 +++++++
 src/main/webapp/static/js/order/order.js                      |   26 
 src/main/webapp/views/order/out.html                          |    4 
 src/main/java/com/zy/asrs/task/handler/MesPakoutHandler.java  |   37 ++
 src/main/java/com/zy/asrs/task/MesMatSyncScheduler.java       |   35 +
 src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java  |  140 +++++++
 src/main/webapp/static/js/common.js                           |  118 +++---
 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   |  208 +++++++++++
 src/main/resources/application.yml                            |   29 +
 src/main/webapp/static/image/logo.png                         |    0 
 21 files changed, 914 insertions(+), 116 deletions(-)

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/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/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..a974216
--- /dev/null
+++ b/src/main/java/com/zy/asrs/task/handler/MesPakinHandler.java
@@ -0,0 +1,208 @@
+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;
+        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..d521519 100644
--- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -2,9 +2,8 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.core.common.Cools;
-import com.core.common.DateUtils;
 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;
@@ -14,17 +13,19 @@
 import com.zy.asrs.service.OrderService;
 import com.zy.asrs.task.AbstractHandler;
 import com.zy.asrs.task.core.ReturnT;
-import com.zy.common.constant.MesConstant;
-import com.zy.common.model.MesPakinParam;
-import com.zy.common.model.MesPakoutParam;
 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.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+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 +45,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 +66,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 +112,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 +170,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..f04e9e6 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8081
   servlet:
     context-path: /@pom.build.finalName@
 
@@ -24,6 +24,13 @@
     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
@@ -52,4 +59,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/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..239e3bf 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: '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: 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: '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/order.js b/src/main/webapp/static/js/order/order.js
index ad09170..65b1a96 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -122,12 +122,13 @@
                         cellMinWidth: 100,
                         cols: [[
                             {type: 'numbers'},
-                            {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                            {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
-                            {field: 'batch', title: '鎵瑰彿'},
+                            {field: 'matnr', title: '鐗╂枡缂栫爜', width: 160},
+                            {field: 'maktx', title: '鐗╂枡鍚嶇О', width: 160},
+                            {field: 'batch', title: '鐢熶骇鎵瑰彿'},
                             {field: 'anfme', title: '鏁伴噺'},
-                            {field: 'workQty', title: '浣滀笟鏁伴噺'},
-                            {field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'},
+                            {field: 'qty', title: '杈呮暟閲�'},
+                            {field: 'qrCode', title: '鏉″舰鐮�'},
+                            //{field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'},
                             // {field: 'unit', title: '鍗曚綅'},
                             // {
                             //     field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
@@ -136,7 +137,7 @@
                             // },
                             // {field: 'inQty', title: '宸插叆搴撻噺'},
                             // {field: 'color', title: '棰滆壊'},
-                            {field: 'specs', title: '瑙勬牸'}
+                            {field: 'specs', title: '瑙勬牸/鍨嬪彿'}
                         ]],
                         request: {
                             pageName: 'curr',
@@ -234,13 +235,14 @@
                     cellMinWidth: 100,
                     cols: [[
                         {type: 'numbers', title: '#'},
-                        {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                        {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
-                        {field: 'batch', title: '鎵瑰彿', edit: true},
-                        {field: 'specs', title: '瑙勬牸'},
-                        {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
-                        {field: 'workQty', title: '浣滀笟鏁伴噺',  minWidth: 100, width: 100},
+                        {field: 'matnr', title: '鐗╂枡缂栫爜', width: 160},
+                        {field: 'maktx', title: '鐗╂枡鍚嶇О', width: 200},
+                        {field: 'batch', title: '鐢熶骇鎵瑰彿', edit: true},
+                        {field: 'specs', title: '瑙勬牸/鍨嬪彿'},
+                        {field: 'anfme', title: '鏁伴噺', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
+                        //{field: 'workQty', title: '浣滀笟鏁伴噺',  minWidth: 100, width: 100},
                         // {field: 'unit', title: '鍗曚綅', width: 80},
+                        {field: 'qty', title: '杈呮暟閲�' , edit: true},
                         {field: 'memo', title: '澶囨敞' , edit: true},
                         {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
                     ]],
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..3674450 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">
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/order/out.html b/src/main/webapp/views/order/out.html
index 0d7e344..688e2fa 100644
--- a/src/main/webapp/views/order/out.html
+++ b/src/main/webapp/views/order/out.html
@@ -95,13 +95,13 @@
                     <form class="layui-form toolbar">
                         <div class="layui-form-item">
                             <div class="layui-inline">
-                                <label class="layui-form-label">鍟嗗搧缂栫爜:</label>
+                                <label class="layui-form-label">鐗╂枡缂栫爜:</label>
                                 <div class="layui-input-inline">
                                     <input name="matnr" class="layui-input" placeholder="鍟嗗搧缂栫爜"/>
                                 </div>
                             </div>
                             <div class="layui-inline">
-                                <label class="layui-form-label">鍟嗗搧鍚嶇О:</label>
+                                <label class="layui-form-label">鐗╂枡鍚嶇О:</label>
                                 <div class="layui-input-inline">
                                     <input name="maktx" class="layui-input" placeholder="鍟嗗搧鍚嶇О"/>
                                 </div>

--
Gitblit v1.9.1