From 00985eabb51145130d4fa253b153aaeeec3a957a Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期日, 24 三月 2024 20:22:05 +0800 Subject: [PATCH] # app version --- src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java | 105 +++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 83 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java index c2860f1..88f5250 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java @@ -27,26 +27,26 @@ public void initLocFloor1() { //1妤� 13鎺� 86鍒� 12灞� - List<AgvLocMast> agvLocMastList = getLocMastList(1,13,1,86,1,12,1); + List<AgvLocMast> agvLocMastList = getLocMastList(1,45,1,33,1,1,1); this.insertBatch(agvLocMastList); } public void initLocFloor3() { //3妤� 1-33鎺� 1-14鍒� 8灞� ------> 1-33鎺� 1-17鍒� 8灞� - this.insertBatch(getLocMastList(1, 33, 1, 17, 1, 8, 3)); +// this.insertBatch(getLocMastList(1, 33, 1, 17, 1, 8, 3)); +// +// //3妤� 1-27鎺� 15-34鍒� 8灞� ------> 1-26鎺� 18-25鍒� 8灞� +// this.insertBatch(getLocMastList(1, 27, 18, 25, 1, 8, 3)); +// +// //3妤� 1-25鎺� 35-46鍒� 8灞� ------> 1-25鎺� 26-35鍒� 8灞� +// this.insertBatch(getLocMastList(1, 25, 26, 35, 1, 8, 3)); +// +// //3妤� 3-25鎺� 47-60鍒� 8灞� ------> 1-23鎺� 36-70鍒� 8灞� +// this.insertBatch(getLocMastList(1, 23, 36, 70, 1, 8, 3)); - //3妤� 1-27鎺� 15-34鍒� 8灞� ------> 1-26鎺� 18-25鍒� 8灞� - this.insertBatch(getLocMastList(1, 27, 18, 25, 1, 8, 3)); - - //3妤� 1-25鎺� 35-46鍒� 8灞� ------> 1-25鎺� 26-35鍒� 8灞� - this.insertBatch(getLocMastList(1, 25, 26, 35, 1, 8, 3)); - - //3妤� 3-25鎺� 47-60鍒� 8灞� ------> 1-23鎺� 36-70鍒� 8灞� - this.insertBatch(getLocMastList(1, 23, 36, 70, 1, 8, 3)); - - //3妤� 4-25鎺� 61-70鍒� 8灞� - //this.insertBatch(getLocMastList(4, 25, 61, 70, 1, 8, 3)); + //3妤� 3-23鎺� 71-72鍒� 8灞� + this.insertBatch(getLocMastList(3, 23, 71, 72, 1, 8, 3)); } @@ -77,7 +77,7 @@ String locRow = row < 10 ? "-00" + row : "-0" + row; String locBay = bay < 10 ? "-00" + bay : "-0" + bay; String locLev = lev < 10 ? "-0" + lev : "-" + lev; - String locNo = "SK" + locRow + locBay + locLev + "@" + floor; + String locNo = "YZ" + locRow + locBay + locLev + "@" + floor; loc.setLocNo(locNo); loc.setLocSts("O"); loc.setRow1(row); @@ -96,14 +96,67 @@ } private boolean checkLocExist(int row, int bay, int floor){ - if(floor == 1 && (row == 8 || row == 9)){ - if((bay >=8 && bay <=11) - || (bay >= 20 && bay <=23) - || (bay>=37 && bay <=39) - || (bay>=50 && bay <=52) - || (bay>=63 && bay <=64) - || (bay>=79 && bay <=80)){ + //if(floor == 1 && (row == 2)){ + // if((bay >=8 && bay <=11) + // || (bay >= 20 && bay <=23) + // || (bay>=37 && bay <=39) + // || (bay>=50 && bay <=52) + // || (bay>=63 && bay <=64) + // || (bay>=79 && bay <=80)){ + // return false; + // } + //} + if (floor == 1) { + if (row == 2 || row == 5 || row == 8 || row == 11 + || row == 14 || row == 17 || row == 19 || row == 22 || row == 25 + || row == 28 || (row >29 && row <39)|| row == 41|| row == 44) { return false; + } else if (row == 1) { + if (bay < 19) { + return false; + } + } else if (row == 3 || row == 4) { + if (bay < 19 || bay == 26) { + return false; + } + } else if (row == 6) { + if (bay < 20 || bay == 26 || bay == 30) { + return false; + } + } else if (row == 7) { + if (bay < 4 || bay == 26) { + return false; + } + } else if (row == 9 || row ==10 ) { + if (bay < 4 || bay == 12 || bay == 26) { + return false; + } + } else if (row == 12) { + if (bay < 4) { + return false; + } + } else if (row == 15 || row == 18 || row == 20 || row == 21 || row == 24 || row == 26 || row == 27 || row == 40) { + if (bay == 12 || bay == 26) { + return false; + } + } else if (row == 16 || row == 23 || row == 39) { + if (bay == 3 || bay == 4 || bay == 9 || bay == 12 || bay == 14 || bay == 20 || bay == 25 || bay == 26) { + return false; + } + } else if (row == 42) { + if (bay == 5 || bay == 12 || bay == 26) { + return false; + } + } else if (row == 43) { + if (bay < 6 || bay == 12 || bay == 26) { + return false; + } + } else if (row == 45) { + if (bay < 6) { + return false; + } + } else { + return true; } } @@ -137,9 +190,10 @@ this.baseMapper.updateLocType2(locType2,locRule.getRowBeg(),locRule.getRowEnd(),locRule.getBayBeg(),locRule.getBayEnd(),locRule.getLevBeg(),locRule.getLevEnd(),locRule.getFloor()); } - public void updateLocStsByLocNo(String locNo, String locSts) { + public void updateLocStsByLocNo(String locNo, String locSts, String barcode) { AgvLocMast agvLocMast = this.selectById(locNo); agvLocMast.setLocSts(locSts); + agvLocMast.setBarcode(barcode); this.updateById(agvLocMast); } @@ -154,4 +208,11 @@ //return this.agvLocMastMapper.selectLocByLevAndFloor(lev,floor); } + @Override + public AgvLocMast selectEmptyZpallet(int type) { + + return this.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_sts","D").eq("loc_type2",type)); + + } + } -- Gitblit v1.9.1