Jelajahi Sumber

1.测试并修改箱量计算以及超期箱使费生成整体流程接口
2.海运进出口列表排序修改
3.海运进出口报表打印接口修改
4.海运进出口,费用请核接口增加提单号,分单号
5.返场后状态修改
6.箱池动态导入弹窗,不显示箱动态
7.报价中心获取运价接口条件修改
8.客户托书模板导入
9.海运出口列表提取成本接口修改
10.业务费用统计接口增加分单号,并检索
11.发送邮件

纪新园 5 bulan lalu
induk
melakukan
229a3270a2
20 mengubah file dengan 450 tambahan dan 417 penghapusan
  1. 6 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/ExpenseApplication.java
  2. 7 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/vo/GenerateMailVo.java
  3. 12 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/check/entity/LosAuditProecess.java
  4. 2 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/statisticAnalysis/FeeSettlementExcel.java
  5. 1 1
      blade-service/blade-los/pom.xml
  6. 250 246
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java
  7. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/RouteCostController.java
  8. 3 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/ExpenseApplicationServiceImpl.java
  9. 69 83
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java
  10. 0 1
      blade-service/blade-los/src/main/java/org/springblade/los/business/mktSlot/controller/MktSlotController.java
  11. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BillsController.java
  12. 4 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  13. 4 4
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java
  14. 74 72
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/TemplateImportServiceImpl.java
  15. 3 1
      blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java
  16. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java
  17. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/ftp/controller/TestController.java
  18. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/CyFtpService.java
  19. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/impl/CyFtpServiceImpl.java
  20. 4 0
      blade-service/blade-los/src/main/java/org/springblade/los/statisticAnalysis/service/impl/StatisticAnalysisServiceImpl.java

+ 6 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/ExpenseApplication.java

@@ -218,5 +218,11 @@ public class ExpenseApplication implements Serializable {
 	@TableField(exist = false)
 	private TradingBox tradingBox;
 
+	/**
+	 * 来源提单号
+	 */
+	@TableField(exist = false)
+	private String srcHblno;
+
 
 }

+ 7 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/vo/GenerateMailVo.java

@@ -2,6 +2,8 @@ package org.springblade.los.business.sea.vo;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @author Rain
  */
@@ -56,4 +58,9 @@ public class GenerateMailVo {
 	 */
 	private String fileContentStr;
 
+	/**
+	 * 附件地址
+	 */
+	private List<String> fileList;
+
 }

+ 12 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/check/entity/LosAuditProecess.java

@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springblade.los.utils.LosSpecialHandle;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -375,5 +376,16 @@ public class LosAuditProecess implements Serializable {
 	@TableField(exist = false)
 	private List<String> etdList;
 
+	/**
+	 * MB/L NO
+	 */
+	@ApiModelProperty(value = "MB/L NO")
+	private String mblno;
+	/**
+	 * HB/L NO
+	 */
+	@ApiModelProperty(value = "HB/L NO")
+	private String hblno;
+
 
 }

+ 2 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/statisticAnalysis/FeeSettlementExcel.java

@@ -31,6 +31,8 @@ public class FeeSettlementExcel {
 	private String billNo;
 	@ExcelProperty(value = "提单号")
 	private String mblno;
+	@ExcelProperty(value = "分单号")
+	private String hblno;
 	@ExcelProperty(value = "来源编号")
 	private String srcNo;
 	@ExcelProperty(value = "业务日期")

+ 1 - 1
blade-service/blade-los/pom.xml

@@ -15,7 +15,7 @@
         <dependency>
             <groupId>com.echepei</groupId>
             <artifactId>common-utils</artifactId>
-            <version>1.3</version>
+            <version>1.4</version>
             <exclusions>
                 <exclusion>
                     <groupId>ch.qos.logback</groupId>

+ 250 - 246
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -779,92 +779,91 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 
 							}
 							List<FeeCenter> feeCenterListMh = feeCenterService.list(lambdaQueryWrapper);
-							if (feeCenterListMh.isEmpty()) {
-								throw new RuntimeException("请先维护费用信息");
-							}
-							allFeeCenter.addAll(feeCenterListMh);
-							for (FeeCenter item : feeCenterListMh) {
-								if (ObjectUtils.isNotNull(item.getShortName())) {
-									item.setCorpCnName(item.getShortName());
-								} else {
-									item.setCorpCnName("无");
-								}
-								if (ObjectUtils.isNotNull(item.getBillShortName())) {
-									item.setBillCorpCnName(item.getBillShortName());
-								} else {
-									item.setBillCorpCnName("无");
-								}
-							}
-							for (Bills item : billsList) {
-								this.dictionaryConversion(item);
-								List<FeeCenter> feeD = feeCenterListMh.stream().filter(e -> MagicValues.D.equals(e.getDc()) &&
-									e.getPid().equals(item.getId())).collect(Collectors.toList());
-								item.setFeeCenterListD(feeD);
-								List<FeeCenter> feeC = feeCenterListMh.stream().filter(e -> MagicValues.C.equals(e.getDc()) &&
-									e.getPid().equals(item.getId())).collect(Collectors.toList());
-								item.setFeeCenterListC(feeC);
-								List<FeeCenter> feeCenterList = feeCenterListMh.stream().filter(e -> e.getPid().equals(item.getId()))
-									.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-										Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getDc()))), ArrayList::new));
-								List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
-								for (FeeCenter fee : feeCenterList) {
-									FeeCenterReports feeCenterReports = new FeeCenterReports();
-									feeCenterReports.setRemarks(fee.getRemarks());
-									feeCenterReports.setPid(item.getId());
-									feeCenterReports.setFeeCnName(fee.getFeeCnName());
-									feeCenterReports.setDc(fee.getDc());
-									List<FeeCenter> feeCenterListD = feeCenterListMh.stream()
-										.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
-											e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-											e.getCorpId().equals(fee.getCorpId()))
-										.collect(Collectors.toList());
-									if (!feeCenterListD.isEmpty()) {
-										feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
-										feeCenterReports.setAmountD(feeCenterListD.stream().map(FeeCenter::getAmount)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-										feeCenterReports.setAmountLocD(feeCenterListD.stream().map(FeeCenter::getAmountLoc)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-									}
-									List<FeeCenter> feeCenterListUsdD = feeCenterListMh.stream()
-										.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
-											e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-											e.getCorpId().equals(fee.getCorpId()))
-										.collect(Collectors.toList());
-									if (!feeCenterListUsdD.isEmpty()) {
-										feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
-										feeCenterReports.setAmountUsdD(feeCenterListUsdD.stream().map(FeeCenter::getAmount)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-										feeCenterReports.setAmountLocD(feeCenterListUsdD.stream().map(FeeCenter::getAmountLoc)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+							if (!feeCenterListMh.isEmpty()) {
+								allFeeCenter.addAll(feeCenterListMh);
+								for (FeeCenter item : feeCenterListMh) {
+									if (ObjectUtils.isNotNull(item.getShortName())) {
+										item.setCorpCnName(item.getShortName());
+									} else {
+										item.setCorpCnName("无");
 									}
-									List<FeeCenter> feeCenterListC = feeCenterListMh.stream()
-										.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
-											e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-											e.getCorpId().equals(fee.getCorpId()))
-										.collect(Collectors.toList());
-									if (!feeCenterListC.isEmpty()) {
-										feeCenterReports.setCorpCnName(fee.getCorpCnName());
-										feeCenterReports.setAmountC(feeCenterListC.stream().map(FeeCenter::getAmount)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-										feeCenterReports.setAmountLocC(feeCenterListC.stream().map(FeeCenter::getAmountLoc)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+									if (ObjectUtils.isNotNull(item.getBillShortName())) {
+										item.setBillCorpCnName(item.getBillShortName());
+									} else {
+										item.setBillCorpCnName("无");
 									}
-									List<FeeCenter> feeCenterListUsdC = feeCenterListMh.stream()
-										.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
-											e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-											e.getCorpId().equals(fee.getCorpId()))
-										.collect(Collectors.toList());
-									if (!feeCenterListUsdC.isEmpty()) {
-										feeCenterReports.setCorpCnName(fee.getCorpCnName());
-										feeCenterReports.setAmountUsdC(feeCenterListUsdC.stream().map(FeeCenter::getAmount)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-										feeCenterReports.setAmountLocC(feeCenterListUsdC.stream().map(FeeCenter::getAmountLoc)
-											.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+								}
+								for (Bills item : billsList) {
+									this.dictionaryConversion(item);
+									List<FeeCenter> feeD = feeCenterListMh.stream().filter(e -> MagicValues.D.equals(e.getDc()) &&
+										e.getPid().equals(item.getId())).collect(Collectors.toList());
+									item.setFeeCenterListD(feeD);
+									List<FeeCenter> feeC = feeCenterListMh.stream().filter(e -> MagicValues.C.equals(e.getDc()) &&
+										e.getPid().equals(item.getId())).collect(Collectors.toList());
+									item.setFeeCenterListC(feeC);
+									List<FeeCenter> feeCenterList = feeCenterListMh.stream().filter(e -> e.getPid().equals(item.getId()))
+										.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
+											Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getDc()))), ArrayList::new));
+									List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
+									for (FeeCenter fee : feeCenterList) {
+										FeeCenterReports feeCenterReports = new FeeCenterReports();
+										feeCenterReports.setRemarks(fee.getRemarks());
+										feeCenterReports.setPid(item.getId());
+										feeCenterReports.setFeeCnName(fee.getFeeCnName());
+										feeCenterReports.setDc(fee.getDc());
+										List<FeeCenter> feeCenterListD = feeCenterListMh.stream()
+											.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
+												e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+												e.getCorpId().equals(fee.getCorpId()))
+											.collect(Collectors.toList());
+										if (!feeCenterListD.isEmpty()) {
+											feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
+											feeCenterReports.setAmountD(feeCenterListD.stream().map(FeeCenter::getAmount)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+											feeCenterReports.setAmountLocD(feeCenterListD.stream().map(FeeCenter::getAmountLoc)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+										}
+										List<FeeCenter> feeCenterListUsdD = feeCenterListMh.stream()
+											.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
+												e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+												e.getCorpId().equals(fee.getCorpId()))
+											.collect(Collectors.toList());
+										if (!feeCenterListUsdD.isEmpty()) {
+											feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
+											feeCenterReports.setAmountUsdD(feeCenterListUsdD.stream().map(FeeCenter::getAmount)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+											feeCenterReports.setAmountLocD(feeCenterListUsdD.stream().map(FeeCenter::getAmountLoc)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+										}
+										List<FeeCenter> feeCenterListC = feeCenterListMh.stream()
+											.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
+												e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+												e.getCorpId().equals(fee.getCorpId()))
+											.collect(Collectors.toList());
+										if (!feeCenterListC.isEmpty()) {
+											feeCenterReports.setCorpCnName(fee.getCorpCnName());
+											feeCenterReports.setAmountC(feeCenterListC.stream().map(FeeCenter::getAmount)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+											feeCenterReports.setAmountLocC(feeCenterListC.stream().map(FeeCenter::getAmountLoc)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+										}
+										List<FeeCenter> feeCenterListUsdC = feeCenterListMh.stream()
+											.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(item.getId()) &&
+												e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+												e.getCorpId().equals(fee.getCorpId()))
+											.collect(Collectors.toList());
+										if (!feeCenterListUsdC.isEmpty()) {
+											feeCenterReports.setCorpCnName(fee.getCorpCnName());
+											feeCenterReports.setAmountUsdC(feeCenterListUsdC.stream().map(FeeCenter::getAmount)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+											feeCenterReports.setAmountLocC(feeCenterListUsdC.stream().map(FeeCenter::getAmountLoc)
+												.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+										}
+										feeCenterReportList.add(feeCenterReports);
 									}
-									feeCenterReportList.add(feeCenterReports);
+									item.setFeeCenterList(feeCenterReportList);
+									list.add(item);
 								}
-								item.setFeeCenterList(feeCenterReportList);
-								list.add(item);
 							}
 						}
 					}
@@ -883,25 +882,24 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						}
 					}
 					List<FeeCenter> feeCenterList = feeCenterService.list(lambdaQueryWrapper);
-					allFeeCenter.addAll(feeCenterList);
-					List<FeeCenter> feeD = feeCenterList.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
-					bills.setFeeCenterListD(feeD);
-					List<FeeCenter> feeC = feeCenterList.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
-					bills.setFeeCenterListC(feeC);
-
-					for (FeeCenter item : feeCenterList) {
-						if (ObjectUtils.isNotNull(item.getShortName())) {
-							item.setCorpCnName(item.getShortName());
-						} else {
-							item.setCorpCnName("无");
-						}
-						if (ObjectUtils.isNotNull(item.getBillShortName())) {
-							item.setBillCorpCnName(item.getBillShortName());
-						} else {
-							item.setBillCorpCnName("无");
-						}
-					}
 					if (!feeCenterList.isEmpty()) {
+						allFeeCenter.addAll(feeCenterList);
+						List<FeeCenter> feeD = feeCenterList.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
+						bills.setFeeCenterListD(feeD);
+						List<FeeCenter> feeC = feeCenterList.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
+						bills.setFeeCenterListC(feeC);
+						for (FeeCenter item : feeCenterList) {
+							if (ObjectUtils.isNotNull(item.getShortName())) {
+								item.setCorpCnName(item.getShortName());
+							} else {
+								item.setCorpCnName("无");
+							}
+							if (ObjectUtils.isNotNull(item.getBillShortName())) {
+								item.setBillCorpCnName(item.getBillShortName());
+							} else {
+								item.setBillCorpCnName("无");
+							}
+						}
 						// 提取汇率
 						bills.setRate(feeCenterList.get(0).getExrate());
 						List<FeeCenter> feeCenters = feeCenterList.stream()
@@ -966,8 +964,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							feeCenterReportList.add(feeCenterReports);
 						}
 						bills.setFeeCenterList(feeCenterReportList);
-					} else {
-						throw new RuntimeException("请先维护费用");
 					}
 					list.add(0, bills);
 				} else if (MagicValues.MH.equals(bills.getBillType())) {
@@ -991,14 +987,13 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							}
 						}
 						List<FeeCenter> feeCenterList = feeCenterService.list(lambdaQueryWrapper);
