Browse Source

2024年10月21日09:47:31

纪新园 1 year ago
parent
commit
a15c6c85b1

+ 5 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Containers.java

@@ -175,6 +175,11 @@ public class Containers implements Serializable {
 	@ApiModelProperty(value = "尺码箱型")
 	private String cntrTypeCode;
 	/**
+	 * 尺码箱型Id
+	 */
+	@ApiModelProperty(value = "尺码箱型Id")
+	private String cntrTypeCodeId;
+	/**
 	 * 铅封号
 	 */
 	@ApiModelProperty(value = "铅封号")

+ 5 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/PreContainers.java

@@ -99,6 +99,11 @@ public class PreContainers implements Serializable {
 	 */
 	@ApiModelProperty(value = "集装箱 ISO 尺码箱型")
 	private String cntrTypeCode;
+	/**
+	 * 集装箱 ISO 尺码箱型Id
+	 */
+	@ApiModelProperty(value = "集装箱 ISO 尺码箱型Id")
+	private String cntrTypeCodeId;
 
 	/**
 	 * TEU

+ 6 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/entity/FeeCenter.java

@@ -960,5 +960,11 @@ public class FeeCenter implements Serializable {
 	@ApiModelProperty(value = "货物名称")
 	private String goodsName;
 
+	/**
+	 * 主表客户简称
+	 */
+	@ApiModelProperty(value = "主表客户简称")
+	private String billShortName;
+
 }
 

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

@@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.seata.spring.annotation.GlobalTransactional;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
@@ -164,6 +163,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 	public R<Map<String, Object>> getReportData(String billId, String reportCode, String groupCode, String corpIds,
 												String itemIds, String type, String curCode) {
 		Map<String, Object> map = new HashMap<>();
+		if (ObjectUtils.isNull(billId)) {
+			throw new RuntimeException("缺少比要参数");
+		}
 		R<Dept> res = sysClient.getDept(deptUtils.getDeptPid());
 		Dept dept;
 		if (res.isSuccess() && res.getData() != null) {
@@ -185,9 +187,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 			.eq(BCurrency::getTenantId, AuthUtil.getTenantId())
 			.eq(BCurrency::getIsDeleted, 0)
 			.eq(BCurrency::getCode, MagicValues.USD));
-		List<BCorps> bCorpsLists = bCorpsService.list(new LambdaQueryWrapper<BCorps>()
+		/*List<BCorps> bCorpsLists = bCorpsService.list(new LambdaQueryWrapper<BCorps>()
 			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
-			.eq(BCorps::getIsDeleted, 0));
+			.eq(BCorps::getIsDeleted, 0));*/
 		if (MagicValues.BUSINESS.equals(reportCode) && MagicValues.SALES_REPORT.equals(groupCode) && (MagicValues.HYCK.equals(type) || MagicValues.HYJK.equals(type))) {
 			List<Bills> list = new ArrayList<>();
 			String profitMargin = sysClient.getParamServiceNew(MagicValues.PROFIT_MARGIN);
@@ -220,14 +222,27 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 								.in(FeeCenter::getPid, ids)
 								.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
 								.eq(FeeCenter::getIsDeleted, 0));
+							if (feeCenterListMh.isEmpty()) {
+								throw new RuntimeException("请先维护费用信息");
+							}
 							for (FeeCenter item : feeCenterListMh) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							for (Bills item : billsList) {
@@ -301,13 +316,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
 						.eq(FeeCenter::getIsDeleted, 0));
 					for (FeeCenter item : feeCenterList) {
-						BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-						if (bCorps != null) {
-							item.setCorpCnName(bCorps.getShortName());
+						if (ObjectUtils.isNotNull(item.getShortName())) {
+							item.setCorpCnName(item.getShortName());
+						} else {
+							/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+							if (bCorps != null) {
+								item.setCorpCnName(bCorps.getShortName());
+							}*/
+							item.setCorpCnName("无");
 						}
-						BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-						if (bCorp != null) {
-							item.setBillCorpCnName(bCorp.getShortName());
+						if (ObjectUtils.isNotNull(item.getBillShortName())) {
+							item.setBillCorpCnName(item.getBillShortName());
+						} else {
+							/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+							if (bCorp != null) {
+								item.setBillCorpCnName(bCorp.getShortName());
+							}*/
+							item.setBillCorpCnName("无");
 						}
 					}
 					if (!feeCenterList.isEmpty()) {
@@ -384,15 +409,28 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							.eq(FeeCenter::getPid, bills.getId())
 							.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
 							.eq(FeeCenter::getIsDeleted, 0));
+						if (feeCenterList.isEmpty()) {
+							throw new RuntimeException("请先维护费用信息");
+						}
 						if (!feeCenterList.isEmpty()) {
 							for (FeeCenter item : feeCenterList) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							List<FeeCenter> feeCenters = feeCenterList.stream()
@@ -463,13 +501,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
 							.eq(FeeCenter::getIsDeleted, 0));
 						for (FeeCenter item : feeCenterListMh) {
-							BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-							if (bCorps != null) {
-								item.setCorpCnName(bCorps.getShortName());
+							if (ObjectUtils.isNotNull(item.getShortName())) {
+								item.setCorpCnName(item.getShortName());
+							} else {
+								/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+								if (bCorps != null) {
+									item.setCorpCnName(bCorps.getShortName());
+								}*/
+								item.setCorpCnName("无");
 							}
-							BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-							if (bCorp != null) {
-								item.setBillCorpCnName(bCorp.getShortName());
+							if (ObjectUtils.isNotNull(item.getBillShortName())) {
+								item.setBillCorpCnName(item.getBillShortName());
+							} else {
+								/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+								if (bCorp != null) {
+									item.setBillCorpCnName(bCorp.getShortName());
+								}*/
+								item.setBillCorpCnName("无");
 							}
 						}
 						List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
@@ -796,13 +844,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -915,13 +973,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -1500,13 +1568,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -1602,13 +1680,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -1743,13 +1831,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									}
 									feeCenterListMh.addAll(amendFeeCenterList);
 									for (FeeCenter items : feeCenterListMh) {
-										BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
-										if (bCorps != null) {
-											items.setCorpCnName(bCorps.getShortName());
+										if (ObjectUtils.isNotNull(items.getShortName())) {
+											items.setCorpCnName(items.getShortName());
+										} else {
+											/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
+											if (bCorps != null) {
+												items.setCorpCnName(bCorps.getShortName());
+											}*/
+											items.setCorpCnName("无");
 										}
-										BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
-										if (bCorp != null) {
-											items.setBillCorpCnName(bCorp.getShortName());
+										if (ObjectUtils.isNotNull(items.getBillShortName())) {
+											items.setBillCorpCnName(items.getBillShortName());
+										} else {
+											/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
+											if (bCorp != null) {
+												items.setBillCorpCnName(bCorp.getShortName());
+											}*/
+											items.setBillCorpCnName("无");
 										}
 									}
 									List<FeeCenter> feeCenterList = feeCenterListMh.stream()
@@ -1903,13 +2001,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						feeCenterList.addAll(amendFeeCenterList);
 						if (!feeCenterList.isEmpty()) {
 							for (FeeCenter item : feeCenterList) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
@@ -2066,13 +2174,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							feeCenterList.addAll(amendFeeCenterList);
 							if (!feeCenterList.isEmpty()) {
 								for (FeeCenter item : feeCenterList) {
-									BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-									if (bCorps != null) {
-										item.setCorpCnName(bCorps.getShortName());
+									if (ObjectUtils.isNotNull(item.getShortName())) {
+										item.setCorpCnName(item.getShortName());
+									} else {
+										/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+										if (bCorps != null) {
+											item.setCorpCnName(bCorps.getShortName());
+										}*/
+										item.setCorpCnName("无");
 									}
-									BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-									if (bCorp != null) {
-										item.setBillCorpCnName(bCorp.getShortName());
+									if (ObjectUtils.isNotNull(item.getBillShortName())) {
+										item.setBillCorpCnName(item.getBillShortName());
+									} else {
+										/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+										if (bCorp != null) {
+											item.setBillCorpCnName(bCorp.getShortName());
+										}*/
+										item.setBillCorpCnName("无");
 									}
 								}
 								feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
@@ -2226,13 +2344,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							}
 							feeCenterListMh.addAll(amendFeeCenterList);
 							for (FeeCenter item : feeCenterListMh) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
@@ -2653,13 +2781,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									}
 									feeCenterListMh.addAll(amendFeeCenterList);
 									for (FeeCenter items : feeCenterListMh) {
-										BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
-										if (bCorps != null) {
-											items.setCorpCnName(bCorps.getShortName());
+										if (ObjectUtils.isNotNull(items.getShortName())) {
+											items.setCorpCnName(items.getShortName());
+										} else {
+											/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
+											if (bCorps != null) {
+												items.setCorpCnName(bCorps.getShortName());
+											}*/
+											items.setCorpCnName("无");
 										}
-										BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
-										if (bCorp != null) {
-											items.setBillCorpCnName(bCorp.getShortName());
+										if (ObjectUtils.isNotNull(items.getBillShortName())) {
+											items.setBillCorpCnName(items.getBillShortName());
+										} else {
+											/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
+											if (bCorp != null) {
+												items.setBillCorpCnName(bCorp.getShortName());
+											}*/
+											items.setBillCorpCnName("无");
 										}
 									}
 									List<FeeCenter> feeCenterList = feeCenterListMh.stream()
@@ -2813,13 +2951,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						feeCenterList.addAll(amendFeeCenterList);
 						if (!feeCenterList.isEmpty()) {
 							for (FeeCenter item : feeCenterList) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
@@ -2976,13 +3124,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							feeCenterList.addAll(amendFeeCenterList);
 							if (!feeCenterList.isEmpty()) {
 								for (FeeCenter item : feeCenterList) {
-									BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-									if (bCorps != null) {
-										item.setCorpCnName(bCorps.getShortName());
+									if (ObjectUtils.isNotNull(item.getShortName())) {
+										item.setCorpCnName(item.getShortName());
+									} else {
+										/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+										if (bCorps != null) {
+											item.setCorpCnName(bCorps.getShortName());
+										}*/
+										item.setCorpCnName("无");
 									}
-									BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-									if (bCorp != null) {
-										item.setBillCorpCnName(bCorp.getShortName());
+									if (ObjectUtils.isNotNull(item.getBillShortName())) {
+										item.setBillCorpCnName(item.getBillShortName());
+									} else {
+										/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+										if (bCorp != null) {
+											item.setBillCorpCnName(bCorp.getShortName());
+										}*/
+										item.setBillCorpCnName("无");
 									}
 								}
 								feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
@@ -3136,13 +3294,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							}
 							feeCenterListMh.addAll(amendFeeCenterList);
 							for (FeeCenter item : feeCenterListMh) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
@@ -3486,13 +3654,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 								.eq(FeeCenter::getIsDeleted, 0));
 							for (AeaBills item : billsList) {
 								for (FeeCenter items : feeCenterListMh) {
-									BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
-									if (bCorps != null) {
-										items.setCorpCnName(bCorps.getShortName());
+									if (ObjectUtils.isNotNull(items.getShortName())) {
+										items.setCorpCnName(items.getShortName());
+									} else {
+										/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(items.getCorpId())).findFirst().orElse(null);
+										if (bCorps != null) {
+											items.setCorpCnName(bCorps.getShortName());
+										}*/
+										items.setCorpCnName("无");
 									}
-									BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
-									if (bCorp != null) {
-										items.setBillCorpCnName(bCorp.getShortName());
+									if (ObjectUtils.isNotNull(items.getBillShortName())) {
+										items.setBillCorpCnName(items.getBillShortName());
+									} else {
+										/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(items.getBillCorpId())).findFirst().orElse(null);
+										if (bCorp != null) {
+											items.setBillCorpCnName(bCorp.getShortName());
+										}*/
+										items.setBillCorpCnName("无");
 									}
 								}
 								List<FeeCenter> feeCenterList = feeCenterListMh.stream()
@@ -3566,13 +3744,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						.eq(FeeCenter::getIsDeleted, 0));
 					if (!feeCenterList.isEmpty()) {
 						for (FeeCenter item : feeCenterList) {
-							BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-							if (bCorps != null) {
-								item.setCorpCnName(bCorps.getShortName());
+							if (ObjectUtils.isNotNull(item.getShortName())) {
+								item.setCorpCnName(item.getShortName());
+							} else {
+								/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+								if (bCorps != null) {
+									item.setCorpCnName(bCorps.getShortName());
+								}*/
+								item.setCorpCnName("无");
 							}
-							BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-							if (bCorp != null) {
-								item.setBillCorpCnName(bCorp.getShortName());
+							if (ObjectUtils.isNotNull(item.getBillShortName())) {
+								item.setBillCorpCnName(item.getBillShortName());
+							} else {
+								/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+								if (bCorp != null) {
+									item.setBillCorpCnName(bCorp.getShortName());
+								}*/
+								item.setBillCorpCnName("无");
 							}
 						}
 						List<FeeCenter> feeCenters = feeCenterList.stream()
@@ -3650,13 +3838,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							.eq(FeeCenter::getIsDeleted, 0));
 						if (!feeCenterList.isEmpty()) {
 							for (FeeCenter item : feeCenterList) {
-								BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-								if (bCorps != null) {
-									item.setCorpCnName(bCorps.getShortName());
+								if (ObjectUtils.isNotNull(item.getShortName())) {
+									item.setCorpCnName(item.getShortName());
+								} else {
+									/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+									if (bCorps != null) {
+										item.setCorpCnName(bCorps.getShortName());
+									}*/
+									item.setCorpCnName("无");
 								}
-								BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-								if (bCorp != null) {
-									item.setBillCorpCnName(bCorp.getShortName());
+								if (ObjectUtils.isNotNull(item.getBillShortName())) {
+									item.setBillCorpCnName(item.getBillShortName());
+								} else {
+									/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+									if (bCorp != null) {
+										item.setBillCorpCnName(bCorp.getShortName());
+									}*/
+									item.setBillCorpCnName("无");
 								}
 							}
 							List<FeeCenter> feeCenters = feeCenterList.stream()
@@ -3727,13 +3925,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
 							.eq(FeeCenter::getIsDeleted, 0));
 						for (FeeCenter item : feeCenterListMh) {
-							BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-							if (bCorps != null) {
-								item.setCorpCnName(bCorps.getShortName());
+							if (ObjectUtils.isNotNull(item.getShortName())) {
+								item.setCorpCnName(item.getShortName());
+							} else {
+								/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+								if (bCorps != null) {
+									item.setCorpCnName(bCorps.getShortName());
+								}*/
+								item.setCorpCnName("无");
 							}
-							BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-							if (bCorp != null) {
-								item.setBillCorpCnName(bCorp.getShortName());
+							if (ObjectUtils.isNotNull(item.getBillShortName())) {
+								item.setBillCorpCnName(item.getBillShortName());
+							} else {
+								/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+								if (bCorp != null) {
+									item.setBillCorpCnName(bCorp.getShortName());
+								}*/
+								item.setBillCorpCnName("无");
 							}
 						}
 						List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
@@ -3968,13 +4176,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -4086,13 +4304,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -4175,13 +4403,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					.eq(FeeCenter::getIsDeleted, 0));
 				if (!feeCenterList.isEmpty()) {
 					for (FeeCenter item : feeCenterList) {
-						BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-						if (bCorps != null) {
-							item.setCorpCnName(bCorps.getShortName());
+						if (ObjectUtils.isNotNull(item.getShortName())) {
+							item.setCorpCnName(item.getShortName());
+						} else {
+							/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+							if (bCorps != null) {
+								item.setCorpCnName(bCorps.getShortName());
+							}*/
+							item.setCorpCnName("无");
 						}
-						BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-						if (bCorp != null) {
-							item.setBillCorpCnName(bCorp.getShortName());
+						if (ObjectUtils.isNotNull(item.getBillShortName())) {
+							item.setBillCorpCnName(item.getBillShortName());
+						} else {
+							/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+							if (bCorp != null) {
+								item.setBillCorpCnName(bCorp.getShortName());
+							}*/
+							item.setBillCorpCnName("无");
 						}
 					}
 					List<FeeCenter> feeCenters = feeCenterList.stream()
@@ -4337,13 +4575,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -4444,13 +4692,23 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				BigDecimal amountProfitLoc;
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						/*BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
+						if (bCorps != null) {
+							item.setCorpCnName(bCorps.getShortName());
+						}*/
+						item.setCorpCnName("无");
 					}
-					BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
-					if (bCorp != null) {
-						item.setBillCorpCnName(bCorp.getShortName());
+					if (ObjectUtils.isNotNull(item.getBillShortName())) {
+						item.setBillCorpCnName(item.getBillShortName());
+					} else {
+						/*BCorps bCorp = bCorpsLists.stream().filter(e -> e.getId().equals(item.getBillCorpId())).findFirst().orElse(null);
+						if (bCorp != null) {
+							item.setBillCorpCnName(bCorp.getShortName());
+						}*/
+						item.setBillCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {

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

@@ -176,6 +176,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		} else {
 			bills.setBillDate(bills.getEta());
 		}
+		BCorps corps = ibCorpsService.getById(bills.getCorpId());
 		if (ObjectUtils.isNotNull(bills.getBillDate())) {
 			LocalDate date = bills.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
 			int year = date.getYear();
@@ -481,6 +482,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				item.setBillCorpId(bills.getCorpId());
 				item.setBillCorpCnName(bills.getCorpCnName());
 				item.setBillCorpEnName(bills.getCorpEnName());
+				if (corps != null){
+					item.setBillShortName(corps.getShortName());
+				}
 				item.setLineId(bills.getLineId());
 				item.setLineCnName(bills.getLineCnName());
 				item.setLineEnName(bills.getLineEnName());
@@ -533,6 +537,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				item.setBillCorpId(bills.getCorpId());
 				item.setBillCorpCnName(bills.getCorpCnName());
 				item.setBillCorpEnName(bills.getCorpEnName());
+				if (corps != null){
+					item.setBillShortName(corps.getShortName());
+				}
 				item.setLineId(bills.getLineId());
 				item.setLineCnName(bills.getLineCnName());
 				item.setLineEnName(bills.getLineEnName());

+ 19 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterServiceImpl.java

@@ -111,6 +111,12 @@ public class FeeCenterServiceImpl extends ServiceImpl<FeeCenterMapper, FeeCenter
 				deptName = String.join(",", res.getData());
 			}
 		}
+		if (ObjectUtils.isNotNull(feeCenter.getBillCorpId())){
+			BCorps corps = bCorpsService.getById(feeCenter.getBillCorpId());
+			if (corps != null){
+				feeCenter.setBillShortName(corps.getShortName());
+			}
+		}
 		if (feeCenter.getId() == null) {
 			feeCenter.setCreateTime(new Date());
 			feeCenter.setCreateUser(AuthUtil.getUserId());
@@ -533,7 +539,14 @@ public class FeeCenterServiceImpl extends ServiceImpl<FeeCenterMapper, FeeCenter
 		}
 		List<FeeCenter> feeCenterList = new ArrayList<>();
 		if (ObjectUtils.isNotNull(list) && !list.isEmpty()) {
+			BCorps corps = null;
+			if (ObjectUtils.isNotNull(list.get(0).getBillCorpId())){
+				 corps = bCorpsService.getById(list.get(0).getBillCorpId());
+			}
 			for (FeeCenter feeCenter : list) {
+				if (corps != null){
+					feeCenter.setBillShortName(corps.getShortName());
+				}
 				if (feeCenter.getId() == null) {
 					feeCenter.setCreateTime(new Date());
 					feeCenter.setCreateUser(AuthUtil.getUserId());
@@ -1102,6 +1115,12 @@ public class FeeCenterServiceImpl extends ServiceImpl<FeeCenterMapper, FeeCenter
 				deptName = String.join(",", res.getData());
 			}
 		}
+		if (ObjectUtils.isNotNull(feeCenter.getBillCorpId())){
+			BCorps corps = bCorpsService.getById(feeCenter.getBillCorpId());
+			if (corps != null){
+				feeCenter.setBillShortName(corps.getShortName());
+			}
+		}
 		if (feeCenter.getId() == null) {
 			feeCenter.setCreateTime(new Date());
 			feeCenter.setCreateUser(AuthUtil.getUserId());

+ 10 - 11
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/AgentServiceImpl.java

@@ -3412,9 +3412,6 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 	@Override
 	public R getReportDataTrade(String billId, String reportCode, String groupCode, String corpIds, String itemIds, String type) {
 		Map<String, Object> map = new HashMap<>();
-		List<BCorps> bCorpsLists = bCorpsService.list(new LambdaQueryWrapper<BCorps>()
-			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
-			.eq(BCorps::getIsDeleted, 0));
 		if (MagicValues.BUSINESS.equals(reportCode) && MagicValues.ORDER_ALLOCATION.equals(groupCode) && MagicValues.MYDL.equals(type)) {
 			Agent agent = baseMapper.selectById(billId);
 			DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
@@ -3443,7 +3440,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 					.eq(AgentItems::getIsDeleted, 0)
 					.eq(AgentItems::getTenantId, AuthUtil.getTenantId())
 					.eq(AgentItems::getPid, billId));
-				for (AgentItems item :agentItemsList){
+				for (AgentItems item : agentItemsList) {
 					AgentFpReport agentFpReport = new AgentFpReport();
 					agentFpReport.setInvoiceNumber(item.getInvoiceNo());
 					agentFpReport.setProduct(item.getLabelProductName());
@@ -3789,7 +3786,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 				String serviceCharge = sysClient.getParamServiceByDept("service.charge", AuthUtil.getTenantId(), AuthUtil.getDeptId());
 				if (ObjectUtils.isNotNull(serviceCharge)) {
 					BigDecimal serviceChargeAmount = new BigDecimal("1").divide(new BigDecimal(serviceCharge), serviceCharge.length(), RoundingMode.HALF_UP);
-					BigDecimal amount = serviceChargeAmount.multiply(discountAmount).setScale(2,RoundingMode.HALF_UP);
+					BigDecimal amount = serviceChargeAmount.multiply(discountAmount).setScale(2, RoundingMode.HALF_UP);
 					if (amount.compareTo(new BigDecimal("1000")) > 0) {
 						agentFeeReport.setReportServiceCharge(new BigDecimal("1000"));
 					} else if (amount.compareTo(new BigDecimal("50")) < 0) {
@@ -3874,9 +3871,10 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 				BigDecimal amountDrLoc = new BigDecimal(MagicValues.ZERO);
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						item.setCorpCnName("无");
 					}
 					if (MagicValues.D.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {
@@ -3958,9 +3956,10 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 				BigDecimal amountCrLoc = new BigDecimal(MagicValues.ZERO);
 				List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 				for (FeeCenter item : feeCenterList) {
-					BCorps bCorps = bCorpsLists.stream().filter(e -> e.getId().equals(item.getCorpId())).findFirst().orElse(null);
-					if (bCorps != null) {
-						item.setCorpCnName(bCorps.getShortName());
+					if (ObjectUtils.isNotNull(item.getShortName())) {
+						item.setCorpCnName(item.getShortName());
+					} else {
+						item.setCorpCnName("无");
 					}
 					if (MagicValues.C.equals(item.getDc())) {
 						if (MagicValues.USD.equals(item.getCurCode())) {