From b157c60bf9087c40dccfd3dc929726b8c558f1fc Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 17 十一月 2025 08:38:02 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |  852 ------------------------------------------
 src/main/java/com/zy/core/MainProcess.java                  |   24 -
 src/main/webapp/static/js/common.js                         |    2 
 pom.xml                                                     |    2 
 src/main/resources/application.yml                          |  261 ------------
 5 files changed, 5 insertions(+), 1,136 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2fcbb03..c427b83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,7 +185,7 @@
     </dependencies>
 
     <build>
-        <finalName>flsbwcs</finalName>
+        <finalName>wcs</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
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 bfefac2..0006e50 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -810,150 +810,6 @@
     }
 
     /**
-     * 鍫嗗灈鏈烘棤浠诲姟涓ゅ垎閽燂紝鍥炲叆搴撳彛寰呮満
-     */
-    public synchronized void crnMove() {
-        for (CrnSlave crn : slaveProperties.getCrn()) {
-            if (crn.getId() == 1) {
-                continue;
-            }
-
-            // 鑾峰彇鍫嗗灈鏈轰俊鎭�
-            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
-            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
-            if (crnProtocol == null) {
-                continue;
-            }
-            BasCrnp basCrnp = basCrnpService.selectById(crn.getId());
-            if (basCrnp == null) {
-                log.error("{}鍙峰爢鍨涙満灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�", crn.getId());
-                continue;
-            }
-
-            if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO) {
-                if (crnProtocol.getBay() == 1 && crnProtocol.getLevel() == 1) {
-                    continue;
-                }
-
-                if (System.currentTimeMillis() - crnProtocol.getLastCommandTime() < 1000 * 60 * 2) {
-                    continue;
-                }
-
-                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId());
-                if (object != null) {
-                    continue;
-                }
-
-                List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
-                        .eq("crn_no", crn.getId())
-                        .notIn("wrk_sts", 5, 14, 15)
-                );
-                if (!wrkMasts.isEmpty()) {
-                    continue;
-                }
-
-                CrnSlave.CrnStn crnStn = crn.getCrnInStn().get(0);
-
-                News.info("鍫嗗灈鏈烘棤浠诲姟鑷姩鍥炲叆搴撳彛寰呮満==>>" + crnProtocol.getCrnNo() + "鍙峰爢鍨涙満");
-                // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-                CrnCommand crnCommand = new CrnCommand();
-                crnCommand.setCrnNo(crnProtocol.getCrnNo()); // 鍫嗗灈鏈虹紪鍙�
-                crnCommand.setTaskNo((short) 9999); // 宸ヤ綔鍙�
-                crnCommand.setAckFinish((short) 0);  // 浠诲姟瀹屾垚纭浣�
-                crnCommand.setTaskMode(CrnTaskModeType.CRN_MOVE); // 浠诲姟妯″紡:  鍫嗗灈鏈虹Щ鍔�
-                crnCommand.setSourcePosX(crnStn.getRow().shortValue());     // 婧愬簱浣嶆帓
-                crnCommand.setSourcePosY((short) 1);     // 婧愬簱浣嶅垪
-                crnCommand.setSourcePosZ((short) 1);     // 婧愬簱浣嶅眰
-                crnCommand.setDestinationPosX((short) 0);     // 鐩爣搴撲綅鎺�
-                crnCommand.setDestinationPosY((short) 0);     // 鐩爣搴撲綅鍒�
-                crnCommand.setDestinationPosZ((short) 0);     // 鐩爣搴撲綅灞�
-                if (!MessageQueue.offer(SlaveType.Crn, crnProtocol.getCrnNo(), new Task(2, crnCommand))) {
-                    News.error("鍫嗗灈鏈虹Щ鍔ㄥ懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnProtocol.getCrnNo(), JSON.toJSON(crnCommand));
-                }
-                crnThread.setBackHpFlag(true);
-                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 10);
-                try {
-                    Thread.sleep(500);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    /**
-     * 鍫嗗灈鏈烘湁鍏ュ簱浠诲姟鏃讹紝鍥炲叆搴撳彛寰呮満
-     */
-    public synchronized void crnMoveByInTask() {
-        for (CrnSlave crn : slaveProperties.getCrn()) {
-            if (crn.getId() == 1) {
-                continue;
-            }
-
-            // 鑾峰彇鍫嗗灈鏈轰俊鎭�
-            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
-            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
-            if (crnProtocol == null) {
-                continue;
-            }
-            BasCrnp basCrnp = basCrnpService.selectById(crn.getId());
-            if (basCrnp == null) {
-                log.error("{}鍙峰爢鍨涙満灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�", crn.getId());
-                continue;
-            }
-
-            if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO) {
-                if (crnProtocol.getBay() == 1 && crnProtocol.getLevel() == 1) {
-                    continue;
-                }
-
-                if (System.currentTimeMillis() - crnProtocol.getLastCommandTime() < 1000 * 60) {
-                    continue;
-                }
-
-                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId());
-                if (object != null) {
-                    continue;
-                }
-
-                List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
-                        .eq("crn_no", crn.getId())
-                        .eq("wrk_sts", 2)
-                );
-                if (wrkMasts.isEmpty()) {
-                    continue;
-                }
-
-                CrnSlave.CrnStn crnStn = crn.getCrnInStn().get(0);
-
-                News.info("鍫嗗灈鏈烘湁鍏ュ簱浠诲姟鏃讹紝鍥炲叆搴撳彛寰呮満==>>" + crnProtocol.getCrnNo() + "鍙峰爢鍨涙満");
-                // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-                CrnCommand crnCommand = new CrnCommand();
-                crnCommand.setCrnNo(crnProtocol.getCrnNo()); // 鍫嗗灈鏈虹紪鍙�
-                crnCommand.setTaskNo((short) 9999); // 宸ヤ綔鍙�
-                crnCommand.setAckFinish((short) 0);  // 浠诲姟瀹屾垚纭浣�
-                crnCommand.setTaskMode(CrnTaskModeType.CRN_MOVE); // 浠诲姟妯″紡:  鍫嗗灈鏈虹Щ鍔�
-                crnCommand.setSourcePosX(crnStn.getRow().shortValue());     // 婧愬簱浣嶆帓
-                crnCommand.setSourcePosY((short) 1);     // 婧愬簱浣嶅垪
-                crnCommand.setSourcePosZ((short) 1);     // 婧愬簱浣嶅眰
-                crnCommand.setDestinationPosX((short) 0);     // 鐩爣搴撲綅鎺�
-                crnCommand.setDestinationPosY((short) 0);     // 鐩爣搴撲綅鍒�
-                crnCommand.setDestinationPosZ((short) 0);     // 鐩爣搴撲綅灞�
-                if (!MessageQueue.offer(SlaveType.Crn, crnProtocol.getCrnNo(), new Task(2, crnCommand))) {
-                    News.error("鍫嗗灈鏈虹Щ鍔ㄥ懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", crnProtocol.getCrnNo(), JSON.toJSON(crnCommand));
-                }
-                crnThread.setBackHpFlag(true);
-                redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 10);
-                try {
-                    Thread.sleep(500);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    /**
      * 鍏ュ簱  ===>>  鍫嗗灈鏈虹珯鍒板簱浣�
      */
     public synchronized void crnStnToLoc(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) {
@@ -1855,245 +1711,6 @@
         News.infoNoLog("" + mark + " - 0" + " - 鍫嗗灈鏈哄紓甯镐俊鎭褰曟墽琛屽畬鎴�");
     }
 
-
-    // -------------------------------------------------------------------------------
-
-    /**
-     * 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�
-     */
-    public synchronized void storeEmptyPlt(Integer mark) {
-
-        for (DevpSlave devp : slaveProperties.getDevp()) {
-            // 閬嶅巻绌烘澘鍏ュ簱鍙�
-            for (DevpSlave.Sta emptyInSta : devp.getEmptyInSta()) {
-                // 鑾峰彇绌烘澘鍏ュ簱绔欎俊鎭�
-                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-                StaProtocol staProtocol = devpThread.getStation().get(emptyInSta.getStaNo());
-                if (staProtocol == null) {
-                    continue;
-                } else {
-                    staProtocol = staProtocol.clone();
-                }
-
-                LedThread ledThread = null;
-                if (!Cools.isEmpty(emptyInSta.getLed())) {
-                    ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, emptyInSta.getLed());
-                }
-
-                if (!staProtocol.isLoading()) {
-                    continue;
-                }
-
-                // 鑾峰彇鏉$爜鎵弿浠俊鎭�
-                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, emptyInSta.getBarcode());
-                if (barcodeThread == null) {
-                    continue;
-                }
-
-                // 绔欑偣鏉′欢鍒ゆ柇
-                if (staProtocol.isAutoing()
-                        && staProtocol.isInEnable()
-                        && staProtocol.isEmptyMk()
-                        && (staProtocol.getWorkNo() > 9990 && staProtocol.getWorkNo() <= 9999)
-                        && staProtocol.isPakMk()
-                        && staProtocol.getEmptyInType() == 1
-                ) {
-                    News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛岋細绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�");
-
-                    String barcode = barcodeThread.getBarcode();
-                    if (!Cools.isEmpty(barcode)) {
-                        News.info("" + mark + " - 1" + " - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", emptyInSta.getBarcode(), barcode);
-                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) {
-                            News.info("" + mark + " - 2" + " - 鎵爜澶辫触1 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo());
-                            // led 寮傚父鏄剧ず
-                            if (ledThread != null) {
-                                String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯";
-                                MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
-                            }
-                            continue;
-                        }
-                    } else {
-                        News.info("" + mark + " - 3" + " - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo());
-                        // led 寮傚父鏄剧ず
-                        if (ledThread != null) {
-                            String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯";
-                            MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
-                        }
-                        continue;
-                    }
-
-                    try {
-                        LocTypeDto locTypeDto = new LocTypeDto(staProtocol);
-
-                        SearchLocParam param = new SearchLocParam();
-                        param.setIoType(10);
-                        param.setSourceStaNo(emptyInSta.getStaNo());
-                        param.setLocType1(locTypeDto.getLocType1());
-                        param.setBarcode(barcode);
-                        String response = new HttpHandler.Builder()
-                                .setUri(wmsUrl)
-                                .setPath("/rpc/pakin/loc/v1")
-                                .setJson(JSON.toJSONString(param))
-                                .build()
-                                .doPost();
-                        JSONObject jsonObject = JSON.parseObject(response);
-                        if (jsonObject.getInteger("code").equals(200)) {
-                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
-
-                            LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
-                                    .eq("loc_no", dto.getLocNo()));
-
-                            // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护
-                            staProtocol.setWorkNo(dto.getWorkNo().shortValue());
-                            staProtocol.setStaNo(dto.getStaNo().shortValue());
-                            staProtocol.setPalletSize(locMast.getLocType2());
-                            devpThread.setPakMk(staProtocol.getSiteId(), false);
-                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
-                            if (!result) {
-                                News.errorNoLog("" + mark + " - 1" + " - 鏇存柊plc绔欑偣淇℃伅澶辫触");
-                                throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                            }
-                        } else {
-                            if (ledThread != null) {
-                                String errorMsg = jsonObject.getString("msg");
-                                if (!Cools.isEmpty(errorMsg)) {
-                                    MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
-                                }
-                            }
-                            News.error("" + mark + " - 3" + " - 璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                } else {
-                    News.errorNoLog("" + mark + " - 4" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isAutoing() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable()
-                            + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo()
-                            + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk());
-                }
-            }
-        }
-        News.infoNoLog("" + mark + " - 0" + " - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�");
-    }
-
-    /**
-     * 绌烘墭鐩樺叆搴�-浜х嚎
-     */
-    public synchronized void storeEmptyPltLine(Integer mark) {
-        for (DevpSlave devp : slaveProperties.getDevp()) {
-            // 閬嶅巻绌烘澘鍏ュ簱鍙�
-            for (DevpSlave.Sta emptyInSta : devp.getEmptyInSta()) {
-                // 鑾峰彇绌烘澘鍏ュ簱绔欎俊鎭�
-                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-                StaProtocol staProtocol = devpThread.getStation().get(emptyInSta.getStaNo());
-                if (staProtocol == null) {
-                    continue;
-                } else {
-                    staProtocol = staProtocol.clone();
-                }
-
-                LedThread ledThread = null;
-                if (!Cools.isEmpty(emptyInSta.getLed())) {
-                    ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, emptyInSta.getLed());
-                }
-
-                if (!staProtocol.isLoading()) {
-                    continue;
-                }
-
-                // 鑾峰彇鏉$爜鎵弿浠俊鎭�
-                BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, emptyInSta.getBarcode());
-                if (barcodeThread == null) {
-                    continue;
-                }
-
-                // 绔欑偣鏉′欢鍒ゆ柇
-                if (staProtocol.isAutoing()
-                        && staProtocol.isInEnable()
-                        && staProtocol.isEmptyMk()
-                        && (staProtocol.getWorkNo() > 9990 && staProtocol.getWorkNo() <= 9999)
-                        && staProtocol.isPakMk()
-                        && staProtocol.getEmptyInType() == 2
-                ) {
-                    News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛岋細绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�");
-
-                    String barcode = barcodeThread.getBarcode();
-                    if (!Cools.isEmpty(barcode)) {
-                        News.info("" + mark + " - 1" + " - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", emptyInSta.getBarcode(), barcode);
-                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) {
-                            News.info("" + mark + " - 2" + " - 鎵爜澶辫触1 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo());
-                            // led 寮傚父鏄剧ず
-                            if (ledThread != null) {
-                                String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯";
-                                MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
-                            }
-                            continue;
-                        }
-                    } else {
-                        News.info("" + mark + " - 3" + " - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo());
-                        // led 寮傚父鏄剧ず
-                        if (ledThread != null) {
-                            String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯";
-                            MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
-                        }
-                        continue;
-                    }
-
-                    WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>()
-                            .eq("barcode", barcode)
-                    );
-                    if (wrkMast != null) {
-                        continue;
-                    }
-
-                    //妫�娴嬫槸鍚︽湁鍏ュ簱浠诲姟
-                    List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
-                            .in("io_type", 1, 53, 57)
-                            .in("source_sta_no", 1002, 1007)
-                    );
-                    if (!inWrkMasts.isEmpty()) {
-                        News.error("" + mark + " - 2" + " - 妫�娴嬪瓨鍦ㄥ叆搴撲换鍔★紝绛夊緟鍏ュ簱浠诲姟鎵ц瀹屾垚鍐嶅叆绌烘墭锛屽伐浣滃彿={}");
-                        continue;
-                    }
-
-                    int workNo = commonService.getWorkNo(3);
-                    // 鐢熸垚宸ヤ綔妗�
-                    WrkMast wrkMast1 = new WrkMast();
-                    wrkMast1.setWrkNo(workNo);
-                    wrkMast1.setIoTime(new Date());
-                    wrkMast1.setWrkSts(2L); // 宸ヤ綔鐘舵�侊細璁惧涓婅蛋
-                    wrkMast1.setIoType(3); // 鍏ュ嚭搴撶姸鎬侊細3.绔欏埌绔�
-                    wrkMast1.setIoPri(13D); // 浼樺厛绾�
-                    wrkMast1.setSourceStaNo(emptyInSta.getStaNo());
-                    wrkMast1.setStaNo(1004);
-                    wrkMast1.setBarcode(barcode);
-                    // 鎿嶄綔浜哄憳鏁版嵁
-                    wrkMast1.setAppeTime(new Date());
-                    wrkMast1.setModiTime(new Date());
-                    boolean res = wrkMastService.insert(wrkMast1);
-                    if (!res) {
-                        throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
-                    }
-
-                    // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护
-                    staProtocol.setWorkNo((short) workNo);
-                    staProtocol.setStaNo((short) 2003);
-                    staProtocol.setPalletSize((short) 1);
-                    devpThread.setPakMk(staProtocol.getSiteId(), false);
-                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
-                    if (!result) {
-                        News.errorNoLog("" + mark + " - 1" + " - 鏇存柊plc绔欑偣淇℃伅澶辫触");
-                        throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                    }
-                } else {
-                    News.errorNoLog("" + mark + " - 4" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isAutoing() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable()
-                            + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo()
-                            + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk());
-                }
-            }
-        }
-        News.infoNoLog("" + mark + " - 0" + " - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�");
-    }
-
     /**
      * 鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�
      */