-						if (feeCenterList.isEmpty()) {
-							throw new RuntimeException("请先维护费用信息");
+						if (!feeCenterList.isEmpty()) {
+							allFeeCenter.addAll(feeCenterList);
+							List<FeeCenter> feeD = feeCenterList.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
+							bills.setFeeCenterListD(feeD);
+							List<FeeCenter> feeC = feeCenterList.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
+							bills.setFeeCenterListC(feeC);
 						}
-						allFeeCenter.addAll(feeCenterList);
-						List<FeeCenter> feeD = feeCenterList.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
-						bills.setFeeCenterListD(feeD);
-						List<FeeCenter> feeC = feeCenterList.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
-						bills.setFeeCenterListC(feeC);
 						if (!feeCenterList.isEmpty()) {
 							for (FeeCenter item : feeCenterList) {
 								if (ObjectUtils.isNotNull(item.getShortName())) {
@@ -1090,153 +1085,157 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							}
 						}
 						List<FeeCenter> feeCenterListMh = feeCenterService.list(feeCenterLambdaQueryWrapper);
-						allFeeCenter.addAll(feeCenterListMh);
-						List<FeeCenter> feeD2 = feeCenterListMh.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
-						details.setFeeCenterListD(feeD2);
-						List<FeeCenter> feeC2 = feeCenterListMh.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
-						details.setFeeCenterListC(feeC2);
-						for (FeeCenter item : feeCenterListMh) {
-							if (ObjectUtils.isNotNull(item.getShortName())) {
-								item.setCorpCnName(item.getShortName());
-							} else {
-								item.setCorpCnName("无");
-							}
-							if (ObjectUtils.isNotNull(item.getBillShortName())) {
-								item.setBillCorpCnName(item.getBillShortName());
-							} else {
-								item.setBillCorpCnName("无");
-							}
-						}
-						List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
-							.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-								Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getDc()))), ArrayList::new));
-						List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
-						for (FeeCenter fee : feeCenterList1) {
-							FeeCenterReports feeCenterReports = new FeeCenterReports();
-							feeCenterReports.setRemarks(fee.getRemarks());
-							feeCenterReports.setPid(details.getId());
-							feeCenterReports.setFeeCnName(fee.getFeeCnName());
-							feeCenterReports.setDc(fee.getDc());
-							List<FeeCenter> feeCenterListD = feeCenterListMh.stream()
-								.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
-									e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-									e.getCorpId().equals(fee.getCorpId()))
-								.collect(Collectors.toList());
-							if (!feeCenterListD.isEmpty()) {
-								feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
-								feeCenterReports.setAmountD(feeCenterListD.stream().map(FeeCenter::getAmount)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-								feeCenterReports.setAmountLocD(feeCenterListD.stream().map(FeeCenter::getAmountLoc)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-							}
-							List<FeeCenter> feeCenterListUsdD = feeCenterListMh.stream()
-								.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
-									e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-									e.getCorpId().equals(fee.getCorpId()))
-								.collect(Collectors.toList());
-							if (!feeCenterListUsdD.isEmpty()) {
-								feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
-								feeCenterReports.setAmountUsdD(feeCenterListUsdD.stream().map(FeeCenter::getAmount)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-								feeCenterReports.setAmountLocD(feeCenterListUsdD.stream().map(FeeCenter::getAmountLoc)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-							}
-							List<FeeCenter> feeCenterListC = feeCenterListMh.stream()
-								.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
-									e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-									e.getCorpId().equals(fee.getCorpId()))
-								.collect(Collectors.toList());
-							if (!feeCenterListC.isEmpty()) {
-								feeCenterReports.setCorpCnName(fee.getCorpCnName());
-								feeCenterReports.setAmountC(feeCenterListC.stream().map(FeeCenter::getAmount)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-								feeCenterReports.setAmountLocC(feeCenterListC.stream().map(FeeCenter::getAmountLoc)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+						if (!feeCenterListMh.isEmpty()) {
+							allFeeCenter.addAll(feeCenterListMh);
+							List<FeeCenter> feeD2 = feeCenterListMh.stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
+							details.setFeeCenterListD(feeD2);
+							List<FeeCenter> feeC2 = feeCenterListMh.stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
+							details.setFeeCenterListC(feeC2);
+							for (FeeCenter item : feeCenterListMh) {
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									item.setCorpCnName("无");
+								}
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									item.setBillCorpCnName("无");
+								}
 							}
-							List<FeeCenter> feeCenterListUsdC = feeCenterListMh.stream()
-								.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
-									e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
-									e.getCorpId().equals(fee.getCorpId()))
-								.collect(Collectors.toList());
-							if (!feeCenterListUsdC.isEmpty()) {
-								feeCenterReports.setCorpCnName(fee.getCorpCnName());
-								feeCenterReports.setAmountUsdC(feeCenterListUsdC.stream().map(FeeCenter::getAmount)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-								feeCenterReports.setAmountLocC(feeCenterListUsdC.stream().map(FeeCenter::getAmountLoc)
-									.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+							List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
+								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
+									Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getDc()))), ArrayList::new));
+							List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
+							for (FeeCenter fee : feeCenterList1) {
+								FeeCenterReports feeCenterReports = new FeeCenterReports();
+								feeCenterReports.setRemarks(fee.getRemarks());
+								feeCenterReports.setPid(details.getId());
+								feeCenterReports.setFeeCnName(fee.getFeeCnName());
+								feeCenterReports.setDc(fee.getDc());
+								List<FeeCenter> feeCenterListD = feeCenterListMh.stream()
+									.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
+										e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+										e.getCorpId().equals(fee.getCorpId()))
+									.collect(Collectors.toList());
+								if (!feeCenterListD.isEmpty()) {
+									feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
+									feeCenterReports.setAmountD(feeCenterListD.stream().map(FeeCenter::getAmount)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+									feeCenterReports.setAmountLocD(feeCenterListD.stream().map(FeeCenter::getAmountLoc)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+								}
+								List<FeeCenter> feeCenterListUsdD = feeCenterListMh.stream()
+									.filter(e -> MagicValues.D.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
+										e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+										e.getCorpId().equals(fee.getCorpId()))
+									.collect(Collectors.toList());
+								if (!feeCenterListUsdD.isEmpty()) {
+									feeCenterReports.setBillCorpCnName(fee.getCorpCnName());
+									feeCenterReports.setAmountUsdD(feeCenterListUsdD.stream().map(FeeCenter::getAmount)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+									feeCenterReports.setAmountLocD(feeCenterListUsdD.stream().map(FeeCenter::getAmountLoc)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+								}
+								List<FeeCenter> feeCenterListC = feeCenterListMh.stream()
+									.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
+										e.getFeeId().equals(fee.getFeeId()) && exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+										e.getCorpId().equals(fee.getCorpId()))
+									.collect(Collectors.toList());
+								if (!feeCenterListC.isEmpty()) {
+									feeCenterReports.setCorpCnName(fee.getCorpCnName());
+									feeCenterReports.setAmountC(feeCenterListC.stream().map(FeeCenter::getAmount)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+									feeCenterReports.setAmountLocC(feeCenterListC.stream().map(FeeCenter::getAmountLoc)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+								}
+								List<FeeCenter> feeCenterListUsdC = feeCenterListMh.stream()
+									.filter(e -> MagicValues.C.equals(e.getDc()) && e.getPid().equals(details.getId()) &&
+										e.getFeeId().equals(fee.getFeeId()) && !exrateType.equals(e.getCurCode()) && fee.getCurCode().equals(e.getCurCode()) &&
+										e.getCorpId().equals(fee.getCorpId()))
+									.collect(Collectors.toList());
+								if (!feeCenterListUsdC.isEmpty()) {
+									feeCenterReports.setCorpCnName(fee.getCorpCnName());
+									feeCenterReports.setAmountUsdC(feeCenterListUsdC.stream().map(FeeCenter::getAmount)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+									feeCenterReports.setAmountLocC(feeCenterListUsdC.stream().map(FeeCenter::getAmountLoc)
+										.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+								}
+								feeCenterReportList.add(feeCenterReports);
 							}
-							feeCenterReportList.add(feeCenterReports);
+							details.setFeeCenterList(feeCenterReportList);
 						}
-						details.setFeeCenterList(feeCenterReportList);
 						list.add(0, details);
 					}
 				}
 				if (!list.isEmpty()) {
 					for (Bills item : list) {
-						List<FeeCenterReports> feeCenterReports = new ArrayList<>();
-						// 应收
-						List<FeeCenterReports> feeCenterReportsD = item.getFeeCenterList().stream()
-							.filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList()) == null ? new ArrayList<>() :
-							item.getFeeCenterList().stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
-						// 应付
-						List<FeeCenterReports> feeCenterReportsC = item.getFeeCenterList().stream()
-							.filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList()) == null ? new ArrayList<>() :
-							item.getFeeCenterList().stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
-						// 排序
-						List<FeeCenterReports> feeCentersD = feeCenterReportsD.stream()
-							.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-								Comparator.comparing(e -> e.getFeeCnName() + e.getBillCorpCnName()))), ArrayList::new));
-						int countC = 0;
-						// 遍历应收,并与应付对应
-						for (int i = 0; i < feeCentersD.size(); i++) {
-							FeeCenterReports feeCenterReports1 = new FeeCenterReports();
-							feeCenterReports1.setFeeCnName(feeCentersD.get(i).getFeeCnName());
-							feeCenterReports1.setHblno(feeCentersD.get(i).getHblno());
-							feeCenterReports1.setPid(feeCentersD.get(i).getPid());
-							int finalI = i;
-							feeCenterReports1.setBillCorpCnName(feeCentersD.get(i).getBillCorpCnName());
-							feeCenterReports1.setAmountD(feeCentersD.get(i).getAmountD());
-							feeCenterReports1.setAmountLocD(feeCentersD.get(i).getAmountLocD());
-							feeCenterReports1.setAmountUsdD(feeCentersD.get(i).getAmountUsdD());
-							FeeCenterReports feeCenterC = feeCenterReportsC.stream()
-								.filter(e -> e.getFeeCnName().equals(feeCentersD.get(finalI).getFeeCnName()) && !"1".equals(e.getMark())).findFirst().orElse(null);
-							if (feeCenterC != null) {
-								feeCenterC.setMark("1");
-								feeCenterReports1.setCorpCnName(feeCenterC.getCorpCnName());
-								feeCenterReports1.setAmountC(feeCenterC.getAmountC());
-								feeCenterReports1.setAmountLocC(feeCenterC.getAmountLocC());
-								feeCenterReports1.setAmountUsdC(feeCenterC.getAmountUsdC());
-								countC++;
-							}
-							feeCenterReports.add(feeCenterReports1);
-						}
-						// 如果存在未对应的应付,添加应付费用
-						if (countC < feeCenterReportsC.size()) {
-							List<FeeCenterReports> feeCe = feeCenterReportsC.stream()
-								.filter(e -> !"1".equals(e.getMark())).collect(Collectors.toList());
-							for (FeeCenterReports i : feeCe) {
+						if (ObjectUtils.isNotNull(item.getFeeCenterList()) && !item.getFeeCenterList().isEmpty()) {
+							List<FeeCenterReports> feeCenterReports = new ArrayList<>();
+							// 应收
+							List<FeeCenterReports> feeCenterReportsD = item.getFeeCenterList().stream()
+								.filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList()) == null ? new ArrayList<>() :
+								item.getFeeCenterList().stream().filter(e -> MagicValues.D.equals(e.getDc())).collect(Collectors.toList());
+							// 应付
+							List<FeeCenterReports> feeCenterReportsC = item.getFeeCenterList().stream()
+								.filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList()) == null ? new ArrayList<>() :
+								item.getFeeCenterList().stream().filter(e -> MagicValues.C.equals(e.getDc())).collect(Collectors.toList());
+							// 排序
+							List<FeeCenterReports> feeCentersD = feeCenterReportsD.stream()
+								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
+									Comparator.comparing(e -> e.getFeeCnName() + e.getBillCorpCnName()))), ArrayList::new));
+							int countC = 0;
+							// 遍历应收,并与应付对应
+							for (int i = 0; i < feeCentersD.size(); i++) {
 								FeeCenterReports feeCenterReports1 = new FeeCenterReports();
-								feeCenterReports1.setCorpCnName(i.getCorpCnName());
-								feeCenterReports1.setFeeCnName(i.getFeeCnName());
-								feeCenterReports1.setHblno(i.getHblno());
-								feeCenterReports1.setPid(i.getPid());
-								feeCenterReports1.setAmountC(i.getAmountC());
-								feeCenterReports1.setAmountLocC(i.getAmountLocC());
-								feeCenterReports1.setAmountUsdC(i.getAmountUsdC());
+								feeCenterReports1.setFeeCnName(feeCentersD.get(i).getFeeCnName());
+								feeCenterReports1.setHblno(feeCentersD.get(i).getHblno());
+								feeCenterReports1.setPid(feeCentersD.get(i).getPid());
+								int finalI = i;
+								feeCenterReports1.setBillCorpCnName(feeCentersD.get(i).getBillCorpCnName());
+								feeCenterReports1.setAmountD(feeCentersD.get(i).getAmountD());
+								feeCenterReports1.setAmountLocD(feeCentersD.get(i).getAmountLocD());
+								feeCenterReports1.setAmountUsdD(feeCentersD.get(i).getAmountUsdD());
+								FeeCenterReports feeCenterC = feeCenterReportsC.stream()
+									.filter(e -> e.getFeeCnName().equals(feeCentersD.get(finalI).getFeeCnName()) && !"1".equals(e.getMark())).findFirst().orElse(null);
+								if (feeCenterC != null) {
+									feeCenterC.setMark("1");
+									feeCenterReports1.setCorpCnName(feeCenterC.getCorpCnName());
+									feeCenterReports1.setAmountC(feeCenterC.getAmountC());
+									feeCenterReports1.setAmountLocC(feeCenterC.getAmountLocC());
+									feeCenterReports1.setAmountUsdC(feeCenterC.getAmountUsdC());
+									countC++;
+								}
 								feeCenterReports.add(feeCenterReports1);
 							}
