From 33050f2e886fb8e4f84313388cc0450550b0b848 Mon Sep 17 00:00:00 2001 From: ytfl <ytfl@qq.com> Date: 星期一, 11 八月 2025 09:56:44 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 440 +++++++++++++++++++++++++++++------------------------- 1 files changed, 236 insertions(+), 204 deletions(-) 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 6e8b64a..b37c954 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -131,7 +131,7 @@ LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); // 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢 - if (!staProtocol.isLoading()){ + if (!staProtocol.isLoading()) { continue; } @@ -139,18 +139,18 @@ && staProtocol.isInEnable() && !staProtocol.isEmptyMk() && staProtocol.getWorkNo() == 9999 - && staProtocol.isPakMk()) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�"); + && staProtocol.isPakMk() && (staProtocol.getEmptyInType() != 1 && staProtocol.getEmptyInType() != 2)) { + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�"); String barcode = barcodeThread.getBarcode(); - if(!Cools.isEmpty(barcode)) { - News.info(""+mark+" - 1"+" - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); - if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { + if (!Cools.isEmpty(barcode)) { + News.info("" + mark + " - 1" + " - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); + if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { // staProtocol.setWorkNo((short) 9992); // staProtocol.setStaNo(inSta.getBackSta().shortValue()); // devpThread.setPakMk(staProtocol.getSiteId(), false); // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); - News.info(""+mark+" - 2"+" - 鎵爜澶辫触1 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); + News.info("" + mark + " - 2" + " - 鎵爜澶辫触1 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); // led 寮傚父鏄剧ず if (ledThread != null) { String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -164,7 +164,7 @@ // devpThread.setPakMk(staProtocol.getSiteId(), false); // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); - News.info(""+mark+" - 3"+" - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); + News.info("" + mark + " - 3" + " - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", inSta.getBarcode(), barcode, inSta.getStaNo()); // led 寮傚父鏄剧ず if (ledThread != null) { String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -177,13 +177,13 @@ WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); //杩囨护鍒ゆ柇锛岄槻姝㈡嫞鏂欏啀鍏ュ簱璐х墿锛岀粡杩囧叆搴撶珯鍐嶅叆搴撴椂锛岃閫�鍥炲埌閫�搴撶珯 WrkMast wrkMast1 = wrkMastMapper.selectPakInStepBarcode(barcode); - if (wrkMast1 !=null){ - if (wrkMast1.getIoType()==103 || wrkMast1.getIoType()==107 || wrkMast1.getIoType()==104){ + if (wrkMast1 != null) { + if (wrkMast1.getIoType() == 103 || wrkMast1.getIoType() == 107 || wrkMast1.getIoType() == 104) { continue; } } if (wrkMast != null) { - News.error(""+mark+" - 4"+" - 宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo()); + News.error("" + mark + " - 4" + " - 宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo()); // staProtocol.setWorkNo((short)9992); // staProtocol.setStaNo(inSta.getBackSta().shortValue()); // devpThread.setPakMk(staProtocol.getSiteId(), false); @@ -207,7 +207,7 @@ .in("sta_no", 1003, 1007) ); if (!wrkMasts.isEmpty()) { - News.error(""+mark+" - 4"+" - 1003绔欏叆搴擄紝妫�娴嬪瓨鍦ㄥ嚭搴撲换鍔★紝绛夊緟鍑哄簱浠诲姟鎵ц瀹屾垚,鎵樼洏鐮�={}", barcode); + News.error("" + mark + " - 4" + " - 1003绔欏叆搴擄紝妫�娴嬪瓨鍦ㄥ嚭搴撲换鍔★紝绛夊緟鍑哄簱浠诲姟鎵ц瀹屾垚,鎵樼洏鐮�={}", barcode); continue; } } @@ -264,7 +264,7 @@ //// ledThread.errorReset(); // } } else { - News.error(""+mark+" - 5"+" - 璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); + News.error("" + mark + " - 5" + " - 璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); // staProtocol.setWorkNo((short)9992); // staProtocol.setStaNo(inSta.getBackSta().shortValue()); // devpThread.setPakMk(staProtocol.getSiteId(), false); @@ -285,15 +285,15 @@ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); } - }else { - News.errorNoLog(""+mark+" - 6"+" - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒"+" 鑷姩淇″彿锛�"+staProtocol.isAutoing()+"銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() - +"銆佺┖鏉夸俊鍙凤細"+ staProtocol.isEmptyMk()+"銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() - +"銆侀攣瀹氭爣璁�"+ staProtocol.isPakMk()); + } else { + News.errorNoLog("" + mark + " - 6" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isAutoing() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() + + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - 缁勬墭 ===銆嬫墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 缁勬墭 ===銆嬫墽琛屽畬鎴�"); } @@ -316,7 +316,7 @@ } // 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢 - if (!staProtocol.isLoading()){ + if (!staProtocol.isLoading()) { continue; } @@ -325,7 +325,7 @@ && !staProtocol.isEmptyMk() && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�"); // 鍒ゆ柇閲嶅宸ヤ綔妗� WrkMast wrkMast = wrkMastMapper.selectPakInStep11(inSta.getStaNo()); if (wrkMast == null) { @@ -344,20 +344,20 @@ wrkMast.setWrkSts(2L); // 宸ヤ綔鐘舵�侊細2.璁惧涓婅蛋 wrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.error(""+mark+" - 1"+" - 鏇存柊宸ヤ綔妗eけ璐ワ紒锛侊紒 [宸ヤ綔鍙凤細{}]", wrkMast.getWrkNo()); + News.error("" + mark + " - 1" + " - 鏇存柊宸ヤ綔妗eけ璐ワ紒锛侊紒 [宸ヤ綔鍙凤細{}]", wrkMast.getWrkNo()); } } else { - News.error(""+mark+" - 2"+" - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); + News.error("" + mark + " - 2" + " - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); } - }else { - News.errorNoLog(""+mark+" - 6"+" - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒"+" 鑷姩淇″彿锛�"+staProtocol.isLoading()+"銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() - +"銆佺┖鏉夸俊鍙凤細"+ staProtocol.isEmptyMk()+"銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() - +"銆侀攣瀹氭爣璁�"+ staProtocol.isPakMk()); + } else { + News.errorNoLog("" + mark + " - 6" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isLoading() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() + + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - wms鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - wms鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); } @@ -382,7 +382,7 @@ && staProtocol.isInEnable() && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�"); // // 鑾峰彇鏉$爜鎵弿浠俊鎭� // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); @@ -435,7 +435,7 @@ LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); // led 寮傚父鏄剧ず if (ledThread != null) { - String errorMsg = "姝や负鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱.璇锋斁鍦�"+pickSta.getBackSta().shortValue()+"绔欑偣"; + String errorMsg = "姝や负鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱.璇锋斁鍦�" + pickSta.getBackSta().shortValue() + "绔欑偣"; MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(5, errorMsg)); } continue; @@ -490,18 +490,18 @@ devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { - News.error(""+mark+" - 3"+" - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); + News.error("" + mark + " - 3" + " - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); } - }else { - News.errorNoLog(""+mark+" - 6"+" - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒"+" 鑷姩淇″彿锛�"+staProtocol.isLoading()+"銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() - +"銆佺┖鏉夸俊鍙凤細"+ staProtocol.isEmptyMk()); + } else { + News.errorNoLog("" + mark + " - 6" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isLoading() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); } /** @@ -525,7 +525,7 @@ && staProtocol.isInEnable() && staProtocol.getWorkNo() > 0 && staProtocol.isPakMk()) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�"); // 鑾峰彇鏉$爜鎵弿浠俊鎭� BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, insta.getBarcode()); @@ -533,9 +533,9 @@ continue; } String barcode = barcodeThread.getBarcode(); - if(!Cools.isEmpty(barcode)) { - News.info(""+mark+" - 1"+" - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", insta.getBarcode(), barcode); - if("NG".endsWith(barcode) || "NoRead".equals(barcode)) { + if (!Cools.isEmpty(barcode)) { + News.info("" + mark + " - 1" + " - {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", insta.getBarcode(), barcode); + if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) { continue; } } else { @@ -577,7 +577,7 @@ LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, insta.getLed()); // led 寮傚父鏄剧ず if (ledThread != null) { - String errorMsg = "姝や负鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱.璇锋斁鍦�"+insta.getBackSta().shortValue()+"绔欑偣"; + String errorMsg = "姝や负鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱.璇锋斁鍦�" + insta.getBackSta().shortValue() + "绔欑偣"; MessageQueue.offer(SlaveType.Led, insta.getLed(), new Task(5, errorMsg)); } continue; @@ -632,18 +632,18 @@ devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { - News.error(""+mark+" - 3"+" - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); + News.error("" + mark + " - 3" + " - 鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); } - }else { - News.errorNoLog(""+mark+" - 6"+" - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒"+" 鑷姩淇″彿锛�"+staProtocol.isLoading()+"銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() - +"銆佺┖鏉夸俊鍙凤細"+ staProtocol.isEmptyMk()); + } else { + News.errorNoLog("" + mark + " - 6" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isLoading() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 ===銆嬫墽琛屽畬鎴�"); } /** @@ -683,7 +683,7 @@ if (crnProtocol.modeType == CrnModeType.AUTO && crnProtocol.getTaskNo().equals(wrkMast.getWrkNo().shortValue()) && crnProtocol.statusType == CrnStatusType.WAITING && crnProtocol.forkPosType == CrnForkPosType.HOME) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�"); // 鍛戒护涓嬪彂鍖� -------------------------------------------------------------------------- @@ -697,7 +697,6 @@ if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(2, staProtocol))) { continue; } - News.info(""+mark+" - 1"+" - 鍑哄簱浠诲姟鍐欏叆杈撻�佺嚎鏁版嵁鎴愬姛锛侊紒锛� [宸ヤ綔鍙�:{}]", wrkMast.getWrkNo()); // 鏇存柊宸ヤ綔妗g姸鎬佷负14澶辫触 wrkMast.setWrkSts(14L); @@ -706,21 +705,21 @@ // 澶嶄綅鍫嗗灈鏈� crnThread.setResetFlag(true); } else { - News.error(""+mark+" - 1"+" - 鏇存柊宸ヤ綔妗g殑宸ヤ綔鐘舵�佷负14澶辫触锛侊紒锛� [宸ヤ綔鍙�:{}]", wrkMast.getWrkNo()); + News.error("" + mark + " - 1" + " - 鏇存柊宸ヤ綔妗g殑宸ヤ綔鐘舵�佷负14澶辫触锛侊紒锛� [宸ヤ綔鍙�:{}]", wrkMast.getWrkNo()); } - }else { - News.errorNoLog(""+mark+" - 6"+" - 鍫嗗灈鏈轰俊鎭笉绗﹀悎鍏ュ簱鏉′欢锛侊紒锛�" - +" 鍫嗗灈鏈虹姸鎬侊細"+crnProtocol.modeType+"==鑷姩AUTO锛�" + CrnModeType.AUTO - +"銆佸爢鍨涙満浠诲姟鍙凤細"+crnProtocol.getTaskNo()+"==宸ヤ綔妗d换鍔″彿锛�" + wrkMast.getWrkNo().shortValue() - +"銆佺姸鎬佹灇涓撅細"+crnProtocol.statusType+"==WAITING锛�90 //浠诲姟瀹屾垚绛夊緟WCS纭)锛�" + CrnStatusType.WAITING - +"銆佽揣鍙変綅缃細"+crnProtocol.forkPosType+"==HOME锛�0 // 璐у弶鍘熶綅锛�" + CrnForkPosType.HOME); + } else { + News.errorNoLog("" + mark + " - 6" + " - 鍫嗗灈鏈轰俊鎭笉绗﹀悎鍏ュ簱鏉′欢锛侊紒锛�" + + " 鍫嗗灈鏈虹姸鎬侊細" + crnProtocol.modeType + "==鑷姩AUTO锛�" + CrnModeType.AUTO + + "銆佸爢鍨涙満浠诲姟鍙凤細" + crnProtocol.getTaskNo() + "==宸ヤ綔妗d换鍔″彿锛�" + wrkMast.getWrkNo().shortValue() + + "銆佺姸鎬佹灇涓撅細" + crnProtocol.statusType + "==WAITING锛�90 //浠诲姟瀹屾垚绛夊緟WCS纭)锛�" + CrnStatusType.WAITING + + "銆佽揣鍙変綅缃細" + crnProtocol.forkPosType + "==HOME锛�0 // 璐у弶鍘熶綅锛�" + CrnForkPosType.HOME); } } } } - News.infoNoLog(""+mark+" - 0"+" - 鍫嗗灈鏈虹珯鍑哄簱鍒板嚭搴撶珯 ===銆嬫墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 鍫嗗灈鏈虹珯鍑哄簱鍒板嚭搴撶珯 ===銆嬫墽琛屽畬鎴�"); } /** @@ -737,7 +736,7 @@ } BasCrnp basCrnp = basCrnpService.selectById(crn.getId()); if (basCrnp == null) { - News.error(""+mark+" - 1"+" - {}鍙峰爢鍨涙満灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�", crn.getId()); + News.error("" + mark + " - 1" + " - {}鍙峰爢鍨涙満灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�", crn.getId()); continue; } @@ -749,38 +748,38 @@ // 鍙湁褰撳爢鍨涙満绌洪棽 骞朵笖 鏃犱换鍔℃椂鎵嶇户缁墽琛� if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO && crnProtocol.getLoaded() == 0 && crnProtocol.getForkPos() == 0) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛屽爢鍨涙満鍏ュ嚭搴撲綔涓氫笅鍙�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛屽爢鍨涙満鍏ュ嚭搴撲綔涓氫笅鍙�"); // 濡傛灉鏈�杩戜竴娆℃槸鍏ュ簱妯″紡 if (crnProtocol.getLastIo().equals("I")) { if (basCrnp.getInEnable().equals("Y")) { //mark - 1 - .... - this.crnStnToLoc(crn, crnProtocol,mark); // 鍏ュ簱 + this.crnStnToLoc(crn, crnProtocol, mark); // 鍏ュ簱 crnProtocol.setLastIo("O"); } else if (basCrnp.getOutEnable().equals("Y")) { //mark - 2 - .... - this.locToCrnStn(crn, crnProtocol,mark); // 鍑哄簱 + this.locToCrnStn(crn, crnProtocol, mark); // 鍑哄簱 crnProtocol.setLastIo("I"); } } // 濡傛灉鏈�杩戜竴娆℃槸鍑哄簱妯″紡 else if (crnProtocol.getLastIo().equals("O")) { if (basCrnp.getOutEnable().equals("Y")) { - this.locToCrnStn(crn, crnProtocol,mark); // 鍑哄簱 + this.locToCrnStn(crn, crnProtocol, mark); // 鍑哄簱 crnProtocol.setLastIo("I"); } else if (basCrnp.getInEnable().equals("Y")) { - this.crnStnToLoc(crn, crnProtocol,mark); // 鍏ュ簱 + this.crnStnToLoc(crn, crnProtocol, mark); // 鍏ュ簱 crnProtocol.setLastIo("O"); } } } // 搴撲綅绉昏浆 //mark - 3 - .... - this.locToLoc(crn, crnProtocol,mark); - this.locToLoc111(crn, crnProtocol,mark); + this.locToLoc(crn, crnProtocol, mark); + this.locToLoc111(crn, crnProtocol, mark); // this.crnRebackHp(crnProtocol, crnThread); } - News.infoNoLog(""+mark+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂鎵ц瀹屾垚"); + News.infoNoLog("" + mark + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂鎵ц瀹屾垚"); } /** @@ -930,15 +929,15 @@ /** * 鍏ュ簱 ===>> 鍫嗗灈鏈虹珯鍒板簱浣� */ - public synchronized void crnStnToLoc(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { - News.warnNoLog(""+mark+" - 1"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽叆搴�"); + public synchronized void crnStnToLoc(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) { + News.warnNoLog("" + mark + " - 1" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽叆搴�"); for (CrnSlave.CrnStn crnStn : slave.getCrnInStn()) { boolean flag = false; // 鑾峰彇鍫嗗灈鏈哄叆搴撶珯淇℃伅 DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); if (staProtocol == null) { - News.infoNoLog(""+mark+" - 1"+" - 1"+" - 鍫嗗灈鏈哄叆搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц)锛歴taProtocol="+staProtocol); + News.infoNoLog("" + mark + " - 1" + " - 1" + " - 鍫嗗灈鏈哄叆搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц)锛歴taProtocol=" + staProtocol); continue; } else { staProtocol = staProtocol.clone(); @@ -946,7 +945,7 @@ // 鏌ヨ绔欑偣璇︾粏淇℃伅 BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); if (staDetl == null) { - News.error(""+mark+" - 1"+" - 2"+" - 鍏ュ簱 ===>> 鍫嗗灈鏈虹珯鐐瑰湪鏁版嵁搴撲笉瀛樺湪, 绔欑偣缂栧彿={}", crnStn.getStaNo()); + News.error("" + mark + " - 1" + " - 2" + " - 鍏ュ簱 ===>> 鍫嗗灈鏈虹珯鐐瑰湪鏁版嵁搴撲笉瀛樺湪, 绔欑偣缂栧彿={}", crnStn.getStaNo()); continue; } if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() @@ -954,27 +953,27 @@ flag = true; } if (!flag) { - News.errorNoLog(""+mark+" - 1"+" - 3"+" - 鍫嗗灈鏈哄叆搴撶珯淇℃伅(浠ヤ笅闇�瑕佸叏true):" - +"鑷姩淇″彿"+staProtocol.isAutoing()+"鏈夌墿淇″彿"+staProtocol.isLoading() - +"宸ヤ綔鍙�>0"+staProtocol.getWorkNo()+"鍙叆淇″彿"+staProtocol.isInEnable() - +"鑳藉叆淇″彿锛坵ms璁剧疆锛�.equals(\"Y\")"+staDetl.getCanining()); + News.errorNoLog("" + mark + " - 1" + " - 3" + " - 鍫嗗灈鏈哄叆搴撶珯淇℃伅(浠ヤ笅闇�瑕佸叏true):" + + "鑷姩淇″彿" + staProtocol.isAutoing() + "鏈夌墿淇″彿" + staProtocol.isLoading() + + "宸ヤ綔鍙�>0" + staProtocol.getWorkNo() + "鍙叆淇″彿" + staProtocol.isInEnable() + + "鑳藉叆淇″彿锛坵ms璁剧疆锛�.equals(\"Y\")" + staDetl.getCanining()); continue; } // 鑾峰彇宸ヤ綔鐘舵�佷负2锛堣澶囦笂璧帮級鐨勫叆搴撳伐浣滄。 WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo()); if (null == wrkMast) { - News.infoNoLog(""+mark+" - 1"+" - 4"+" - 鏌ヨ鏃犲緟鍏ュ簱鏁版嵁--wrk_sts=2, 宸ヤ綔鍙�={}", staProtocol.getWorkNo()); + News.infoNoLog("" + mark + " - 1" + " - 4" + " - 鏌ヨ鏃犲緟鍏ュ簱鏁版嵁--wrk_sts=2, 宸ヤ綔鍙�={}", staProtocol.getWorkNo()); // log.error("鏌ヨ鏃犲緟鍏ュ簱鏁版嵁--wrk_sts=2, 宸ヤ綔鍙�={}", staProtocol.getWorkNo()); continue; } // 鑾峰彇搴撲綅淇℃伅 LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); if (locMast == null) { - News.error(""+mark+" - 1"+" - 5"+" - 鏌ヨ搴撳瓨鏃犳暟鎹�--搴撲綅鍙穥}", wrkMast.getLocNo()); + News.error("" + mark + " - 1" + " - 5" + " - 鏌ヨ搴撳瓨鏃犳暟鎹�--搴撲綅鍙穥}", wrkMast.getLocNo()); continue; } if (!locMast.getLocSts().equals("S") && !locMast.getLocSts().equals("Q")) { - News.error(""+mark+" - 1"+" - 6"+" - 鍏ュ簱鎿嶄綔搴撲綅鐘舵�佷笉绗﹀悎--鐘舵��, 搴撲綅鍙�={}锛屽簱浣嶇姸鎬�={}", wrkMast.getLocNo(), locMast.getLocSts()); + News.error("" + mark + " - 1" + " - 6" + " - 鍏ュ簱鎿嶄綔搴撲綅鐘舵�佷笉绗﹀悎--鐘舵��, 搴撲綅鍙�={}锛屽簱浣嶇姸鎬�={}", wrkMast.getLocNo(), locMast.getLocSts()); continue; } @@ -994,43 +993,43 @@ if (Utils.getLaneByLocNo(wrkMast.getLocNo()) != crnProtocol.getCrnLane()) { //鍒ゆ柇鍫嗗灈鏈烘墍鍦ㄥ贩閬撴槸鍚﹀瓨鍦ㄥ叾浠栦换鍔★紝濡傚瓨鍦ㄥ垯浼樺厛鎵ц List<WrkMast> currentWrkMasts = wrkMastService.selectLaneWrkMast(crnProtocol.getCrnLane(), false); - if (!currentWrkMasts.isEmpty()) { - continue;//褰撳墠鍫嗗灈鏈烘墍鍦ㄥ贩閬撳瓨鍦ㄤ换鍔� - } +// if (!currentWrkMasts.isEmpty()) { +// continue;//褰撳墠鍫嗗灈鏈烘墍鍦ㄥ贩閬撳瓨鍦ㄤ换鍔� +// } } } // 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� if (Utils.isDeepLoc(slaveProperties, wrkMast.getLocNo())) { - News.warnNoLog(""+mark+" - 1"+" - 8"+" - 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� : 寮�濮嬫墽琛� 浠诲姟鍙�={}",wrkMast.getWrkNo()); + News.warnNoLog("" + mark + " - 1" + " - 8" + " - 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� : 寮�濮嬫墽琛� 浠诲姟鍙�={}", wrkMast.getWrkNo()); String shallowLocNo = Utils.getShallowLoc(slaveProperties, wrkMast.getLocNo()); LocMast shallowLoc = locMastService.selectById(shallowLocNo); // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒 if (shallowLoc.getLocSts().equals("P") || shallowLoc.getLocSts().equals("R")) { - News.warn(""+mark+" - 1"+" - 9"+" - // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warn("" + mark + " - 1" + " - 9" + " - // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); WrkMast waitWrkMast = wrkMastMapper.selectByLocNo(shallowLocNo); if (null == waitWrkMast) { - News.error(""+mark+" - 1"+" - 10"+" - {}搴撲綅寮傚父锛屾湭妫�绱㈠埌鐩稿簲宸ヤ綔妗o紒", shallowLocNo); + News.error("" + mark + " - 1" + " - 10" + " - {}搴撲綅寮傚父锛屾湭妫�绱㈠埌鐩稿簲宸ヤ綔妗o紒", shallowLocNo); } else { if (waitWrkMast.getWrkSts() != 14 && waitWrkMast.getIoType() > 100) { waitWrkMast.setIoPri(15D); waitWrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(waitWrkMast) == 0) { - News.error(""+mark+" - 1"+" - 11"+" - 璋冩暣宸ヤ綔妗d紭鍏堢骇澶辫触锛佸伐浣滃彿={}", waitWrkMast.getWrkNo()); + News.error("" + mark + " - 1" + " - 11" + " - 璋冩暣宸ヤ綔妗d紭鍏堢骇澶辫触锛佸伐浣滃彿={}", waitWrkMast.getWrkNo()); } continue; } - if(waitWrkMast.getWrkSts() < 5 && waitWrkMast.getIoType() < 100) { + if (waitWrkMast.getWrkSts() < 5 && waitWrkMast.getIoType() < 100) { continue;//鏈変换鍔$姝㈡惉杩愶紝鏈夊彲鑳芥祬搴撲綅鐘舵�佽繕鏈彉鏇村畬鎴� } } } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { - News.warn(""+mark+" - 1"+" - 12"+" - // F銆丏 搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warn("" + mark + " - 1" + " - 12" + " - // F銆丏 搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); // 姝ゆ爣璁伴伩鍏嶅娆℃墽琛岀Щ搴撲换鍔� if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) { - if (moveLocForDeepLoc(slave, shallowLoc,mark)){ + if (moveLocForDeepLoc(slave, shallowLoc, mark)) { wrkMast.setUpdMk("Y"); wrkMast.setIoPri(14D); wrkMastMapper.updateById(wrkMast); @@ -1045,17 +1044,17 @@ } continue; } else if (shallowLoc.getLocSts().equals("Q")) { - News.warn(""+mark+" - 1"+" - 13"+" - // Q 搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warn("" + mark + " - 1" + " - 13" + " - // Q 搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); WrkMast waitWrkMast = wrkMastMapper.selectByLocNo(shallowLocNo); if (null != waitWrkMast && waitWrkMast.getWrkSts() == 4) { - News.infoNoLog(""+mark+" - 1"+" - 14"+" - // F銆丏 宸ヤ綔鐘舵��(鍒ゆ柇鏉′欢涓�==4)={}",waitWrkMast.getWrkSts()); + News.infoNoLog("" + mark + " - 1" + " - 14" + " - // F銆丏 宸ヤ綔鐘舵��(鍒ゆ柇鏉′欢涓�==4)={}", waitWrkMast.getWrkSts()); continue; } } } - News.info(""+mark+" - 1"+" - 15"+" - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}",wrkMast.getWrkNo().shortValue() - ,crnStn.getRow().shortValue(),crnStn.getBay().shortValue(),crnStn.getLev().shortValue() - ,locMast.getRow1().shortValue(),locMast.getBay1().shortValue(),locMast.getLev1().shortValue()); + News.info("" + mark + " - 1" + " - 15" + " - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}", wrkMast.getWrkNo().shortValue() + , crnStn.getRow().shortValue(), crnStn.getBay().shortValue(), crnStn.getLev().shortValue() + , locMast.getRow1().shortValue(), locMast.getBay1().shortValue(), locMast.getLev1().shortValue()); // 鍛戒护涓嬪彂鍖� -------------------------------------------------------------------------- CrnCommand crnCommand = new CrnCommand(); @@ -1070,7 +1069,7 @@ crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { - News.error(""+mark+" - 1"+" - 16"+" - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); + News.error("" + mark + " - 1" + " - 16" + " - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // long startTime = System.currentTimeMillis(); @@ -1091,26 +1090,33 @@ wrkMast.setCrnStrTime(now); wrkMast.setModiTime(now); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.error(""+mark+" - 1"+" - 17"+" - 淇敼宸ヤ綔妗g姸鎬� 2.璁惧涓婅蛋 => 3.鍚婅溅鍏ュ簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); + News.error("" + mark + " - 1" + " - 17" + " - 淇敼宸ヤ綔妗g姸鎬� 2.璁惧涓婅蛋 => 3.鍚婅溅鍏ュ簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); } } } - News.infoNoLog(""+mark+" - 1"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 锛� 鍏ュ簱鎵ц瀹屾瘯"); + News.infoNoLog("" + mark + " - 1" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 锛� 鍏ュ簱鎵ц瀹屾瘯"); } /** * 鍑哄簱 ===>> 搴撲綅鍒板爢鍨涙満绔� * 2022-06-09 TQS淇敼锛屾煡璇㈠伐浣滄。LIST锛岄亶鍘嗕笅鍙戯紝闃叉绗竴涓换鍔″牭濉炲嚭搴� */ - public synchronized void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { - News.warnNoLog(""+mark+" - 2"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽嚭搴�"); + public synchronized void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) { + News.warnNoLog("" + mark + " - 2" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽嚭搴�"); int devpTaskStackOver = 20; Config config = configService.selectOne(new EntityWrapper<Config>() .eq("code", "devpTaskStackOver")); - if(config != null) { + if (config != null) { devpTaskStackOver = Integer.parseInt(config.getValue()); } + int devpCheckTaskStackOver = 2; + Config config2 = configService.selectOne(new EntityWrapper<Config>() + .eq("code", "devpCheckTaskStackOver")); + if (config2 != null) { + devpCheckTaskStackOver = Integer.parseInt(config2.getValue()); + } + Integer devpWorkingCount = commonService.queryDevpWorkingCount(); if (devpWorkingCount > devpTaskStackOver) { @@ -1128,20 +1134,20 @@ } // 宸ヤ綔妗g姸鎬佸垽鏂� if (wrkMast.getIoType() < 100 || wrkMast.getSourceStaNo() == null) { - News.error(""+mark+" - 2"+" - 1"+" - 鏌ヨ宸ヤ綔妗f暟鎹笉绗﹀悎鏉′欢--鍏ュ嚭绫诲瀷/绔欑偣, 宸ヤ綔鍙�={}锛屾簮搴撲綅={}锛屽叆鍑虹被鍨�={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getIoType()); + News.error("" + mark + " - 2" + " - 1" + " - 鏌ヨ宸ヤ綔妗f暟鎹笉绗﹀悎鏉′欢--鍏ュ嚭绫诲瀷/绔欑偣, 宸ヤ綔鍙�={}锛屾簮搴撲綅={}锛屽叆鍑虹被鍨�={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getIoType()); continue; } // 鑾峰彇婧愬簱浣嶄俊鎭� LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); if (!sourceSta.getLocSts().equals("R") && !sourceSta.getLocSts().equals("P")) { - News.error(""+mark+" - 2"+" - 2"+" - 鍑哄簱鎿嶄綔搴撲綅鐘舵�佷笉绗﹀悎--鐘舵��, 搴撲綅鍙�={}锛屽簱浣嶇姸鎬�={}", wrkMast.getLocNo(), sourceSta.getLocSts()); + News.error("" + mark + " - 2" + " - 2" + " - 鍑哄簱鎿嶄綔搴撲綅鐘舵�佷笉绗﹀悎--鐘舵��, 搴撲綅鍙�={}锛屽簱浣嶇姸鎬�={}", wrkMast.getLocNo(), sourceSta.getLocSts()); continue; } // 鑾峰彇鍫嗗灈鏈哄嚭搴撶珯淇℃伅 SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); if (staProtocol == null) { - News.infoNoLog(""+mark+" - 2"+" - 3"+" - 鍫嗗灈鏈哄嚭搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц,鍚﹀垯寰幆缁堟)锛歴taProtocol="+staProtocol); + News.infoNoLog("" + mark + " - 2" + " - 3" + " - 鍫嗗灈鏈哄嚭搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц,鍚﹀垯寰幆缁堟)锛歴taProtocol=" + staProtocol); break; // continue; } else { @@ -1160,6 +1166,29 @@ } } + //zhangc + if (wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107) { + if (wrkMast.getStaNo() == 1058) { + List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .in("wrk_sts", 12, 14) + .eq("sta_no", 1058) + ); + if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) { + News.error("" + mark + " - 2" + " - 妫�娴嬪瓨鍦�1058绔欑偣锛屽瓨鍦ㄤ袱绗斿伐浣滀腑鐨勪换鍔★紝宸ヤ綔鍙�={}" + wrkMast.getWrkNo()); + continue; + } + } else if (wrkMast.getStaNo() == 1062) { + List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .in("wrk_sts", 12, 14) + .eq("sta_no", 1062) + ); + if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) { + News.error("" + mark + " - 2" + " - 妫�娴嬪瓨鍦�1062绔欑偣锛屽瓨鍦ㄤ袱绗斿伐浣滀腑鐨勪换鍔★紝宸ヤ綔鍙�={}" + wrkMast.getWrkNo()); + continue; + } + } + } + // // 鍏ュ嚭搴撴ā寮忓垽鏂� // if (devpThread.ioMode != IoModeType.PAKOUT_MODE) { continue; } // if (wrkMast.getStaNo() == 204 && devpThread.ioModeOf2F != IoModeType.PAKOUT_MODE) { @@ -1170,7 +1199,7 @@ // 鏌ヨ绔欑偣璇︾粏淇℃伅 BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); if (staDetl == null) { - News.error(""+mark+" - 2"+" - 5"+" - 鍑哄簱 ===>> 鍫嗗灈鏈虹珯鐐瑰湪鏁版嵁搴撲笉瀛樺湪, 绔欑偣缂栧彿={}", crnStn.getStaNo()); + News.error("" + mark + " - 2" + " - 5" + " - 鍑哄簱 ===>> 鍫嗗灈鏈虹珯鐐瑰湪鏁版嵁搴撲笉瀛樺湪, 绔欑偣缂栧彿={}", crnStn.getStaNo()); break; // continue; } @@ -1182,7 +1211,7 @@ String crnOutVerifyOut = "Y"; Config crnOutVerifyOutEnableConfig = configService.selectOne(new EntityWrapper<Config>() .eq("code", "crnOutVerifyOutEnable")); - if(crnOutVerifyOutEnableConfig != null) { + if (crnOutVerifyOutEnableConfig != null) { crnOutVerifyOut = crnOutVerifyOutEnableConfig.getValue(); } @@ -1214,12 +1243,12 @@ // 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� if (Utils.isDeepLoc(slaveProperties, wrkMast.getSourceLocNo())) { - News.warnNoLog(""+mark+" - 2"+" - 6"+" - 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� : 寮�濮嬫墽琛� 浠诲姟鍙�={}",wrkMast.getWrkNo()); + News.warnNoLog("" + mark + " - 2" + " - 6" + " - 鍙屾繁搴撲綅涓旀祬搴撲綅鏈夎揣锛屽垯闇�鍏堝娴呭簱浣嶈繘琛屽簱浣嶇Щ杞� : 寮�濮嬫墽琛� 浠诲姟鍙�={}", wrkMast.getWrkNo()); String shallowLocNo = Utils.getShallowLoc(slaveProperties, wrkMast.getSourceLocNo()); LocMast shallowLoc = locMastService.selectById(shallowLocNo); // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒 if (shallowLoc.getLocSts().equals("P") || shallowLoc.getLocSts().equals("R")) { - News.warnNoLog(""+mark+" - 2"+" - 7"+" - // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warnNoLog("" + mark + " - 2" + " - 7" + " - // O.绌哄簱浣嶃�丵.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴撱�丼.鍏ュ簱棰勭害銆乆.绂佺敤 鐩存帴鎼紒搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); WrkMast waitWrkMast = wrkMastMapper.selectByLocNo(shallowLocNo); if (null == waitWrkMast) { News.error("{}搴撲綅寮傚父锛屾湭妫�绱㈠埌鐩稿簲宸ヤ綔妗o紒", shallowLocNo); @@ -1228,7 +1257,7 @@ waitWrkMast.setIoPri(15D); waitWrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(waitWrkMast) == 0) { - News.error(""+mark+" - 2"+" - 8"+" - 璋冩暣宸ヤ綔妗d紭鍏堢骇澶辫触锛佸伐浣滃彿={}", waitWrkMast.getWrkNo()); + News.error("" + mark + " - 2" + " - 8" + " - 璋冩暣宸ヤ綔妗d紭鍏堢骇澶辫触锛佸伐浣滃彿={}", waitWrkMast.getWrkNo()); } continue; } else { @@ -1236,7 +1265,7 @@ } } } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { - News.warnNoLog(""+mark+" - 2"+" - 9"+" - // F銆丏 搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warnNoLog("" + mark + " - 2" + " - 9" + " - // F銆丏 搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); // WrkMast waitWrkMast = wrkMastMapper.selectByLocNo(shallowLocNo); //2022-08-16 modify,涓嶆牴鎹畊pdmk鏍囪绉诲簱浠诲姟(瀹规槗琚彇娑堝鑷村牭濉�)锛屾煡璇㈠伐浣滄。鏄惁瀛樺湪浠诲姟 WrkMast waitWrkMast = wrkMastMapper.selectByLocNo1(shallowLocNo); @@ -1244,7 +1273,7 @@ // if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk()) // || Cools.isEmpty(waitWrkMast)) { if (Cools.isEmpty(waitWrkMast)) { - if (moveLocForDeepLoc(slave, shallowLoc,mark)){ + if (moveLocForDeepLoc(slave, shallowLoc, mark)) { wrkMast.setUpdMk("Y"); // wrkMast.setIoPri(14D); wrkMastMapper.updateById(wrkMast); @@ -1257,10 +1286,10 @@ News.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佹祬搴撲綅鍙�:{}", wrkMast.getWrkNo(), shallowLocNo); continue; } else if (shallowLoc.getLocSts().equals("Q") || shallowLoc.getLocSts().equals("S")) { - News.warnNoLog(""+mark+" - 2"+" - 10"+" - // Q銆丼 搴撲綅={},搴撲綅鐘舵��={}",shallowLoc.getLocNo(),shallowLoc.getLocSts()); + News.warnNoLog("" + mark + " - 2" + " - 10" + " - // Q銆丼 搴撲綅={},搴撲綅鐘舵��={}", shallowLoc.getLocNo(), shallowLoc.getLocSts()); WrkMast waitWrkMast = wrkMastMapper.selectByLocNo1(shallowLocNo); if (null != waitWrkMast && waitWrkMast.getWrkSts() == 4) { - News.infoNoLog(""+mark+" - 2"+" - 11"+" - // F銆丏 宸ヤ綔鐘舵��(鍒ゆ柇鏉′欢涓�==4)={}",waitWrkMast.getWrkSts()); + News.infoNoLog("" + mark + " - 2" + " - 11" + " - // F銆丏 宸ヤ綔鐘舵��(鍒ゆ柇鏉′欢涓�==4)={}", waitWrkMast.getWrkSts()); continue; } } @@ -1272,9 +1301,9 @@ // return; } - News.warnNoLog(""+mark+" - 2"+" - 12"+" - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}",wrkMast.getWrkNo().shortValue() - ,sourceSta.getRow1().shortValue(),sourceSta.getBay1().shortValue(),sourceSta.getLev1().shortValue() - ,crnStn.getRow().shortValue(),crnStn.getBay().shortValue(),crnStn.getLev().shortValue()); + News.warnNoLog("" + mark + " - 2" + " - 12" + " - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}", wrkMast.getWrkNo().shortValue() + , sourceSta.getRow1().shortValue(), sourceSta.getBay1().shortValue(), sourceSta.getLev1().shortValue() + , crnStn.getRow().shortValue(), crnStn.getBay().shortValue(), crnStn.getLev().shortValue()); // 1.鍫嗗灈鏈哄紑濮嬬Щ鍔� CrnCommand crnCommand = new CrnCommand(); @@ -1289,7 +1318,7 @@ crnCommand.setDestinationPosY(crnStn.getBay().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(crnStn.getLev().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { - News.error(""+mark+" - 2"+" - 13"+" - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); + News.error("" + mark + " - 2" + " - 13" + " - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� Date now = new Date(); @@ -1297,14 +1326,14 @@ wrkMast.setCrnStrTime(now); wrkMast.setModiTime(now); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.error(""+mark+" - 2"+" - 14"+" - 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); + News.error("" + mark + " - 2" + " - 14" + " - 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); } break; } } } } - News.infoNoLog(""+mark+" - 2"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 锛� 鍑哄簱鎵ц瀹屾瘯"); + News.infoNoLog("" + mark + " - 2" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂 锛� 鍑哄簱鎵ц瀹屾瘯"); } // /** @@ -1427,17 +1456,17 @@ /** * 搴撲綅绉昏浆 */ - public synchronized void locToLoc(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { + public synchronized void locToLoc(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) { // 鑾峰彇宸ヤ綔妗d俊鎭� WrkMast wrkMast = wrkMastMapper.selectLocMove(slave.getId()); if (null == wrkMast) { return; } - News.warnNoLog(""+mark+" - 3"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽簱浣嶇Щ杞�"); + News.warnNoLog("" + mark + " - 3" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽簱浣嶇Щ杞�"); // 鑾峰彇婧愬簱浣嶄俊鎭� LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); if (null == sourceSta) { - News.error(""+mark+" - 3"+" - 1"+" - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈡簮搴撲綅澶辫触锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); + News.error("" + mark + " - 3" + " - 1" + " - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈡簮搴撲綅澶辫触锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); return; } // 婧愬簱浣� 搴撲綅鐘舵�佸垽鏂� @@ -1447,7 +1476,7 @@ // 鑾峰彇鐩爣搴撲綅淇℃伅 LocMast sta = locMastService.selectById(wrkMast.getLocNo()); if (null == sta) { - News.error(""+mark+" - 3"+" - 2"+" - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈢洰鏍囧簱浣嶅け璐ワ紒宸ヤ綔鍙�={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getLocNo()); + News.error("" + mark + " - 3" + " - 2" + " - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈢洰鏍囧簱浣嶅け璐ワ紒宸ヤ綔鍙�={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getLocNo()); return; } // 鑾峰彇鍫嗗灈鏈轰俊鎭� 骞� 鍒ゆ柇鏄惁鍙叆鍑� @@ -1466,9 +1495,9 @@ return; } - News.warnNoLog(""+mark+" - 3"+" - 3"+" - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}",wrkMast.getWrkNo().shortValue() - ,sourceSta.getRow1().shortValue(),sourceSta.getBay1().shortValue(),sourceSta.getLev1().shortValue() - ,sta.getRow1().shortValue(),sta.getBay1().shortValue(),sta.getLev1().shortValue()); + News.warnNoLog("" + mark + " - 3" + " - 3" + " - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}", wrkMast.getWrkNo().shortValue() + , sourceSta.getRow1().shortValue(), sourceSta.getBay1().shortValue(), sourceSta.getLev1().shortValue() + , sta.getRow1().shortValue(), sta.getBay1().shortValue(), sta.getLev1().shortValue()); // 鍛戒护涓嬪彂鍖� -------------------------------------------------------------------------- CrnCommand crnCommand = new CrnCommand(); @@ -1483,7 +1512,7 @@ crnCommand.setDestinationPosY(sta.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(sta.getLev1().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { - News.error(""+mark+" - 3"+" - 4"+" - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); + News.error("" + mark + " - 3" + " - 4" + " - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� Date now = new Date(); @@ -1491,36 +1520,36 @@ wrkMast.setCrnStrTime(now); wrkMast.setModiTime(now); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.error(""+mark+" - 3"+" - 5"+" - 銆愬簱浣嶇Щ杞�� 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); + News.error("" + mark + " - 3" + " - 5" + " - 銆愬簱浣嶇Щ杞�� 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); } } - News.infoNoLog(""+mark+" - 3"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氬簱浣嶇Щ杞畬鎴�"); + News.infoNoLog("" + mark + " - 3" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氬簱浣嶇Щ杞畬鎴�"); } /** * 搴撲綅绉昏浆 */ - public synchronized void locToLoc111(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { + public synchronized void locToLoc111(CrnSlave slave, CrnProtocol crnProtocol, Integer mark) { // 鑾峰彇宸ヤ綔妗d俊鎭� WrkMast wrkMast = wrkMastMapper.selectLocMove111(slave.getId()); if (null == wrkMast) { return; } - News.warnNoLog(""+mark+" - 3"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽簱浣嶇Щ杞�"); + News.warnNoLog("" + mark + " - 3" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氭墽琛屽簱浣嶇Щ杞�"); // 鑾峰彇婧愬簱浣嶄俊鎭� LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); if (null == sourceLoc) { - News.error(""+mark+" - 3"+" - 1"+" - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈡簮搴撲綅澶辫触锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); + News.error("" + mark + " - 3" + " - 1" + " - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭绱㈡簮搴撲綅澶辫触锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); return; } // 婧愬簱浣� 搴撲綅鐘舵�佸垽鏂� if (!sourceLoc.getLocSts().equals("R")) { - News.error(""+mark+" - 3"+" - 11"+" - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭簮搴撲綅鐘舵�佷笉涓篟锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); + News.error("" + mark + " - 3" + " - 11" + " - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氭簮搴撲綅鐘舵�佷笉涓篟锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); return; } - if(wrkMast.getIoType() != 111) { + if (wrkMast.getIoType() != 111) { // 鑾峰彇鐩爣搴撲綅淇℃伅 LocMast loc = locMastService.selectById(wrkMast.getLocNo()); if (null == loc) { @@ -1529,7 +1558,7 @@ } // 婧愬簱浣� 搴撲綅鐘舵�佸垽鏂� if (!loc.getLocSts().equals("S")) { - News.error(""+mark+" - 3"+" - 21"+" - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氱洰鏍囧簱浣嶇姸鎬佷笉涓篟锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getLocNo()); + News.error("" + mark + " - 3" + " - 21" + " - 宸ヤ綔妗e簱浣嶇Щ杞け璐ワ紝鍘熷洜锛氱洰鏍囧簱浣嶇姸鎬佷笉涓篟锛佸伐浣滃彿={}锛屾簮搴撲綅={}", wrkMast.getWrkNo(), wrkMast.getLocNo()); return; } } @@ -1549,9 +1578,9 @@ return; } - News.warnNoLog(""+mark+" - 3"+" - 3"+" - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}",wrkMast.getWrkNo().shortValue() - ,sourceLoc.getRow1().shortValue(),sourceLoc.getBay1().shortValue(),sourceLoc.getLev1().shortValue() - ,sourceLoc.getRow1().shortValue(),sourceLoc.getBay1().shortValue(),sourceLoc.getLev1().shortValue()); + News.warnNoLog("" + mark + " - 3" + " - 3" + " - 鍛戒护涓嬪彂 : 宸ヤ綔鍙�={},婧愭帓={},婧愬垪={},婧愬眰={},鐩爣鎺�={},鐩爣鍒�={},鐩爣灞�={}", wrkMast.getWrkNo().shortValue() + , sourceLoc.getRow1().shortValue(), sourceLoc.getBay1().shortValue(), sourceLoc.getLev1().shortValue() + , sourceLoc.getRow1().shortValue(), sourceLoc.getBay1().shortValue(), sourceLoc.getLev1().shortValue()); // 鍛戒护涓嬪彂鍖� -------------------------------------------------------------------------- CrnCommand crnCommand = new CrnCommand(); @@ -1566,7 +1595,7 @@ crnCommand.setDestinationPosY(sourceLoc.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(sourceLoc.getLev1().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { - News.error(""+mark+" - 3"+" - 4"+" - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); + News.error("" + mark + " - 3" + " - 4" + " - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� Date now = new Date(); @@ -1574,10 +1603,10 @@ wrkMast.setCrnStrTime(now); wrkMast.setModiTime(now); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.error(""+mark+" - 3"+" - 5"+" - 銆愬簱浣嶇Щ杞�� 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); + News.error("" + mark + " - 3" + " - 5" + " - 銆愬簱浣嶇Щ杞�� 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast.getWrkNo()); } } - News.infoNoLog(""+mark+" - 3"+" - 0"+" - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氬簱浣嶇Щ杞畬鎴�"); + News.infoNoLog("" + mark + " - 3" + " - 0" + " - 鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂锛氬簱浣嶇Щ杞畬鎴�"); } @@ -1594,7 +1623,7 @@ } // 鐘舵�侊細绛夊緟纭 骞朵笖 浠诲姟瀹屾垚浣� = 1 if (crnProtocol.statusType == CrnStatusType.WAITING && crnProtocol.getTaskNo() != 0) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛屽宸ヤ綔妗g殑瀹屾垚鎿嶄綔"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛屽宸ヤ綔妗g殑瀹屾垚鎿嶄綔"); if (crnProtocol.getTaskNo() == 9999) { // 鍫嗗灈鏈哄浣� crnThread.setResetFlag(true); @@ -1602,11 +1631,11 @@ // 鑾峰彇鍏ュ簱寰呯‘璁ゅ伐浣滄。 WrkMast wrkMast = wrkMastMapper.selectPakInStep3(crnProtocol.getTaskNo().intValue()); if (wrkMast == null) { - News.error(""+mark+" - 1"+" - 鍫嗗灈鏈哄浜庣瓑寰呯‘璁や笖浠诲姟瀹屾垚鐘舵�侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�傚爢鍨涙満鍙�={}锛屽伐浣滃彿={}", crn.getId(), crnProtocol.getTaskNo()); + News.error("" + mark + " - 1" + " - 鍫嗗灈鏈哄浜庣瓑寰呯‘璁や笖浠诲姟瀹屾垚鐘舵�侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�傚爢鍨涙満鍙�={}锛屽伐浣滃彿={}", crn.getId(), crnProtocol.getTaskNo()); continue; } // 鍏ュ簱 + 搴撲綅杞Щ ==> 4.鍏ュ簱瀹屾垚 - if (wrkMast.getWrkSts() == 3 || (wrkMast.getWrkSts() == 12 && (wrkMast.getIoType() == 11 || wrkMast.getIoType()==111))) { + if (wrkMast.getWrkSts() == 3 || (wrkMast.getWrkSts() == 12 && (wrkMast.getIoType() == 11 || wrkMast.getIoType() == 111))) { wrkMast.setWrkSts(4L); } else { continue; @@ -1617,14 +1646,14 @@ // 淇敼鎴愬姛鍚庡浣嶅爢鍨涙満 if (wrkMastMapper.updateById(wrkMast) > 0) { // 鍫嗗灈鏈哄浣� - News.info(""+mark+" - 2"+" - 涓婁綅鏈虹‘璁ゅ爢鍨涙満鎴愬姛 : 鍫嗗灈鏈哄彿={}",crnThread.getCrnProtocol().getCrnNo()); + News.warnNoLog("" + mark + " - 2" + " - 淇敼鎴愬姛鍚庡浣嶅爢鍨涙満 : 鍫嗗灈鏈哄彿={}", crnThread.getCrnProtocol().getCrnNo()); crnThread.setResetFlag(true); } } } } - News.infoNoLog(""+mark+" - 0"+" - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); } /** @@ -1647,7 +1676,7 @@ BasErrLog latest = basErrLogService.findLatestByTaskNo(crn.getId(), crnProtocol.getTaskNo().intValue()); // 鏈夊紓甯� if (latest == null) { - News.warnNoLog(""+mark+" - 1"+" - 寮�濮嬫墽琛岋細鍫嗗灈鏈哄紓甯镐俊鎭褰� 锛� 鏈変换鍔★紝鏈夊紓甯�"); + News.warnNoLog("" + mark + " - 1" + " - 寮�濮嬫墽琛岋細鍫嗗灈鏈哄紓甯镐俊鎭褰� 锛� 鏈変换鍔★紝鏈夊紓甯�"); if (crnProtocol.getAlarm() != null && crnProtocol.getAlarm() > 0) { WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo()); if (wrkMast == null) { @@ -1679,7 +1708,7 @@ "浠诲姟涓紓甯�" // 澶囨敞 ); if (!basErrLogService.insert(basErrLog)) { - News.error(""+mark+" - 2"+" - 鍫嗗灈鏈簆lc寮傚父璁板綍澶辫触 ===>> [id:{}] [error:{}]", crn.getId(), errName); + News.error("" + mark + " - 2" + " - 鍫嗗灈鏈簆lc寮傚父璁板綍澶辫触 ===>> [id:{}] [error:{}]", crn.getId(), errName); } } } else { @@ -1689,7 +1718,7 @@ latest.setUpdateTime(now); latest.setStatus(2); if (!basErrLogService.updateById(latest)) { - News.error(""+mark+" - 3"+" - 鍫嗗灈鏈簆lc寮傚父璁板綍淇澶辫触 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); + News.error("" + mark + " - 3" + " - 鍫嗗灈鏈簆lc寮傚父璁板綍淇澶辫触 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); } } } @@ -1698,7 +1727,7 @@ BasErrLog latest = basErrLogService.findLatest(crn.getId()); // 鏈夊紓甯� if (crnProtocol.getAlarm() != null && crnProtocol.getAlarm() > 0) { - News.warnNoLog(""+mark+" - 4"+" - 寮�濮嬫墽琛岋細鍫嗗灈鏈哄紓甯镐俊鎭褰� 锛� 鏃犱换鍔★紝鏈夊紓甯�"); + News.warnNoLog("" + mark + " - 4" + " - 寮�濮嬫墽琛岋細鍫嗗灈鏈哄紓甯镐俊鎭褰� 锛� 鏃犱换鍔★紝鏈夊紓甯�"); // 璁板綍鏂板紓甯� if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm().intValue())) { BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); @@ -1727,7 +1756,7 @@ "鏃犱换鍔″紓甯�" // 澶囨敞 ); if (!basErrLogService.insert(basErrLog)) { - News.error(""+mark+" - 5"+" - 鍫嗗灈鏈簆lc寮傚父璁板綍澶辫触 ===>> [id:{}] [error:{}]", crn.getId(), errName); + News.error("" + mark + " - 5" + " - 鍫嗗灈鏈簆lc寮傚父璁板綍澶辫触 ===>> [id:{}] [error:{}]", crn.getId(), errName); } } // 鏃犲紓甯� @@ -1738,7 +1767,7 @@ latest.setUpdateTime(now); latest.setStatus(2); if (!basErrLogService.updateById(latest)) { - News.error(""+mark+" - 6"+" - 鍫嗗灈鏈簆lc寮傚父璁板綍淇澶辫触 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); + News.error("" + mark + " - 6" + " - 鍫嗗灈鏈簆lc寮傚父璁板綍淇澶辫触 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); } } } @@ -1746,7 +1775,7 @@ } } - News.infoNoLog(""+mark+" - 0"+" - 鍫嗗灈鏈哄紓甯镐俊鎭褰曟墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 鍫嗗灈鏈哄紓甯镐俊鎭褰曟墽琛屽畬鎴�"); } @@ -1770,11 +1799,11 @@ } LedThread ledThread = null; - if (!Cools.isEmpty(emptyInSta.getLed())) { + if (!Cools.isEmpty(emptyInSta.getLed())) { ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, emptyInSta.getLed()); } - if (!staProtocol.isLoading()){ + if (!staProtocol.isLoading()) { continue; } @@ -1792,13 +1821,13 @@ && staProtocol.isPakMk() && staProtocol.getEmptyInType() == 1 ) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛岋細绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�"); + 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()); + 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 = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -1807,7 +1836,7 @@ continue; } } else { - News.info(""+mark+" - 3"+" - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo()); + News.info("" + mark + " - 3" + " - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo()); // led 寮傚父鏄剧ず if (ledThread != null) { String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -1840,7 +1869,7 @@ devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { - News.errorNoLog(""+mark+" - 1"+" - 鏇存柊plc绔欑偣淇℃伅澶辫触"); + News.errorNoLog("" + mark + " - 1" + " - 鏇存柊plc绔欑偣淇℃伅澶辫触"); throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); } } else { @@ -1850,19 +1879,19 @@ 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); + 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.errorNoLog("" + mark + " - 4" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isAutoing() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() + + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�"); } /** @@ -1882,11 +1911,11 @@ } LedThread ledThread = null; - if (!Cools.isEmpty(emptyInSta.getLed())) { + if (!Cools.isEmpty(emptyInSta.getLed())) { ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, emptyInSta.getLed()); } - if (!staProtocol.isLoading()){ + if (!staProtocol.isLoading()) { continue; } @@ -1904,13 +1933,13 @@ && staProtocol.isPakMk() && staProtocol.getEmptyInType() == 2 ) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛岋細绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�"); + 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()); + 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 = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -1919,7 +1948,7 @@ continue; } } else { - News.info(""+mark+" - 3"+" - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo()); + News.info("" + mark + " - 3" + " - 鎵爜澶辫触2 ===>> {}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{},绔欑偣:{}", emptyInSta.getBarcode(), barcode, emptyInSta.getStaNo()); // led 寮傚父鏄剧ず if (ledThread != null) { String errorMsg = "鎵爜澶辫触锛岃閲嶈瘯"; @@ -1931,7 +1960,7 @@ WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>() .eq("barcode", barcode) ); - if(wrkMast != null) { + if (wrkMast != null) { continue; } @@ -1960,17 +1989,17 @@ devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { - News.errorNoLog(""+mark+" - 1"+" - 鏇存柊plc绔欑偣淇℃伅澶辫触"); + 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.errorNoLog("" + mark + " - 4" + " - 绔欑偣淇℃伅涓嶇鍚堝叆搴撴潯浠讹紒锛侊紒" + " 鑷姩淇″彿锛�" + staProtocol.isAutoing() + "銆佸彲鍏ヤ俊鍙凤細" + staProtocol.isInEnable() + + "銆佺┖鏉夸俊鍙凤細" + staProtocol.isEmptyMk() + "銆佸伐浣滃彿锛�" + staProtocol.getWorkNo() + + "銆侀攣瀹氭爣璁�" + staProtocol.isPakMk()); } } } - News.infoNoLog(""+mark+" - 0"+" - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐ф墽琛屽畬鎴�"); } /** @@ -1999,7 +2028,7 @@ if (null == wrkMast) { continue; } - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�:鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�:鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�"); wrkMasts.add(wrkMast); // 缁勮鍛戒护 LedCommand ledCommand = new LedCommand(); @@ -2039,7 +2068,7 @@ ledCommand.setTitle("骞舵澘鍏ュ簱"); break; default: - News.error(""+mark+" - 1"+" - 浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkMast.getWrkNo(), wrkMast.getIoType()); + News.error("" + mark + " - 1" + " - 浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkMast.getWrkNo(), wrkMast.getIoType()); break; } ledCommand.setSourceLocNo(wrkMast.getSourceLocNo()); @@ -2113,7 +2142,7 @@ if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, commands))) { News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort()); continue; - }else { + } else { ledThread.setLedMk(false); } } @@ -2124,7 +2153,7 @@ wrkMast.setOveMk("Y"); wrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(wrkMast) == 0) { - News.errorNoLog(""+mark+" - 4"+" - 鏇存柊宸ヤ綔妗eけ璐�"); + News.errorNoLog("" + mark + " - 4" + " - 鏇存柊宸ヤ綔妗eけ璐�"); throw new CoolException("鏇存柊宸ヤ綔妗eけ璐�"); } } @@ -2138,7 +2167,7 @@ } } - News.infoNoLog(""+mark+" - 0"+" - 鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣ㄦ墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣ㄦ墽琛屽畬鎴�"); } /** @@ -2146,7 +2175,7 @@ */ public synchronized void ledReset(Integer mark) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛�:鍏朵粬 ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅"); + News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�:鍏朵粬 ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅"); for (LedSlave led : slaveProperties.getLed()) { // 鑾峰彇杈撻�佺嚎plc绾跨▼ @@ -2170,13 +2199,13 @@ if (reset && !ledThread.isLedMk()) { ledThread.setLedMk(true); if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) { - News.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort()); + News.error("" + mark + " - 1" + " - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort()); } else { } } } - News.infoNoLog(""+mark+" - 0"+" - 鎵ц瀹屾垚锛氬叾浠� ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅"); + News.infoNoLog("" + mark + " - 0" + " - 鎵ц瀹屾垚锛氬叾浠� ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅"); } /** @@ -2260,10 +2289,10 @@ * 鍥犲弻娣卞簱浣嶉樆濉烇紝瀵规祬搴撲綅杩涜绉昏浆锛堢珛鍗虫墽琛岀増) * tip锛氬悓姝� */ - private synchronized boolean moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc,Integer mark) { + private synchronized boolean moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc, Integer mark) { try { - News.warnNoLog(""+mark+"moveLocForDeepLoc"+" - 0"+" - 寮�濮嬫墽琛�:鍥犲弻娣卞簱浣嶉樆濉烇紝瀵规祬搴撲綅杩涜绉昏浆锛堢珛鍗虫墽琛岀増)"); + News.warnNoLog("" + mark + "moveLocForDeepLoc" + " - 0" + " - 寮�濮嬫墽琛�:鍥犲弻娣卞簱浣嶉樆濉烇紝瀵规祬搴撲綅杩涜绉昏浆锛堢珛鍗虫墽琛岀増)"); List<Integer> rows = locMastService.queryDistinctRow(crn.getId()); LocMast loc = null; for (Integer row : rows) { @@ -2305,7 +2334,7 @@ } if (null == loc) { - News.error(""+mark+"moveLocForDeepLoc"+" - 1"+" - 鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo()); + News.error("" + mark + "moveLocForDeepLoc" + " - 1" + " - 鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo()); return false; // throw new CoolException("鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo()); } else { @@ -2333,7 +2362,7 @@ wrkMast.setModiTime(new Date()); int res = wrkMastMapper.insert(wrkMast); if (res == 0) { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 2"+" - 淇濆瓨宸ヤ綔妗eけ璐�"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 2" + " - 淇濆瓨宸ヤ綔妗eけ璐�"); // throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�"); return true; } @@ -2351,7 +2380,7 @@ wrkDetl.setAppeTime(new Date()); wrkDetl.setModiTime(new Date()); if (!wrkDetlService.insert(wrkDetl)) { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 3"+" - 淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 3" + " - 淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); // throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); return true; } @@ -2362,12 +2391,12 @@ shallowLoc.setLocSts("R"); // R.鍑哄簱棰勭害 shallowLoc.setModiTime(new Date()); if (!locMastService.updateById(shallowLoc)) { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 4"+" - 鏇存柊婧愬簱浣嶇姸鎬佸け璐�"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 4" + " - 鏇存柊婧愬簱浣嶇姸鎬佸け璐�"); // throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�"); return true; } } else { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 5"+" - 婧愬簱浣嶅嚭搴撳け璐�"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 5" + " - 婧愬簱浣嶅嚭搴撳け璐�"); // throw new CoolException("婧愬簱浣嶅嚭搴撳け璐�"); return true; } @@ -2376,23 +2405,23 @@ loc.setLocSts("S"); // S.鍏ュ簱棰勭害 loc.setModiTime(new Date()); if (!locMastService.updateById(loc)) { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 6"+" - 鏇存柊鐩爣搴撲綅鐘舵�佸け璐�"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 6" + " - 鏇存柊鐩爣搴撲綅鐘舵�佸け璐�"); // throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�"); return true; } } else { - News.errorNoLog(""+mark+"moveLocForDeepLoc"+" - 7"+" - 绉昏浆澶辫触"); + News.errorNoLog("" + mark + "moveLocForDeepLoc" + " - 7" + " - 绉昏浆澶辫触"); // throw new CoolException("绉昏浆澶辫触"); return true; } - } catch (Exception e){ - News.error(""+mark+"moveLocForDeepLoc"+" - 8"+" - 鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e); + } catch (Exception e) { + News.error("" + mark + "moveLocForDeepLoc" + " - 8" + " - 鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e); } } } catch (Exception e) { - News.error(""+mark+"moveLocForDeepLoc"+" - 8"+" - 鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e); + News.error("" + mark + "moveLocForDeepLoc" + " - 8" + " - 鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e); // e.printStackTrace(); // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); } @@ -2558,7 +2587,10 @@ // RGV ===>> 鎵ц瀵筊GV鎿嶄綔 public synchronized void rgvExecute(Integer mark) { - ArrayList<Integer> list = new ArrayList<Integer>(){{add(2003);add(2002);}}; + ArrayList<Integer> list = new ArrayList<Integer>() {{ + add(2003); + add(2002); + }}; for (Integer staNo : list) { Integer devpId = null; Integer rgvStaNoDevpId = null; @@ -2567,7 +2599,7 @@ devpId = 1; rgvStaNo = 2002; rgvStaNoDevpId = 2; - }else { + } else { devpId = 2; rgvStaNo = 2003; rgvStaNoDevpId = 1; @@ -2675,11 +2707,11 @@ // 鐘舵�侊細绛夊緟纭 骞朵笖 浠诲姟瀹屾垚浣� = 1 if (rgvProtocol.statusType1 == RgvStatusType.WAITING && rgvProtocol.getTaskNo1() != 0) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛屽RGV宸ヤ綔妗g殑瀹屾垚鎿嶄綔"); + 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()); + News.error("" + mark + " - 1" + " - RGV澶勪簬绛夊緟纭涓斾换鍔″畬鎴愮姸鎬侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�俁GV鍙�={}锛屽伐浣滃彿={}", rgvSlave.getId(), rgvProtocol.getTaskNo1()); continue; } @@ -2702,7 +2734,7 @@ devpId = 1; devpStaNo = 2003; locNo = wrkMast.getLocNo(); - }else { + } else { //鍑哄簱 updateWrkSts = 15L; devpId = 2; @@ -2738,7 +2770,7 @@ } } } - News.infoNoLog(""+mark+" - 0"+" - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); } // RGV ===>> 鎵ц瀵筊GV宸ヤ綔妗g殑瀹屾垚鎿嶄綔 绔欏埌绔� @@ -2757,11 +2789,11 @@ // 鐘舵�侊細绛夊緟纭 骞朵笖 浠诲姟瀹屾垚浣� = 1 if (rgvProtocol.statusType1 == RgvStatusType.WAITING && rgvProtocol.getTaskNo1() != 0) { - News.warnNoLog(""+mark+" - 0"+" - 寮�濮嬫墽琛屽RGV宸ヤ綔妗g殑瀹屾垚鎿嶄綔"); + 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()); + News.error("" + mark + " - 1" + " - RGV澶勪簬绛夊緟纭涓斾换鍔″畬鎴愮姸鎬侊紝浣嗘湭鎵惧埌宸ヤ綔妗c�俁GV鍙�={}锛屽伐浣滃彿={}", rgvSlave.getId(), rgvProtocol.getTaskNo1()); continue; } @@ -2818,7 +2850,7 @@ } } } - News.infoNoLog(""+mark+" - 0"+" - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); + News.infoNoLog("" + mark + " - 0" + " - 瀵瑰伐浣滄。鐨勫畬鎴愭搷浣滄墽琛屽畬鎴�"); } // /** -- Gitblit v1.9.1