|
|
@@ -778,8 +778,8 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItemService.saveOrUpdateBatch(tradingBoxItems);
|
|
|
}
|
|
|
}*/
|
|
|
- if (!itemsListJC.isEmpty()){
|
|
|
- for (BoxDynamicsRecordItems item : itemsListJC){
|
|
|
+ if (!itemsListJC.isEmpty()) {
|
|
|
+ for (BoxDynamicsRecordItems item : itemsListJC) {
|
|
|
item.setTenantId(AuthUtil.getTenantId());
|
|
|
}
|
|
|
this.synchronization(itemsListJC);
|
|
|
@@ -1409,6 +1409,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxList = tradingBoxMapper.selectList(new LambdaQueryWrapper<TradingBox>()
|
|
|
.eq(TradingBox::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(TradingBox::getIsDeleted, 0)
|
|
|
+ .eq(TradingBox::getStatus, 0)
|
|
|
.in(TradingBox::getId, srcIdList));
|
|
|
}
|
|
|
List<TradingBoxItem> tradingBoxItemList = new ArrayList<>();
|
|
|
@@ -1554,95 +1555,55 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
putBoxItem.setBoxEastName(putBox.getBoxEastName());
|
|
|
}
|
|
|
putBoxItems.add(putBoxItem);
|
|
|
- if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
- if (!tradingBoxList.isEmpty()) {
|
|
|
- TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBox.getSrcId()))
|
|
|
- .findFirst().orElse(null);
|
|
|
- if (tradingBox != null) {
|
|
|
- if (!tradingBoxes.isEmpty()) {
|
|
|
- if (!tradingBoxes.stream().map(TradingBox::getId).collect(Collectors.toList()).contains(tradingBox.getId())) {
|
|
|
- tradingBoxes.add(tradingBox);
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (!tradingBoxList.isEmpty()) {
|
|
|
+ TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBox.getSrcId()))
|
|
|
+ .findFirst().orElse(null);
|
|
|
+ if (tradingBox != null) {
|
|
|
+ if (!tradingBoxes.isEmpty()) {
|
|
|
+ if (!tradingBoxes.stream().map(TradingBox::getId).collect(Collectors.toList()).contains(tradingBox.getId())) {
|
|
|
tradingBoxes.add(tradingBox);
|
|
|
}
|
|
|
- TradingBoxItem tradingBoxItem;
|
|
|
- if (!tradingBoxItemList.isEmpty()) {
|
|
|
- tradingBoxItem = tradingBoxItemList.stream().filter(e -> e.getCode().equals(item.getBoxCode()))
|
|
|
- .findFirst().orElse(null);
|
|
|
- if (tradingBoxItem != null) {
|
|
|
- tradingBoxItem.setPid(tradingBox.getId());
|
|
|
- tradingBoxItem.setBoxDynamics("调箱进场");
|
|
|
- tradingBoxItem.setPortId(item.getPortId());
|
|
|
- tradingBoxItem.setPortCode(item.getPortCode());
|
|
|
- tradingBoxItem.setPortCname(item.getPortCname());
|
|
|
- tradingBoxItem.setPortEname(item.getPortEname());
|
|
|
- tradingBoxItem.setStationId(item.getStationId());
|
|
|
- tradingBoxItem.setStationCode(item.getStationCode());
|
|
|
- tradingBoxItem.setStationCname(item.getStationCname());
|
|
|
- tradingBoxItem.setStationEname(item.getStationEname());
|
|
|
- tradingBoxItem.setPolCyId(item.getStationId());
|
|
|
- tradingBoxItem.setPolCyCode(item.getStationCode());
|
|
|
- tradingBoxItem.setPolCyCname(item.getStationCname());
|
|
|
- tradingBoxItem.setPolCyEname(item.getStationEname());
|
|
|
- if (ObjectUtils.isNotNull(item.getApproachExitDate())) {
|
|
|
- tradingBoxItem.setRentEndDate(item.getApproachExitDate());
|
|
|
- tradingBoxItem.setPolPickUpDate(item.getApproachExitDate());
|
|
|
- tradingBoxItem.setPolPreAppearanceDate(item.getApproachExitDate());
|
|
|
- } else {
|
|
|
- tradingBoxItem.setRentEndDate(new Date());
|
|
|
- tradingBoxItem.setPolPickUpDate(new Date());
|
|
|
- tradingBoxItem.setPolPreAppearanceDate(new Date());
|
|
|
- }
|
|
|
- tradingBoxItem.setStatus("待使用");
|
|
|
+ } else {
|
|
|
+ tradingBoxes.add(tradingBox);
|
|
|
+ }
|
|
|
+ TradingBoxItem tradingBoxItem;
|
|
|
+ if (!tradingBoxItemList.isEmpty()) {
|
|
|
+ tradingBoxItem = tradingBoxItemList.stream().filter(e -> e.getCode().equals(item.getBoxCode()))
|
|
|
+ .findFirst().orElse(null);
|
|
|
+ if (tradingBoxItem != null) {
|
|
|
+ tradingBoxItem.setPid(tradingBox.getId());
|
|
|
+ tradingBoxItem.setBoxDynamics("调箱进场");
|
|
|
+ tradingBoxItem.setPortId(item.getPortId());
|
|
|
+ tradingBoxItem.setPortCode(item.getPortCode());
|
|
|
+ tradingBoxItem.setPortCname(item.getPortCname());
|
|
|
+ tradingBoxItem.setPortEname(item.getPortEname());
|
|
|
+ tradingBoxItem.setStationId(item.getStationId());
|
|
|
+ tradingBoxItem.setStationCode(item.getStationCode());
|
|
|
+ tradingBoxItem.setStationCname(item.getStationCname());
|
|
|
+ tradingBoxItem.setStationEname(item.getStationEname());
|
|
|
+ tradingBoxItem.setPolCyId(item.getStationId());
|
|
|
+ tradingBoxItem.setPolCyCode(item.getStationCode());
|
|
|
+ tradingBoxItem.setPolCyCname(item.getStationCname());
|
|
|
+ tradingBoxItem.setPolCyEname(item.getStationEname());
|
|
|
+ if (ObjectUtils.isNotNull(item.getApproachExitDate())) {
|
|
|
+ tradingBoxItem.setRentEndDate(item.getApproachExitDate());
|
|
|
+ tradingBoxItem.setPolPickUpDate(item.getApproachExitDate());
|
|
|
+ tradingBoxItem.setPolPreAppearanceDate(item.getApproachExitDate());
|
|
|
} else {
|
|
|
- tradingBoxItem = new TradingBoxItem();
|
|
|
- tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
- if ("OW-N".equals(tradingBox.getType())) {
|
|
|
- tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
- } else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
- tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
- }
|
|
|
- putBoxItem.setBoxClass(putBox.getBusType());
|
|
|
- tradingBoxItem.setBoxCondition("新");
|
|
|
- tradingBoxItem.setBoxStatus(item.getBoxStatus());
|
|
|
- tradingBoxItem.setPid(tradingBox.getId());
|
|
|
- tradingBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
- tradingBoxItem.setCode(item.getBoxCode());
|
|
|
- tradingBoxItem.setBoxDynamics("调箱进场");
|
|
|
- tradingBoxItem.setBoxType(item.getBoxType());
|
|
|
- tradingBoxItem.setPortId(item.getPortId());
|
|
|
- tradingBoxItem.setPortCode(item.getPortCode());
|
|
|
- tradingBoxItem.setPortCname(item.getPortCname());
|
|
|
- tradingBoxItem.setPortEname(item.getPortEname());
|
|
|
- tradingBoxItem.setStationId(item.getStationId());
|
|
|
- tradingBoxItem.setStationCode(item.getStationCode());
|
|
|
- tradingBoxItem.setStationCname(item.getStationCname());
|
|
|
- tradingBoxItem.setStationEname(item.getStationEname());
|
|
|
- tradingBoxItem.setPolCyId(item.getStationId());
|
|
|
- tradingBoxItem.setPolCyCode(item.getStationCode());
|
|
|
- tradingBoxItem.setPolCyCname(item.getStationCname());
|
|
|
- tradingBoxItem.setPolCyEname(item.getStationEname());
|
|
|
- tradingBoxItem.setActivationDate(tradingBox.getActivationDate());
|
|
|
- if (ObjectUtils.isNotNull(item.getApproachExitDate())) {
|
|
|
- tradingBoxItem.setRentEndDate(item.getApproachExitDate());
|
|
|
- tradingBoxItem.setPolPickUpDate(item.getApproachExitDate());
|
|
|
- tradingBoxItem.setPolPreAppearanceDate(item.getApproachExitDate());
|
|
|
- } else {
|
|
|
- tradingBoxItem.setRentEndDate(new Date());
|
|
|
- tradingBoxItem.setPolPickUpDate(new Date());
|
|
|
- tradingBoxItem.setPolPreAppearanceDate(new Date());
|
|
|
- }
|
|
|
- tradingBoxItem.setStatus("待使用");
|
|
|
+ tradingBoxItem.setRentEndDate(new Date());
|
|
|
+ tradingBoxItem.setPolPickUpDate(new Date());
|
|
|
+ tradingBoxItem.setPolPreAppearanceDate(new Date());
|
|
|
}
|
|
|
+ tradingBoxItem.setStatus("待使用");
|
|
|
} else {
|
|
|
tradingBoxItem = new TradingBoxItem();
|
|
|
+ tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
if ("OW-N".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
}
|
|
|
- tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
+ putBoxItem.setBoxClass(putBox.getBusType());
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
tradingBoxItem.setBoxStatus(item.getBoxStatus());
|
|
|
tradingBoxItem.setPid(tradingBox.getId());
|
|
|
@@ -1674,15 +1635,53 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
}
|
|
|
tradingBoxItem.setStatus("待使用");
|
|
|
}
|
|
|
- tradingBoxItem.setBoxEastId(tradingBox.getPurchaseCompanyId());
|
|
|
- tradingBoxItem.setBoxEastName(tradingBox.getPurchaseCompanyName());
|
|
|
- tradingBoxItems.add(tradingBoxItem);
|
|
|
} else {
|
|
|
- throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到OW单据");
|
|
|
+ tradingBoxItem = new TradingBoxItem();
|
|
|
+ if ("OW-N".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
+ } else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ }
|
|
|
+ tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
+ tradingBoxItem.setBoxCondition("新");
|
|
|
+ tradingBoxItem.setBoxStatus(item.getBoxStatus());
|
|
|
+ tradingBoxItem.setPid(tradingBox.getId());
|
|
|
+ tradingBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
+ tradingBoxItem.setCode(item.getBoxCode());
|
|
|
+ tradingBoxItem.setBoxDynamics("调箱进场");
|
|
|
+ tradingBoxItem.setBoxType(item.getBoxType());
|
|
|
+ tradingBoxItem.setPortId(item.getPortId());
|
|
|
+ tradingBoxItem.setPortCode(item.getPortCode());
|
|
|
+ tradingBoxItem.setPortCname(item.getPortCname());
|
|
|
+ tradingBoxItem.setPortEname(item.getPortEname());
|
|
|
+ tradingBoxItem.setStationId(item.getStationId());
|
|
|
+ tradingBoxItem.setStationCode(item.getStationCode());
|
|
|
+ tradingBoxItem.setStationCname(item.getStationCname());
|
|
|
+ tradingBoxItem.setStationEname(item.getStationEname());
|
|
|
+ tradingBoxItem.setPolCyId(item.getStationId());
|
|
|
+ tradingBoxItem.setPolCyCode(item.getStationCode());
|
|
|
+ tradingBoxItem.setPolCyCname(item.getStationCname());
|
|
|
+ tradingBoxItem.setPolCyEname(item.getStationEname());
|
|
|
+ tradingBoxItem.setActivationDate(tradingBox.getActivationDate());
|
|
|
+ if (ObjectUtils.isNotNull(item.getApproachExitDate())) {
|
|
|
+ tradingBoxItem.setRentEndDate(item.getApproachExitDate());
|
|
|
+ tradingBoxItem.setPolPickUpDate(item.getApproachExitDate());
|
|
|
+ tradingBoxItem.setPolPreAppearanceDate(item.getApproachExitDate());
|
|
|
+ } else {
|
|
|
+ tradingBoxItem.setRentEndDate(new Date());
|
|
|
+ tradingBoxItem.setPolPickUpDate(new Date());
|
|
|
+ tradingBoxItem.setPolPreAppearanceDate(new Date());
|
|
|
+ }
|
|
|
+ tradingBoxItem.setStatus("待使用");
|
|
|
}
|
|
|
+ tradingBoxItem.setBoxEastId(tradingBox.getPurchaseCompanyId());
|
|
|
+ tradingBoxItem.setBoxEastName(tradingBox.getPurchaseCompanyName());
|
|
|
+ tradingBoxItems.add(tradingBoxItem);
|
|
|
} else {
|
|
|
throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到OW单据");
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到OW单据");
|
|
|
}
|
|
|
} else {
|
|
|
throw new RuntimeException("未查到放箱号:" + item.getContainerNumber() + "单据");
|
|
|
@@ -1743,10 +1742,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBox.setCode(itemsListZJ.stream().filter(e -> e.getContainerNumber().equals(item.getContainerNumber()))
|
|
|
.map(BoxDynamicsRecordItems::getBoxCode).collect(Collectors.joining(",")));
|
|
|
}
|
|
|
- if ("OW(拿)".contains(item.getBusType())) {
|
|
|
- tradingBox.setSuitcaseNum(tradingBox.getSuitcaseNum() + Integer.parseInt(count1 + ""));
|
|
|
- tradingBox.setNotSuitcaseNum(tradingBox.getBoxNumber() - tradingBox.getSuitcaseNum());
|
|
|
- }
|
|
|
+ tradingBox.setActualBoxNumber(tradingBox.getSuitcaseNum() + Integer.parseInt(count1 + ""));
|
|
|
+ if (Objects.equals(tradingBox.getActualBoxNumber(), tradingBox.getBoxNumber())){
|
|
|
+ tradingBox.setStatus(1);
|
|
|
+ }
|
|
|
tradingBoxMapper.updateById(tradingBox);
|
|
|
}
|
|
|
}
|
|
|
@@ -1867,6 +1866,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxList = tradingBoxMapper.selectList(new LambdaQueryWrapper<TradingBox>()
|
|
|
.eq(TradingBox::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(TradingBox::getIsDeleted, 0)
|
|
|
+ .eq(TradingBox::getStatus, 0)
|
|
|
.in(TradingBox::getId, srcIdList));
|
|
|
}
|
|
|
List<TradingBoxItem> tradingBoxItemList = new ArrayList<>();
|
|
|
@@ -3146,7 +3146,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
.eq(PutBoxItems::getIsDeleted, 0)
|
|
|
.eq(PutBoxItems::getTenantId, tenantId)
|
|
|
.in(PutBoxItems::getPid, putBoxIdList));
|
|
|
- String blacklist = sysClient.getParamServiceDWT("box.blacklist",tenantId);
|
|
|
+ String blacklist = sysClient.getParamServiceDWT("box.blacklist", tenantId);
|
|
|
if (ObjectUtils.isNotNull(blacklist)) {
|
|
|
StringBuilder text = new StringBuilder();
|
|
|
for (String item : boxCodeList) {
|