-						}
-						if (ObjectUtils.isNotNull(item.getAmountProfitLoc()) && ObjectUtils.isNotNull(item.getAmountDrLoc())) {
-							if (item.getAmountProfitLoc().compareTo(new BigDecimal(MagicValues.ZERO)) == 0 ||
-								item.getAmountDrLoc().compareTo(new BigDecimal(MagicValues.ZERO)) == 0) {
-								item.setGrossMargin(new BigDecimal(MagicValues.ZERO));
+							// 如果存在未对应的应付,添加应付费用
+							if (countC < feeCenterReportsC.size()) {
+								List<FeeCenterReports> feeCe = feeCenterReportsC.stream()
+									.filter(e -> !"1".equals(e.getMark())).collect(Collectors.toList());
+								for (FeeCenterReports i : feeCe) {
+									FeeCenterReports feeCenterReports1 = new FeeCenterReports();
+									feeCenterReports1.setCorpCnName(i.getCorpCnName());
+									feeCenterReports1.setFeeCnName(i.getFeeCnName());
+									feeCenterReports1.setHblno(i.getHblno());
+									feeCenterReports1.setPid(i.getPid());
+									feeCenterReports1.setAmountC(i.getAmountC());
+									feeCenterReports1.setAmountLocC(i.getAmountLocC());
+									feeCenterReports1.setAmountUsdC(i.getAmountUsdC());
+									feeCenterReports.add(feeCenterReports1);
+								}
+							}
+							if (ObjectUtils.isNotNull(item.getAmountProfitLoc()) && ObjectUtils.isNotNull(item.getAmountDrLoc())) {
+								if (item.getAmountProfitLoc().compareTo(new BigDecimal(MagicValues.ZERO)) == 0 ||
+									item.getAmountDrLoc().compareTo(new BigDecimal(MagicValues.ZERO)) == 0) {
+									item.setGrossMargin(new BigDecimal(MagicValues.ZERO));
+								} else {
+									item.setGrossMargin(item.getAmountProfitLoc().divide(item.getAmountDrLoc(), 4, RoundingMode.HALF_UP));
+								}
 							} else {
-								item.setGrossMargin(item.getAmountProfitLoc().divide(item.getAmountDrLoc(), 4, RoundingMode.HALF_UP));
+								item.setGrossMargin(new BigDecimal(MagicValues.ZERO));
 							}
-						} else {
-							item.setGrossMargin(new BigDecimal(MagicValues.ZERO));
+							item.setFeeCenterList(feeCenterReports);
 						}
-						item.setFeeCenterList(feeCenterReports);
 						item.setDept(dept);
 					}
 				}
