Przeglądaj źródła

海运出口修改开船日期同步预定舱,托书

纪新园 2 miesięcy temu
rodzic
commit
f0a27c6419

+ 26 - 19
blade-service/blade-los/src/main/java/org/springblade/los/box/dynamics/service/impl/BoxDynamicsRecordServiceImpl.java

@@ -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())) {

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -356,6 +356,8 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					bills1.setCyReturnTime(bills.getCyReturnTime());
 					bills1.setCyTrailerTime(bills.getCyTrailerTime());
 					bills1.setSiRemarks(bills.getSiRemarks());
+					bills1.setEtd(bills.getEtd());
+					bills1.setActualEtd(bills.getActualEtd());
 					this.updateById(bills1);
 				}
 			}