|
|
@@ -220,6 +220,9 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
putBox.setCreateUser(AuthUtil.getUserId());
|
|
|
putBox.setCreateUserName(AuthUtil.getUserName());
|
|
|
putBox.setTenantId(AuthUtil.getTenantId());
|
|
|
+ putBox.setWhetherManuallyCreate("0");
|
|
|
+ putBox.setBusType("自有箱");
|
|
|
+ putBox.setBoxClass("自有箱");
|
|
|
baseMapper.insert(putBox);
|
|
|
} else {
|
|
|
if (putBoxList.stream().anyMatch(e -> !e.getId().equals(putBox.getId()) && e.getPolId().equals(putBox.getPolId())
|
|
|
@@ -623,7 +626,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -1076,11 +1079,11 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
throw new RuntimeException("未查到放箱号:" + item.getContainerNumber() + "单据");
|
|
|
}
|
|
|
if (!"OW(放)".equals(putBoxData.getBusType()) && ObjectUtils.isNotNull(item.getMblno())) {
|
|
|
- PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(item.getMblno())
|
|
|
+ /*PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(item.getMblno())
|
|
|
&& ObjectUtils.isNotNull(e.getPolId()) && e.getPolId().equals(ports.getId())
|
|
|
&& ObjectUtils.isNotNull(e.getPolStationId()) && e.getPolStationId().equals(corps.getId()) &&
|
|
|
putBoxData.getBusType().equals(e.getBusType())).findFirst().orElse(null);
|
|
|
- if (putBox1 != null) {
|
|
|
+ if (putBox1 != null) {*/
|
|
|
if (!containersList.isEmpty()) {
|
|
|
List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
@@ -1096,7 +1099,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
} else {
|
|
|
throw new RuntimeException("未查到对应提单号:" + item.getMblno() + "配箱单据");
|
|
|
}
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
if (!putBoxes.isEmpty()) {
|
|
|
@@ -1262,8 +1265,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
this.countOverdueFee(putBoxList, tradingBoxList, tradingBoxItems, containersListNew, putBoxItems);
|
|
|
List<String> fileName = excelList.stream().map(EmptyContainerAppearanceAnalysis::getSrcFile).distinct()
|
|
|
.filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
- if (!fileName.isEmpty()){
|
|
|
- cyFtpService.ftpFilescopy(excelList.get(0).getCorpId(),fileName,"OUT");
|
|
|
+ if (!fileName.isEmpty()) {
|
|
|
+ cyFtpService.ftpFilescopy(excelList.get(0).getCorpId(), fileName, "OUT");
|
|
|
}
|
|
|
return R.data("操作成功");
|
|
|
}
|
|
|
@@ -1280,7 +1283,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -2163,7 +2166,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -2541,7 +2544,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearanceAnalysis::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -2928,6 +2931,11 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
.map(EmptyContainerAppearanceAnalysis::getBoxCode).collect(Collectors.joining(",")));
|
|
|
}
|
|
|
long count = excelList.stream().filter(e -> e.getContainerNumber().equals(item.getContainerNumber())).count();
|
|
|
+ if ("0".equals(item.getWhetherManuallyCreate())) {
|
|
|
+ item.setTotalNum(item.getTotalNum() + Integer.parseInt(count + ""));
|
|
|
+ item.setRemainingNum(item.getRemainingNum() + Integer.parseInt(count + ""));
|
|
|
+ item.setStorageNum(item.getStorageNum() + Integer.parseInt(count + ""));
|
|
|
+ }
|
|
|
if ("OW(拿)".equals(item.getBusType())) {
|
|
|
item.setSuitcaseNum(item.getSuitcaseNum() + Integer.parseInt(count + ""));
|
|
|
item.setNotSuitcaseNum(item.getTotalNum() - item.getSuitcaseNum());
|
|
|
@@ -3010,8 +3018,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
}
|
|
|
List<String> fileName = excelList.stream().map(EmptyContainerAppearanceAnalysis::getSrcFile).distinct()
|
|
|
.filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
- if (!fileName.isEmpty()){
|
|
|
- cyFtpService.ftpFilescopy(excelList.get(0).getCorpId(),fileName,"IN");
|
|
|
+ if (!fileName.isEmpty()) {
|
|
|
+ cyFtpService.ftpFilescopy(excelList.get(0).getCorpId(), fileName, "IN");
|
|
|
}
|
|
|
return R.data("操作成功");
|
|
|
}
|
|
|
@@ -3033,7 +3041,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
throw new RuntimeException("未查到配箱信息");
|
|
|
}
|
|
|
if ("SI".equals(podStationR.getBusinessType())) {
|
|
|
- if ("1".equals(podStationR.getType())){
|
|
|
+ if ("1".equals(podStationR.getType())) {
|
|
|
List<String> boxNum = containersHYJKList.stream().map(Containers::getCntrNo).filter(Objects::nonNull)
|
|
|
.collect(Collectors.toList());
|
|
|
if (boxNum.isEmpty()) {
|
|
|
@@ -3579,7 +3587,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
//计算超期箱使费
|
|
|
this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
for (Containers item : containersHYJKList) {
|
|
|
if (ObjectUtils.isNull(item.getHblno())) {
|
|
|
throw new RuntimeException("分单号不能为空");
|
|
|
@@ -3683,7 +3691,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearance::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearance::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -3868,7 +3876,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearance::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(EmptyContainerAppearance::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -4061,27 +4069,27 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
}
|
|
|
}
|
|
|
if (!"OW(放)".equals(putBoxData.getBusType()) && ObjectUtils.isNotNull(item.getMblno())) {
|
|
|
- PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(item.getMblno())
|
|
|
+ /*PutBox putBox1 = putBoxList.stream().filter(e -> e.getContainerNumber().equals(item.getMblno())
|
|
|
&& ObjectUtils.isNotNull(e.getPolId()) && e.getPolId().equals(ports.getId())
|
|
|
&& ObjectUtils.isNotNull(e.getPolStationId()) && e.getPolStationId().equals(corps.getId()) &&
|
|
|
"OW(放)".equals(e.getBusType())).findFirst().orElse(null);
|
|
|
- if (putBox1 == null) {
|
|
|
- if (!containersList.isEmpty()) {
|
|
|
- List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
- && item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
- if (containerItemList.isEmpty()) {
|
|
|
- analysis.setResult("失败");
|
|
|
- analysis.setReason("未查到对应提单号:" + item.getMblno() + "配箱单据");
|
|
|
- analysisList.add(analysis);
|
|
|
- continue;
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (putBox1 == null) {*/
|
|
|
+ if (!containersList.isEmpty()) {
|
|
|
+ List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
+ && item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
+ if (containerItemList.isEmpty()) {
|
|
|
analysis.setResult("失败");
|
|
|
analysis.setReason("未查到对应提单号:" + item.getMblno() + "配箱单据");
|
|
|
analysisList.add(analysis);
|
|
|
continue;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ analysis.setResult("失败");
|
|
|
+ analysis.setReason("未查到对应提单号:" + item.getMblno() + "配箱单据");
|
|
|
+ analysisList.add(analysis);
|
|
|
+ continue;
|
|
|
}
|
|
|
+// }
|
|
|
}
|
|
|
} else {
|
|
|
analysis.setResult("失败");
|
|
|
@@ -4115,7 +4123,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(GiveAnEncore::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(GiveAnEncore::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -4397,7 +4405,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
if (CollectionUtils.isEmpty(excelList)) {
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
- List<String> boxCodeList = excelList.stream().map(GiveAnEncore::getBoxCode)
|
|
|
+ List<String> boxCodeList = excelList.stream().map(GiveAnEncore::getBoxCode).filter(Objects::nonNull)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
//箱档案数据
|
|
|
List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
@@ -5275,7 +5283,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
|
|
|
feeCenterList.add(feeCenterC);
|
|
|
}
|
|
|
- item.setPodBoxUseDays(Integer.parseInt(days+""));
|
|
|
+ item.setPodBoxUseDays(Integer.parseInt(days + ""));
|
|
|
putBoxItemsList.add(item);
|
|
|
if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
TradingBoxItem tradingBoxItem = tradingBoxItemOldList.stream().filter(e -> e.getCode().equals(item.getBoxCode())).findFirst().orElse(null);
|