@@ -1286,7 +1285,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						}
 					}
 					containersReportsList.add(containersReports);
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
 						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
@@ -1335,7 +1334,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				StringBuilder text = new StringBuilder();
 				StringBuilder cntrSealNo = new StringBuilder();
 				for (Containers item : containersList) {
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
 						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
@@ -2104,7 +2103,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				bills.setContainersList(containersList);
 				StringBuilder text = new StringBuilder();
 				for (Containers item : containersList) {
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
 						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
@@ -3615,7 +3614,12 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 		mailDto.setMailBcc(generateMailVo.getSendBcc());
 		mailDto.setMailTitle(generateMailVo.getMailTitle());
 		mailDto.setMailContent(generateMailVo.getMailContent());
-		mailDto.setMailFilePath(Arrays.asList(filePath));
+		List<String> fileList = generateMailVo.getFileList();
+		if (ObjectUtils.isNull(fileList)) {
+			fileList = new ArrayList<>();
+		}
+		fileList.add(filePath);
+		mailDto.setMailFilePath(fileList);
 		SendMailUtil.sendHtmlFileMail(mailDto);
 		return R.data("发送成功");
 	}

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/RouteCostController.java

@@ -346,8 +346,8 @@ public class RouteCostController extends BladeController {
 			.eq(ObjectUtils.isNotNull(routeCost.getBusinessType()), RouteCost::getBusinessType, routeCost.getBusinessType())
 			.eq(ObjectUtils.isNotNull(routeCost.getPodId()), RouteCost::getPodId, routeCost.getPodId())
 			.eq(ObjectUtils.isNotNull(routeCost.getDestinationId()), RouteCost::getDestinationId, routeCost.getDestinationId())
-			.apply(ObjectUtils.isNotNull(routeCost.getShippingCompanyId()), "((business_type = 'SOC' and actual_shipping_company_id = '" + routeCost.getShippingCompanyId() + "')" +
-				"OR (business_type = 'COC' and shipping_company_id = '" + routeCost.getShippingCompanyId() + "'))");
+			.apply(ObjectUtils.isNotNull(routeCost.getShippingCompanyId()), "((business_type = 'SOC' and shipping_company_id = '" + routeCost.getShippingCompanyId() + "')" +
+				"OR (business_type = 'COC' and actual_shipping_company_id = '" + routeCost.getShippingCompanyId() + "'))");
 //			.eq(ObjectUtils.isNotNull(routeCost.getShippingCompanyId()), RouteCost::getActualShippingCompanyId, routeCost.getShippingCompanyId());
 		lambdaQueryWrapper.orderByAsc(RouteCost::getTotalProfit);
 		List<RouteCost> list = routeCostService.list(lambdaQueryWrapper);

+ 3 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/ExpenseApplicationServiceImpl.java

@@ -186,6 +186,7 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			expenseApplication.setCreateUserName(AuthUtil.getUserName());
 			expenseApplication.setSrcNo(bills.getBillNo());
 			expenseApplication.setSrcMblno(bills.getMblno());
+			expenseApplication.setSrcHblno(bills.getHblno());
 			expenseApplication.setSrcContainerNumber("");
 			expenseApplication.setSrcContractNo(bills.getBookingNo());
 			expenseApplication.setStatus("审核提交");
@@ -296,6 +297,8 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			auditProecessDTO.setSrcBusType(expenseApplication.getSrcType());
 			auditProecessDTO.setSalesCompanyId(Long.parseLong(expenseApplication.getBranchId()));
 			auditProecessDTO.setSalesCompanyName(expenseApplication.getBranchName());
+			auditProecessDTO.setMblno(expenseApplication.getSrcMblno());
+			auditProecessDTO.setHblno(expenseApplication.getSrcHblno());
 			BigDecimal salesPrice = expenseApplication.getFeeCenterList().stream().filter(e -> e.getDc().equals("D"))
 				.map(FeeCenter::getAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 			BigDecimal costPrice = expenseApplication.getFeeCenterList().stream().filter(e -> e.getDc().equals("C"))

+ 69 - 83
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java

@@ -1256,7 +1256,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 				}
 			}
 		}
-		this.countOverdueFee(tradingBoxList, tradingBoxItems, containersListNew, putBoxItems);
+		this.countOverdueFee(putBoxList, tradingBoxList, tradingBoxItems, containersListNew, putBoxItems);
 		return R.data("操作成功");
 	}
 
@@ -1621,17 +1621,17 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 		}*/
 		//计算超期箱使费
 		if (!billsList.isEmpty()) {
-			this.countOverdueFee(tradingBoxList, tradingBoxItemOldList, containersListNew,putBoxItemsOldList);
+			this.countOverdueFee(putBoxList,tradingBoxList, tradingBoxItemOldList, containersListNew, putBoxItemsOldList);
 		}
 		return R.data("操作成功");
 	}
 
