|
@@ -2748,38 +2748,66 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
throw new RuntimeException("未查到放箱号箱明细");
|
|
throw new RuntimeException("未查到放箱号箱明细");
|
|
|
}
|
|
}
|
|
|
List<PutBoxItems> putBoxItems = new ArrayList<>();
|
|
List<PutBoxItems> putBoxItems = new ArrayList<>();
|
|
|
|
|
+ List<TradingBoxItem> tradingBoxItemsList = new ArrayList<>();
|
|
|
for (TradingBoxItem item : tradingBox.getTradingBoxItemsList()) {
|
|
for (TradingBoxItem item : tradingBox.getTradingBoxItemsList()) {
|
|
|
- item.setPodStationId(tradingBox.getPodStationId());
|
|
|
|
|
- item.setPodStationCname(tradingBox.getPodStationCname());
|
|
|
|
|
- item.setPodStationCode(tradingBox.getPodStationCode());
|
|
|
|
|
- item.setPodStationEname(tradingBox.getPodStationEname());
|
|
|
|
|
- item.setPodCyAddress(tradingBox.getPodCyAddress());
|
|
|
|
|
- item.setPodCyContact(tradingBox.getPodCyContact());
|
|
|
|
|
- item.setPodCyEmail(tradingBox.getPodCyEmail());
|
|
|
|
|
- item.setPodCyTel(tradingBox.getPodCyTel());
|
|
|
|
|
- item.setUpdateUser(AuthUtil.getUserId());
|
|
|
|
|
- item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
|
|
- item.setUpdateTime(new Date());
|
|
|
|
|
- item.setOffhireReference(tradingBox.getOffhireReference());
|
|
|
|
|
- item.setWorkContent(tradingBox.getWorkContent());
|
|
|
|
|
PutBoxItems boxItems = putBoxItemsList.stream().filter(e -> e.getBoxCode().equals(item.getCode())).findFirst().orElse(null);
|
|
PutBoxItems boxItems = putBoxItemsList.stream().filter(e -> e.getBoxCode().equals(item.getCode())).findFirst().orElse(null);
|
|
|
if (boxItems == null) {
|
|
if (boxItems == null) {
|
|
|
throw new RuntimeException("未查到放箱号中箱号:" + item.getCode() + "明细");
|
|
throw new RuntimeException("未查到放箱号中箱号:" + item.getCode() + "明细");
|
|
|
}
|
|
}
|
|
|
- boxItems.setPodStationId(tradingBox.getPodStationId());
|
|
|
|
|
- boxItems.setPodStationCname(tradingBox.getPodStationCname());
|
|
|
|
|
- boxItems.setPodStationCode(tradingBox.getPodStationCode());
|
|
|
|
|
- boxItems.setPodStationEname(tradingBox.getPodStationEname());
|
|
|
|
|
- boxItems.setPodCyAddress(tradingBox.getPodCyAddress());
|
|
|
|
|
- boxItems.setPodCyContact(tradingBox.getPodCyContact());
|
|
|
|
|
- boxItems.setPodCyEmail(tradingBox.getPodCyEmail());
|
|
|
|
|
- boxItems.setPodCyTel(tradingBox.getPodCyTel());
|
|
|
|
|
- boxItems.setUpdateUser(AuthUtil.getUserId());
|
|
|
|
|
- boxItems.setUpdateUserName(AuthUtil.getUserName());
|
|
|
|
|
- boxItems.setUpdateTime(new Date());
|
|
|
|
|
- putBoxItems.add(boxItems);
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodStationId())) {
|
|
|
|
|
+ item.setPodStationId(tradingBox.getPodStationId());
|
|
|
|
|
+ item.setPodStationCname(tradingBox.getPodStationCname());
|
|
|
|
|
+ item.setPodStationCode(tradingBox.getPodStationCode());
|
|
|
|
|
+ item.setPodStationEname(tradingBox.getPodStationEname());
|
|
|
|
|
+
|
|
|
|
|
+ boxItems.setPodStationId(tradingBox.getPodStationId());
|
|
|
|
|
+ boxItems.setPodStationCname(tradingBox.getPodStationCname());
|
|
|
|
|
+ boxItems.setPodStationCode(tradingBox.getPodStationCode());
|
|
|
|
|
+ boxItems.setPodStationEname(tradingBox.getPodStationEname());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodCyAddress())) {
|
|
|
|
|
+ item.setPodCyAddress(tradingBox.getPodCyAddress());
|
|
|
|
|
+ boxItems.setPodCyAddress(tradingBox.getPodCyAddress());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodCyContact())) {
|
|
|
|
|
+ item.setPodCyContact(tradingBox.getPodCyContact());
|
|
|
|
|
+ boxItems.setPodCyContact(tradingBox.getPodCyContact());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodCyEmail())) {
|
|
|
|
|
+ item.setPodCyEmail(tradingBox.getPodCyEmail());
|
|
|
|
|
+ boxItems.setPodCyEmail(tradingBox.getPodCyEmail());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodCyTel())) {
|
|
|
|
|
+ item.setPodCyTel(tradingBox.getPodCyTel());
|
|
|
|
|
+ boxItems.setPodCyTel(tradingBox.getPodCyTel());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getOffhireReference())) {
|
|
|
|
|
+ item.setOffhireReference(tradingBox.getOffhireReference());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getWorkContent())) {
|
|
|
|
|
+ item.setWorkContent(tradingBox.getWorkContent());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodStationId()) || ObjectUtils.isNotNull(tradingBox.getPodCyAddress())
|
|
|
|
|
+ || ObjectUtils.isNotNull(tradingBox.getPodCyContact()) || ObjectUtils.isNotNull(tradingBox.getPodCyEmail())
|
|
|
|
|
+ || ObjectUtils.isNotNull(tradingBox.getPodCyTel()) || ObjectUtils.isNotNull(tradingBox.getOffhireReference())
|
|
|
|
|
+ || ObjectUtils.isNotNull(tradingBox.getWorkContent())) {
|
|
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
|
|
+ tradingBoxItemsList.add(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getPodStationId()) || ObjectUtils.isNotNull(tradingBox.getPodCyAddress())
|
|
|
|
|
+ || ObjectUtils.isNotNull(tradingBox.getPodCyContact()) || ObjectUtils.isNotNull(tradingBox.getPodCyEmail())
|
|
|
|
|
+ || ObjectUtils.isNotNull(tradingBox.getPodCyTel())) {
|
|
|
|
|
+ boxItems.setUpdateUser(AuthUtil.getUserId());
|
|
|
|
|
+ boxItems.setUpdateUserName(AuthUtil.getUserName());
|
|
|
|
|
+ boxItems.setUpdateTime(new Date());
|
|
|
|
|
+ putBoxItems.add(boxItems);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!tradingBoxItemsList.isEmpty()){
|
|
|
|
|
+ tradingBoxItemService.updateBatchById(tradingBox.getTradingBoxItemsList());
|
|
|
}
|
|
}
|
|
|
- tradingBoxItemService.updateBatchById(tradingBox.getTradingBoxItemsList());
|
|
|
|
|
List<String> hblno = new ArrayList<>();
|
|
List<String> hblno = new ArrayList<>();
|
|
|
if (!putBoxItems.isEmpty()) {
|
|
if (!putBoxItems.isEmpty()) {
|
|
|
putBoxItemsService.updateBatchById(putBoxItems);
|
|
putBoxItemsService.updateBatchById(putBoxItems);
|