Commit 3f6f41072114dfdf656d114da68ae4a7d7143888
1 parent
4158fbdd
双伸位分配库位 选取巷道,当不适合分配库位大于保留库位时, 那么这个巷道可分配库位要大于不适合分配库位
Showing
2 changed files
with
22 additions
and
1 deletions
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
... | ... | @@ -209,7 +209,12 @@ export default { |
209 | 209 | title: '容器状态', |
210 | 210 | align: "center", |
211 | 211 | dataIndex: 'containerStatus_dictText', |
212 | - scopedSlots: {customRender: 'containerStatus_dictText'} | |
212 | + scopedSlots: {customRender: 'containerStatus_dictText'}, | |
213 | + filterMultiple: false, | |
214 | + filters: [ | |
215 | + {text: '空闲', value: 'empty'}, | |
216 | + {text: '锁定', value: 'lock'}, | |
217 | + ] | |
213 | 218 | }, |
214 | 219 | { |
215 | 220 | title: '库位编码', |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... | ... | @@ -125,6 +125,22 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
125 | 125 | List<Integer> removeRoadWays = new ArrayList<>(); |
126 | 126 | // 寻找可用巷道,空闲的空库位低于设定值,那么这个巷道就不能用来分配库位 |
127 | 127 | for (Integer roadWay : roadWays) { |
128 | + LambdaQueryWrapper<Location> locationLambdaQueryWrapper1 = Wrappers.lambdaQuery(); | |
129 | + locationLambdaQueryWrapper1.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay) | |
130 | + .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_LOCK).ge(Location::getHigh, high).eq(Location::getEnable, QuantityConstant.STATUS_ENABLE) | |
131 | + .in(Location::getLocationTypeCode, locationTypeCodeList); | |
132 | + List<Location> totalLocationList1 = locationService.list(locationLambdaQueryWrapper1); | |
133 | + int total = 0; | |
134 | + for (Location location : totalLocationList1) { | |
135 | + Location location1 = locationService.getInsideNear(location); | |
136 | + if (location1.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY) && StringUtils.isEmpty(location1.getContainerCode())) { | |
137 | + total++; | |
138 | + } | |
139 | + } | |
140 | + if (total > reserveNumber) { | |
141 | + reserveNumber = total; | |
142 | + } | |
143 | + | |
128 | 144 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
129 | 145 | locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay) |
130 | 146 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high).eq(Location::getEnable, QuantityConstant.STATUS_ENABLE) |
... | ... |