-	private void countOverdueFee(List<TradingBox> tradingBoxList, List<TradingBoxItem> tradingBoxItemOldList,
+	private void countOverdueFee(List<PutBox> putBoxList, List<TradingBox> tradingBoxList, List<TradingBoxItem> tradingBoxItemOldList,
 								 List<Containers> containersListNew, List<PutBoxItems> putBoxItems) {
 		List<FeeCenter> feeCenterList = new ArrayList<>();
 		List<PutBoxItems> putBoxItemsList = new ArrayList<>();
 		List<TradingBoxItem> tradingBoxItemList = new ArrayList<>();
-		List<String> mblnoList = tradingBoxItemOldList.stream().map(TradingBoxItem::getMblno).collect(Collectors.toList());
+		List<String> mblnoList = putBoxItems.stream().map(PutBoxItems::getMblno).collect(Collectors.toList());
 		if (!mblnoList.isEmpty()) {
 			//海运进出口单据
 			List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
@@ -1681,16 +1681,12 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 			if (bCorps == null) {
 				throw new RuntimeException("基础资料未查到编码为‘ZBYF’往来单位");
 			}
-			for (TradingBoxItem item : tradingBoxItemOldList) {
-				//查找OW明细对应主表
-				TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
-				if (tradingBox == null) {
-					throw new RuntimeException("未查到OW单据");
-				}
-				if ("OW-F".equals(tradingBox.getType())) {
-					continue;
+			for (PutBoxItems item : putBoxItems) {
+				PutBox putBox = putBoxList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
+				if (putBox == null) {
+					throw new RuntimeException("未查到放箱号数据");
 				}
-				Containers containers = containersListNew.stream().filter(e -> e.getCntrNo().equals(item.getCode())).findFirst().orElse(null);
+				Containers containers = containersListNew.stream().filter(e -> e.getCntrNo().equals(item.getBoxCode())).findFirst().orElse(null);
 				if (containers == null) {
 					throw new RuntimeException("箱号未在配箱信息中查到");
 				}
@@ -1704,12 +1700,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 				String exrateType = currencyUtils.standardCurrency(bills.getBranchId());
 				//对应海运进出口单据所属公司所有币别
 				List<BCurExrate> curExrateList = currencyUtils.obtainRate(new Date(), "1", bills.getBranchId());
-				Date polPickUpDate;
-				if ("OW-N".equals(tradingBox.getType())) {
-					polPickUpDate = item.getPolPickUpDate();
-				} else {
-					polPickUpDate = item.getPolStationEmptyContainerExitDate();
-				}
+				Date polPickUpDate = item.getPolPickUpDate();
 				//起运港超期天数
 				if (ObjectUtils.isNotNull(polPickUpDate) && ObjectUtils.isNotNull(bills.getEtd())) {
 					//所属公司具体超期标准
@@ -1733,11 +1724,12 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 						overdueDays = (int) (days - bills.getPolFreeBoxUseDays());
 					}
 					if (overdueDays != 0) {
-						FeeCenter feeCenter = this.addFeeCenter(tradingBox, item, bills, fees, storageFeesItems, curExrateList, overdueDays, exrateType);
+						FeeCenter feeCenter = this.addFeeCenter(item, bills, fees, storageFeesItems, curExrateList, overdueDays, exrateType);
 						if (feeCenter != null) {
 							feeCenterList.add(feeCenter);
 							FeeCenter feeCenterC = new FeeCenter();
 							BeanUtil.copyProperties(feeCenter, feeCenterC);
+							feeCenterC.setPid(bills.getId());
 							feeCenterC.setDc("C");
 							feeCenterC.setCorpType("国内直接客户");
 							feeCenterC.setCorpId(bCorps.getId());
@@ -1750,13 +1742,21 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 							feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
 							feeCenterList.add(feeCenterC);
 						}
-						item.setPolOverdueBoxUseDays(overdueDays);
-						PutBoxItems putBoxItems1 = putBoxItems.stream().filter(e -> e.getBoxCode().equals(item.getCode())).findFirst().orElse(null);
-						if (putBoxItems1 != null) {
-							putBoxItems1.setPolOverdueBoxUseDays(overdueDays);
-							putBoxItemsList.add(putBoxItems1);
+						item.setPodBoxUseDays(overdueDays);
+						putBoxItemsList.add(item);
+						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单据明细箱号");
+							}
+							//查找OW明细对应主表
+							TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(tradingBoxItem.getPid())).findFirst().orElse(null);
+							if (tradingBox == null) {
+								throw new RuntimeException("未查到OW单据");
+							}
+							tradingBoxItem.setPolOverdueBoxUseDays(overdueDays);
+							tradingBoxItemList.add(tradingBoxItem);
 						}
-						tradingBoxItemList.add(item);
 					}
 				}
 			}
@@ -1797,7 +1797,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 		return storageFees;
 	}
 
-	private FeeCenter addFeeCenter(TradingBox tradingBox, TradingBoxItem item, Bills bills, BFees fees,
+	private FeeCenter addFeeCenter(PutBoxItems item, Bills bills, BFees fees,
 								   List<StorageFeesItems> storageFeesItems, List<BCurExrate> curExrateList,
 								   int overdueDays, String exrateType) {
 		FeeCenter feeCenter = new FeeCenter();
@@ -1818,7 +1818,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 		feeCenter.setFeeCnName(fees.getCnName());
 		feeCenter.setFeeEnName(fees.getEnName());
 		feeCenter.setCurCode(storageFeesItems.get(0).getCurCode());
-		feeCenter.setCntrNo(item.getCode());
+		feeCenter.setCntrNo(item.getBoxCode());
 		feeCenter.setUnitNo(item.getBoxType());
 		//计算天数
 		int days = overdueDays + 1;
@@ -3188,8 +3188,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 									putBoxItem.setPodEmptyContainerReturnDate(podStationR.getReturnEmptyTime());
 									putBoxItem.setPodFreeBoxUseDays(billsHYJK.getPodFreeBoxUseDays());
 									putBoxItem.setEta(billsHYJK.getEta());
-									putBoxItem.setStatus("待使用");
-									putBoxItem.setBoxDynamics("空箱进场");
+									putBoxItem.setStatus("已完成");
+									putBoxItem.setBoxDynamics("已返场");
 									putBoxItemsOldList.add(putBoxItem);
 								} else {
 									throw new RuntimeException("未查到原放箱号:" + archives.getContainerNumber() + "中箱号为:" + item.getCntrNo() + "数据");
@@ -3213,8 +3213,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 												tradingBoxItem.setPodStationCname(podStationR.getPodStationEname());
 												tradingBoxItem.setPodStationEname(podStationR.getPodStationCode());
 												tradingBoxItem.setPodEmptyContainerReturnDate(podStationR.getReturnEmptyTime());
-												tradingBoxItem.setBoxDynamics("空箱进场");
-												tradingBoxItem.setStatus("待使用");
+												tradingBoxItem.setBoxDynamics("已返场");
+												tradingBoxItem.setStatus("已完成");
 												tradingBoxItem.setPortId(billsHYJK.getPodId());
 												tradingBoxItem.setPortCode(billsHYJK.getPodCode());
 												tradingBoxItem.setPortCname(billsHYJK.getPodCnName());
@@ -3252,8 +3252,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 										putBox2.setCreateUser(AuthUtil.getUserId());
 										putBox2.setCreateTime(new Date());
 										putBox2.setCreateUserName(AuthUtil.getUserName());
-										putBox2.setBusType("自有箱");
-										putBox2.setBoxBelongsTo("SOC");
+										putBox2.setBusType(archives.getContainerNumberType());
+										putBox2.setBoxBelongsTo(archives.getBoxBelongsTo());
 										putBox2.setBoxEastId(archives.getBoxEastId() + "");
 										putBox2.setBoxEastName(archives.getBoxEastName());
 										String code = "FXH-ZY";
@@ -3285,7 +3285,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 										putBox2.setPolStationCname(podStationR.getPodStationEname());
 										putBox2.setPolStationEname(podStationR.getPodStationCode());
 										putBox2.setBoxType(archives.getTypeName());
-										putBox2.setBoxClass("自有箱");
+										putBox2.setBoxClass(archives.getBoxType());
 										putBox2.setTotalNum(1);
 										putBox2.setOccupyNum(0);
 										putBox2.setRemainingNum(1);
@@ -3302,8 +3302,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 									putBox.setCreateUser(AuthUtil.getUserId());
 									putBox.setCreateTime(new Date());
 									putBox.setCreateUserName(AuthUtil.getUserName());
-									putBox.setBusType("自有箱");
-									putBox.setBoxClass("自有箱");
+									putBox.setBusType(archives.getContainerNumberType());
+									putBox.setBoxClass(archives.getBoxType());
 									String code = "FXH-ZY";
 									BusinessBillNo businessBillNo = new BusinessBillNo();
 									businessBillNo.setBusinessTypeId(businessType.getId());
@@ -3314,7 +3314,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 									}
 									putBox.setSysNo((String) clientBillNo.getData());
 									putBox.setContainerNumber(archives.getContainerNumber());
-									putBox.setBoxBelongsTo("SOC");
+									putBox.setBoxBelongsTo(archives.getBoxBelongsTo());
 									putBox.setBoxEastId(archives.getBoxEastId() + "");
 									putBox.setBoxEastName(archives.getBoxEastName());
 									putBox.setSrcContainerNumber(archives.getContainerNumberOw());
@@ -3336,7 +3336,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 									putBox.setPolStationCname(podStationR.getPodStationEname());
 									putBox.setPolStationEname(podStationR.getPodStationCode());
 									putBox.setBoxType(archives.getTypeName());
-									putBox.setBoxClass("自有箱");
+									putBox.setBoxClass(archives.getBoxType());
 									putBox.setTotalNum(1);
 									putBox.setOccupyNum(0);
 									putBox.setRemainingNum(1);
@@ -3364,8 +3364,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 									putBoxItem.setPodEmptyContainerReturnDate(podStationR.getReturnEmptyTime());
 									putBoxItem.setPodFreeBoxUseDays(billsHYJK.getPodFreeBoxUseDays());
 									putBoxItem.setEta(billsHYJK.getEta());
-									putBoxItem.setStatus("待使用");
-									putBoxItem.setBoxDynamics("空箱进场");
+									putBoxItem.setStatus("已完成");
+									putBoxItem.setBoxDynamics("已返场");
 									putBoxItemsOldList.add(putBoxItem);
 								} else {
 									throw new RuntimeException("未查到原放箱号:" + archives.getContainerNumber() + "中箱号为:" + item.getCntrNo() + "数据");
@@ -3388,8 +3388,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 											tradingBoxItem.setPodStationCname(podStationR.getPodStationEname());
 											tradingBoxItem.setPodStationEname(podStationR.getPodStationCode());
 											tradingBoxItem.setPodEmptyContainerReturnDate(podStationR.getReturnEmptyTime());
-											tradingBoxItem.setBoxDynamics("空箱进场");
-											tradingBoxItem.setStatus("待使用");
+											tradingBoxItem.setBoxDynamics("已返场");
+											tradingBoxItem.setStatus("已完成");
 											tradingBoxItem.setPortId(billsHYJK.getPodId());
 											tradingBoxItem.setPortCode(billsHYJK.getPodCode());
 											tradingBoxItem.setPortCname(billsHYJK.getPodCnName());
@@ -3561,7 +3561,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 					}
 				}
 				//计算超期箱使费
