|
|
@@ -282,6 +282,7 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
throw new SecurityException("数据不能为空");
|
|
|
}
|
|
|
if ("JC".equals(boxDynamicsRecord.getApproachExit())) {
|
|
|
+ String whetherOpenEntryFee = sysClient.getParamService("whether.open.entry.fee");
|
|
|
List<BoxDynamicsRecordItems> itemsListJC = itemsList.stream().filter(e -> !e.getObjective().equals("C")).collect(Collectors.toList());
|
|
|
if (!itemsListJC.isEmpty()) {
|
|
|
List<String> boxCodeList = itemsListJC.stream().map(BoxDynamicsRecordItems::getBoxCode).filter(Objects::nonNull)
|
|
|
@@ -799,23 +800,27 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
if (businessType == null) {
|
|
|
throw new RuntimeException("未找到可用业务类型");
|
|
|
}
|
|
|
- List<Bills> billsHYJKListFD = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
- .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Bills::getIsDeleted, 0)
|
|
|
- .eq(Bills::getBusinessType, "SI")
|
|
|
- .apply("find_in_set(bill_type,'MH,DD')")
|
|
|
- .in(Bills::getHblno, putBoxItemsList.stream().map(PutBoxItems::getHblno).distinct().collect(Collectors.toList())));
|
|
|
- if (billsHYJKListFD.isEmpty()) {
|
|
|
- throw new RuntimeException("未查到海运进口单据");
|
|
|
- }
|
|
|
- List<Containers> containersHYJKList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
- .eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Containers::getIsDeleted, 0)
|
|
|
- .in(Containers::getPid, billsHYJKListFD.stream().map(Bills::getId).collect(Collectors.toList()))
|
|
|
- .in(Containers::getCntrNo, itemsListFC.stream().map(BoxDynamicsRecordItems::getBoxCode).collect(Collectors.toList()))
|
|
|
- );
|
|
|
- if (containersHYJKList.isEmpty()) {
|
|
|
- throw new RuntimeException("未查到配箱信息");
|
|
|
+ List<Bills> billsHYJKListFD = new ArrayList<>();
|
|
|
+ List<Containers> containersHYJKList = new ArrayList<>();
|
|
|
+ if ("1".equals(whetherOpenEntryFee)){
|
|
|
+ billsHYJKListFD = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .eq(Bills::getBusinessType, "SI")
|
|
|
+ .apply("find_in_set(bill_type,'MH,DD')")
|
|
|
+ .in(Bills::getHblno, putBoxItemsList.stream().map(PutBoxItems::getHblno).distinct().collect(Collectors.toList())));
|
|
|
+ if (billsHYJKListFD.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运进口单据");
|
|
|
+ }
|
|
|
+ containersHYJKList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
+ .eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Containers::getIsDeleted, 0)
|
|
|
+ .in(Containers::getPid, billsHYJKListFD.stream().map(Bills::getId).collect(Collectors.toList()))
|
|
|
+ .in(Containers::getCntrNo, itemsListFC.stream().map(BoxDynamicsRecordItems::getBoxCode).collect(Collectors.toList()))
|
|
|
+ );
|
|
|
+ if (containersHYJKList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到配箱信息");
|
|
|
+ }
|
|
|
}
|
|
|
List<Containers> containersListNew = new ArrayList<>();
|
|
|
for (Bills billsHYJK : billsHYJKListFD) {
|
|
|
@@ -1284,8 +1289,10 @@ public class BoxDynamicsRecordServiceImpl extends ServiceImpl<BoxDynamicsRecordM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //计算超期箱使费
|
|
|
- this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
|
|
|
+ if ("1".equals(whetherOpenEntryFee)){
|
|
|
+ //计算超期箱使费
|
|
|
+ this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else if ("CC".equals(boxDynamicsRecord.getApproachExit())) {
|