From 7912915a2b076e7ed4772ce2939f33862587a54b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 22 三月 2022 17:19:32 +0800
Subject: [PATCH] Merge branch 'xgmwcs' of http://47.97.1.152:5880/r/zy-wcs into xgmwcs

---
 src/main/java/com/zy/core/thread/LedThread.java                |   18 +
 src/main/java/com/zy/asrs/entity/BasDevp.java                  |    2 
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java    |  154 ++++++++----
 src/main/java/com/zy/core/thread/MelsecCrnThread.java          |   51 ++++
 src/main/webapp/views/console.html                             |  200 +++++++++-------
 src/main/webapp/static/css/pipeline.css                        |    3 
 src/main/resources/mapper/WrkMastMapper.xml                    |   10 
 src/main/java/com/zy/core/model/protocol/StaProtocol.java      |    3 
 src/main/java/com/zy/asrs/controller/ConsoleController.java    |   34 ++
 src/main/java/com/zy/asrs/service/WrkMastService.java          |    2 
 src/main/webapp/views/crn.html                                 |    8 
 src/main/webapp/static/images/zy-logo.png                      |    0 
 src/main/webapp/static/css/car_vue.css                         |   14 +
 src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java |    4 
 src/main/webapp/views/index.html                               |    5 
 src/main/webapp/static/css/crn.css                             |    3 
 src/main/java/com/zy/asrs/mapper/WrkMastMapper.java            |   13 +
 src/main/webapp/static/css/console.css                         |   37 ++
 src/main/webapp/static/css/index.css                           |   44 +++
 src/main/java/com/zy/core/MainProcess.java                     |    2 
 src/main/java/com/zy/core/thread/SiemensDevpThread.java        |   82 +++++
 src/main/resources/application.yml                             |    9 
 22 files changed, 508 insertions(+), 190 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/ConsoleController.java b/src/main/java/com/zy/asrs/controller/ConsoleController.java
index 034bbdf..dd56b27 100644
--- a/src/main/java/com/zy/asrs/controller/ConsoleController.java
+++ b/src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -1,16 +1,20 @@
 package com.zy.asrs.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.core.annotations.ManagerAuth;
 import com.core.common.Arith;
 import com.core.common.Cools;
+import com.core.common.DateUtils;
 import com.core.common.R;
 import com.zy.asrs.domain.enums.CrnStatusType;
 import com.zy.asrs.domain.enums.SiteStatusType;
 import com.zy.asrs.domain.param.SystemSwitchParam;
 import com.zy.asrs.domain.vo.*;
+import com.zy.asrs.entity.BasCrnError;
 import com.zy.asrs.entity.BasDevp;
 import com.zy.asrs.entity.WrkMast;
+import com.zy.asrs.mapper.BasCrnErrorMapper;
 import com.zy.asrs.mapper.LocMastMapper;
 import com.zy.asrs.service.BasDevpService;
 import com.zy.asrs.service.WrkMastService;
@@ -54,6 +58,8 @@
     private BasDevpService basDevpService;
     @Autowired
     private LocMastMapper locMastMapper;
+    @Autowired
+    private BasCrnErrorMapper basCrnErrorMapper;
 
     @PostMapping("/system/running/status")
     @ManagerAuth(memo = "绯荤粺杩愯鐘舵��")
@@ -130,7 +136,7 @@
             /**
              * 鍫嗗灈鏈虹姸鎬佸垽鏂�
              */
-            if (crn.getId() == 1 && crnProtocol.getAlarm() > 0) {
+            if (crnProtocol.getAlarm() > 0) {
                 vo.setCrnStatus(CrnStatusType.MACHINE_ERROR);
             } else {
                 if (crnProtocol.getTaskNo()>0) {
@@ -246,6 +252,13 @@
                 CrnProtocol crnProtocol = crnThread.getCrnProtocol();
                 vo.setCrnNo(crnNo);
                 vo.setWorkNo(crnProtocol.getTaskNo());
+                vo.setCrnStatus(crnProtocol.getStatusType().desc);
+
+                if (crnProtocol.getAlarm() > 0) {
+                    BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm());
+                    vo.setError(crnError == null ? "鏈煡寮傚父" : crnError.getErrName());
+                }
+
                 if (crnProtocol.getTaskNo() > 0) {
                     WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo());
                     if (wrkMast != null) {
@@ -281,15 +294,16 @@
 
     @GetMapping("/barcode/output/site")
     public R crnOutput(){
-//        StringBuilder str = new StringBuilder();
-//        String s;
-//        int i = 0;
-//        while((s = OutputQueue.CRN.poll()) != null && i <=32) {
-//            str.append("\n").append(s);
-//            i++;
-//        }
-//        return R.ok().add(str.toString());
-        return R.ok().add(JSON.toJSONString(new ArrayList<>(OutputQueue.BARCODE)));
+        ArrayList<JSONObject> jsonObjects = new ArrayList<>(OutputQueue.BARCODE);
+        jsonObjects.sort(new Comparator<JSONObject>() {
+            @Override
+            public int compare(JSONObject o1, JSONObject o2) {
+                Date o1Time = DateUtils.convert(o1.getString("time"), DateUtils.yyyyMMddHHmmss_F);
+                Date o2Time = DateUtils.convert(o2.getString("time"), DateUtils.yyyyMMddHHmmss_F);
+                return (int) (o2Time.getTime() - o1Time.getTime());
+            }
+        });
+        return R.ok().add(JSON.toJSONString(jsonObjects));
     }
 
 }
diff --git a/src/main/java/com/zy/asrs/entity/BasDevp.java b/src/main/java/com/zy/asrs/entity/BasDevp.java
index 388c3e2..1e3d022 100644
--- a/src/main/java/com/zy/asrs/entity/BasDevp.java
+++ b/src/main/java/com/zy/asrs/entity/BasDevp.java
@@ -129,7 +129,7 @@
     @ApiModelProperty(value= "鏉″舰鐮�")
     private String barcode;
 
-    @ApiModelProperty(value= "")
+    @ApiModelProperty(value= "鍏ュ簱鏆傚瓨鏁�")
     @TableField("in_qty")
     private Integer inQty;
 
diff --git a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
index 6f9c9c0..55a5ded 100644
--- a/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/WrkMastMapper.java
@@ -74,4 +74,17 @@
 
     WrkMast selectWorkingPakout();
 
+    /**
+     * 鍫嗗灈鏈烘槸鍚﹀瓨鍦ㄥ嚭搴撲换鍔�
+     * @param crnNo
+     * @return
+     */
+    WrkMast selectCrnWorking(@Param("crnNo")Integer crnNo);
+
+    /**
+     * 杈撻�佺嚎鏄惁瀛樺湪鍏ュ簱浠诲姟
+     * @param crnNo
+     * @return
+     */
+    WrkMast selectDevWorking(@Param("crnNo")Integer crnNo);
 }
diff --git a/src/main/java/com/zy/asrs/service/WrkMastService.java b/src/main/java/com/zy/asrs/service/WrkMastService.java
index f5c3e5c..67469f8 100644
--- a/src/main/java/com/zy/asrs/service/WrkMastService.java
+++ b/src/main/java/com/zy/asrs/service/WrkMastService.java
@@ -13,4 +13,6 @@
 
     List<WrkMast> selectToBeHistoryData();
 
+    int getOutToStn182(Integer devpNo);
+
 }
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 5e351b0..b5c0f3b 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -89,6 +89,8 @@
     private BasCrnErrorMapper basCrnErrorMapper;
     @Value("${wms.url}")
     private String wmsUrl;