-				this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList,putBoxItemsOldList);
+				this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
 			}
 		} else {
 			for (Containers item : containersHYJKList) {
@@ -3703,7 +3703,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 			analysis.setPortName(item.getPortName());
 			analysis.setStationName(item.getStationName());
 			analysis.setMblno(item.getMblno());
-			analysis.setBoxStatus(item.getBoxStatus());
+			analysis.setBoxStatus("空箱提箱进场");
 			analysis.setBoxStatusDate(item.getBoxStatusDate());
 			analysis.setResult("成功");
 			analysis.setReason("");
@@ -3754,34 +3754,11 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 					analysisList.add(analysis);
 					continue;
 				}
-				//放箱号明细数据处理
-				PutBoxItems putBoxItem;
-				if (!putBoxItemsList.isEmpty()) {
-					putBoxItem = putBoxItemsList.stream().filter(e -> e.getBoxCode().equals(item.getBoxCode()))
-						.findFirst().orElse(null);
-					if (putBoxItem != null) {
-						analysis.setResult("失败");
-						analysis.setReason("箱号:" + item.getBoxCode() + "在放箱号:" + item.getContainerNumber() + "单据中已存在,不能重复导入");
-						analysisList.add(analysis);
-						continue;
-					}
-				}
 				if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
 					if (!tradingBoxList.isEmpty()) {
 						TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(putBox.getSrcId()))
 							.findFirst().orElse(null);
-						if (tradingBox != null) {
-							TradingBoxItem tradingBoxItem;
-							if (!tradingBoxItemList.isEmpty()) {
-								tradingBoxItem = tradingBoxItemList.stream().filter(e -> e.getCode().equals(item.getBoxCode()))
-									.findFirst().orElse(null);
-								if (tradingBoxItem != null) {
-									analysis.setResult("失败");
-									analysis.setReason("箱号:" + item.getBoxCode() + "在放箱号:" + item.getContainerNumber() + "单据中已存在,不能重复导入");
-									analysisList.add(analysis);
-								}
-							}
-						} else {
+						if (tradingBox == null) {
 							analysis.setResult("失败");
 							analysis.setReason("放箱号:" + item.getContainerNumber() + "未查到OW单据");
 							analysisList.add(analysis);
@@ -3914,7 +3891,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 			analysis.setPortName(item.getPortName());
 			analysis.setStationName(item.getStationName());
 			analysis.setMblno(item.getMblno());
-			analysis.setBoxStatus(item.getBoxStatus());
+			analysis.setBoxStatus("空箱出场");
 			analysis.setBoxStatusDate(item.getBoxStatusDate());
 			analysis.setResult("成功");
 			analysis.setReason("");
@@ -5134,13 +5111,14 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 			}
 		}
 		//计算超期箱使费
-		this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList,putBoxItemsOldList);
+		this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
 
 		return null;
 	}
 
 	private void countOverdueFeeV1(Bills billsHYJK, List<TradingBox> tradingBoxList,
-								   List<TradingBoxItem> tradingBoxItemOldList,List<PutBoxItems> putBoxItemsOldList) {
+								   List<TradingBoxItem> tradingBoxItemOldList, List<PutBoxItems> putBoxItemsOldList,
+								   List<PutBox> putBoxList) {
 		List<FeeCenter> feeCenterList = new ArrayList<>();
 		List<PutBoxItems> putBoxItemsList = new ArrayList<>();
 		List<TradingBoxItem> tradingBoxItemList = new ArrayList<>();
@@ -5180,12 +5158,12 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 		if (bCorps == null) {
 			throw new RuntimeException("基础资料未查到编码为‘ZBYF’往来单位");
 		}
-		for (TradingBoxItem item : tradingBoxItemOldList) {
-			//查找OW明细对应主表
-			TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
-			if (tradingBox == null) {
-				throw new RuntimeException("未查到OW单据");
+		for (PutBoxItems item : putBoxItemsOldList) {
+			PutBox putBox = putBoxList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
+			if (putBox == null) {
+				throw new RuntimeException("未查到放箱号数据");
 			}
+
 			//对应海运进出口单据所属公司本位币
 			String exrateType = currencyUtils.standardCurrency(billsHYJK.getBranchId());
 			//对应海运进出口单据所属公司所有币别
@@ -5214,7 +5192,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 					overdueDays = (int) (days - billsHYJK.getPodFreeBoxUseDays());
 				}
 				if (overdueDays != 0) {
-					FeeCenter feeCenter = this.addFeeCenter(tradingBox, item, billsHYJK, fees, storageFeesItems, curExrateList, overdueDays, exrateType);
+					FeeCenter feeCenter = this.addFeeCenter( item, billsHYJK, fees, storageFeesItems, curExrateList, overdueDays, exrateType);
 					if (feeCenter != null) {
 						feeCenterList.add(feeCenter);
 						FeeCenter feeCenterC = new FeeCenter();
@@ -5232,12 +5210,20 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 						feeCenterList.add(feeCenterC);
 					}
 					item.setPodBoxUseDays(overdueDays);
-					PutBoxItems putBoxItems1 = putBoxItemsOldList.stream().filter(e -> e.getBoxCode().equals(item.getCode())).findFirst().orElse(null);
-					if (putBoxItems1 != null) {
-						putBoxItems1.setPodBoxUseDays(overdueDays);
-						putBoxItemsList.add(putBoxItems1);
+					putBoxItemsList.add(item);
+					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单据明细箱号");
+						}
+						//查找OW明细对应主表
+						TradingBox tradingBox = tradingBoxList.stream().filter(e -> e.getId().equals(tradingBoxItem.getPid())).findFirst().orElse(null);
+						if (tradingBox == null) {
+							throw new RuntimeException("未查到OW单据");
+						}
+						tradingBoxItem.setPodBoxUseDays(overdueDays);
+						tradingBoxItemList.add(tradingBoxItem);
 					}
-					tradingBoxItemList.add(item);
 				}
 			}
 		}

+ 0 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/mktSlot/controller/MktSlotController.java

@@ -197,7 +197,6 @@ public class MktSlotController extends BladeController {
 			.eq(MktSlot::getIsDeleted, 0)
 			.eq(MktSlot::getBranchId, AuthUtil.getDeptId())
 			.eq(ObjectUtils.isNotNull(mktSlot.getPolId()), MktSlot::getPolId, mktSlot.getPolId())
-			.eq(ObjectUtils.isNotNull(mktSlot.getPodId()), MktSlot::getPodId, mktSlot.getPodId())
 			.eq(MktSlot::getBillStatus, "已提交");
 		lambdaQueryWrapper.orderByAsc(MktSlot::getPodId);
 		List<MktSlot> list = mktSlotService.list(lambdaQueryWrapper);

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

@@ -218,6 +218,7 @@ public class BillsController extends BladeController {
 				lambdaQueryWrapper.orderByDesc(Bills::getMblno);
 				lambdaQueryWrapper.orderByAsc(Bills::getMasterBillNo);
 				lambdaQueryWrapper.orderByDesc(Bills::getBillType);
+				lambdaQueryWrapper.orderByDesc(Bills::getHblno);
 			} else {
 				lambdaQueryWrapper.orderByDesc(Bills::getEtd);
 				lambdaQueryWrapper.orderByAsc(Bills::getMasterBillNo);
@@ -232,6 +233,7 @@ public class BillsController extends BladeController {
 				lambdaQueryWrapper.orderByDesc(Bills::getMblno);
 				lambdaQueryWrapper.orderByAsc(Bills::getMasterBillNo);
 				lambdaQueryWrapper.orderByDesc(Bills::getBillType);
+				lambdaQueryWrapper.orderByDesc(Bills::getHblno);
 			} else {
 				lambdaQueryWrapper.orderByDesc(Bills::getEta);
 				lambdaQueryWrapper.orderByAsc(Bills::getMasterBillNo);

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

@@ -1712,6 +1712,8 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			auditProecessDTO.setSrcId(declare.getSrcId());
 			auditProecessDTO.setSrcCnName(declare.getSrcCnName());
 			auditProecessDTO.setSrcEnName(declare.getSrcEnName());
+			auditProecessDTO.setMblno(declare.getMblno());
+			auditProecessDTO.setHblno(declare.getHblno());
 			if ("SE".equals(declare.getBusinessType())) {
 				auditProecessDTO.setEtd(declare.getEtd());
 			} else if ("SI".equals(declare.getBusinessType())) {
@@ -3073,7 +3075,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				containersListNew.add(item);
 			}
 			containersService.saveBatch(containersListNew);
-			List<ContainersCommodity> containersCommodityList = containersCommodityService.list(new LambdaQueryWrapper<ContainersCommodity>()
+			/*List<ContainersCommodity> containersCommodityList = containersCommodityService.list(new LambdaQueryWrapper<ContainersCommodity>()
 				.eq(ContainersCommodity::getTenantId, AuthUtil.getTenantId())
 				.eq(ContainersCommodity::getIsDeleted, 0)
 				.eq(ContainersCommodity::getPpId, billsJk.getSrcBusId()));
@@ -3128,7 +3130,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					containersBillsListNew.add(item);
 				}
 				containersBillsService.saveBatch(containersBillsListNew);
-			}
+			}*/
 		}
 		List<FilesCenter> filesList = filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
 			.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())

+ 4 - 4
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java

@@ -673,8 +673,8 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 		if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
 			excel.setBranchId(AuthUtil.getDeptId());
 		}
-		if ("SE".equals(excel.getBusinessType())){
-			excel.setWhetherFee("1");
+		if ("SI".equals(excel.getBusinessType())){
+			excel.setWhetherFee("0");
 		}
 		return page.setRecords(baseMapper.updatePodStationPage(page, excel));
 	}
@@ -685,8 +685,8 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 		if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
 			excel.setBranchId(AuthUtil.getDeptId());
 		}