@@ -2625,473 +2242,4 @@
         return true;
     }
 
-    /**
-     * 鍫嗗灈鏈烘紨绀�  ===>> 搴撲綅绉昏浆
-     */
-    public synchronized void crnDemoOfLocMove1() {
-        try {
-            for (CrnSlave crn : slaveProperties.getCrn()) {
-                if (!crn.getDemo()) {
-                    continue;
-                }   // 蹇呴』涓烘紨绀虹姸鎬�
-
-                CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
-                CrnProtocol crnProtocol = crnThread.getCrnProtocol();
-                if (crnProtocol == null) {
-                    continue;
-                }
-
-                // 鍙湁褰撳爢鍨涙満绌洪棽 骞朵笖 鏃犱换鍔℃椂鎵嶇户缁墽琛�
-                if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO) {
-                    // 鑾峰彇绉诲簱宸ヤ綔妗d俊鎭�
-                    WrkMast wrkMast = wrkMastMapper.selectLocMove(crn.getId());
-                    if (null != wrkMast) {
-                        continue;
-                    }
-
-                    LocMast sourceLoc = locMastService.queryDemoSourceLoc(crn.getId());
-                    LocMast loc = locMastService.queryDemoLoc(crn.getId());
-                    if (null == sourceLoc || null == loc) {
-                        continue;
-                    }
-
-                    Integer ctnType = 1;
-                    if (ctnType.equals(loc.getCtnType())) {
-                        continue;
-                    }
-
-                    String sourceLocNo = sourceLoc.getLocNo();
-                    String locNo = loc.getLocNo();
-
-                    // 鑾峰彇宸ヤ綔鍙�
-                    int workNo = commonService.getWorkNo(0);
-                    // 淇濆瓨宸ヤ綔妗�
-                    wrkMast = new WrkMast();
-                    wrkMast.setWrkNo(workNo);
-                    wrkMast.setIoTime(new Date());
-                    wrkMast.setWrkSts(11L); // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID
-                    wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇
-                    wrkMast.setIoPri(13D);
-                    wrkMast.setCrnNo(crn.getId());
-                    wrkMast.setSourceLocNo(sourceLocNo); // 婧愬簱浣�
-                    wrkMast.setLocNo(locNo); // 鐩爣搴撲綅
-                    wrkMast.setFullPlt("N"); // 婊℃澘锛歒
-                    wrkMast.setPicking("N"); // 鎷f枡
-                    wrkMast.setExitMk("N"); // 閫�鍑�
-                    wrkMast.setEmptyMk(sourceLoc.getLocSts().equals("D") ? "Y" : "N"); // 绌烘澘
-                    wrkMast.setBarcode(sourceLoc.getBarcode()); // 鎵樼洏鐮�
-                    wrkMast.setLinkMis("N");
-                    wrkMast.setAppeTime(new Date());
-                    wrkMast.setModiTime(new Date());
-                    int res = wrkMastMapper.insert(wrkMast);
-                    if (res == 0) {
-                        throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
-                    }
-                    // 宸ヤ綔妗f槑缁嗕繚瀛�
-//                List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo));
-//                for (LocDetl locDetl : locDetls) {
-//                    WrkDetl wrkDetl = new WrkDetl();
-//                    wrkDetl.setWrkNo(workNo);
-//                    wrkDetl.setIoTime(new Date());
-//                    wrkDetl.setAnfme(locDetl.getAnfme());
-//                    VersionUtils.setWrkDetl(wrkDetl, locDetl); // 鐗堟湰鎺у埗
-//                    wrkDetl.setAppeTime(new Date());
-//                    wrkDetl.setModiTime(new Date());
-//                    if (!wrkDetlService.insert(wrkDetl)) {
-//                        throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
-//                    }
-//                }
-                    // 淇敼婧愬簱浣嶇姸鎬�
-                    if (sourceLoc.getLocSts().equals("D")) {
-                        sourceLoc.setLocSts("R"); // R.鍑哄簱棰勭害
-                        sourceLoc.setModiTime(new Date());
-                        if (!locMastService.updateById(sourceLoc)) {
-                            throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�");
-                        }
-                    } else {
-                        throw new CoolException("婧愬簱浣嶅嚭搴撳け璐�");
-                    }
-                    // 淇敼鐩爣搴撲綅鐘舵��
-                    if (loc.getLocSts().equals("O")) {
-                        loc.setLocSts("S"); // S.鍏ュ簱棰勭害
-                        loc.setCtnType(1);
-                        loc.setModiTime(new Date());
-                        if (!locMastService.updateById(loc)) {
-                            throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�");
-                        }
-                    } else {
-                        throw new CoolException("绉昏浆澶辫触");
-                    }
-
-                }
-            }
-        } catch (Exception e) {
-            News.error("鍫嗗灈鏈烘紨绀�  ===>> 搴撲綅绉昏浆澶辫触", e);
-            e.printStackTrace();
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-        }
-    }
-
-    /**
-     * 鍫嗗灈鏈哄懡浠や笅鍙戝悗锛屽紓姝ヤ慨鏀瑰伐浣滄。鐘舵��
-     */
-    public synchronized void crnIoWrkMast() {
-        for (CrnSlave crn : slaveProperties.getCrn()) {
-            // 鑾峰彇鍫嗗灈鏈轰俊鎭�
-            CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId());
-            CrnProtocol crnProtocol = crnThread.getCrnProtocol();
-            if (crnProtocol == null) {
-                continue;
-            }
-            Date now = new Date();
-            // 鍫嗗灈鏈烘鍦ㄨ繍琛�
-            if (crnProtocol.getStatusType() != CrnStatusType.IDLE && crnProtocol.getTaskNo() != 0 && crnProtocol.getModeType() == CrnModeType.AUTO) {
-                // 鑾峰彇宸ヤ綔妗�
-                WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo());
-                if (wrkMast == null) {
-                    continue;
-                }
-                // 鍏ュ簱
-                if (wrkMast.getWrkSts() == 1 || wrkMast.getWrkSts() == 2) {
-                    News.warn("鍫嗗灈鏈洪潪绌洪棽鎯呭喌涓嬶紝寮�濮嬩慨鏀瑰伐浣滄。鐘舵�併�俒id:{},鏃堕棿锛歿}] >>>>> 鍫嗗灈鏈哄綋鍓嶇姸鎬佷负锛歿}銆備换鍔″彿:{}", crn.getId(), DateUtils.convert(now, DateUtils.yyyyMMddHHmmsssss_F), crnProtocol.getStatusType().desc, crnProtocol.getTaskNo());
-                    // 淇敼宸ヤ綔妗g姸鎬� 2.璁惧涓婅蛋 => 3.鍚婅溅鍏ュ簱涓�
-                    wrkMast.setWrkSts(3L);
-                    wrkMast.setCrnStrTime(now);
-                    wrkMast.setModiTime(now);
-                    if (wrkMastMapper.updateById(wrkMast) == 0) {
-                        News.error("淇敼宸ヤ綔妗g姸鎬� 2.璁惧涓婅蛋 => 3.鍚婅溅鍏ュ簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo());
-                    }
-                    News.warn("淇敼宸ヤ綔妗g姸鎬佹垚鍔熴�俒鏃堕棿锛歿}] >>>>> 浠诲姟鍙�:{}", DateUtils.convert(now, DateUtils.yyyyMMddHHmmsssss_F), wrkMast.getWrkNo());
-                }
-                // 鍑哄簱銆佺Щ搴�
-                if (wrkMast.getWrkSts() == 11) {
-                    News.warn("鍫嗗灈鏈洪潪绌洪棽鎯呭喌涓嬶紝寮�濮嬩慨鏀瑰伐浣滄。鐘舵�併�俒id:{},鏃堕棿锛歿}] >>>>> 鍫嗗灈鏈哄綋鍓嶇姸鎬佷负锛歿}銆備换鍔″彿:{}", crn.getId(), DateUtils.convert(now, DateUtils.yyyyMMddHHmmsssss_F), crnProtocol.getStatusType().desc, crnProtocol.getTaskNo());
-                    // 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓�
-                    wrkMast.setWrkSts(12L);
-                    wrkMast.setCrnStrTime(now);
-                    wrkMast.setModiTime(now);
-                    if (wrkMastMapper.updateById(wrkMast) == 0) {
-                        News.error("淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo());
-                    }
-                    News.warn("淇敼宸ヤ綔妗g姸鎬佹垚鍔熴�俒鏃堕棿锛歿}] >>>>> 浠诲姟鍙�:{}", DateUtils.convert(now, DateUtils.yyyyMMddHHmmsssss_F), wrkMast.getWrkNo());
-                }
-
-
-            }
-
-        }
-    }
-
-    // RGV  ===>> 鎵ц瀵筊GV鎿嶄綔
-    public synchronized void rgvExecute(Integer mark) {
-        ArrayList<Integer> list = new ArrayList<Integer>() {{
-            add(2003);
-            add(2002);
-        }};
-        for (Integer staNo : list) {
-            Integer devpId = null;
-            Integer rgvStaNoDevpId = null;
-            Integer rgvStaNo = null;
-            if (staNo == 2003) {
-                devpId = 1;
-                rgvStaNo = 2002;
-                rgvStaNoDevpId = 2;
-            } else {
-                devpId = 2;
-                rgvStaNo = 2003;
-                rgvStaNoDevpId = 1;
-            }
-
-            SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devpId);
-            if (devpThread == null) {
-                continue;
-            }
-            StaProtocol staProtocol = devpThread.getStation().get(staNo);
-            if (staProtocol == null) {
-                continue;
-            } else {
-                staProtocol = staProtocol.clone();
-            }
-
-            if (staProtocol.isAutoing()
-                    && staProtocol.isLoading()
-                    && staProtocol.isInEnable()
-                    && staProtocol.getWorkNo() > 0
-            ) {
-                WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>()
-                        .eq("wrk_no", staProtocol.getWorkNo()));
-
-                if (wrkMast == null) {
-                    continue;
-                }
-
-                if (wrkMast.getWrkSts() == 201) {
-                    continue;
-                }
-
-                SiemensDevpThread devpThread2 = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, rgvStaNoDevpId);
-                if (devpThread2 == null) {
-                    continue;
-                }
-                StaProtocol staProtocolRgvStaNo = devpThread2.getStation().get(rgvStaNo);
-                if (staProtocolRgvStaNo == null) {
-                    continue;
-                }
-
-                if (!staProtocolRgvStaNo.isAutoing()) {
-                    continue;
-                }
-
-                if (staProtocolRgvStaNo.isLoading()) {
-                    continue;
-                }
-
-                // 鑾峰彇RGV淇℃伅
-                RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, 1);
-                if (rgvThread == null) {
-                    continue;
-                }
-
-                RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-                if (rgvProtocol == null) {
-                    continue;
-                }
-
-                if (rgvProtocol.statusType1 != RgvStatusType.IDLE && rgvProtocol.getTaskNo1() != 0) {
-                    continue;
-                }
-
-                Object object = redisUtil.get(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo());
-                if (object != null) {
-                    continue;
-                }
-
-                RgvCommand command = new RgvCommand();
-                command.setRgvNo(1); // RGV缂栧彿
-                command.setAckFinish1((short) 0);  // 浠诲姟瀹屾垚纭浣�
-                command.setTaskNo1(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙�
-                command.setTaskMode1(RgvTaskModeType.FETCH_PUT); // 浠诲姟妯″紡: 鍙栨斁璐�
-                command.setSourceStaNo1(staNo.shortValue()); // 婧愮珯
-                command.setDestinationStaNo1(rgvStaNo.shortValue());  // 鐩爣绔�
-                command.setCommand((short) 0);
-
-                boolean result = MessageQueue.offer(SlaveType.Rgv, 1, new Task(4, command));
-                if (!result) {
-                    throw new CoolException("RGV鎸囦护涓嬪彂澶辫触");
-                }
-
-                wrkMast.setWrkSts(201L);//201.RGV鎼繍涓�
-                wrkMast.setModiTime(new Date());
-                wrkMastService.updateById(wrkMast);
-                redisUtil.set(RedisConstantType.RGV_MOVE_LOCK + wrkMast.getWrkNo(), "lock", 60 * 60);
-            }
-        }
-    }
-
-    // RGV  ===>> 鎵ц瀵筊GV宸ヤ綔妗g殑瀹屾垚鎿嶄綔
-    public synchronized void rgvFinished(Integer mark) {
-        for (RgvSlave rgvSlave : slaveProperties.getRgv()) {
-            // 鑾峰彇RGV淇℃伅
-            RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
-            if (rgvThread == null) {
-                continue;
-            }
-
-            RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-            if (rgvProtocol == null) {
-                continue;
-            }
-
-            //  鐘舵�侊細绛夊緟纭 骞朵笖  浠诲姟瀹屾垚浣� = 1
-            if (rgvProtocol.statusType1 == RgvStatusType.WAITING && rgvProtocol.getTaskNo1() != 0) {
-                News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛屽RGV宸ヤ綔妗g殑瀹屾垚鎿嶄綔");
-                // 鑾峰彇鍏ュ簱寰呯‘璁ゅ伐浣滄。
-                WrkMast wrkMast = wrkMastMapper.selectPakInStep3(rgvProtocol.getTaskNo1().intValue());
-                if (wrkMast == null) {
-                    News.error("" + mark + " - 1" + " - RGV澶勪簬绛夊緟纭涓斾换鍔″畬鎴愮姸鎬侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�俁GV鍙�={}锛屽伐浣滃彿={}", rgvSlave.getId(), rgvProtocol.getTaskNo1());
-                    continue;
-                }
-
-                if (wrkMast.getWrkSts() != 201) {
-                    continue;
-                }
-
-                if (wrkMast.getIoType() == 3) {
-                    //绔欏埌绔欒蛋鍙﹀涓�涓柟娉�
-                    continue;
-                }
-
-                Integer devpId = null;
-                Integer devpStaNo = null;
-                String locNo = null;
-                Long updateWrkSts = null;
-                if (wrkMast.getIoType() < 100) {
-                    //鍏ュ簱
-                    updateWrkSts = 2L;
-                    devpId = 1;
-                    devpStaNo = 2003;
-                    locNo = wrkMast.getLocNo();
-                } else {
-                    //鍑哄簱
-                    updateWrkSts = 15L;
-                    devpId = 2;
-                    devpStaNo = 2002;
-                    locNo = wrkMast.getSourceLocNo();
-                }
-
-                // 鑾峰彇鍏ュ簱绔欎俊鎭�
-                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devpId);
-                StaProtocol staProtocol = devpThread.getStation().get(devpStaNo);
-                if (staProtocol == null) {
-                    continue;
-                } else {
-                    staProtocol = staProtocol.clone();
-                }
-
-                if (staProtocol.isAutoing()
-                        && staProtocol.isLoading()
-                        && staProtocol.getWorkNo() == 0
-                ) {
-                    LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
-                            .eq("loc_no", locNo));
-                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
-                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
-                    staProtocol.setPalletSize(locMast.getLocType2());
-                    devpThread.setPakMk(staProtocol.getSiteId(), false);
-                    boolean result = MessageQueue.offer(SlaveType.Devp, devpId, new Task(2, staProtocol));
-                    if (!result) {
-                        throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                    }
-                    wrkMastMapper.updateWrkSts(updateWrkSts, wrkMast.getWrkNo());
-                    rgvThread.setResetFlag1(true);
-                }
-            }
-        }
-        News.infoNoLog("" + mark + " - 0" + " - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�");
-    }
-
-    // RGV  ===>> 鎵ц瀵筊GV宸ヤ綔妗g殑瀹屾垚鎿嶄綔 绔欏埌绔�
-    public synchronized void rgvFinished2(Integer mark) {
-        for (RgvSlave rgvSlave : slaveProperties.getRgv()) {
-            // 鑾峰彇RGV淇℃伅
-            RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
-            if (rgvThread == null) {
-                continue;
-            }
-
-            RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-            if (rgvProtocol == null) {
-                continue;
-            }
-
-            //  鐘舵�侊細绛夊緟纭 骞朵笖  浠诲姟瀹屾垚浣� = 1
-            if (rgvProtocol.statusType1 == RgvStatusType.WAITING && rgvProtocol.getTaskNo1() != 0) {
-                News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛屽RGV宸ヤ綔妗g殑瀹屾垚鎿嶄綔");
-                // 鑾峰彇鍏ュ簱寰呯‘璁ゅ伐浣滄。
-                WrkMast wrkMast = wrkMastMapper.selectPakInStep3(rgvProtocol.getTaskNo1().intValue());
-                if (wrkMast == null) {
-                    News.error("" + mark + " - 1" + " - RGV澶勪簬绛夊緟纭涓斾换鍔″畬鎴愮姸鎬侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�俁GV鍙�={}锛屽伐浣滃彿={}", rgvSlave.getId(), rgvProtocol.getTaskNo1());
-                    continue;
-                }
-
-                if (wrkMast.getWrkSts() != 201) {
-                    continue;
-                }
-
-                if (wrkMast.getIoType() != 3) {
-                    //涓嶆槸绔欏埌绔�
-                    continue;
-                }
-
-                Integer devpId = 2;
-                Integer devpStaNo = 2002;
-
-                // 鑾峰彇鍏ュ簱绔欎俊鎭�
-                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devpId);
-                StaProtocol staProtocol = devpThread.getStation().get(devpStaNo);
-                if (staProtocol == null) {
-                    continue;
-                } else {
-                    staProtocol = staProtocol.clone();
-                }
-
-                if (staProtocol.isAutoing()
-                        && staProtocol.isLoading()
-                        && staProtocol.getWorkNo() == 0
-                ) {
-
-                    short locType2 = 1;
-                    String barcode = wrkMast.getBarcode();
-                    if (barcode.startsWith("11")) {
-                        locType2 = 1;
-                    } else if (barcode.startsWith("13")) {
-                        locType2 = 2;
-                    } else if (barcode.startsWith("16")) {
-                        locType2 = 3;
-                    } else {
-                        continue;
-                    }
-
-                    staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue());
-                    staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
-                    staProtocol.setPalletSize(locType2);
-                    devpThread.setPakMk(staProtocol.getSiteId(), false);
-                    boolean result = MessageQueue.offer(SlaveType.Devp, devpId, new Task(2, staProtocol));
-                    if (!result) {
-                        throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
-                    }
-                    rgvThread.setResetFlag1(true);
-
-                    wrkMastService.delete(new EntityWrapper<WrkMast>()
-                            .eq("wrk_no", wrkMast.getWrkNo()));
-                }
-            }
-        }
-        News.infoNoLog("" + mark + " - 0" + " - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�");
-    }
-
-//    /**
-//     * 鍏ュ嚭搴撴ā寮忓垏鎹㈠嚱鏁�
-//     */
-//    public synchronized void ioConvert() {
-//        try {
-//            // 鏍规嵁杈撻�佺嚎plc閬嶅巻
-//            for (DevpSlave devp : slaveProperties.getDevp()) {
-//                SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-//
-//                for (DevpSlave.Sta inSta : devp.getInSta()) {
-//                    if (inSta.getStaNo() == 2) {
-//                        continue;
-//                    }
-//                    WrkMast pakout = wrkMastMapper.selectWorkingPakout(inSta.getStaNo());
-//                    switch (inSta.getStaNo()) {
-//                        case 101://1F
-//                            if (pakout != null) {
-//                                if (devpThread.ioModeOf2F != IoModeType.PAKOUT_MODE) {
-//                                    // 鍑哄簱鍒囨崲涓�
-//                                    devpThread.ioModeOf2F = IoModeType.PAKOUT_BOOTING;
-//                                    WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
-//                                    if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
-//                                            && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading()
-//                                            && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) {
-//                                        // 鍑哄簱妯″紡
-//                                        devpThread.ioModeOf2F = IoModeType.PAKOUT_MODE;
-//                                    }
-//                                }
-//                            } else {
-//                                // 鍏ュ簱妯″紡
-//                                devpThread.ioModeOf2F = IoModeType.PAKIN_MODE;
-//                            }
-//                            break;
-//                    }
-//                }
-//
-//            }
-//
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
-//
-//
-//    }
 }
diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index c5e9015..e43d988 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -41,10 +41,6 @@
                         continue;
                     }
 
-                    // 婕旂ず
-                    mainService.crnDemoOfLocMove1();
-                    // 鍏ュ嚭搴撴ā寮忓垏鎹㈠嚱鏁�
-//                    mainService.ioConvert();
                     // 鍏ュ簱  ===>> 鍏ュ簱绔欏埌鍫嗗灈鏈虹珯锛屾牴鎹潯鐮佹壂鎻忕敓鎴愬叆搴撳伐浣滄。
                     mainService.generateStoreWrkFile(1); // 缁勬墭
                     mainService.generateStoreWrkFile0(2); // WMS鍏ュ簱
@@ -57,35 +53,15 @@
                     mainService.crnStnToOutStn(4);
                     // 鍏ュ嚭搴�  ===>>  鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂
                     mainService.crnIoExecute(5);
-                    // 鍏ュ嚭搴撳寮� ===>> 鍫嗗灈鏈哄懡浠や笅鍙戝悗锛屽紓姝ヤ慨鏀瑰伐浣滄。鐘舵��
-//                    mainService.crnIoWrkMast();
                     // 鍏ュ簱  ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣�
                     mainService.storeFinished(6);
                     // 鍫嗗灈鏈哄紓甯镐俊鎭褰�
                     mainService.recCrnErr(7);