+    @Value("${crnBackHp.enable}")
+    private boolean crnBackHp;
 
     /**
      * 缁勬墭
@@ -105,14 +107,14 @@
                     continue;
                 }
                 String barcode = barcodeThread.getBarcode();
-//                if(!Cools.isEmpty(barcode)) {
-//                    log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
-//                    if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-//                        continue;
-//                    }
-//                } else {
-//                    continue;
-//                }
+                if(!Cools.isEmpty(barcode)) {
+                    log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
+                    if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
+                        continue;
+                    }
+                } else {
+                    continue;
+                }
 
                 // 鑾峰彇鍏ュ簱绔欎俊鎭�
                 SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
@@ -123,8 +125,8 @@
                     staProtocol = staProtocol.clone();
                 }
 
-                // 鍏ュ嚭搴撴ā寮忓垽鏂�
-                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
+//                // 鍏ュ嚭搴撴ā寮忓垽鏂�
+//                if ( inSta.getStaNo()==180 && devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
 
                 // 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢
                 if (staProtocol.isAutoing() && staProtocol.isLoading()
@@ -132,18 +134,18 @@
                         && !staProtocol.isEmptyMk() && (staProtocol.getWorkNo() == 0 || staProtocol.getWorkNo() == 9999)
                         && staProtocol.isPakMk()){// && !Cools.isEmpty(barcode)) {
 
-                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-                        log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
-                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
-                        staProtocol.setWorkNo((short)9999);
-                        staProtocol.setStaNo((short)172);
-                        devpThread.setPakMk(staProtocol.getSiteId(), false);
-                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
-                        if (!result) {
-                            throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                        }
-                        continue;
-                    }
+//                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) {
+//                        log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
+//                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
+//                        staProtocol.setWorkNo((short)9999);
+//                        staProtocol.setStaNo((short)172);
+//                        devpThread.setPakMk(staProtocol.getSiteId(), false);
+//                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+//                        if (!result) {
+//                            throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
+//                        }
+//                        continue;
+//                    }
 
                     // 鍒ゆ柇閲嶅宸ヤ綔妗�
                     WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode);
@@ -278,8 +280,8 @@
                     staProtocol = staProtocol.clone();
                 }
 
-                // 鍏ュ嚭搴撴ā寮忓垽鏂�
-                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
+//                // 鍏ュ嚭搴撴ā寮忓垽鏂�
+//                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
 
                 // 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢
                 if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
@@ -328,14 +330,14 @@
                     continue;
                 }
                 String barcode = barcodeThread.getBarcode();
-//                if(!Cools.isEmpty(barcode)) {
-//                    log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
-//                    if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-//                        continue;
-//                    }
-//                } else {
-//                    continue;
-//                }
+                if(!Cools.isEmpty(barcode)) {
+                    log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
+                    if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
+                        continue;
+                    }
+                } else {
+                    continue;
+                }
 
                 // 鑾峰彇鎷f枡鍏ュ簱绔欎俊鎭�
                 SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
@@ -346,23 +348,23 @@
                     staProtocol = staProtocol.clone();
                 }
 
-                // 鍏ュ嚭搴撴ā寮忓垽鏂�
-                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
+//                // 鍏ュ嚭搴撴ā寮忓垽鏂�
+//                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
 
                 if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()){
 
-                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-                        log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
-                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
-                        staProtocol.setWorkNo((short)9999);
-                        staProtocol.setStaNo((short)172);
-                        devpThread.setPakMk(staProtocol.getSiteId(), false);
-                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
-                        if (!result) {
-                            throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                        }
-                        continue;
-                    }
+//                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) {
+//                        log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
+//                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
+//                        staProtocol.setWorkNo((short)9999);
+//                        staProtocol.setStaNo((short)172);
+//                        devpThread.setPakMk(staProtocol.getSiteId(), false);
+//                        boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+//                        if (!result) {
+//                            throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
+//                        }
+//                        continue;
+//                    }
 
                     WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
                     if (wrkMast == null) {
@@ -549,7 +551,57 @@
             }
             // 搴撲綅绉昏浆
             this.locToLoc(crn, crnProtocol);
+
+            if (crnBackHp) {
+                //鍫嗗灈鏈烘病鏈夋墽琛屼腑浠诲姟锛岃澶囧瓨鍦ㄥ叆搴撲换鍔℃椂鍙洖鍘熺偣
+                this.crnRebackHp(crn, crnProtocol);
+            }
         }
+    }
+
+    /**
+     * 鍥炲師鐐癸紝鍫嗗灈鏈烘病鏈夋墽琛屼腑浠诲姟锛岃澶囧瓨鍦ㄥ叆搴撲换鍔℃椂鍙洖鍘熺偣
+     * @param slave
+     * @param crnProtocol
+     */
+    public void crnRebackHp(CrnSlave slave, CrnProtocol crnProtocol){
+            // 鍫嗗灈鏈烘帶鍒惰繃婊�
+            if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0
+                || crnProtocol.getModeType() != CrnModeType.AUTO) {
+                return;
+            }
+
+            // 宸茬粡瀛樺湪鍚婅溅鎵ц浠诲姟鏃讹紝鍒欒繃婊�
+            if (wrkMastMapper.selectWorking(slave.getId()) != null) {
+                return;
+            }
+
+            //鍫嗗灈鏈烘湁鎵ц涓换鍔★紝杩囨护
+            if (wrkMastMapper.selectCrnWorking(slave.getId()) != null) {
+                return;
+            }
+
+            //杈撻�佺嚎娌℃湁鍏ュ簱浠诲姟锛岃繃婊�
+            if (wrkMastMapper.selectDevWorking(slave.getId()) == null) {
+                return;
+            }
+
+            // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
+            CrnCommand crnCommand = new CrnCommand();
+            crnCommand.setCrnNo(slave.getId()); // 鍫嗗灈鏈虹紪鍙�
+            crnCommand.setTaskNo((short) 1); // 宸ヤ綔鍙�
+            crnCommand.setAckFinish((short) 0);  // 浠诲姟瀹屾垚纭浣�
+            crnCommand.setTaskMode(CrnTaskModeType.GO_ORIGIN); // 浠诲姟妯″紡:  鍥炲師鐐�
+            crnCommand.setSourcePosX((short) 0);     // 婧愬簱浣嶆帓
+            crnCommand.setSourcePosY((short) 0);     // 婧愬簱浣嶅垪
+            crnCommand.setSourcePosZ((short) 0);     // 婧愬簱浣嶅眰
+            crnCommand.setDestinationPosX((short) 0);     // 鐩爣搴撲綅鎺�
+            crnCommand.setDestinationPosY((short) 0);     // 鐩爣搴撲綅鍒�
+            crnCommand.setDestinationPosZ((short) 0);     // 鐩爣搴撲綅灞�
+            if (!MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, crnCommand))) {
+                log.error("鍫嗗灈鏈哄洖鍘熺偣鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={}锛屼换鍔℃暟鎹�={}", slave.getId(), JSON.toJSON(crnCommand));
+            } else {
+            }
     }
 
     /**
@@ -711,8 +763,8 @@
                 staProtocol = staProtocol.clone();
             }
 
-            // 鍏ュ嚭搴撴ā寮忓垽鏂�
-            if (devpThread.ioMode != IoModeType.PAKOUT_MODE) { continue; }
+//            // 鍏ュ嚭搴撴ā寮忓垽鏂�
+//            if (devpThread.ioMode != IoModeType.PAKOUT_MODE) { continue; }
 
 
             // 鏌ヨ绔欑偣璇︾粏淇℃伅
@@ -835,7 +887,7 @@
         }
 
         // 宸茬粡瀛樺湪鍚婅溅鎵ц浠诲姟鏃讹紝鍒欒繃婊�
-        if (wrkMastMapper.selectLocMoving(slave.getId()) != null) {
+        if (wrkMastMapper.selectWorking(slave.getId()) != null) {
             return;
         }
 
@@ -1042,8 +1094,8 @@
                     staProtocol = staProtocol.clone();
                 }
 
-                // 鍏ュ嚭搴撴ā寮忓垽鏂�
-                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
+//                // 鍏ュ嚭搴撴ā寮忓垽鏂�
+//                if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
 
                 // 绔欑偣鏉′欢鍒ゆ柇
                 if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
diff --git a/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java
index 63e7cd2..8c0b9e9 100644
--- a/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java
@@ -27,4 +27,8 @@
         return this.baseMapper.selectToBeHistoryData();
     }
 
+    @Override
+    public int getOutToStn182(Integer devpNo) {
+        return selectCount(new EntityWrapper<WrkMast>().eq("sta_no", devpNo).in("wrk_sts",11,12));
+    }
 }
diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index 810f454..93af98e 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -42,7 +42,7 @@
                     // 婕旂ず
                     mainService.crnDemoOfLocMove1();
                     // 鍏ュ嚭搴撴ā寮忓垏鎹㈠嚱鏁�
-                    mainService.ioConvert();
+//                    mainService.ioConvert();
                     // 鍏ュ簱  ===>> 鍏ュ簱绔欏埌鍫嗗灈鏈虹珯锛屾牴鎹潯鐮佹壂鎻忕敓鎴愬叆搴撳伐浣滄。
                     mainService.generateStoreWrkFile(); // 缁勬墭
                     mainService.generateStoreWrkFile0(); // WMS鍏ュ簱
diff --git a/src/main/java/com/zy/core/model/protocol/StaProtocol.java b/src/main/java/com/zy/core/model/protocol/StaProtocol.java
index 2290116..e42e540 100644
--- a/src/main/java/com/zy/core/model/protocol/StaProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/StaProtocol.java
@@ -49,6 +49,8 @@
     // 閿佸畾鏍囪
     private boolean pakMk = true;
 
+    // 鍏ュ簱鏆傚瓨鏁�
+    private Short inQty;
 
     public BasDevp toSqlModel(){
         BasDevp basDevp = new BasDevp();
@@ -62,6 +64,7 @@
         basDevp.setLocType2((short) 0);  // 瀹界獎绫诲瀷{0:鏈煡,1:绐勫簱浣�,2:瀹藉簱浣峿
         basDevp.setLocType3((short) 0);  // 杞婚噸绫诲瀷{0:鏈煡,1:杞诲簱浣�,2:閲嶅簱浣峿
         basDevp.setLocType1(high != low && low ? (short) 1 : (short) 2);
+        basDevp.setInQty(inQty !=null ?(int)inQty : 0);
         return basDevp;
     }
 
diff --git a/src/main/java/com/zy/core/thread/LedThread.java b/src/main/java/com/zy/core/thread/LedThread.java
index 197b219..3305f41 100644
--- a/src/main/java/com/zy/core/thread/LedThread.java
+++ b/src/main/java/com/zy/core/thread/LedThread.java
@@ -100,14 +100,21 @@
             page.newLine("鐩爣绔欙細"+command.getStaNo());
             if (!command.isEmptyMk()) {
                 for (MatDto matDto : command.getMatDtos()) {
-                    page.newLine(matDto.getMaknx() + "銆愭暟閲�" + matDto.getCount() +"銆�");
+                    //鍘绘帀灏忔暟鐐�
+                    String strQty = matDto.getCount().toString();
+                    int idx = strQty.lastIndexOf(".");
+                    if(idx >= 0){
+                        strQty.substring(0,idx);
+                    }
+                    page.newLine(matDto.getMaknx() + "[鏁伴噺" + strQty +"]");
+//                    page.newLine(matDto.getMaknx() + "銆愭暟閲�" + matDto.getCount() +"銆�");
                 }
             }
             page.newLine("\n");
         }
 
         // 璁剧疆瀛椾綋
-        page.setFont(new Font("瀹嬩綋",Font.PLAIN,12));
+        page.setFont(new Font("瀹嬩綋",Font.PLAIN,10));
         // 璁剧疆鏂囨湰棰滆壊
         page.setForeground(Color.red);
         // 璁剧疆鏄剧ず鐗规妧涓哄揩閫熸墦鍑�
@@ -198,6 +205,13 @@
 
 
     public static void main(String[] args) throws Exception {
+        String strQty = "1234";
+        int index = strQty.lastIndexOf(".");
+        if(index>=0) {
+            strQty=strQty.substring(0, index);
+        }
+        System.out.println("2==>>"+strQty);
+
         Bx5GEnv.initial(3000);
         Bx5GScreenClient screen = new Bx5GScreenClient("my");
         DisplayStyleFactory.DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyleFactory.DisplayStyle[0]);
diff --git a/src/main/java/com/zy/core/thread/MelsecCrnThread.java b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
index ce0f98d..5d4b037 100644
--- a/src/main/java/com/zy/core/thread/MelsecCrnThread.java
+++ b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
@@ -229,6 +229,55 @@
             log.error("鍫嗗灈鏈哄啓鍏ュ懡浠や负绌�");
             return false;
         }
+
+//        OperateResult result = null;
+//        try{
+//            Integer exeCount=0;
+//            do{
+//                command.setCrnNo(slave.getId());
+//                short[] array = new short[10];
+//                array[0] = command.getAckFinish();
+//                array[1] = command.getTaskNo();
+//                array[2] = command.getTaskMode();
+//                array[3] = command.getSourcePosX();
+//                array[4] = command.getSourcePosY();
+//                array[5] = command.getSourcePosZ();
+//                array[6] = command.getDestinationPosX();
+//                array[7] = command.getDestinationPosY();
+//                array[8] = command.getDestinationPosZ();
+//                array[9] = command.getCommand();
+//                result = melsecMcNet.Write("D0", array);
+//                if(result.IsSuccess) {
+//                    if (command.getAckFinish() == 0) {
+//                        short commandFinish = 1;
+//                        result = melsecMcNet.Write("D9", commandFinish);
+//                        if(result.IsSuccess){
+//                            //鍐欎换鍔$‘璁よ繑鍥炴垚鍔熷悗锛屾煡璇㈢‘璁や竴娆�
+//                            Thread.sleep(200);
+//                            OperateResultExOne<byte[]> result1 = melsecMcNet.Read("D9", (short)2);
+//                            if(result1.IsSuccess){
+//                                short commandVal = melsecMcNet.getByteTransform().TransInt16(result1.Content,2);
+//                                if(commandVal==1){
+//                                    break;
+//                                } else {
+//                                    exeCount++;
+//                                }
+//                            } else{
+//                                exeCount++;
+//                            }
+//                        }else{
+//                            exeCount++;
+//                        }
+//                    }
+//                }else{
+//                    exeCount++;
+//                }
+//                Thread.sleep(200);
+//            }while(exeCount>3);
+//        }catch (Exception e){
+//
+//        }
+
         command.setCrnNo(slave.getId());
         short[] array = new short[10];
         array[0] = command.getAckFinish();
@@ -271,7 +320,7 @@
             bean.insert(basCrnOpt);
         } catch (Exception ignore) {}
 
-        if (result.IsSuccess) {
+        if (result != null && result.IsSuccess) {
             log.info("鍫嗗灈鏈哄懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command));
             OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command)));
             return true;
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index 6eb8cb3..9c10f69 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -9,6 +9,7 @@
 import com.core.common.SpringUtils;
 import com.zy.asrs.entity.BasDevp;
 import com.zy.asrs.service.BasDevpService;
+import com.zy.asrs.service.WrkMastService;
 import com.zy.core.DevpThread;
 import com.zy.core.cache.MessageQueue;
 import com.zy.core.cache.OutputQueue;
@@ -48,11 +49,15 @@
         add(150);add(151);add(152);add(153);add(154);add(155);add(156);add(157);add(158);add(159);
         add(160);add(161);add(162);add(163);add(164);add(165);add(166);add(167);add(168);add(169);
         add(170);add(171);add(172);add(173);add(174);add(175);add(176);add(177);add(178);add(179);
-        add(180);add(181);add(182);add(183);add(184);add(185);add(186);add(187);add(188);add(189);
-        add(190);add(191);add(192);
+        add(180);add(181);add(182);
+        add(183);add(184);add(185);add(186);add(187);add(188);add(189);add(190);add(191);add(192);
     }};
 
     public IoModeType ioMode = IoModeType.NONE;
+    /**
+     * 182绔欏爢鍨涙満鎵ц涓嚭搴撴暟閲�
+     */
+    public int PRE_COUNT=0;
 
     public SiemensDevpThread(DevpSlave slave) {
         this.slave = slave;
@@ -114,11 +119,11 @@
      * 璇诲彇鐘舵�� ====> 鏁村潡plc
      */
     private void read() throws InterruptedException {
-        // 鏇存柊鍏ュ嚭搴撴ā寮�
-        updateIoMode();
+//        // 鏇存柊鍏ュ嚭搴撴ā寮�
+//        updateIoMode();
         OperateResultExOne<byte[]> result = siemensS7Net.Read("DB100.0", (short) 186);
         if (result.IsSuccess) {
-            for (int i = 0; i < 83; i++) {
+            for (int i = 0; i < 93; i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 StaProtocol staProtocol = station.get(siteId);
                 if (null == staProtocol) {
@@ -132,7 +137,7 @@
         Thread.sleep(200);
         OperateResultExOne<byte[]> result0 = siemensS7Net.Read("DB101.0", (short) 186);
         if (result0.IsSuccess) {
-            for (int i = 0; i < 83; i++) {
+            for (int i = 0; i < 93; i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 StaProtocol staProtocol = station.get(siteId);
                 if (null == staProtocol) {
@@ -146,7 +151,7 @@
         Thread.sleep(200);
         OperateResultExOne<byte[]> result1 = siemensS7Net.Read("DB102.0", (short) 186);
         if (result1.IsSuccess) {
-            for (int i = 0; i < 83; i++) {
+            for (int i = 0; i < 93; i++) {
                 Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
                 boolean[] status = siemensS7Net.getByteTransform().TransBool(result1.Content, i*2, 1);
                 StaProtocol staProtocol = station.get(siteId);
@@ -165,10 +170,44 @@
             }
         }
 
-        OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB200.0");
-        if (result2.IsSuccess) {
-            this.ioMode = IoModeType.get(result2.Content);
+        Thread.sleep(200);
+        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB300.0", (short) 10);
+        if (result3.IsSuccess) {
+//            Integer siteId = staNos.get(i); // 绔欑偣缂栧彿
+            Integer siteId = 0;
+            for (int i = 0; i < 5; i++) {
+                switch (i){
+                    case 0:
+                        siteId = 100;
+                        break;
+                    case 1:
+                        siteId = 102;
+                        break;
+                    case 2:
+                        siteId = 104;
+                        break;
+                    case 3:
+                        siteId = 106;
+                        break;
+                    case 4:
+                        siteId = 108;
+                        break;
+                }
+                StaProtocol staProtocol = station.get(siteId);
+                if (null == staProtocol) {
+                    staProtocol = new StaProtocol();
+                    staProtocol.setSiteId(siteId);
+                    station.put(siteId, staProtocol);
+                }
+                short value = siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2);
+                staProtocol.setInQty(value);     // 鍏ュ簱鏆傚瓨鏁�
+            }
         }
+
+//        OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB200.0");
+//        if (result2.IsSuccess) {
+//            this.ioMode = IoModeType.get(result2.Content);
+//        }
 
         if (result.IsSuccess && result0.IsSuccess && result1.IsSuccess) {
 
@@ -181,15 +220,36 @@
                     StaProtocol staProtocol = station.get(siteId);
                     basDevps.add(staProtocol.toSqlModel());
                 }
+
                 BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class);
-                if (!basDevpService.updateBatchById(basDevps)) {
+                if (null != basDevpService && !basDevpService.updateBatchById(basDevps)) {
                     throw new Exception("鏇存柊鏁版嵁搴撴暟鎹け璐�");
                 }
             } catch (Exception e) {
+                e.printStackTrace();
                 OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戞洿鏂版暟鎹簱鏁版嵁澶辫触 ===>> [id:{1}] [ip:{2}] [port:{3}] [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()));
                 log.error("鏇存柊鏁版嵁搴撴暟鎹け璐� ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot());
             }
 
+            //鍑哄簱鍒�182绔欏爢鍨涙満浠诲姟鏁版嵁鍙戦�佺粰PLC
+            try{
+                WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class);
+                if(null != wrkMastService){
+                    int count = wrkMastService.getOutToStn182(182);
+                    if(count != PRE_COUNT){
+                        OperateResult write = siemensS7Net.Write("DB300.2",(short)count);
+                        if (write.IsSuccess) {
+                            PRE_COUNT = count;
+                        } else {
+                            log.error("鏇存柊鍫嗗灈鏈哄嚭搴撳埌182绔欎换鍔℃暟閲忛敊璇�,浠诲姟鏁伴噺==>>" + count);
+                        }
+                    }
+                }
+            }catch (Exception e) {
+                e.printStackTrace();
+                log.error("鏇存柊鍫嗗灈鏈哄嚭搴撳埌182绔欎换鍔℃暟閲忓け璐�");
+            }
+
         } else {
             OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戣鍙栬緭閫佺嚎plc鐘舵�佷俊鎭け璐� ===>> [id:{1}] [ip:{2}] [port:{3}] [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()));
 //            log.error("璇诲彇杈撻�佺嚎plc鐘舵�佷俊鎭け璐� ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot());
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index e2b441a..281d5b3 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -11,8 +11,8 @@
     #    url: jdbc:sqlserver://47.97.1.152:51433;databasename=xgmasrs
     #    username: sa
     #    password: Zoneyung@zy56$
-#    url: jdbc:sqlserver://10.10.10.238:1433;databasename=xgmasrs
-    url: jdbc:sqlserver://localhost:1433;databasename=xgmasrs
+    url: jdbc:sqlserver://10.10.10.238:1433;databasename=xgmasrs
+#    url: jdbc:sqlserver://localhost:1433;databasename=xgmasrs
     username: sa
     password: sa@123
   mvc:
@@ -40,6 +40,10 @@
 wms:
   url: 10.10.10.238:8080/xgmwms
 #  url: localhost:8082/xgmwms
+
+#鍫嗗灈鏈烘病鏈夋墽琛屼腑浠诲姟锛岃緭閫佹湁鍏ュ簱浠诲姟锛屽彨鍥炲師鐐�
+crnBackHp:
+  enable: true
 
 # 涓嬩綅鏈洪厤缃�
 wcs-slave:
@@ -170,6 +174,7 @@
     inSta[0]:
       staNo: 176
       barcode: ${wcs-slave.barcode[0].id}
+    # 鍏ュ簱鍙�2
     inSta[1]:
       staNo: 180
       barcode: ${wcs-slave.barcode[1].id}
diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 5436457..96c7603 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -121,7 +121,7 @@
 
     <!-- 鍏ュ簱浠诲姟 -->
     <select id="selectWorkingPakin" resultMap="BaseResultMap">
-        select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 order by io_time,wrk_no
+        select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = 180 order by io_time,wrk_no
     </select>
 
     <!-- 鍑哄簱浠诲姟 -->
@@ -136,8 +136,16 @@
         where wrk_no > 0)
         ))
         and io_type != 11
+        and source_sta_no = 180
         order by io_time,wrk_no
     </select>
 
+    <select id="selectCrnWorking" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no
+    </select>
+
+    <select id="selectDevWorking" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no
+    </select>
 
 </mapper>
diff --git a/src/main/webapp/static/css/car_vue.css b/src/main/webapp/static/css/car_vue.css
new file mode 100644
index 0000000..fe3d15f
--- /dev/null
+++ b/src/main/webapp/static/css/car_vue.css
@@ -0,0 +1,14 @@
+body {
+    background-color: #6CA7A8;
+}
+
+.title {
+    margin-top: 10px;
+    font-size: 20px;
+    text-align: center;
+
+}
+.bg-orgin {
+    color: white;
+    background-color: #FF5722;
+}
diff --git a/src/main/webapp/static/css/console.css b/src/main/webapp/static/css/console.css
index aa50cf6..4a74204 100644
--- a/src/main/webapp/static/css/console.css
+++ b/src/main/webapp/static/css/console.css
@@ -12,17 +12,35 @@
 }
 .head {
 	height: 10%;
-	width: 20%;
-	padding-top: 1%;
-	padding-left: 1%;
+	width: 100%;
 	color: #FFFFFF;
 }
+.head-left {
+	height: 100%;
+	width: 20%;
+	display: inline-block;
+}
+.head-right {
+	height: 100%;
+	width: 30%;
+	display: inline-block;
+	float: right;
+}
 .head h1 {
+	margin-top: 2%;
+	margin-left: 2%;
 	font-weight: 400;
 	letter-spacing:3px;
 }
 .head h6 {
+	margin-left: 2%;
 	font-weight: 400;
+}
+
+img {
+	float: right;
+	margin-top: 10px;
+	margin-right: 10px;
 }
 #body {
 	width: 100%;
@@ -293,16 +311,23 @@
 	width: 80px;
 }
 
-.site-row-5 {
+.site-row-4 {
 	top: 71px;
 	left: 448px;
+}
+.site-row-4 .site {
+	width: 80px;
+}
+.site-row-5 {
+	top: 71px;
+	left: 530px;
 }
 .site-row-5 .site {
 	width: 80px;
 }
 .site-row-6 {
 	top: 71px;
-	left: 530px;
+	left: 612px;
 }
 .site-row-6 .site {
 	width: 80px;
@@ -313,7 +338,7 @@
 .main-part {
 	position: absolute;
 	top: 20px;
-	left: 612px;
+	left: 694px;
 }
 .main-part .lane {
 	margin-top: 30px;
diff --git a/src/main/webapp/static/css/crn.css b/src/main/webapp/static/css/crn.css
index a70f372..0fa623e 100644
--- a/src/main/webapp/static/css/crn.css
+++ b/src/main/webapp/static/css/crn.css
@@ -1,12 +1,11 @@
 body {
-    background-color: #f1f1f1;
+    background-color: #6CA7A8;
 }
 .button-window {
     float: left;
     width: 100%;
     height: 100%;
     padding: 10px;
-    background-color: #6CA7A8;
     border-radius: 5px;
     box-shadow: 0 0 3px rgba(0 0 0 .3);
 }
diff --git a/src/main/webapp/static/css/index.css b/src/main/webapp/static/css/index.css
index 089ed6d..2b5ee44 100644
--- a/src/main/webapp/static/css/index.css
+++ b/src/main/webapp/static/css/index.css
@@ -30,19 +30,53 @@
 }
 
 .sidebar {
-    width: 7%;
+    width: 8%;
     height: 40%;
     line-height: 90px;
     position: fixed;
     top: 50%;
     transform: translateY(-50%);
-
-
 }
+/* Effect 1: Brackets */
+.cl-effect-1 a::before,
+.cl-effect-1 a::after {
+    display: inline-block;
+    opacity: 0;
+    -webkit-transition: -webkit-transform 0.3s, opacity 0.2s;
+    -moz-transition: -moz-transform 0.3s, opacity 0.2s;
+    transition: transform 0.3s, opacity 0.2s;
+}
+
+.cl-effect-1 a::before {
+    margin-right: 10px;
+    content: '[';
+    -webkit-transform: translateX(20px);
+    -moz-transform: translateX(20px);
+    transform: translateX(20px);
+}
+
+.cl-effect-1 a::after {
+    margin-left: 10px;
+    content: ']';
+    -webkit-transform: translateX(-20px);
+    -moz-transform: translateX(-20px);
+    transform: translateX(-20px);
+}
+
+.cl-effect-1 a:hover::before,
+.cl-effect-1 a:hover::after,
+.cl-effect-1 a:focus::before,
+.cl-effect-1 a:focus::after {
+    opacity: 1;
+    -webkit-transform: translateX(0px);
+    -moz-transform: translateX(0px);
+    transform: translateX(0px);
+}
+/* Effect 1: Brackets 馃憜*/
 .sidebar ul {
     font-size: 20px;
-    font-weight: 5c00;
-    padding-left: 15%;
+    font-weight: 500;
+    padding-left: 5%;
 
 }
 .sidebar a {
diff --git a/src/main/webapp/static/css/pipeline.css b/src/main/webapp/static/css/pipeline.css
index 820f5f4..8fe0e8a 100644
--- a/src/main/webapp/static/css/pipeline.css
+++ b/src/main/webapp/static/css/pipeline.css
@@ -1,6 +1,6 @@
 body {
     /*padding: 10px;*/
-    background-color: #f1f1f1;
+    background-color: #6CA7A8;
 }
 main {
     background-color: #fff;
@@ -14,7 +14,6 @@
     width: 100%;
     height: 100%;
     padding: 10px;
-    background-color: #6CA7A8;
     border-radius: 5px;
     box-shadow: 0 0 3px rgba(0 0 0 .3);
 }
diff --git a/src/main/webapp/static/images/zy-logo.png b/src/main/webapp/static/images/zy-logo.png
new file mode 100644
index 0000000..4865504
--- /dev/null
+++ b/src/main/webapp/static/images/zy-logo.png
Binary files differ
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index a1d0f1f..c57b160 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -17,8 +17,13 @@
 <body>
 <div id="root">
     <div class="head">
-        <h1>鑷姩浠撳簱WCS鐩戞帶鍥�</h1>
-        <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6>
+        <div class="head-left">
+            <h1>鑷姩浠撳簱WCS鐩戞帶鍥�</h1>
+            <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6>
+        </div>
+        <div class="head-right">
+            <img src="../static/images/zy-logo.png" alt="涓壃" height="44" width="80" >
+        </div>
     </div>
     <!--绗�1鍒楋紙瀹藉害 70px锛� -->
     <div class="site-row site-row-1">
@@ -50,8 +55,8 @@
     </div>
     <!-- 绗�4鍒楋紙瀹藉害 70px 140px锛� -->
 
-    <!--&lt;!&ndash; 绗�5鍒楋紙瀹藉害 70px锛� &ndash;&gt;-->
-    <div class="site-row site-row-5">
+    <!--&lt;!&ndash; 绗�4鍒楋紙瀹藉害 70px锛� &ndash;&gt;-->
+    <div class="site-row site-row-4">
         <div id="site-163" class="site" style="height: 28.5px;line-height: 28.5px">163</div>
         <div id="site-162" class="site" style="height: 28.5px;line-height: 28.5px">162</div>
         <div id="site-161" class="site" style="height: 71px;line-height: 71px">161</div>
@@ -67,8 +72,8 @@
         <div id="site-151" class="site" style="height: 28.5px;line-height: 28.5px">151</div>
         <div id="site-150" class="site" style="height: 28.5px;line-height: 28.5px">150</div>
     </div>
-    <!--&lt;!&ndash; 绗�6鍒楋紙瀹藉害 70px锛� &ndash;&gt;-->
-    <div class="site-row site-row-6">
+    <!--&lt;!&ndash; 绗�5鍒楋紙瀹藉害 70px锛� &ndash;&gt;-->
+    <div class="site-row site-row-5">
         <div id="site-120" class="site" style="height: 28.5px;line-height: 28.5px">120</div>
         <div id="site-121" class="site" style="height: 28.5px;line-height: 28.5px">121</div>
         <div id="site-122" class="site" style="height: 71px;line-height: 71px">122</div>
@@ -84,6 +89,19 @@
         <div id="site-132" class="site" style="height: 28.5px;line-height: 28.5px">132</div>
         <div id="site-133" class="site" style="height: 28.5px;line-height: 28.5px">133</div>
     </div>
+    <!--&lt;!&ndash; 绗�6鍒楋紙瀹藉害 70px锛� &ndash;&gt;-->
+    <div class="site-row site-row-6">
+        <div id="site-183" class="site">183</div>
+        <div id="site-184" class="site" style="margin-top: 21px">184</div>
+        <div id="site-185" class="site" style="margin-top: 73px">185</div>
+        <div id="site-186" class="site" style="margin-top: 21px">186</div>
+        <div id="site-187" class="site" style="margin-top: 73px">187</div>
+        <div id="site-188" class="site" style="margin-top: 21px">188</div>
+        <div id="site-189" class="site" style="margin-top: 73px">189</div>
+        <div id="site-190" class="site" style="margin-top: 21px">190</div>
+        <div id="site-191" class="site" style="margin-top: 73px">191</div>
+        <div id="site-192" class="site" style="margin-top: 21px">192</div>
+    </div>
 
     <!-- 璐ф灦 + 鍫嗗灈鏈� + 鍏ュ簱绔欑偣 -->
     <div class="main-part">
@@ -91,10 +109,10 @@
         <div class="lane">
             <!-- 璐ф灦 -->
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -130,10 +148,10 @@
             </div>
             <div class="stock-group">
                 <div id="site-100" class="site" style="">100</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -175,10 +193,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div id="site-101" class="site" style="">101</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -213,10 +231,10 @@
                 <span class="row-no">3#</span>
             </div>
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -257,10 +275,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div class="site" style="background-color: rgb(108,167,168)"></div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -296,10 +314,10 @@
             </div>
             <div class="stock-group">
                 <div id="site-102" class="site" style="">102</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -341,10 +359,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div id="site-103" class="site" style="">103</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -380,10 +398,10 @@
             </div>
             <div class="stock-group">
                 <div class="site" style="background-color: rgb(108,167,168)"></div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -423,10 +441,10 @@
             <span class="row-no"></span>
             <!-- 璐ф灦 -->
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -462,10 +480,10 @@
             </div>
             <div class="stock-group">
                 <div id="site-104" class="site" style="">104</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -507,10 +525,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div id="site-105" class="site" style="">105</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -545,10 +563,10 @@
                 <span class="row-no">11#</span>
             </div>
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -588,10 +606,10 @@
             <span class="row-no"></span>
             <!-- 璐ф灦 -->
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -627,10 +645,10 @@
             </div>
             <div class="stock-group">
                 <div id="site-106" class="site" style="">106</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -672,10 +690,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div id="site-107" class="site" style="">107</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -710,10 +728,10 @@
                 <span class="row-no">15#</span>
             </div>
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -753,10 +771,10 @@
             <span class="row-no"></span>
             <!-- 璐ф灦 -->
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -792,10 +810,10 @@
             </div>
             <div class="stock-group">
                 <div id="site-108" class="site" style="">108</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -837,10 +855,10 @@
             <!-- 璐ф灦 -->
             <div class="stock-group">
                 <div id="site-109" class="site" style="">109</div>
-                <button class="item">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -875,10 +893,10 @@
                 <span class="row-no">19#</span>
             </div>
             <div class="stock-group">
-                <button class="item" style="margin-left: 82px">2</button>
-                <button class="item">4</button>
-                <button class="item">6</button>
-                <button class="item">8</button>
+                <button class="item" style="margin-left: 82px">&nbsp2&nbsp</button>
+                <button class="item">&nbsp4&nbsp</button>
+                <button class="item">&nbsp6&nbsp</button>
+                <button class="item">&nbsp8&nbsp</button>
                 <button class="item">10</button>
                 <button class="item">12</button>
                 <button class="item">14</button>
@@ -955,7 +973,7 @@
             <div class="body-head">杈撻�佺嚎鐘舵��</div>
             <div class="state states">
                 <span>杩愯緭绾挎�绘暟</span>
-                <span class="line-ss">48</span>
+                <span class="line-ss">58</span>
             </div>
             <div class="button"><span>鎵�鏈夌姸鎬�</span></div>
             <div class="button item-group">
@@ -1485,8 +1503,11 @@
                     for (var i = 0; i < crns.length; i++){
                         var crnEl = $("#crn-"+crns[i].crnId);
                         crnEl.attr("class", "machine " + crns[i].crnStatus);
-                        var unit = ($('.item').eq(0).width()+4)/2;
-                        crnEl.animate({left: (crns[i].bay * unit + 25) +'px'}, 1000);
+                        var unit = ($('.item').eq(0).width()+13)/2;
+                        if (crns[i].bay < 0) {
+                            crns[i].bay = 0
+                        }
+                        crnEl.animate({left: (crns[i].bay * unit) +'px'}, 1000);
                     }
                 } else if (res.code === 403){
                     parent.location.href = baseUrl+"/login";
@@ -1496,7 +1517,6 @@
             }
         });
     }
-
     // 鎵爜鍣ㄥ疄鏃舵暟鎹幏鍙�
     function getBarcodeInfo(){
         $.ajax({
diff --git a/src/main/webapp/views/crn.html b/src/main/webapp/views/crn.html
index cf44fb9..3999603 100644
--- a/src/main/webapp/views/crn.html
+++ b/src/main/webapp/views/crn.html
@@ -122,10 +122,10 @@
                     <th>璧拌閫熷害锛坢/min)</th>
                     <th>鍗囬檷閫熷害锛坢/min)</th>
                     <th>鍙夌墮閫熷害锛坢/min)</th>
-                    <th>璧拌璺濈(m)</th>
-                    <th>鍗囬檷璺濈(m)</th>
-                    <th>璧拌鏃堕暱(s)</th>
-                    <th>鍗囬檷鏃堕暱(s)</th>
+                    <th>璧拌璺濈(Km)</th>
+                    <th>鍗囬檷璺濈(Km)</th>
+                    <th>璧拌鏃堕暱(H)</th>
+                    <th>鍗囬檷鏃堕暱(H)</th>
                 </tr>
                 </thead>
                 <tbody>
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index c37f3b0..e8d4ce3 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -12,12 +12,15 @@
 <!--			<li class="right">娉ㄩ攢<a id="about" class="nav-unselect" onclick="logout()" href="#"></a></li>-->
 <!--		</div>-->
 <div class="sidebar">
-    <ul>
+    <ul class="cl-effect-1">
         <li><a id="console" onclick="nav(this.id)" class="nav-select" href="#">涓绘帶鍥�</a></li>
         <li><a id="pipeline" onclick="nav(this.id)" class="nav-unselect" href="#">杈撻�佽澶�</a></li>
         <li><a id="crn" onclick="nav(this.id)" class="nav-unselect" href="#">鍫嗗灈鏈�</a></li>
     </ul>
 </div>
+<!--<div style="z-index: 999; position: absolute; top: 250px; left: 900px; width: 200px; height: 200px; opacity: 0.5;background-color: #0000FF">-->
+
+<!--</div>-->
 <!-- 涓讳綋鍐呭 -->
 <iframe id="content" src="console.html"></iframe>
 <footer class="footer">

--
Gitblit v1.9.1