Commit d26d03744f14f26f14ec16399fee88f596bac380
1 parent
0db81c02
feat: 出库单历史code重复,覆盖
Showing
2 changed files
with
7 additions
and
1 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -256,7 +256,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
256 | 256 | //如果内侧库位上有托盘的话 |
257 | 257 | if (StringUtils.isNotEmpty(insideLocation.getContainerCode())) { |
258 | 258 | Location destinationLocation; |
259 | - if (roadWay.equals("5")) { | |
259 | + if (roadWay.equals("5") || isSelfCreated == 1) {//5号巷道、自建单据库位 | |
260 | 260 | //分配库位 |
261 | 261 | String destinationLocationCode = locationAllocationService.allocation(high, area, roadWay, containerCode, frequencyLocation, emptyContainerTask, isSelfCreated, isFlammable, true, taskNo); |
262 | 262 | if (StringUtils.isEmpty(destinationLocationCode)) { |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java
... | ... | @@ -49,6 +49,12 @@ public class ShipmentHeaderHistoryServiceImpl extends ServiceImpl<ShipmentHeader |
49 | 49 | @Override |
50 | 50 | public void saveById(String id, String name) { |
51 | 51 | ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id); |
52 | + ShipmentHeaderHistory headerHistory = getOne(new LambdaQueryWrapper<ShipmentHeaderHistory>().eq(ShipmentHeaderHistory::getCode, shipmentHeader.getCode())); | |
53 | + if (headerHistory != null) { | |
54 | + remove(new LambdaQueryWrapper<ShipmentHeaderHistory>().eq(ShipmentHeaderHistory::getCode, shipmentHeader.getCode())); | |
55 | + } | |
56 | + | |
57 | + | |
52 | 58 | Date created = shipmentHeader.getCreated(); |
53 | 59 | String createdBy = shipmentHeader.getCreatedBy(); |
54 | 60 | String lastUpdatedBy = shipmentHeader.getLastUpdatedBy(); |
... | ... |