Browse Source

2024年12月10日17:21:57

纪新园 1 year ago
parent
commit
a2822787fc

+ 22 - 16
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsController.java

@@ -437,9 +437,30 @@ public class BCorpsController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入bCorps")
 	public R<List<BCorps>> list(BCorps bCorps) {
+		List<Long> corpIds = new ArrayList<>();
+		if (ObjectUtils.isNotNull(bCorps.getCorpTypeName())){
+			List<Long> typeIds = new ArrayList<>();
+			LambdaQueryWrapper<BCorpsTypeDefine> lambdaQueryWrapperTypes = new LambdaQueryWrapper<>();
+			lambdaQueryWrapperTypes.eq(BCorpsTypeDefine::getTenantId, AuthUtil.getTenantId())
+				.eq(BCorpsTypeDefine::getIsDeleted, 0)
+				.apply(ObjectUtils.isNotNull(bCorps.getCorpTypeName()), "find_in_set(cn_name,'" + bCorps.getCorpTypeName() + "')");
+			List<BCorpsTypeDefine> bCorpsTypeList = bCorpsTypeDefineService.list(lambdaQueryWrapperTypes);
+			if (!bCorpsTypeList.isEmpty()) {
+				typeIds = bCorpsTypeList.stream().map(BCorpsTypeDefine::getId).distinct().collect(Collectors.toList());
+			}
+			LambdaQueryWrapper<BCorpsTypes> lambdaQueryWrapperType = new LambdaQueryWrapper<>();
+			lambdaQueryWrapperType.eq(BCorpsTypes::getTenantId, AuthUtil.getTenantId())
+				.eq(BCorpsTypes::getIsDeleted, 0)
+				.in(!typeIds.isEmpty(), BCorpsTypes::getCorpTypeId, typeIds);
+			List<BCorpsTypes> bCorpsTypesList = bCorpsTypesService.list(lambdaQueryWrapperType);
+			if (!bCorpsTypesList.isEmpty()) {
+				corpIds = bCorpsTypesList.stream().map(BCorpsTypes::getCorpId).distinct().collect(Collectors.toList());
+			}
+		}
 		LambdaQueryWrapper<BCorps> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(BCorps::getTenantId, AuthUtil.getTenantId())
 			.eq(BCorps::getIsDeleted, 0)
+			.in(!corpIds.isEmpty(), BCorps::getId, corpIds)
 			.like(ObjectUtils.isNotNull(bCorps.getCode()), BCorps::getCode, bCorps.getCode())
 			.eq(ObjectUtils.isNotNull(bCorps.getStatus()), BCorps::getStatus, bCorps.getStatus())
 			.and(ObjectUtils.isNotNull(bCorps.getCnName()), i -> i.like(BCorps::getCnName, bCorps.getCnName()).or()
@@ -455,21 +476,6 @@ public class BCorpsController extends BladeController {
 			.like(ObjectUtils.isNotNull(bCorps.getCorpSource()), BCorps::getCorpSource, bCorps.getCorpSource())
 			.like(ObjectUtils.isNotNull(bCorps.getTel()), BCorps::getTel, bCorps.getTel())
 			.like(ObjectUtils.isNotNull(bCorps.getAdminProfiles()), BCorps::getAdminProfiles, bCorps.getAdminProfiles());
-		LambdaQueryWrapper<BCorpsTypeDefine> typeDefineLambdaQueryWrapper = new LambdaQueryWrapper<>();
-		typeDefineLambdaQueryWrapper.eq(BCorpsTypeDefine::getTenantId, AuthUtil.getTenantId())
-			.eq(BCorpsTypeDefine::getIsDeleted, 0);
-		typeDefineLambdaQueryWrapper.eq(BCorpsTypeDefine::getCorpType, "PS客户");
-		BCorpsTypeDefine typeDefine = bCorpsTypeDefineService.getOne(typeDefineLambdaQueryWrapper);
-		if ("1".equals(bCorps.getType())) {
-			if (typeDefine != null) {
-				lambdaQueryWrapper.apply("find_in_set('" + typeDefine.getId() + "',corp_type)");
-			}
-		} else {
-			if (typeDefine != null) {
-				lambdaQueryWrapper.ne(BCorps::getCorpType, typeDefine.getId());
-			}
-			lambdaQueryWrapper.apply(ObjectUtils.isNotNull(bCorps.getCorpType()), "find_in_set('" + bCorps.getCorpType() + "',corp_type)");
-		}
 		String status = sysClient.getParamServiceNew("basic.data.sort");
 		if ("name".equals(status)) {
 			lambdaQueryWrapper.orderByDesc(BCorps::getCnName);
@@ -478,7 +484,7 @@ public class BCorpsController extends BladeController {
 		} else {
 			lambdaQueryWrapper.orderByDesc(BCorps::getCreateTime);
 		}
-		List<BCorps> pages = bCorpsService.list( lambdaQueryWrapper);
+		List<BCorps> pages = bCorpsService.list(lambdaQueryWrapper);
 		return R.data(pages);
 	}
 

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

@@ -6541,6 +6541,10 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				if (resDictBiz.isSuccess() && ObjectUtils.isNotNull(resDictBiz.getData())) {
 					bills.setHpaymode(resDictBiz.getData().getRemark());
 				}
+				R<DictBiz> resDictBiz1 = dictBizClient.getDictBiz("issue_type_F", bills.getIssueType(), AuthUtil.getTenantId());
+				if (resDictBiz1.isSuccess() && ObjectUtils.isNotNull(resDictBiz1.getData())) {
+					bills.setIssueType(resDictBiz1.getData().getRemark());
+				}
 				SeaBillsDetail seaBillsDetail = seaBillsDetailService.getOne(new LambdaQueryWrapper<SeaBillsDetail>()
 					.eq(SeaBillsDetail::getTenantId, AuthUtil.getTenantId())
 					.eq(SeaBillsDetail::getPid, bills.getId()));
@@ -6596,7 +6600,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					bills.setMforwarderDetails(seaBillsDetail.getMforwarderDetails());
 				}
 //				bills.setFM(MagicValues.FM);
-				bills.setCapitalLetters(BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit());
+				bills.setCapitalLetters("SAY "+BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() +" ONLY.");
 				bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
 				BigDecimal boxWeightSum = BigDecimal.ZERO;
 				List<ContainersReports> containersReportsList = new ArrayList<>();
@@ -6702,8 +6706,12 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				if (resDictBiz.isSuccess() && ObjectUtils.isNotNull(resDictBiz.getData())) {
 					bills.setHpaymode(resDictBiz.getData().getRemark());
 				}
+				R<DictBiz> resDictBiz1 = dictBizClient.getDictBiz("issue_type_F", bills.getIssueType(), AuthUtil.getTenantId());
+				if (resDictBiz1.isSuccess() && ObjectUtils.isNotNull(resDictBiz1.getData())) {
+					bills.setIssueType(resDictBiz1.getData().getRemark());
+				}
 //				bills.setFM(MagicValues.FM);
-				bills.setCapitalLetters(BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit());
+				bills.setCapitalLetters("SAY "+BigDecimalUtils.convertToEnglish(bills.getQuantity()) + " " + bills.getPackingUnit() +" ONLY.");
 				bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
 				BigDecimal boxWeightSum = BigDecimal.ZERO;
 				List<Containers> containersList = containersService.list(new LambdaQueryWrapper<Containers>()