From 9e449db8c3bb40e1a8591cad341b1850a03765ff Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期六, 21 十二月 2024 13:13:34 +0800 Subject: [PATCH] #地图文件bug尝试修复 --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 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 a610282..0e18857 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -114,6 +114,8 @@ private WrkDetlLogService wrkDetlLogService; @Autowired private MatService matService; + @Autowired + private NavigateMapData navigateMapData; /** @@ -888,7 +890,7 @@ ////// devpThread.setPakMk(staProtocol.getSiteId(), false); ////// boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); ////// if (!result) { -////// News.error("鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿锛歿}]", devp.getId()); +////// News.error("鍙戝竷鍛戒护鑷宠緭閫佺嚎闃熷垪澶辫触锛侊紒锛� [plc缂栧彿{}]", devp.getId()); ////// } //// //// barcodeThread.setBarcode("");//娓呯悊鏉$爜 @@ -938,8 +940,7 @@ if (basMap == null) { //鏁版嵁搴撲腑涔熶笉瀛樺湪鍦板浘鏁版嵁锛屼粠鍦板浘鏂囦欢涓幏鍙� //杞藉叆鍦板浘 - NavigateMapData mapData = new NavigateMapData(i); - List<List<MapNode>> lists = mapData.getJsonData(-1, null, null);//鑾峰彇瀹屾暣鍦板浘(鍖呮嫭鍏ュ簱鍑哄簱) + List<List<MapNode>> lists = navigateMapData.getJsonData(i, -1, null, null);//鑾峰彇瀹屾暣鍦板浘(鍖呮嫭鍏ュ簱鍑哄簱) //瀛樺叆鏁版嵁搴� basMap = new BasMap(); @@ -2541,10 +2542,13 @@ //鍒ゆ柇鏈烘鑷傛嫞鏂欑珯鏄惁绌洪棽 StaProtocol staProtocol303 = devpThread.getStation().get(303); StaProtocol staProtocol317 = devpThread.getStation().get(317); - if (staProtocol303.isAutoing() && !staProtocol303.isLoading()) { + + List<WrkMast> wrkMasts303 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 25).eq("sta_no", 303)); + List<WrkMast> wrkMasts317 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 25).eq("sta_no", 317)); + if (staProtocol303.isAutoing() && !staProtocol303.isLoading() && wrkMasts303.isEmpty()) { //鑷姩銆佹棤鐗� targetSta = (short) 303; - } else if (staProtocol317.isAutoing() && !staProtocol317.isLoading()) { + } else if (staProtocol317.isAutoing() && !staProtocol317.isLoading() && wrkMasts317.isEmpty()) { //鑷姩銆佹棤鐗� targetSta = (short) 317; } else { @@ -2697,8 +2701,11 @@ String barcode = barcodeThread.getBarcode(); if (!Cools.isEmpty(barcode)) { //閫氱煡AGV鍙栬揣 - agvRestockCall("301-1", barcode); - log.info("閫氱煡AGV鍙栬揣锛屾潯鐮佸彿锛�" + barcode); + boolean result = agvRestockCall("301-1", barcode); + log.info("鏈烘鑷傞�氱煡AGV鍙栬揣锛屾潯鐮佸彿锛�" + barcode); + if (result) { + barcodeThread.setBarcode(""); + } } } @@ -2711,8 +2718,11 @@ String barcode = barcodeThread.getBarcode(); if (!Cools.isEmpty(barcode)) { //閫氱煡AGV鍙栬揣 - agvRestockCall("302-1", barcode); - log.info("閫氱煡AGV鍙栬揣锛屾潯鐮佸彿锛�" + barcode); + boolean result = agvRestockCall("302-1", barcode); + log.info("鏈烘鑷傞�氱煡AGV鍙栬揣锛屾潯鐮佸彿锛�" + barcode); + if (result) { + barcodeThread.setBarcode(""); + } } } } -- Gitblit v1.9.1