diff --git a/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java b/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java index bb5497c..5e9866b 100644 --- a/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java +++ b/src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java @@ -256,7 +256,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService //如果内侧库位上有托盘的话 if (StringUtils.isNotEmpty(insideLocation.getContainerCode())) { Location destinationLocation; - if (roadWay.equals("5")) { + if (roadWay.equals("5") || isSelfCreated == 1) {//5号巷道、自建单据库位 //分配库位 String destinationLocationCode = locationAllocationService.allocation(high, area, roadWay, containerCode, frequencyLocation, emptyContainerTask, isSelfCreated, isFlammable, true, taskNo); if (StringUtils.isEmpty(destinationLocationCode)) { diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java index 642c9a0..dfa23e4 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeaderHistory/service/ShipmentHeaderHistoryServiceImpl.java @@ -49,6 +49,12 @@ public class ShipmentHeaderHistoryServiceImpl extends ServiceImpl<ShipmentHeader @Override public void saveById(String id, String name) { ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id); + ShipmentHeaderHistory headerHistory = getOne(new LambdaQueryWrapper<ShipmentHeaderHistory>().eq(ShipmentHeaderHistory::getCode, shipmentHeader.getCode())); + if (headerHistory != null) { + remove(new LambdaQueryWrapper<ShipmentHeaderHistory>().eq(ShipmentHeaderHistory::getCode, shipmentHeader.getCode())); + } + + Date created = shipmentHeader.getCreated(); String createdBy = shipmentHeader.getCreatedBy(); String lastUpdatedBy = shipmentHeader.getLastUpdatedBy();