From c49dc2f40279bcc360948cea68dec69cf213b85f Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期一, 25 十二月 2023 15:33:34 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java index e3bb07b..0747f90 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java +++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java @@ -34,6 +34,7 @@ } double widths = glasslist.getglasslengthmm(); String orderids = glasslist.getordernumber(); + String FrameBarcode=glasslist.getFrameBarcode(); List<String> adddresslist = new ArrayList<>(); adddresslist.add("DB105.0");// 杩涚墖杞﹁捣濮嬩綅缃� @@ -46,7 +47,7 @@ // String orderid="A001"; // 鑾峰彇璁㈠崟鐩稿叧搴︽渶楂樼殑绗煎瓙鎺掑簭 - List<StorageCage> storageCage = spianMapper.selectAll(orderids.toString()); + List<StorageCage> storageCage = spianMapper.selectAll(orderids,FrameBarcode); if (storageCage == null) { return (400); } @@ -55,7 +56,9 @@ cage1 = storageCage2.getCage(); // 鍒ゆ柇璇ョ瀛愬彿鐩搁偦鏈�澶х殑绌烘牸鏁� int cages = spianMapper.selectCage(cage1); - if(cages==0){ + + // 濡傛灉鐩搁偦绗煎瓙娌℃湁绌烘牸,鎴栬�呮湁姝e湪鎵ц鐨勫嚭鐗囦换鍔℃椂杩斿洖400 + if (cages == 0) { return (400); } StorageCage cages1; @@ -141,6 +144,8 @@ int cages; int cells; double glasswidth = cageout.getGlassWidth(); + + // 鍒ゆ柇鐜荤拑鍐呭鐗� if (tier == 2) { int state = spianMapper.selectGlassState(cage, cell);// 鑾峰彇鏍煎瓙鏁伴噺 @@ -189,7 +194,7 @@ } else { // 鐜荤拑闇�瑕佽皟鎷ㄦ椂锛屽垽鏂睘浜庡摢涓崐鍖虹殑绗煎瓙 if (cage < 6) { - StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 0, 6); + StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 0, 6,cell); if (cagecell == null) { return (300); } @@ -219,7 +224,7 @@ return (200); // 缁撴潫 } else {// 绗煎瓙鍙峰ぇ浜�5鏃� - StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 5, 11); + StorageCage cagecell = spianMapper.selectGlassCage(cage, glasswidth, 5, 11,cell); if (cagecell == null) { return (300); } @@ -239,7 +244,7 @@ // spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid);// 鏂板鍑虹墖浠诲姟 spianMapper.UpdateDBCage(ids, cage, cell, 2);// 灏嗗師鏍煎瓙鏁版嵁鏇存柊鍒版柊鏍煎瓙閲� spianMapper.UpdataAddCage1(glasswidth, cages, cells);// 鍑忓皯鏂版牸瀛愬搴� - spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴� + spianMapper.UpdataOutCage1(glasswidth, cage, cell);// 澧炲姞鍘熸牸瀛愬搴� // 浼犺緭mes鏁版嵁,鍧愭爣锛屾暟鎹� System.out.println("鍑虹墖浠诲姟|" + datas); S7control.getinstance().WriteWord(adddresslist, datas);// 娲惧彂鍑虹墖杞︿换鍔� @@ -300,20 +305,20 @@ // 鏍规嵁鐜荤拑id瀹屾垚鍦ㄨ繘琛屼腑鐨勪换鍔� public void overtask(String glassid) { - + spianMapper.UpdatetaskOut(glassid);// 瀹屾垚涓婁竴娆� 鍑虹墖鎴栬�呰繘鐗囦换鍔� spianMapper.OverOutSlice(glassid, 2);// 瀹屾垚鍑虹墖闃熷垪浠诲姟 spianMapper.UpdataGlassCage(glassid, 0);// 娓呴櫎鍑虹墖鏍煎瓙鐜荤拑淇℃伅 spianMapper.UpdateCageOver(glassid, 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬� - spianMapper.UpdateCageadd(glassid,1);// 鏇存敼绗煎瓙琛ㄨ繘鐗囩姸鎬� + spianMapper.UpdateCageadd(glassid, 1);// 鏇存敼绗煎瓙琛ㄨ繘鐗囩姸鎬� String barcode = spianMapper.SelectBarcode(glassid);// 鑾峰彇璇ョ幓鐠冪殑閾濇id spianMapper.UpdateAddQueue(glassid);// 鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑 - if (barcode != null) { - int barcodeState = spianMapper.SelectOverState(barcode);// 鑾峰彇璇ラ摑妗嗙殑鐘舵�� - if (barcodeState == 2) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁 - spianMapper.DeleteQueue(barcode); - } - } + // if (barcode != null) { + // int barcodeState = spianMapper.SelectOverState(barcode);// 鑾峰彇璇ラ摑妗嗙殑鐘舵�� + // if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁 + // spianMapper.DeleteQueue(barcode); + // } + // } } } -- Gitblit v1.8.0