From 1e6a8c2695f6ac1e58bc46eb08ef1b8c7c03259b Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 07 三月 2025 13:57:45 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/SiemensCrnThread.java | 8 src/main/webapp/static/js/console.map.js | 670 ----------------------------------------------- src/main/java/com/zy/core/MainProcess.java | 54 --- src/main/webapp/static/js/common.js | 2 pom.xml | 2 src/main/java/com/zy/core/thread/SiemensDevpThread.java | 42 -- src/main/resources/application.yml | 4 7 files changed, 13 insertions(+), 769 deletions(-) diff --git a/pom.xml b/pom.xml index 0e0b3b6..cfb1fc2 100644 --- a/pom.xml +++ b/pom.xml @@ -185,7 +185,7 @@ </dependencies> <build> - <finalName>ykwcs</finalName> + <finalName>fyxccrnwcs</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java index 858c5ba..56d1235 100644 --- a/src/main/java/com/zy/core/MainProcess.java +++ b/src/main/java/com/zy/core/MainProcess.java @@ -81,60 +81,6 @@ mainService.outOfDevp(11); - if (i>10){ - //绌烘墭鐩樿嚜鍔ㄥ嚭搴� - mainService.autoEmptyOut(); - //绌烘墭鐩樿嚜鍔ㄥ叆搴� - mainService.autoEmptyIn(); - i=0; - } - i++; - - // 鍏朵粬 ===>> 鍏ュ嚭搴撴ā寮忓垏鎹� -// i++; -// if (i > 1) { -// mainService.ioConvert(); -// i = 0; -// } - - /////////////////////////////////////RGV璋冨害///////////////////////////////////// -// - //瀹屾垚灏忚溅浠诲姟 -// mainService.rgvCompleteWrkMastSta(); - -// //鎵ц灏忚溅绌烘澘鎼繍浠诲姟 -// mainService.rgvRunWrkMastEmptyStaPut();//鏀� -// mainService.rgvRunWrkMastEmptyStaTake();//鍙� -// if (rgcWrk){ -// //鎵ц灏忚溅璐х墿鎼繍浠诲姟 -// mainService.rgvRunWrkMastFullSta(); -// rgcWrk = false; -// }else { -// mainService.rgvRunWrkMastEmptyStaAvoidance();//閬胯 -// rgcWrk = true; -// } - - - /////////////////////////////////////RGV璋冨害///////////////////////////////////// - /////////////////////////////////////RGV璋冨害///////////////////////////////////// - k++; - - // RGV ===>> 灏忚溅浠诲姟浣滀笟涓嬪彂 - try{ - boolean rgvIoExecuteSign = mainService.rgvRunWrkMastFullSta(); - if (rgvIoExecuteSign){ - k = 0; - } else if (k>4){ - k = 0; - mainService.rgvRunWrkMastEmptyStaAvoidance();//閬胯 - } - }catch (Exception e){ - log.error("RGV ===>> 灏忚溅浠诲姟浣滀笟涓嬪彂寮傚父"+e); - } - //瀹屾垚灏忚溅浠诲姟 - mainService.rgvCompleteWrkMastSta(); - /////////////////////////////////////RGV璋冨害///////////////////////////////////// - } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java index e08db4f..3b02b31 100644 --- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java +++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java @@ -285,10 +285,8 @@ array[9] = command.getCommand(); // array[10] = 0; //澶囩敤1 - boolean[] array2 = new boolean[1]; - array2[0] = command.isTraySize(); + OperateResult result = siemensNet.Write("DB100.0", array); - OperateResult result2 = siemensNet.Write("DB100.22", array2); News.info("鍫嗗灈鏈哄懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), array); //鍫嗗灈鏈轰换鍔″啓鍏ュ悗锛屽洖璇讳竴娆★紝鐪嬫槸鍚︽垚鍔� @@ -297,11 +295,10 @@ do { try{ - if(!result.IsSuccess || !result2.IsSuccess){ + if(!result.IsSuccess ){ News.error("鍐欏叆鍫嗗灈鏈簆lc鏁版嵁澶辫触锛岄噸鏂颁笅鍙戜换鍔� 鍐欏叆鐩存帴澶辫触 ===>> [id:{}],{},[鍐欏叆娆℃暟:{}]", slave.getId(), JSON.toJSON(command),writeCount1); // MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command)); result = siemensNet.Write("DB100.0", array); - result2 = siemensNet.Write("DB100.22", array2); Thread.sleep(100); writeCount1++; continue; @@ -344,7 +341,6 @@ // MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command)); News.error("鍐欏叆鍫嗗灈鏈簆lc鏁版嵁澶辫触锛岄噸鏂颁笅鍙戜换鍔� 鍥炶涓嶄竴鑷� ===>> [id:{}],{},[鍐欏叆娆℃暟:{}]", slave.getId(), JSON.toJSON(command),writeCount1); result = siemensNet.Write("DB100.0", array); - result2 = siemensNet.Write("DB100.22", array2); writeCount1++; continue; diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java index eb078f2..d8f138c 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -51,34 +51,17 @@ // // }}; public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ - add(100);add(101);add(102);add(103); - add(104);add(105);add(106);add(107); - add(108);add(109);add(110);add(111); - add(112);add(113);add(114);add(115); - add(116);add(117);add(118);add(119); - add(120);add(121);add(122);add(123); - add(124);add(125);add(126);add(127); - add(128);add(129);add(130);add(131); - add(132);add(133);add(134);add(135); - add(136);add(137);add(138);add(139); - add(140);add(141);add(142);add(143); - add(144);add(145);add(146);add(147); - add(148);add(149);add(150);add(151); - add(152);add(153);add(154);add(155); - add(156);add(157);add(158);add(159); - add(160);add(161); - add(1); -// add(200);add(201);add(202); + add(1111);add(1112);add(1113);add(1114); + add(1121);add(1122);add(1123);add(1124); + add(1131);add(1132);add(1133);add(1134);add(1135); }}; public static final ArrayList<Integer> BarcodeList = new ArrayList<Integer>() {{ - add(0); add(1); add(2); + add(1112); add(1122); }}; - public static final ArrayList<Integer> BarcodeListMat = new ArrayList<Integer>() {{ - add(3); add(4); - }}; + public static final ArrayList<Integer> staNosErrList = new ArrayList<Integer>() {{ - add(106); add(107); add(159); + add(1112); add(1122); }}; private Integer count=0; @@ -296,19 +279,6 @@ for (int i = 0; i < barcodeList.size(); i++) { Integer barcodeId = barcodeList.get(i); String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8"); - BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1); - if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { - barcodeThread.setBarcode(barcode); - } - } - } - //鏉$爜鎵弿鍣� - ArrayList<Integer> barcodeListMat = BarcodeListMat; - OperateResultExOne<byte[]> result2Mat = siemensS7Net.Read("DB103.0", (short) (barcodeListMat.size() * 30)); - if (result2Mat.IsSuccess) { - for (int i = 0; i < barcodeListMat.size(); i++) { - Integer barcodeId = barcodeListMat.get(i); - String barcode = siemensS7Net.getByteTransform().TransString(result2Mat.Content,i*30,30, "UTF-8"); BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId + 1); if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { barcodeThread.setBarcode(barcode); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 249dbe0..2fbe7e7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,5 @@ server: - port: 8080 + port: 9090 servlet: context-path: /@pom.build.finalName@ @@ -8,7 +8,7 @@ name: @pom.build.finalName@ datasource: driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver - url: jdbc:sqlserver://localhost:1433;databasename=gdykasrs + url: jdbc:sqlserver://localhost:1433;databasename=fyxcasrs username: sa password: sa@123 mvc: diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index 44e7c47..cf843f1 100644 --- a/src/main/webapp/static/js/common.js +++ b/src/main/webapp/static/js/common.js @@ -1,4 +1,4 @@ -var baseUrl = "/ykwcs"; +var baseUrl = "/fyxccrnwcs"; // 璧嬪�� function setVal(el, val) { diff --git a/src/main/webapp/static/js/console.map.js b/src/main/webapp/static/js/console.map.js index 76f41ce..656b620 100644 --- a/src/main/webapp/static/js/console.map.js +++ b/src/main/webapp/static/js/console.map.js @@ -6,43 +6,7 @@ "hpPosition": 0, "minBayNo": 1, "floors": 1, - "racks": [{ - "type": "rack", - "id": "rack16", - "top": 167, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack15", - "top": 188, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack14", - "top": 236, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack13", - "top": 257, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { + "racks": [ { "type": "rack", "id": "rack12", "top": 280, @@ -78,78 +42,6 @@ "height": 22, "minBayNo": 2, "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack8", - "top": 393, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack7", - "top": 414, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack6", - "top": 462, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack5", - "top": 483, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack4", - "top": 506, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack3", - "top": 527, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack2", - "top": 575, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 - }, { - "type": "rack", - "id": "rack1", - "top": 596, - "left": 529, - "width": 1280, - "height": 22, - "minBayNo": 2, - "maxBayNo": 56 }], "rackDescs": [{ "type": "rackDescs", @@ -170,22 +62,6 @@ }], "crns": [{ "type": "track", - "id": "lb_track4", - "text": "", - "top": 226, - "left": 490, - "width": 1300, - "height": 2 - }, { - "type": "crane", - "id": "crn-4", - "text": "4", - "top": 213, - "left": 490, - "width": 93, - "height": 22 - },{ - "type": "track", "id": "lb_track3", "text": "", "top": 338, @@ -197,38 +73,6 @@ "id": "crn-3", "text": "3", "top": 325, - "left": 490, - "width": 93, - "height": 22 - },{ - "type": "track", - "id": "lb_track2", - "text": "", - "top": 451, - "left": 490, - "width": 1300, - "height": 2 - }, { - "type": "crane", - "id": "crn-2", - "text": "2", - "top": 438, - "left": 490, - "width": 93, - "height": 22 - },{ - "type": "track", - "id": "lb_track1", - "text": "", - "top": 564, - "left": 490, - "width": 1300, - "height": 2 - }, { - "type": "crane", - "id": "crn-1", - "text": "1", - "top": 553, "left": 490, "width": 93, "height": 22 @@ -251,523 +95,11 @@ "height": 668, "stns": [{ "type": "stn", - "id": "site-148", - "text": "148", - "top": 190, - "left": 468, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-147", - "text": "147", - "top": 190, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-146", - "text": "146", - "top": 190, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-149", - "text": "149", - "top": 190, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-150", - "text": "150", - "top": 169, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-151", - "text": "151", - "top": 148, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-153", - "text": "153", - "top": 148, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-152", - "text": "152", - "top": 148, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-154", - "text": "154", - "top": 127, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-155", - "text": "155", - "top": 106.5, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-157", - "text": "157", - "top": 106.5, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-156", - "text": "156", - "top": 106.5, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-158", - "text": "158", - "top": 85.5, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-159", - "text": "159", - "top": 64.5, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-160", - "text": "160", - "top": 64.5, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-161", - "text": "161", - "top": 64.5, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-145", - "text": "145", - "top": 211, - "left": 344.5, - "width": 60, - "height": 26 - }, { - "type": "stn", - "id": "site-142", - "text": "142", - "top": 239, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-143", - "text": "143", - "top": 239, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", "id": "site-144", "text": "144", "top": 239, "left": 468, "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-141", - "text": "141", - "top": 260, - "left": 344.5, - "width": 60, - "height": 42 - }, { - "type": "stn", - "id": "site-139", - "text": "139", - "top": 304, - "left": 406, - "width": 120, - "height": 19 - }, { - "type": "stn", - "id": "site-138", - "text": "138", - "top": 304, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-134", - "text": "134", - "top": 352, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-135", - "text": "135", - "top": 352, - "left": 406, - "width": 120, - "height": 19 - }, { - "type": "stn", - "id": "site-137", - "text": "137", - "top": 324.5, - "left": 344.5, - "width": 60, - "height": 25.5 - }, { - "type": "stn", - "id": "site-133", - "text": "133", - "top": 373, - "left": 344.5, - "width": 60, - "height": 42.5 - }, { - "type": "stn", - "id": "site-130", - "text": "130", - "top": 417, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-131", - "text": "131", - "top": 417, - "left": 406, - "width": 120, - "height": 19 - }, { - "type": "stn", - "id": "site-129", - "text": "129", - "top": 438, - "left": 344.5, - "width": 60, - "height": 25 - }, { - "type": "stn", - "id": "site-126", - "text": "126", - "top": 464.5, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-127", - "text": "127", - "top": 464.5, - "left": 406, - "width": 120, - "height": 19 - }, { - "type": "stn", - "id": "site-125", - "text": "125", - "top": 485, - "left": 344.5, - "width": 60, - "height": 42.5 - }, { - "type": "stn", - "id": "site-124", - "text": "124", - "top": 529, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-121", - "text": "121", - "top": 529, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-122", - "text": "122", - "top": 529, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-123", - "text": "123", - "top": 529, - "left": 468, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-120", - "text": "120", - "top": 550, - "left": 344.5, - "width": 60, - "height": 25 - }, { - "type": "stn", - "id": "site-119", - "text": "119", - "top": 464.5, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-116", - "text": "116", - "top": 577, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-117", - "text": "117", - "top": 577, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-118", - "text": "118", - "top": 577, - "left": 468, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-115", - "text": "115", - "top": 598, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-114", - "text": "114", - "top": 620, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-113", - "text": "113", - "top": 620, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "track", - "id": "lb_trCart21", - "text": "", - "top": 65, - "left": 226, - "width": 6, - "height": 742 - }, { - "type": "track", - "id": "lb_trCart22", - "text": "", - "top": 65, - "left": 270, - "width": 6, - "height": 742 - },{ - "type": "stn", - "id": "site-3", - "text": "3", - "top": -20, - "left": 220, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-2", - "text": "2", - "top": -20, - "left": 220, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-1", - "text": "1", - "top": -20, - "left": 220, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-202", - "text": "202", - "top": 642, - "left": 283, - "width": 184, - "height": 19 - }, { - "type": "stn", - "id": "site-999", - "text": "澶囩敤PGV銆丷GV缁翠慨鍖�", - "top": 642, - "left": 283, - "width": 184, - "height": 19 - }, { - "type": "stn", - "id": "site-110", - "text": "110", - "top": 663, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-111", - "text": "111", - "top": 663, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-112", - "text": "112", - "top": 663, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-109", - "text": "109", - "top": 684, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-108", - "text": "108", - "top": 705, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-107", - "text": "107", - "top": 705, - "left": 283, - "width": 122, - "height": 19 - }, { - "type": "stn", - "id": "site-105", - "text": "105", - "top": 727, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-106", - "text": "106", - "top": 727, - "left": 283, - "width": 122, - "height": 19 - }, { - "type": "stn", - "id": "site-104", - "text": "104", - "top": 749, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-103", - "text": "103", - "top": 771, - "left": 406, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-102", - "text": "102", - "top": 771, - "left": 344.5, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-101", - "text": "101", - "top": 771, - "left": 283, - "width": 60, - "height": 19 - }, { - "type": "stn", - "id": "site-100", - "text": "100", - "top": 792, - "left": 283, - "width": 184, "height": 19 }], "barcode":[ -- Gitblit v1.9.1