|
|
@@ -925,7 +925,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(archives.getContainerNumberOw()))
|
|
|
.findFirst().orElse(null);
|
|
|
if (putBox1 != null) {
|
|
|
- if ("OW(放),自有箱,代理箱".contains(putBox1.getBoxClass())) {
|
|
|
+ if ("OW(放),自有箱".contains(putBox1.getBoxClass())) {
|
|
|
//放箱号明细数据处理
|
|
|
PutBoxItems putBoxItem;
|
|
|
if (!putBoxItemsList.isEmpty()) {
|
|
|
@@ -1104,7 +1104,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
// putBox.setStorageNum(putBox.getStorageNum() + 1 - putBox.getOccupyNum());
|
|
|
putBoxNewList.add(putBox);
|
|
|
}
|
|
|
- } else if ("OW(拿)".equals(putBox1.getBoxClass())) {
|
|
|
+ } else if ("OW(拿),代理箱,租箱".contains(putBox1.getBoxClass())) {
|
|
|
//放箱号明细数据处理
|
|
|
PutBoxItems putBoxItem;
|
|
|
if (!putBoxItemsList.isEmpty()) {
|
|
|
@@ -1168,7 +1168,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
throw new RuntimeException("未查到原OW单据-放箱号为:" + archives.getContainerNumber());
|
|
|
}
|
|
|
} else {
|
|
|
- throw new RuntimeException("未查到原OW单据-放箱号为:" + archives.getContainerNumberOw());
|
|
|
+ throw new RuntimeException("未查到来源单据-放箱号为:" + archives.getContainerNumberOw());
|
|
|
}
|
|
|
archivesDateleList.add(archives.getId());
|
|
|
} else {
|
|
|
@@ -1212,7 +1212,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(archives.getContainerNumberOw()))
|
|
|
.findFirst().orElse(null);
|
|
|
if (putBox1 != null) {
|
|
|
- if ("OW(放),自有箱,代理箱".contains(putBox1.getBoxClass())) {
|
|
|
+ if ("OW(放),自有箱".contains(putBox1.getBoxClass())) {
|
|
|
//POD放箱号数据明细处理
|
|
|
PutBox putBox = putBoxNewList.stream().filter(e -> e.getContainerNumber().equals(archives.getContainerNumber())
|
|
|
&& e.getPolId().equals(archives.getAddressId()) && e.getPolStationId().equals(archives.getStationId()))
|
|
|
@@ -1508,7 +1508,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBox.getSrcId()))
|
|
|
.findFirst().orElse(null);
|
|
|
if (tradingBox != null) {
|
|
|
- if (tradingBox.getPolId().equals(tradingBox.getPodId())){
|
|
|
+ if (tradingBox.getPolId().equals(tradingBox.getPodId())) {
|
|
|
samePort = false;
|
|
|
}
|
|
|
if (!tradingBoxes.isEmpty()) {
|
|
|
@@ -1554,6 +1554,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ } else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxSource(putBox.getBusType());
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -1593,6 +1597,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ }else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxSource(putBox.getBusType());
|
|
|
tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
@@ -1651,7 +1659,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setStatus("待使用");
|
|
|
archives.setNewDate(item.getApproachExitDate());
|
|
|
archives.setBoxDynamics("调箱进场");
|
|
|
- if (samePort){
|
|
|
+ if (samePort) {
|
|
|
archives.setWhetherTransfer("1");
|
|
|
}
|
|
|
archives.setAddressId(item.getPortId());
|
|
|
@@ -1663,7 +1671,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setStationCname(item.getStationCname());
|
|
|
archives.setStationEname(item.getStationEname());
|
|
|
} else {
|
|
|
- if (!"OW(拿)".equals(putBox.getBusType())) {
|
|
|
+ if (!"OW(拿),代理箱,租箱".contains(putBox.getBusType())) {
|
|
|
throw new RuntimeException("箱档案中未查到箱号:" + item.getBoxCode());
|
|
|
}
|
|
|
archives = new Archives();
|
|
|
@@ -1675,7 +1683,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setBoxStatus(item.getBoxStatus());
|
|
|
archives.setNewDate(item.getApproachExitDate());
|
|
|
archives.setBoxDynamics("调箱进场");
|
|
|
- if (samePort){
|
|
|
+ if (samePort) {
|
|
|
archives.setWhetherTransfer("1");
|
|
|
}
|
|
|
archives.setBoxBelongsTo("SOC");
|
|
|
@@ -1726,7 +1734,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
item.setRemainingNum(item.getRemainingNum() + Integer.parseInt(count + ""));
|
|
|
item.setStorageNum(item.getStorageNum() + Integer.parseInt(count + ""));
|
|
|
}
|
|
|
- if ("OW(拿)".equals(item.getBusType())) {
|
|
|
+ if ("OW(拿),代理箱,租箱".contains(item.getBusType())) {
|
|
|
item.setSuitcaseNum(item.getSuitcaseNum() + Integer.parseInt(count + ""));
|
|
|
item.setNotSuitcaseNum(item.getTotalNum() - item.getSuitcaseNum());
|
|
|
item.setStorageNum(item.getStorageNum() + Integer.parseInt(count + ""));
|
|
|
@@ -1940,7 +1948,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setStationCname(item.getStationCname());
|
|
|
archives.setStationEname(item.getStationEname());
|
|
|
} else {
|
|
|
- if (!"OW(拿)".equals(putBoxData.getBusType())) {
|
|
|
+ if (!"OW(拿),代理箱,租箱".contains(putBoxData.getBusType())) {
|
|
|
throw new RuntimeException("箱档案中未查到箱号:" + item.getBoxCode());
|
|
|
}
|
|
|
archives = new Archives();
|
|
|
@@ -2027,7 +2035,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
putBoxItem.setBoxEastName(putBoxData.getBoxEastName());
|
|
|
}
|
|
|
putBoxItems.add(putBoxItem);
|
|
|
- if ("OW(拿),OW(放)".contains(putBoxData.getBusType())) {
|
|
|
+ if ("OW(拿),OW(放),代理箱,租箱".contains(putBoxData.getBusType())) {
|
|
|
if (!tradingBoxList.isEmpty()) {
|
|
|
TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBoxData.getSrcId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -2072,6 +2080,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ }else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
tradingBoxItem.setBoxStatus(item.getBoxStatus());
|
|
|
@@ -2106,6 +2118,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ }else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -2166,7 +2182,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
.map(BoxDynamicsRecordItems::getBoxCode).collect(Collectors.joining(",")));
|
|
|
}
|
|
|
long count = itemsListZD.stream().filter(e -> e.getContainerNumber().equals(item.getContainerNumber())).count();
|
|
|
- if ("OW(拿)".equals(item.getBusType())) {
|
|
|
+ if ("OW(拿),代理箱,租箱".contains(item.getBusType())) {
|
|
|
item.setStorageNum(item.getStorageNum() - Integer.parseInt(count + ""));
|
|
|
if (item.getStorageNum() < 0) {
|
|
|
throw new RuntimeException("放箱号:" + item.getContainerNumber() + "剩余场地盘存小于本次导入箱数");
|
|
|
@@ -2417,7 +2433,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setStationCname(item.getStationCname());
|
|
|
archives.setStationEname(item.getStationEname());
|
|
|
} else {
|
|
|
- if (!"OW(拿)".equals(putBoxData.getBusType())) {
|
|
|
+ if (!"OW(拿),代理箱,租箱".contains(putBoxData.getBusType())) {
|
|
|
throw new RuntimeException("箱档案中未查到箱号:" + item.getBoxCode());
|
|
|
}
|
|
|
archives = new Archives();
|
|
|
@@ -2551,7 +2567,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
}
|
|
|
putBoxItem.setWhetherStatus(status);
|
|
|
putBoxItems.add(putBoxItem);
|
|
|
- if ("OW(拿),OW(放)".contains(putBoxData.getBusType())) {
|
|
|
+ if ("OW(拿),OW(放),代理箱,租箱".contains(putBoxData.getBusType())) {
|
|
|
if (!tradingBoxList.isEmpty()) {
|
|
|
TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBoxData.getSrcId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -2607,6 +2623,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ } else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
putBoxItem.setBoxClass(putBox.getBusType());
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -2653,6 +2673,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ }else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -2743,7 +2767,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
}
|
|
|
if (item.getStatus()) {
|
|
|
long count = itemsListCC.stream().filter(e -> e.getContainerNumber().equals(item.getContainerNumber())).count();
|
|
|
- if ("OW(拿)".equals(item.getBusType())) {
|
|
|
+ if ("OW(拿),代理箱,租箱".contains(item.getBusType())) {
|
|
|
item.setStorageNum(item.getStorageNum() - Integer.parseInt(count + ""));
|
|
|
if (item.getStorageNum() < 0) {
|
|
|
throw new RuntimeException("放箱号:" + item.getContainerNumber() + "剩余场地盘存小于本次导入箱数");
|
|
|
@@ -3236,7 +3260,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
archives.setStationCname(item.getStationCname());
|
|
|
archives.setStationEname(item.getStationEname());
|
|
|
} else {
|
|
|
- if (!"OW(拿)".equals(putBox.getBusType())) {
|
|
|
+ if (!"OW(拿),代理箱,租箱".contains(putBox.getBusType())) {
|
|
|
throw new RuntimeException("箱档案中未查到箱号:" + item.getBoxCode());
|
|
|
}
|
|
|
archives = new Archives();
|
|
|
@@ -3336,7 +3360,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
putBoxItem.setBoxEastName(putBox.getBoxEastName());
|
|
|
}
|
|
|
putBoxItems.add(putBoxItem);
|
|
|
- if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
+ if ("OW(拿),OW(放),代理箱,租箱".contains(putBox.getBusType())) {
|
|
|
if (!tradingBoxList.isEmpty()) {
|
|
|
TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBox.getSrcId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -3386,6 +3410,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ } else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
putBoxItem.setBoxClass(putBox.getBusType());
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -3427,6 +3455,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxCategory("OW(拿)");
|
|
|
} else if ("OW-F".equals(tradingBox.getType())) {
|
|
|
tradingBoxItem.setBoxCategory("OW(放)");
|
|
|
+ } else if ("DL".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("代理箱");
|
|
|
+ } else if ("ZR".equals(tradingBox.getType())) {
|
|
|
+ tradingBoxItem.setBoxCategory("租箱");
|
|
|
}
|
|
|
tradingBoxItem.setBoxBelongsTo("SOC");
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
@@ -3466,10 +3498,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBoxItem.setBoxEastName(tradingBox.getPurchaseCompanyName());
|
|
|
tradingBoxItems.add(tradingBoxItem);
|
|
|
} else {
|
|
|
- throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到OW单据");
|
|
|
+ throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到来源单据");
|
|
|
}
|
|
|
} else {
|
|
|
- throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到OW单据");
|
|
|
+ throw new RuntimeException("放箱号:" + item.getContainerNumber() + "未查到来源单据");
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -3503,7 +3535,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
item.setRemainingNum(item.getRemainingNum() + Integer.parseInt(count + ""));
|
|
|
item.setStorageNum(item.getStorageNum() + Integer.parseInt(count + ""));
|
|
|
}
|
|
|
- if ("OW(拿)".equals(item.getBusType())) {
|
|
|
+ if ("OW(拿),代理箱,租箱".contains(item.getBusType())) {
|
|
|
item.setSuitcaseNum(item.getSuitcaseNum() + Integer.parseInt(count + ""));
|
|
|
item.setNotSuitcaseNum(item.getTotalNum() - item.getSuitcaseNum());
|
|
|
item.setStorageNum(item.getStorageNum() + Integer.parseInt(count + ""));
|
|
|
@@ -3531,7 +3563,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
tradingBox.setCode(itemsListJC.stream().filter(e -> e.getContainerNumber().equals(item.getContainerNumber()))
|
|
|
.map(BoxDynamicsRecordItems::getBoxCode).collect(Collectors.joining(",")));
|
|
|
}
|
|
|
- if ("OW(拿)".contains(item.getBusType())) {
|
|
|
+ if ("OW(拿),代理箱,租箱".contains(item.getBusType())) {
|
|
|
tradingBox.setSuitcaseNum(tradingBox.getSuitcaseNum() + Integer.parseInt(count1 + ""));
|
|
|
tradingBox.setNotSuitcaseNum(tradingBox.getBoxNumber() - tradingBox.getSuitcaseNum());
|
|
|
}
|
|
|
@@ -3731,7 +3763,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
item.setPolOverdueBoxUseDays(Integer.parseInt(days + ""));
|
|
|
}
|
|
|
putBoxItemsList.add(item);
|
|
|
- if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
+ if ("OW(拿),OW(放),代理箱,租箱".contains(putBox.getBusType())) {
|
|
|
TradingBoxItem tradingBoxItem = tradingBoxItemOldList.stream().filter(e -> e.getCode().equals(item.getBoxCode())).findFirst().orElse(null);
|
|
|
if (tradingBoxItem == null) {
|
|
|
throw new RuntimeException("未查到OW单据明细箱号");
|
|
|
@@ -3991,7 +4023,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
item.setPodBoxUseDays(Integer.parseInt(days + ""));
|
|
|
}
|
|
|
putBoxItemsList.add(item);
|
|
|
- if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
+ if ("OW(拿),OW(放),代理箱,租箱".contains(putBox.getBusType())) {
|
|
|
TradingBoxItem tradingBoxItem = tradingBoxItemOldList.stream().filter(e -> e.getCode().equals(item.getBoxCode())).findFirst().orElse(null);
|
|
|
if (tradingBoxItem == null) {
|
|
|
throw new RuntimeException("未查到OW单据明细箱号");
|