-		if ("SE".equals(excel.getBusinessType())){
-			excel.setWhetherFee("1");
+		if ("SI".equals(excel.getBusinessType())){
+			excel.setWhetherFee("0");
 		}
 		return baseMapper.updatePodStationList(excel);
 	}

+ 74 - 72
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/TemplateImportServiceImpl.java

@@ -1470,83 +1470,85 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
 		if (ObjectUtils.isNotNull(siRemarks)) {
 			bills.setSiRemarks(siRemarks);
 		}
-		List<Containers> containersList = new ArrayList<>();
-		BigDecimal sumQty = new BigDecimal(0L);
-		BigDecimal sumGw = new BigDecimal(0L);
-		BigDecimal sumVol = BigDecimal.ZERO;
-		int rowIndex = 0;
-		int cellIndex = 0;
-		//定位箱号位置
-		for (Row row : sheet) {
-			for (Cell cell : row) {
-				String data = getSheetCellValueAsString(sheet, cell.getRowIndex(), cell.getColumnIndex());
-				if ("箱号".equals(data)) {
-					rowIndex = cell.getRowIndex();
-					cellIndex = cell.getColumnIndex();
+		if ("KHTS".equals(bills.getBusinessType())){
+			List<Containers> containersList = new ArrayList<>();
+			BigDecimal sumQty = new BigDecimal(0L);
+			BigDecimal sumGw = new BigDecimal(0L);
+			BigDecimal sumVol = BigDecimal.ZERO;
+			int rowIndex = 0;
+			int cellIndex = 0;
+			//定位箱号位置
+			for (Row row : sheet) {
+				for (Cell cell : row) {
+					String data = getSheetCellValueAsString(sheet, cell.getRowIndex(), cell.getColumnIndex());
+					if ("箱号".equals(data)) {
+						rowIndex = cell.getRowIndex();
+						cellIndex = cell.getColumnIndex();
+					}
 				}
 			}
-		}
-		for (int r = rowIndex + 1; r <= lastRow; r++) {
-			Containers containers = new Containers();
-			containers.setId(null);
-			containers.setPid(bills.getId());
-			containers.setBranchId(bills.getBranchId());
-			containers.setBillNo(bills.getBillNo());
-			containers.setCreateUser(bills.getCreateUser());
-			containers.setCreateUserName(bills.getCreateUserName());
-			containers.setTenantId(bills.getTenantId());
-			containers.setBillNo(bills.getBillNo());
-			containers.setPolId(bills.getPolId());
-			containers.setPolCode(bills.getPolCode());
-			containers.setPolCnName(bills.getPolCnName());
-			containers.setPolEnName(bills.getPolEnName());
-			containers.setPodId(bills.getPodId());
-			containers.setPodCode(bills.getPodCode());
-			containers.setPodCnName(bills.getPodCnName());
-			containers.setPodEnName(bills.getPodEnName());
-			containers.setMblno(bills.getMblno());
-			containers.setHblno(bills.getHblno());
-			containers.setHscode(bills.getHscode());
-			containers.setCommodityShName(bills.getCommodityShName());
-			containers.setCommodityCnName(bills.getCommodityCnName());
-			containers.setCommodityEnName(bills.getCommodityEnName());
-			containers.setCommodityDescr(bills.getCommodityDescr());
-			containers.setMarks(bills.getMarks());
-			containers.setPackingUnitId(bills.getPackingUnitId());
-			containers.setPackingUnit(bills.getPackingUnit());
-			if (ObjectUtils.isNotNull(getSheetCellValueAsString(sheet, r, cellIndex)) &&
-				ObjectUtils.isNotNull(getSheetCellValueAsString(sheet, r, cellIndex + 2))) {
+			for (int r = rowIndex + 1; r <= lastRow; r++) {
+				Containers containers = new Containers();
+				containers.setId(null);
+				containers.setPid(bills.getId());
+				containers.setBranchId(bills.getBranchId());
+				containers.setBillNo(bills.getBillNo());
+				containers.setCreateUser(bills.getCreateUser());
+				containers.setCreateUserName(bills.getCreateUserName());
+				containers.setTenantId(bills.getTenantId());
+				containers.setBillNo(bills.getBillNo());
+				containers.setPolId(bills.getPolId());
+				containers.setPolCode(bills.getPolCode());
+				containers.setPolCnName(bills.getPolCnName());
+				containers.setPolEnName(bills.getPolEnName());
+				containers.setPodId(bills.getPodId());
+				containers.setPodCode(bills.getPodCode());
+				containers.setPodCnName(bills.getPodCnName());
+				containers.setPodEnName(bills.getPodEnName());
+				containers.setMblno(bills.getMblno());
+				containers.setHblno(bills.getHblno());
+				containers.setHscode(bills.getHscode());
+				containers.setCommodityShName(bills.getCommodityShName());
+				containers.setCommodityCnName(bills.getCommodityCnName());
+				containers.setCommodityEnName(bills.getCommodityEnName());
+				containers.setCommodityDescr(bills.getCommodityDescr());
+				containers.setMarks(bills.getMarks());
+				containers.setPackingUnitId(bills.getPackingUnitId());
+				containers.setPackingUnit(bills.getPackingUnit());
+				if (ObjectUtils.isNotNull(getSheetCellValueAsString(sheet, r, cellIndex)) &&
+					ObjectUtils.isNotNull(getSheetCellValueAsString(sheet, r, cellIndex + 2))) {
 //				containerNumberVerification(getSheetCellValueAsString(sheet, r, cellIndex));
-				containers.setCntrNo(getSheetCellValueAsString(sheet, r, cellIndex));
-				containers.setSealNo(getSheetCellValueAsString(sheet, r, cellIndex + 1));
-				containers.setCntrTypeCode(getSheetCellValueAsString(sheet, r, cellIndex + 2));
-				double tare = getSheetCellValueAsDouble(sheet, r, cellIndex + 3);
-				containers.setTare(BigDecimal.valueOf(tare));
-				double vgmWeight = getSheetCellValueAsDouble(sheet, r, cellIndex + 4);
-				containers.setVgmWeight(BigDecimal.valueOf(vgmWeight));
-				double q1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 5);
-				containers.setQuantity(BigDecimal.valueOf(q1));
-				sumQty = sumQty.add(new BigDecimal(q1));
-				double w1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 6);
-				containers.setGrossWeight(BigDecimal.valueOf(w1));
-				sumGw = sumGw.add(new BigDecimal(w1));
-				double v1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 7);
-				containers.setMeasurement(BigDecimal.valueOf(v1));
-				sumVol = sumVol.add(new BigDecimal(v1));
-				containersList.add(containers);
+					containers.setCntrNo(getSheetCellValueAsString(sheet, r, cellIndex));
+					containers.setSealNo(getSheetCellValueAsString(sheet, r, cellIndex + 1));
+					containers.setCntrTypeCode(getSheetCellValueAsString(sheet, r, cellIndex + 2));
+					double tare = getSheetCellValueAsDouble(sheet, r, cellIndex + 3);
+					containers.setTare(BigDecimal.valueOf(tare));
+					double vgmWeight = getSheetCellValueAsDouble(sheet, r, cellIndex + 4);
+					containers.setVgmWeight(BigDecimal.valueOf(vgmWeight));
+					double q1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 5);
+					containers.setQuantity(BigDecimal.valueOf(q1));
+					sumQty = sumQty.add(new BigDecimal(q1));
+					double w1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 6);
+					containers.setGrossWeight(BigDecimal.valueOf(w1));
+					sumGw = sumGw.add(new BigDecimal(w1));
+					double v1 = getSheetCellValueAsDouble(sheet, r, cellIndex + 7);
+					containers.setMeasurement(BigDecimal.valueOf(v1));
+					sumVol = sumVol.add(new BigDecimal(v1));
+					containersList.add(containers);
+				}
 			}