-
-
-                    // 绌烘墭鐩樺叆搴�-绔嬪簱  ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�
-                    mainService.storeEmptyPlt(8);
-                    // 绌烘墭鐩樺叆搴�-浜х嚎
-                    mainService.storeEmptyPltLine(13);
-
                     // 鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�
                     mainService.ledExecute(9);
                     // 鍏朵粬  ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅
                     mainService.ledReset(10);
 
-                    // RGV  ===>> 鎵ц瀵筊GV鎿嶄綔
-                    mainService.rgvExecute(11);
-                    // RGV  ===>> 鎵ц瀵筊GV宸ヤ綔妗g殑瀹屾垚鎿嶄綔
-                    mainService.rgvFinished(12);
-                    // RGV  ===>> 鎵ц瀵筊GV宸ヤ綔妗g殑瀹屾垚鎿嶄綔 绔欏埌绔�
-                    mainService.rgvFinished2(14);
-
-                    //鍫嗗灈鏈烘棤浠诲姟涓ゅ垎閽燂紝鍥炲叆搴撳彛寰呮満
-                    mainService.crnMove();
-                    //鍫嗗灈鏈烘湁鍏ュ簱浠诲姟鏃讹紝鍥炲叆搴撳彛寰呮満
-                    mainService.crnMoveByInTask();
 
                 } catch (Exception e) {
                     e.printStackTrace();
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9cb30c8..6364e5d 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -8,7 +8,7 @@
     name: @pom.build.finalName@
   datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    url: jdbc:sqlserver://127.0.0.1:1433;databasename=ytflasrs
+    url: jdbc:sqlserver://127.0.0.1:1433;databasename=shhtgcwcs
     username: sa
     password: sa@123
   mvc:
@@ -39,7 +39,7 @@
 # 涓嬩綅鏈洪厤缃�
 wcs-slave:
   # 鍙屾繁
-  doubleDeep: true
+  doubleDeep: false
   # 鍙屾繁搴撲綅鎺掑彿
   doubleLocs: 3,4,7,10,11,14,15,18,19,22,23,26
   # 宸︽繁搴撲綅鎺掑彿
@@ -52,164 +52,6 @@
   shallowLocsRight: 2,6,9,13,17,21,25
   # 涓�涓爢鍨涙満璐熻矗鐨勮揣鏋舵帓鏁�
   groupCount: 4
-  # 鍫嗗灈鏈�1
-  crn[0]:
-    id: 1
-    ip: 172.17.60.10
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1020
-      row: 6
-      bay: 120
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1013
-      row: 3
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[1]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1016
-      row: 5
-      bay: 120
-      lev: 1
-  # 鍫嗗灈鏈�2
-  crn[1]:
-    id: 2
-    ip: 172.17.60.20
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1023
-      row: 8
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1026
-      row: 9
-      bay: 1
-      lev: 1
-  # 鍫嗗灈鏈�3
-  crn[2]:
-    id: 3
-    ip: 172.17.60.30
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1029
-      row: 12
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1032
-      row: 13
-      bay: 1
-      lev: 1
-  # 鍫嗗灈鏈�4
-  crn[3]:
-    id: 4
-    ip: 172.17.60.40
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1036
-      row: 16
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1039
-      row: 17
-      bay: 1
-      lev: 1
-  # 鍫嗗灈鏈�5
-  crn[4]:
-    id: 5
-    ip: 172.17.60.50
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1042
-      row: 20
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1045
-      row: 21
-      bay: 1
-      lev: 1
-  # 鍫嗗灈鏈�6
-  crn[5]:
-    id: 6
-    ip: 172.17.60.60
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
-    offset: 2
-    demo: false
-    # 鍫嗗灈鏈哄叆搴撶珯鐐�
-    crnInStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1049
-      row: 24
-      bay: 1
-      lev: 1
-    # 鍫嗗灈鏈哄嚭搴撶珯鐐�
-    crnOutStn[0]:
-      devpPlcId: ${wcs-slave.devp[0].id}
-      staNo: 1052
-      row: 25
-      bay: 1
-      lev: 1
-  # RGV绌挎杞�1
-  rgv[0]:
-    id: 1
-    ip: 172.17.60.82
-    port: 502
-    rack: 0
-    slot: 0
   # 杈撻�佺嚎1
   devp[0]:
     id: 1
@@ -245,105 +87,8 @@
     outSta[0]:
       staNo: 102
       led: ${wcs-slave.led[0].id}
-  # 杈撻�佺嚎2
-  devp[1]:
-    id: 2
-    ip: 172.17.60.118
-    port: 102
-    rack: 0
-    slot: 0
-    # 鍏ュ簱鍙�1
-    inSta[0]:
-      staNo: 1002
-      barcode: ${wcs-slave.barcode[2].id}
-      backSta: 1001
-      led: ${wcs-slave.led[7].id}
-    # 鍏ュ簱鍙�2
-    inSta[1]:
-      staNo: 1007
-      barcode: ${wcs-slave.barcode[3].id}
-      backSta: 1003
-      led: ${wcs-slave.led[8].id}
   # 鏉$爜鎵弿浠�1
   barcode[0]:
     id: 1
     ip: 10.10.10.121
-    port: 51236
-  # 鏉$爜鎵弿浠�2
-  barcode[1]:
-    id: 2
-    ip: 10.10.10.121
-    port: 51236
-  # 鏉$爜鎵弿浠�3
-  barcode[2]:
-    id: 3
-    ip: 10.10.10.121
-    port: 51236
-  # 鏉$爜鎵弿浠�4
-  barcode[3]:
-    id: 4
-    ip: 10.10.10.121
-    port: 51236
-   # LED1
-  led[0]:
-    id: 1
-    ip: 127.0.0.1
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1009
-  # LED2
-  led[1]:
-    id: 2
-    ip: 172.17.60.183
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1075
-  # LED3
-  led[2]:
-    id: 3
-    ip: 172.17.60.181
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1058
-  # LED4
-  led[3]:
-    id: 4
-    ip: 172.17.60.184
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1064
-  # LED5
-  led[4]:
-    id: 5
-    ip: 172.17.60.185
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1068
-  # LED6
-  led[5]:
-    id: 6
-    ip: 172.17.60.186
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1071
-  # LED7
-  led[6]:
-    id: 7
-    ip: 172.17.60.182
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[0].id}
-    staArr: 1074
-  # LED8
-  led[7]:
-    id: 8
-    ip: 172.17.60.187
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[1].id}
-    staArr: 1001
-  # LED9
-  led[8]:
-    id: 9
-    ip: 172.17.60.188
-    port: 5005
-    devpPlcId: ${wcs-slave.devp[1].id}
-    staArr: 1007
\ No newline at end of file
+    port: 51236
\ No newline at end of file
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 03fc138..2a45d7e 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -1,4 +1,4 @@
-var baseUrl = "/flsbwcs";
+var baseUrl = "/wcs";
 
 // 璧嬪��
 function setVal(el, val) {

--
Gitblit v1.9.1