Commit 1193cbc89bcb1a87c05b48ba7d3ca1444c09a26f
1 parent
d8cdc42b
fix: 双伸位自动移库匹配规则更改及分配库位判断隔壁库位有无任务;
Showing
3 changed files
with
16 additions
and
12 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationServiceImpl.java
... | ... | @@ -116,12 +116,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
116 | 116 | if (StringUtils.isNotEmpty(value)) { |
117 | 117 | reserveNumber = Integer.parseInt(value); |
118 | 118 | } |
119 | - String xzLocationOne = configService.getKey(QuantityConstant.XZ_LOCATION_ONE_ONOFF, warehouseCode); | |
120 | - Integer xzLocaitonONeOnoff = 1; | |
121 | - if (StringUtils.isNotEmpty(xzLocationOne)) { | |
122 | - //等于1,则从第1层开始分配,等于从第2层开始分配 | |
123 | - xzLocaitonONeOnoff = Integer.parseInt(xzLocationOne); | |
124 | - } | |
119 | + | |
125 | 120 | StopWatch stopWatch = new StopWatch(); |
126 | 121 | stopWatch.start("aaa"); |
127 | 122 | List<String> removeRoadWays = new ArrayList<>(); |
... | ... | @@ -132,7 +127,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
132 | 127 | .eq(StringUtils.isNotEmpty(roadWay), Location::getRoadway, roadWay) |
133 | 128 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
134 | 129 | .eq(Location::getHigh, high) |
135 | - .ge(Location::getILayer, xzLocaitonONeOnoff) | |
136 | 130 | .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) |
137 | 131 | .in(Location::getLocationType, locationTypeCodeList) |
138 | 132 | .eq(Location::getContainerCode, "") |
... | ... | @@ -155,7 +149,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
155 | 149 | .eq(StringUtils.isNotEmpty(roadWay), Location::getRoadway, roadWay) |
156 | 150 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
157 | 151 | .eq(Location::getHigh, high) |
158 | - .ge(Location::getILayer, xzLocaitonONeOnoff) | |
159 | 152 | .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) |
160 | 153 | .eq(Location::getRowFlag, QuantityConstant.ROW_OUT) |
161 | 154 | .in(Location::getLocationType, locationTypeCodeList) |
... | ... | @@ -165,7 +158,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
165 | 158 | List<Location> removeLocaationList = new ArrayList<>(); |
166 | 159 | if (locationList != null && locationList.size() > 0) { |
167 | 160 | for (Location location1 : locationList) { |
168 | - if (taskHeaderService.getUncompleteTaskInNear(location1) > 0) { | |
161 | + if (taskHeaderService.getUncompleteTaskInNearXZ(location1) > 0) { | |
169 | 162 | removeLocaationList.add(location1); |
170 | 163 | } |
171 | 164 | } |
... | ... | @@ -180,7 +173,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
180 | 173 | .eq(StringUtils.isNotEmpty(roadWay), Location::getRoadway, roadWay) |
181 | 174 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
182 | 175 | .eq(Location::getHigh, high) |
183 | - .ge(Location::getILayer, xzLocaitonONeOnoff) | |
184 | 176 | .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) |
185 | 177 | .eq(Location::getRowFlag, QuantityConstant.ROW_IN) |
186 | 178 | .in(Location::getLocationType, locationTypeCodeList) |
... | ... | @@ -190,7 +182,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
190 | 182 | removeLocaationList = new ArrayList<>(); |
191 | 183 | if (locationList != null && locationList.size() > 0) { |
192 | 184 | for (Location location1 : locationList) { |
193 | - if (taskHeaderService.getUncompleteTaskInNear(location1) > 0) { | |
185 | + if (taskHeaderService.getUncompleteTaskInNearXZ(location1) > 0) { | |
194 | 186 | removeLocaationList.add(location1); |
195 | 187 | } |
196 | 188 | } |
... | ... |
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... | ... | @@ -569,10 +569,11 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
569 | 569 | queryWrapper.eq(Location::getWarehouseCode, location.getWarehouseCode()); |
570 | 570 | queryWrapper.eq(Location::getRoadway, location.getRoadway()); |
571 | 571 | queryWrapper.ge(Location::getHigh, location.getHigh()); |
572 | - queryWrapper.eq(Location::getRowFlag, QuantityConstant.ROW_OUT); | |
572 | +// queryWrapper.eq(Location::getRowFlag, QuantityConstant.ROW_OUT); | |
573 | 573 | queryWrapper.eq(Location::getContainerCode, ""); |
574 | 574 | queryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY); |
575 | 575 | queryWrapper.eq(!location.getWarehouseCode().equalsIgnoreCase("KS0001"),Location::getLocationType, location.getLocationType()); |
576 | + queryWrapper.last(" order by high asc "); | |
576 | 577 | List<Location> locationList = list(queryWrapper); |
577 | 578 | List<Location> removeLocationList = new ArrayList<>(); |
578 | 579 | int column = location.getIColumn(); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
... | ... | @@ -1044,6 +1044,17 @@ public class TaskHeaderService extends ServiceImpl<TaskHeaderMapper, TaskHeader> |
1044 | 1044 | |
1045 | 1045 | } |
1046 | 1046 | |
1047 | + public int getUncompleteTaskInNearXZ(Location location) { | |
1048 | + Location location1 = locationService.getNear(location); | |
1049 | + if (location1 == null) { | |
1050 | + return 0; | |
1051 | + } | |
1052 | + String status = location1.getStatus(); | |
1053 | + if(QuantityConstant.STATUS_LOCATION_LOCK.equals(status)) { | |
1054 | + return 1; | |
1055 | + } | |
1056 | + return 0; | |
1057 | + } | |
1047 | 1058 | public int getUncompleteTaskInNear(Location location) { |
1048 | 1059 | Location location1 = locationService.getNear(location); |
1049 | 1060 | if (location1 == null) { |
... | ... |