+			if (!containersList.isEmpty()) {
+				bills.setQuantity(containersList.stream().map(Containers::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
+				bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
+				bills.setCfsQuantity(bills.getQuantity());
+				bills.setGrossWeight(containersList.stream().map(Containers::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
+				bills.setCfsGrossWeight(bills.getGrossWeight());
+				bills.setMeasurement(containersList.stream().map(Containers::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
+				bills.setCfsMeasurement(bills.getMeasurement());
+				containersService.saveBatch(containersList);
+			}
+			bills.setContainersList(containersList);
 		}
-		if (!containersList.isEmpty()) {
-			bills.setQuantity(containersList.stream().map(Containers::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
-			bills.setQuantityPackingDescr("SAY " + BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() + " ONLY.");
-			bills.setCfsQuantity(bills.getQuantity());
-			bills.setGrossWeight(containersList.stream().map(Containers::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
-			bills.setCfsGrossWeight(bills.getGrossWeight());
-			bills.setMeasurement(containersList.stream().map(Containers::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP));
-			bills.setCfsMeasurement(bills.getMeasurement());
-			containersService.saveBatch(containersList);
-		}
-		bills.setContainersList(containersList);
 		bills.setPreContainersList(new ArrayList<>());
 		bills.setContainersReportsList(new ArrayList<>());
 		bills.setFeeCenterListC(new ArrayList<>());

+ 3 - 1
blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java

@@ -81,6 +81,8 @@ public class AuditProecessController extends BladeController {
 		lambdaQueryWrapper.eq(StringUtils.isNotBlank(auditProecess.getAuditStatus()), LosAuditProecess::getAuditStatus, auditProecess.getAuditStatus());//审核状态
 		lambdaQueryWrapper.eq(auditProecess.getCorpId() != null, LosAuditProecess::getCorpId, auditProecess.getCorpId());//往来单位
 		lambdaQueryWrapper.like(StringUtils.isNotBlank(auditProecess.getBillNo()), LosAuditProecess::getBillNo, auditProecess.getBillNo());//业务编号
+		lambdaQueryWrapper.like(StringUtils.isNotBlank(auditProecess.getMblno()), LosAuditProecess::getMblno, auditProecess.getMblno());//业务编号
+		lambdaQueryWrapper.like(StringUtils.isNotBlank(auditProecess.getHblno()), LosAuditProecess::getHblno, auditProecess.getHblno());//业务编号
 		lambdaQueryWrapper.like(StringUtils.isNotBlank(auditProecess.getReferenceNumber()), LosAuditProecess::getReferenceNumber, auditProecess.getReferenceNumber());//参考号
 		lambdaQueryWrapper.eq(auditProecess.getSendUserId() != null, LosAuditProecess::getSendUserId, auditProecess.getSendUserId());//请核人id
 		lambdaQueryWrapper.gt(auditProecess.getApplybegintime() != null, LosAuditProecess::getSendTime, auditProecess.getApplybegintime());//请核时间
@@ -95,9 +97,9 @@ public class AuditProecessController extends BladeController {
 			lambdaQueryWrapper.lt(LosAuditProecess::getEtd, auditProecess.getEtdList().get(1));
 		}
 		lambdaQueryWrapper.ne(StringUtils.isBlank(auditProecess.getAuditStatus()), LosAuditProecess::getAuditStatus, "N");
-		lambdaQueryWrapper.like(LosAuditProecess::getAuditUserId, String.valueOf(AuthUtil.getUserId()));//审核人id
 		if (!AuthUtil.getUserRole().contains("总部") && !AuthUtil.getUserRole().contains("admin")) {
 			lambdaQueryWrapper.eq(LosAuditProecess::getSalesCompanyId, AuthUtil.getDeptId());
+			lambdaQueryWrapper.like(LosAuditProecess::getAuditUserId, String.valueOf(AuthUtil.getUserId()));//审核人id
 		} else {
 			lambdaQueryWrapper.eq(ObjectUtils.isNotNull(auditProecess.getSalesCompanyId()), LosAuditProecess::getSalesCompanyId, auditProecess.getSalesCompanyId());
 		}

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -176,6 +176,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 			auditProecess.setReferenceNumber(auditProecessDTO.getReferenceNumber());
 			auditProecess.setSrcBusType(auditProecessDTO.getSrcBusType());
 			auditProecess.setEtd(auditProecessDTO.getEtd());
+			auditProecess.setMblno(auditProecess.getMblno());
+			auditProecess.setHblno(auditProecess.getHblno());
 			//除了第一级是待审,其他都N
 			if (e.getLevelId() == 1) {
 				SimpleDateFormat simpleDateFormat = new SimpleDateFormat();

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/ftp/controller/TestController.java

@@ -56,7 +56,7 @@ public class TestController {
 	 */
 	@SneakyThrows
 	@GetMapping("/emptyContainerEntryFtp")
-	public R emptyContainerEntryFtp(@RequestParam("corpId") Long corpId) {
-		return cyFtpService.ftpFilesHandle(corpId);
+	public R emptyContainerEntryFtp(@RequestParam("corpId") Long corpId,@RequestParam("type") String type) {
+		return cyFtpService.ftpFilesHandle(corpId,type);
 	}
 }

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/CyFtpService.java

@@ -11,5 +11,5 @@ import org.springframework.web.multipart.MultipartFile;
 public interface CyFtpService {
 
 
-	R ftpFilesHandle(Long corpId);
+	R ftpFilesHandle(Long corpId,String type);
 }

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/impl/CyFtpServiceImpl.java

@@ -29,7 +29,7 @@ public class CyFtpServiceImpl implements CyFtpService {
 	private final IBCorpsService bCorpsService;
 
 	@Override
-	public R ftpFilesHandle(Long corpId) {
+	public R ftpFilesHandle(Long corpId,String type) {
 		BCorps bCorps = bCorpsService.getById(corpId);
 		String server = bCorps.getEdiFtp();
 		int port = 21;
@@ -78,7 +78,7 @@ public class CyFtpServiceImpl implements CyFtpService {
 				ex.printStackTrace();
 			}
 		}
-		return null;
+		return R.data("操作成功");
 	}
 
 	public static List<ContainerMovement> parseEdifactMessage(InputStream inputStream) throws IOException {

+ 4 - 0
blade-service/blade-los/src/main/java/org/springblade/los/statisticAnalysis/service/impl/StatisticAnalysisServiceImpl.java

@@ -1324,6 +1324,7 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getWhetherSettlement()), FeeCenter::getStlStatus, feeSettlementExcel.getWhetherSettlement())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getBillNo()), FeeCenter::getBillNo, feeSettlementExcel.getBillNo())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getMblno()), FeeCenter::getMblno, feeSettlementExcel.getMblno())
+			.like(ObjectUtils.isNotNull(feeSettlementExcel.getHblno()), FeeCenter::getHblno, feeSettlementExcel.getHblno())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getSrcNo()), FeeCenter::getMblno, feeSettlementExcel.getSrcNo())
 			.ge(ObjectUtils.isNotNull(feeSettlementExcel.getStartDate()), FeeCenter::getBillDate, feeSettlementExcel.getStartDate())
 			.le(ObjectUtils.isNotNull(feeSettlementExcel.getEndDate()), FeeCenter::getBillDate, feeSettlementExcel.getEndDate());
@@ -1367,6 +1368,7 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			feeSettlementExcel1.setCorpName(item.getCorpCnName());
 			feeSettlementExcel1.setBillNo(item.getBillNo());
 			feeSettlementExcel1.setMblno(item.getMblno());
+			feeSettlementExcel1.setHblno(item.getHblno());
 			feeSettlementExcel1.setSrcNo(item.getBillNo());
 			if (ObjectUtils.isNotNull(item.getBillDate())) {
 				feeSettlementExcel1.setBillDate(dateFormat.format(item.getBillDate()));
@@ -1398,6 +1400,7 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getWhetherSettlement()), FeeCenter::getStlStatus, feeSettlementExcel.getWhetherSettlement())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getBillNo()), FeeCenter::getBillNo, feeSettlementExcel.getBillNo())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getMblno()), FeeCenter::getMblno, feeSettlementExcel.getMblno())
+			.like(ObjectUtils.isNotNull(feeSettlementExcel.getHblno()), FeeCenter::getHblno, feeSettlementExcel.getHblno())
 			.like(ObjectUtils.isNotNull(feeSettlementExcel.getSrcNo()), FeeCenter::getMblno, feeSettlementExcel.getSrcNo())
 			.ge(ObjectUtils.isNotNull(feeSettlementExcel.getStartDate()), FeeCenter::getBillDate, feeSettlementExcel.getStartDate())
 			.le(ObjectUtils.isNotNull(feeSettlementExcel.getEndDate()), FeeCenter::getBillDate, feeSettlementExcel.getEndDate());
@@ -1440,6 +1443,7 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			feeSettlementExcel1.setCorpName(item.getCorpCnName());
 			feeSettlementExcel1.setBillNo(item.getBillNo());
 			feeSettlementExcel1.setMblno(item.getMblno());
+			feeSettlementExcel1.setHblno(item.getHblno());
 			feeSettlementExcel1.setSrcNo(item.getBillNo());
 			if (ObjectUtils.isNotNull(item.getBillDate())) {
 				feeSettlementExcel1.setBillDate(dateFormat.format(item.getBillDate()));