Browse Source

Merge remote-tracking branch 'origin/dev' into dev

liyuan 4 months ago
parent
commit
bbeee81969
13 changed files with 635 additions and 139 deletions
  1. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/check/entity/LosAuditProecess.java
  2. 6 0
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java
  3. 10 6
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java
  4. 7 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/aea/service/impl/AeaBillsServiceImpl.java
  5. 20 27
      blade-service/blade-los/src/main/java/org/springblade/los/business/amends/service/impl/AmendsServiceImpl.java
  6. 12 21
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java
  7. 13 19
      blade-service/blade-los/src/main/java/org/springblade/los/business/generalBill/service/impl/GeneralBillServiceImpl.java
  8. 18 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IDataProcessingService.java
  9. 51 35
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  10. 441 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/DataProcessingImplService.java
  11. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java
  12. 12 28
      blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/service/impl/FinStlBillsServiceImpl.java
  13. 8 0
      blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java

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

@@ -365,6 +365,42 @@ public class LosAuditProecess implements Serializable {
 	private Date etd;
 
 	/**
+	 * 自定义1
+	 */
+	@ApiModelProperty(value = "自定义1")
+	private String customizeOne;
+
+	/**
+	 * 自定义2
+	 */
+	@ApiModelProperty(value = "自定义2")
+	private String customizeTwo;
+
+	/**
+	 * 自定义3
+	 */
+	@ApiModelProperty(value = "自定义3")
+	private Date customizeThree;
+
+	/**
+	 * 自定义4
+	 */
+	@ApiModelProperty(value = "自定义4")
+	private String customizeFour;
+
+	/**
+	 * 自定义5
+	 */
+	@ApiModelProperty(value = "自定义5")
+	private String customizeFive;
+
+	/**
+	 * 自定义6
+	 */
+	@ApiModelProperty(value = "自定义6")
+	private String customizeSix;
+
+	/**
 	 * 开船日期
 	 */
 	@TableField(exist = false)

+ 6 - 0
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java

@@ -79,6 +79,8 @@ public interface IUserClient {
 
 	String GET_USER_LIST_BY_ROLE = API_PREFIX + "/getUserListByRole";
 
+	String GET_USER_BY_DEPT =  "/getUserByDept";
+
 	@GetMapping(LIST_USER_BY_ROLE_ID)
 	R<List<User>> listUserByRoleId(@RequestParam("roleId") String roleId, @RequestParam(value = "tenantId", required = false) String tenantId, @RequestParam(value = "salesCompanyId", required = false) String salesCompanyId);
 
@@ -314,4 +316,8 @@ public interface IUserClient {
 
 	@GetMapping(GET_USER_LIST_BY_ROLE)
 	List<User> selectListByRole(@RequestParam(value = "tenantId", required = false) String tenantId);
+
+	@GetMapping(GET_USER_BY_DEPT)
+    List<User> getUserByDept(@RequestParam(value = "deptPid", required = false)Long deptPid,
+							 @RequestParam(value = "tenantId", required = false) String tenantId);
 }

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

@@ -1448,7 +1448,11 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						BigDecimal PsRate = new BigDecimal(BigInteger.ZERO);
 						Integer corpIsDC = 0;
 						if (ObjectUtils.isNotNull(bCorps11)) {
-							PsRate = new BigDecimal(bCorps11.getPsRate());
+							if("外部报价".equals(item.getQuotationMethod())){
+								PsRate = new BigDecimal(bCorps11.getPsRateExternal());
+							}else {
+								PsRate = new BigDecimal(bCorps11.getPsRate());
+							}
 							if (ObjectUtils.isNotNull(bCorps11.getCorpTypeName()) && bCorps11.getCorpTypeName().contains("国内直接客户")) {
 								corpIsDC = 1;
 							}
@@ -1467,7 +1471,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							BCorps bCorps13 = bCorpsService.getById(hpsCorpId);
 							if (ObjectUtils.isNotNull(bCorps13)) {
 								Long ownerCorpId = ObjectUtils.isNotNull(bCorps13.getCorpId()) ? bCorps13.getCorpId() : 0L;
-								if (ownerCorpId > 0 && (ownerCorpId.equals(item.getCorpId()) || ownerCorpId.equals(item.getCarrierId()) || ownerCorpId.equals(hpsCorpId))) {
+								if (ownerCorpId.equals(item.getCorpId()) || ownerCorpId.equals(item.getCarrierId()) || hpsCorpId.equals(item.getCorpId())) {
 									isPS = ObjectUtils.isNotNull(bCorps13.getIsPs()) && bCorps13.getIsPs() == 1;
 								}
 							}
@@ -1506,7 +1510,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 											BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
 											ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
 											BigDecimal psr2 = new BigDecimal(1).subtract(specPsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
-											ps_ps += "公司比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+											ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
 										}
 									}
 								}
@@ -1519,7 +1523,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 											BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
 											ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
 											BigDecimal psr2 = new BigDecimal(1).subtract(PsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
-											ps_ps += "公司比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+											ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
 										}
 									}
 								}
@@ -2797,7 +2801,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 											BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
 											ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
 											BigDecimal psr2 = new BigDecimal(1).subtract(specPsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
-											ps_ps += "公司比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+											ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
 										}
 									}
 								}
@@ -2810,7 +2814,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 											BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
 											ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
 											BigDecimal psr2 = new BigDecimal(1).subtract(PsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
-											ps_ps += "公司比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+											ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
 										}
 									}
 								}

+ 7 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/aea/service/impl/AeaBillsServiceImpl.java

@@ -23,8 +23,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
@@ -47,6 +45,7 @@ import org.springblade.los.business.amends.entity.Amends;
 import org.springblade.los.business.amends.mapper.AmendsMapper;
 import org.springblade.los.business.files.entity.FilesCenter;
 import org.springblade.los.business.files.service.IFilesCenterService;
+import org.springblade.los.business.sea.service.IDataProcessingService;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -117,6 +116,8 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 
 	private final AmendsMapper amendsMapper;
 
+	private final IDataProcessingService dataProcessingUtil;
+
 	@Override
 	public IPage<AeaBillsVO> selectAeaBillsPage(IPage<AeaBillsVO> page, AeaBillsVO aeaBills) {
 		return page.setRecords(baseMapper.selectAeaBillsPage(page, aeaBills));
@@ -821,6 +822,10 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getAccDept());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType(processType);
 		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()

+ 20 - 27
blade-service/blade-los/src/main/java/org/springblade/los/business/amends/service/impl/AmendsServiceImpl.java

@@ -40,6 +40,7 @@ import org.springblade.los.business.amends.service.IAmendsService;
 import org.springblade.los.business.amends.vo.AmendsVO;
 import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.business.sea.mapper.BillsMapper;
+import org.springblade.los.business.sea.service.IDataProcessingService;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -106,6 +107,8 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 
 	private final FinPeriodMapper finPeriodMapper;
 
+	private final IDataProcessingService dataProcessingUtil;
+
 	@Override
 	public IPage<AmendsVO> selectAmendsPage(IPage<AmendsVO> page, AmendsVO amends) {
 		return page.setRecords(baseMapper.selectAmendsPage(page, amends));
@@ -114,17 +117,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R submit(Amends amends) {
-		String deptId = "";
-		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
-		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
-			deptId = deptUtils.getDeptPid()+"";
-			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
-			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
-				deptName = String.join(",", res.getData());
-			}
-		}
 		amends.setBillDate(new Date());
 		if (ObjectUtils.isNotNull(amends.getBillDate())) {
 			LocalDate date = amends.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
@@ -165,11 +158,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			//amends.setCreateTime(new Date());
 			amends.setCreateUser(AuthUtil.getUserId());
 			amends.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
-				amends.setBranchId(branchId);
-				amends.setCreateDept(deptId);
-				amends.setCreateDeptName(deptName);
-			}
+			amends.setBranchId(branchId);
 		} else {
 			amends.setUpdateUser(AuthUtil.getUserId());
 			amends.setUpdateTime(new Date());
@@ -179,7 +168,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 		if (ObjectUtils.isNotNull(amends.getFeeCenterList())) {
 			for (FeeCenter item : amends.getFeeCenterList()) {
 				item.setBillNo(amends.getBillNo());
-				if ("SEA".equals(amends.getBusinessType())){
+				if ("SEA".equals(amends.getBusinessType())) {
 					item.setBillDate(amends.getEtd());
 				} else if ("SIA".equals(amends.getBusinessType())) {
 					item.setBillDate(amends.getEta());
@@ -250,35 +239,35 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			actId = 1112;
 			processType = "空运进口AMEND";
 			checkType = "aia-approve";
-		}else if ("EXPA".equals(declare.getBusinessType())) {
+		} else if ("EXPA".equals(declare.getBusinessType())) {
 			actId = 1129;
 			processType = "快递业务amend审核";
 			checkType = "EXPA";
-		}else if ("TRUCKA".equals(declare.getBusinessType())) {
+		} else if ("TRUCKA".equals(declare.getBusinessType())) {
 			actId = 1135;
 			processType = "海运派车amend审核";
 			checkType = "TRUCKA";
-		}else if ("MFAA".equals(declare.getBusinessType())) {
+		} else if ("MFAA".equals(declare.getBusinessType())) {
 			actId = 1133;
 			processType = "空运舱单amend审核";
 			checkType = "MFAA";
-		}else if ("MFSA".equals(declare.getBusinessType())) {
+		} else if ("MFSA".equals(declare.getBusinessType())) {
 			actId = 1131;
 			processType = "海运舱单amend审核";
 			checkType = "MFSA";
-		}else if ("BGSEA".equals(declare.getBusinessType())) {
+		} else if ("BGSEA".equals(declare.getBusinessType())) {
 			actId = 1136;
 			processType = "海运出口报关amend审核";
 			checkType = "BGSEA";
-		}else if ("BGSIA".equals(declare.getBusinessType())) {
+		} else if ("BGSIA".equals(declare.getBusinessType())) {
 			actId = 1137;
 			processType = "海运进口报关amend审核";
 			checkType = "BGSIA";
-		}else if ("BGAEA".equals(declare.getBusinessType())) {
+		} else if ("BGAEA".equals(declare.getBusinessType())) {
 			actId = 1138;
 			processType = "空运出口报关amend审核";
 			checkType = "BGAEA";
-		}else if ("BGAIA".equals(declare.getBusinessType())) {
+		} else if ("BGAIA".equals(declare.getBusinessType())) {
 			actId = 1139;
 			processType = "空运进口报关amend审核";
 			checkType = "BGAIA";
@@ -295,18 +284,22 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			.eq(LosAuditPathsActs::getIsEnable, 1)
 			.eq(LosAuditPathsActs::getFidStatus, "status")
 			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId())
-			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid() + "")
 			.eq(LosAuditPathsActs::getActId, actId);
 		pathsActs = auditPathsActsService.getOne(auditPathsActsLambdaQueryWrapper);
 		//获取审批信息
 		LosAuditPathsActs losAuditPathsActs = auditPathsActsService.getOne(new LambdaQueryWrapper<LosAuditPathsActs>()
 			.eq(LosAuditPathsActs::getActId, actId)
 			.eq(LosAuditPathsActs::getFidStatus, "status")
-			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid() + "")
 			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId()));
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getCreateDept());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType(processType);
 		// 没开启审批流直接走 通过流程
@@ -384,7 +377,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 
 			auditProecessDTO.setGrossProfit(amountCnyD.subtract(amountCnyC));
 			auditProecessDTO.setGrossProfitUsd(amountUsdD.subtract(amountUsdC));
-			auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "","1")));
+			auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "", "1")));
 			auditProecessDTO.setSalesCompanyName(declare.getCreateDeptName());
 			auditProecessDTO.setSrcId(declare.getSrcId());
 			auditProecessDTO.setSrcCnName(declare.getSrcCnName());

+ 12 - 21
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java

@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 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;
@@ -34,7 +33,6 @@ import org.springblade.los.basic.business.service.IBusinessTypeService;
 import org.springblade.los.basic.cur.service.IBCurrencyService;
 import org.springblade.los.billno.entity.BusinessBillNo;
 import org.springblade.los.billno.service.IBusinessBillNoService;
-import org.springblade.los.business.aea.entity.AeaBills;
 import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
 import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
 import org.springblade.los.business.customsDeclaration.mapper.CustomsDeclarationMapper;
@@ -43,6 +41,7 @@ import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarati
 import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationVO;
 import org.springblade.los.business.files.entity.FilesCenter;
 import org.springblade.los.business.files.service.IFilesCenterService;
+import org.springblade.los.business.sea.service.IDataProcessingService;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -104,6 +103,8 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 
 	private final FinPeriodMapper finPeriodMapper;
 
+	private final IDataProcessingService dataProcessingUtil;
+
 	@Override
 	public IPage<CustomsDeclarationVO> selectCustomsDeclarationPage(IPage<CustomsDeclarationVO> page, CustomsDeclarationVO customsDeclaration) {
 		return page.setRecords(baseMapper.selectCustomsDeclarationPage(page, customsDeclaration));
@@ -141,20 +142,10 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public R submit(CustomsDeclaration customsDeclarations) throws Exception{
-		Object object = StringTools.handle(customsDeclarations,"CustomsDeclaration");
+	public R submit(CustomsDeclaration customsDeclarations) throws Exception {
+		Object object = StringTools.handle(customsDeclarations, "CustomsDeclaration");
 		CustomsDeclaration customsDeclaration = JSONObject.parseObject(JSONObject.toJSONString(object), CustomsDeclaration.class);
-		String deptId = "";
-		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
-		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
-			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
-				deptName = String.join(",", res.getData());
-			}
-		}
 		if (ObjectUtils.isNotNull(customsDeclaration.getMblno())) {
 			customsDeclaration.setMblno(customsDeclaration.getMblno().replaceAll(" ", ""));
 		}
@@ -212,11 +203,7 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 			customsDeclaration.setCreateTime(new Date());
 			customsDeclaration.setCreateUser(AuthUtil.getUserId());
 			customsDeclaration.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				customsDeclaration.setBranchId(branchId);
-				customsDeclaration.setCreateDept(deptId);
-				customsDeclaration.setCreateDeptName(deptName);
-			}
+			customsDeclaration.setBranchId(branchId);
 		} else {
 			List<Long> ids = count.stream().map(CustomsDeclaration::getId).distinct().collect(Collectors.toList());
 			if (ObjectUtils.isNotNull(customsDeclaration.getMblno())) {
@@ -314,7 +301,7 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 			customsDeclaration.setAccountStatus(1);
 		} else if (0 == statusD && 1 == statusC) {
 			customsDeclaration.setAccountStatus(2);
-		}else if (1 == statusD && 1 == statusC) {
+		} else if (1 == statusD && 1 == statusC) {
 			customsDeclaration.setAccountStatus(3);
 		}
 		//利润 = 收 - 付
@@ -387,6 +374,10 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getAccDept());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType(processType);
 		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
@@ -461,7 +452,7 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 
 			auditProecessDTO.setGrossProfit(amountCnyD.subtract(amountCnyC));
 			auditProecessDTO.setGrossProfitUsd(amountUsdD.subtract(amountUsdC));
-			auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "","1")));
+			auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "", "1")));
 
 			auditProecessDTO.setSalesCompanyName(declare.getCreateDeptName());
 			R financeProcess = auditProecessService.createFinanceProcess(auditProecessDTO);

+ 13 - 19
blade-service/blade-los/src/main/java/org/springblade/los/business/generalBill/service/impl/GeneralBillServiceImpl.java

@@ -34,6 +34,7 @@ import org.springblade.los.business.generalBill.entity.GeneralBill;
 import org.springblade.los.business.generalBill.mapper.GeneralBillMapper;
 import org.springblade.los.business.generalBill.service.IGeneralBillService;
 import org.springblade.los.business.generalBill.vo.GeneralBillVO;
+import org.springblade.los.business.sea.service.IDataProcessingService;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -51,10 +52,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -83,6 +81,8 @@ public class GeneralBillServiceImpl extends ServiceImpl<GeneralBillMapper, Gener
 
 	private final IAuditProecessService auditProecessService;
 
+	private final IDataProcessingService dataProcessingUtil;
+
 	@Override
 	public IPage<GeneralBillVO> selectGeneralBillPage(IPage<GeneralBillVO> page, GeneralBillVO generalBill) {
 		return page.setRecords(baseMapper.selectGeneralBillPage(page, generalBill));
@@ -117,17 +117,7 @@ public class GeneralBillServiceImpl extends ServiceImpl<GeneralBillMapper, Gener
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R submit(GeneralBill generalBill) {
-		String deptId = "";
-		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
-		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(branchId)) {
-			deptId = deptUtils.getDeptPid() + "";
-			R<List<String>> res = sysClient.getDeptNames(branchId);
-			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
-				deptName = String.join(",", res.getData());
-			}
-		}
 		if (generalBill.getId() == null) {
 			BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
 				.select(BusinessType::getId)
@@ -151,11 +141,7 @@ public class GeneralBillServiceImpl extends ServiceImpl<GeneralBillMapper, Gener
 			generalBill.setCreateUser(AuthUtil.getUserId());
 			generalBill.setCreateUserName(AuthUtil.getUserName());
 			generalBill.setTenantId(AuthUtil.getTenantId());
-			if (ObjectUtils.isNotNull(branchId)) {
-				generalBill.setBranchId(branchId);
-				generalBill.setCreateDept(deptId);
-				generalBill.setCreateDeptName(deptName);
-			}
+			generalBill.setBranchId(branchId);
 			// 初始创建为1
 			generalBill.setVersion("1");
 			this.save(generalBill);
@@ -349,6 +335,10 @@ public class GeneralBillServiceImpl extends ServiceImpl<GeneralBillMapper, Gener
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getAccDept());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType(processType);
 		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
@@ -416,6 +406,10 @@ public class GeneralBillServiceImpl extends ServiceImpl<GeneralBillMapper, Gener
 			auditProecessDTO.setSrcId(declare.getSrcId());
 			auditProecessDTO.setSrcCnName(declare.getSrcCnName());
 			auditProecessDTO.setSrcEnName(declare.getSrcEnName());
+			Map<String,Object> map = dataProcessingUtil.profitStatus(declare.getId(), declare.getBusinessType(),feeCenterList);
+			if (ObjectUtils.isNotNull(map)){
+				auditProecessDTO.setCustomizeTwo(map.get("profitStatusText").toString());
+			}
 			R financeProcess = auditProecessService.createFinanceProcess(auditProecessDTO);
 			if (!financeProcess.isSuccess()) {
 				throw new SecurityException("操作失败,请联系管理员");

+ 18 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IDataProcessingService.java

@@ -0,0 +1,18 @@
+package org.springblade.los.business.sea.service;
+
+import org.springblade.los.check.entity.LosAuditPathsLevels;
+import org.springblade.los.finance.fee.entity.FeeCenter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :jixinyuan
+ * @date : 2025/8/4
+ */
+public interface IDataProcessingService {
+
+	 List<LosAuditPathsLevels> toExamine(List<LosAuditPathsLevels> auditPathsLevels, String deptId);
+
+	Map<String,Object> profitStatus(Long id, String businessType, List<FeeCenter> feeCenterList);
+}

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

@@ -158,6 +158,8 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 	private final ZrUtil zrUtil;
 
+	private final IDataProcessingService dataProcessingUtil;
+
 
 	@Override
 	public IPage<BillsVO> selectBillsPage(IPage<BillsVO> page, BillsVO bills) {
@@ -193,28 +195,28 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 		List<Bills> count = null;
 		// 只判断海运出口
-		if("SE".equals(bills.getBusinessType()) && ObjectUtils.isNotNull(bills.getMblno())){
+		if ("SE".equals(bills.getBusinessType()) && ObjectUtils.isNotNull(bills.getMblno())) {
 			// 改为同一团队内,Booking+MblNo 不重复
 			LambdaQueryWrapper<Bills> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 			lambdaQueryWrapper.select(Bills::getId);
 			// CreateDept 是一级部门,总公司,分公司等
 			lambdaQueryWrapper.eq(Bills::getCreateDept, branchId)
-				 .eq(Bills::getTenantId, AuthUtil.getTenantId())
-				 .eq(Bills::getIsDeleted, 0)
-				 .eq(Bills::getTeamId, bills.getTeamId())
-				 .eq(Bills::getMblno, bills.getMblno());
-			if(ObjectUtils.isNotNull(bills.getBookingNo())) {
+				.eq(Bills::getTenantId, AuthUtil.getTenantId())
+				.eq(Bills::getIsDeleted, 0)
+				.eq(Bills::getTeamId, bills.getTeamId())
+				.eq(Bills::getMblno, bills.getMblno());
+			if (ObjectUtils.isNotNull(bills.getBookingNo())) {
 				lambdaQueryWrapper.eq(Bills::getBookingNo, bills.getBookingNo());
 			}
-			if(ObjectUtils.isNotNull(bills.getId())) {
+			if (ObjectUtils.isNotNull(bills.getId())) {
 				lambdaQueryWrapper.ne(Bills::getId, bills.getId());
 			}
 
 			List<String> billTypes = new ArrayList<>();
-			if("DDMM".contains(bills.getBillType())){
+			if ("DDMM".contains(bills.getBillType())) {
 				billTypes.add("DD");
 				billTypes.add("MM");
-			}else{
+			} else {
 				billTypes.add("MH");
 				billTypes.add("HH");
 			}
@@ -223,7 +225,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			count = baseMapper.selectList(lambdaQueryWrapper);
 		}
 
-		if(ObjectUtils.isNotNull(count) && count.size()>0){
+		if (ObjectUtils.isNotNull(count) && count.size() > 0) {
 			throw new RuntimeException("提单号不允许重复输入:" + bills.getMblno());
 		}
 
@@ -1440,6 +1442,10 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getAccDept());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType(processType);
 		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
@@ -1532,23 +1538,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			auditProecessDTO.setPageStatus(bills.getPageStatus());
 			auditProecessDTO.setPageLabel(bills.getPageLabel());
 			auditProecessDTO.setOrderRemark(declare.getRemarks());
-			List<LosAuditPathsLevels> pathsLevelsList = bills.getAuditPathsLevels();
-			if (ObjectUtils.isNotNull(pathsLevelsList) && !pathsLevelsList.isEmpty()) {
-				List<Long> idList = pathsLevelsList.stream().map(LosAuditPathsLevels::getId).collect(Collectors.toList());
-				List<LosAuditPathsLevels> levelsList = new ArrayList<>();
-				for (LosAuditPathsLevels item : auditPathsLevels) {
-					if (2 == item.getUserMold()) {
-						if (idList.contains(item.getId())) {
-							levelsList.add(item);
-						}
-					} else {
-						levelsList.add(item);
-					}
-				}
-				auditProecessDTO.setPathsLevelsList(levelsList);
-			} else {
-				auditProecessDTO.setPathsLevelsList(auditPathsLevels);
-			}
+			auditProecessDTO.setPathsLevelsList(auditPathsLevels);
 			auditProecessDTO.setActId(1);
 			auditProecessDTO.setSrcBillId(declare.getId());
 			auditProecessDTO.setBillId(declare.getId());
@@ -1601,6 +1591,19 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			} else if ("SI".equals(declare.getBusinessType())) {
 				auditProecessDTO.setEtd(declare.getEta());
 			}
+			auditProecessDTO.setCustomizeOne(declare.getMblno());
+			Map<String, Object> map = dataProcessingUtil.profitStatus(declare.getId(), declare.getBusinessType(), feeCenterList);
+			if (ObjectUtils.isNotNull(map)) {
+				auditProecessDTO.setCustomizeTwo(map.get("profitStatusText").toString());
+			}
+			if ("SE".equals(declare.getBusinessType())) {
+				auditProecessDTO.setCustomizeThree(declare.getEtd());
+			} else if ("SI".equals(declare.getBusinessType())) {
+				auditProecessDTO.setCustomizeThree(declare.getEta());
+			}
+			auditProecessDTO.setCustomizeFour(declare.getShortName());
+			auditProecessDTO.setCustomizeFive(declare.getCarrierShortName());
+			auditProecessDTO.setCustomizeSix(declare.getCyShortName());
 			R financeProcess = auditProecessService.createFinanceProcess(auditProecessDTO);
 			if (!financeProcess.isSuccess()) {
 				throw new SecurityException("操作失败,请联系管理员");
@@ -1615,7 +1618,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 	@Transactional(rollbackFor = Exception.class)
 	public Bills revokeCheckOrder(Bills bills) {
 		Bills declare = baseMapper.selectById(bills.getId());
-		if (3 == declare.getStatus()) {
+		if (declare.getStatus() > 1) {
 			throw new SecurityException("审核已通过,撤销失败");
 		}
 		R financeProcess = auditProecessService.deteleByBillId(bills.getId());
@@ -3593,7 +3596,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 		List<Bills> count = null;
 		// 只判断海运出口
-		if("SE".equals(bills.getBusinessType()) && ObjectUtils.isNotNull(bills.getMblno())){
+		if ("SE".equals(bills.getBusinessType()) && ObjectUtils.isNotNull(bills.getMblno())) {
 			// 改为同一团队内,Booking+MblNo 不重复
 			LambdaQueryWrapper<Bills> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 			lambdaQueryWrapper.select(Bills::getId);
@@ -3603,18 +3606,18 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				.eq(Bills::getIsDeleted, 0)
 				.eq(Bills::getTeamId, bills.getTeamId())
 				.eq(Bills::getMblno, bills.getMblno());
-			if(ObjectUtils.isNotNull(bills.getBookingNo())) {
+			if (ObjectUtils.isNotNull(bills.getBookingNo())) {
 				lambdaQueryWrapper.eq(Bills::getBookingNo, bills.getBookingNo());
 			}
-			if(ObjectUtils.isNotNull(bills.getId())) {
+			if (ObjectUtils.isNotNull(bills.getId())) {
 				lambdaQueryWrapper.ne(Bills::getId, bills.getId());
 			}
 
 			List<String> billTypes = new ArrayList<>();
-			if("DDMM".contains(bills.getBillType())){
+			if ("DDMM".contains(bills.getBillType())) {
 				billTypes.add("DD");
 				billTypes.add("MM");
-			}else{
+			} else {
 				billTypes.add("MH");
 				billTypes.add("HH");
 			}
@@ -3623,7 +3626,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			count = baseMapper.selectList(lambdaQueryWrapper);
 		}
 
-		if(ObjectUtils.isNotNull(count) && count.size()>0){
+		if (ObjectUtils.isNotNull(count) && count.size() > 0) {
 			throw new RuntimeException("提单号不允许重复输入:" + bills.getMblno());
 		}
 
@@ -4287,6 +4290,19 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				} else if ("SI".equals(declare.getBusinessType())) {
 					auditProecessDTO.setEtd(declare.getEta());
 				}
+				auditProecessDTO.setCustomizeOne(declare.getMblno());
+				Map<String, Object> map = dataProcessingUtil.profitStatus(declare.getId(), declare.getBusinessType(), feeCenterList);
+				if (ObjectUtils.isNotNull(map)) {
+					auditProecessDTO.setCustomizeTwo(map.get("profitStatusText").toString());
+				}
+				if ("SE".equals(declare.getBusinessType())) {
+					auditProecessDTO.setCustomizeThree(declare.getEtd());
+				} else if ("SI".equals(declare.getBusinessType())) {
+					auditProecessDTO.setCustomizeThree(declare.getEta());
+				}
+				auditProecessDTO.setCustomizeFour(declare.getShortName());
+				auditProecessDTO.setCustomizeFive(declare.getCarrierShortName());
+				auditProecessDTO.setCustomizeSix(declare.getCyShortName());
 				R financeProcess = auditProecessService.createFinanceProcess(auditProecessDTO);
 				if (!financeProcess.isSuccess()) {
 					throw new SecurityException("操作失败,请联系管理员");
@@ -4322,7 +4338,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			throw new RuntimeException("未查到单据信息");
 		}
 		for (Bills declare : billsList) {
-			if (3 == declare.getStatus()) {
+			if (declare.getStatus() > 1) {
 				throw new SecurityException("审核已通过,撤销失败");
 			}
 			R financeProcess = auditProecessService.deteleByBillId(declare.getId());

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

@@ -0,0 +1,441 @@
+package org.springblade.los.business.sea.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.los.Util.IDeptUtils;
+import org.springblade.los.Util.MagicValues;
+import org.springblade.los.basic.corps.entity.BCorps;
+import org.springblade.los.basic.corps.service.IBCorpsService;
+import org.springblade.los.business.sea.mapper.BillsMapper;
+import org.springblade.los.business.sea.service.IBillsService;
+import org.springblade.los.business.sea.service.IDataProcessingService;
+import org.springblade.los.check.entity.LosAuditPathsLevels;
+import org.springblade.los.finance.fee.entity.FeeCenter;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.stereotype.Service;
+
+import org.springblade.los.business.sea.entity.*;
+import org.springblade.los.business.sea.service.*;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author :jixinyuan
+ * @date : 2025/8/4
+ */
+@Service
+@AllArgsConstructor
+public class DataProcessingImplService implements IDataProcessingService {
+
+
+	private final IUserClient userClient;
+
+	private final IDeptUtils deptUtils;
+
+	private final BillsMapper billsMapper;
+
+	private final IBCorpsService bCorpsService;
+
+
+	@Override
+	public List<LosAuditPathsLevels> toExamine(List<LosAuditPathsLevels> auditPathsLevels, String deptId) {
+		List<User> userList = userClient.getUserByDept(deptUtils.getDeptPid(), AuthUtil.getTenantId());
+		for (LosAuditPathsLevels item : auditPathsLevels) {
+			StringBuilder userIds = new StringBuilder();
+			//角色
+			if (1 == item.getUserMold()) {
+				List<Long> moldList = Func.toLongList(item.getAuditMoldId());
+				if (!userList.isEmpty() && !moldList.isEmpty()) {
+					for (Long mold : moldList) {
+						List<Long> userIdList = userList.stream().filter(e -> e.getRoleId().contains(mold + "")
+								&& e.getDeptId().equals(deptId) )
+							.map(User::getId).collect(Collectors.toList());
+						for (Long userId : userIdList) {
+							userIds.append(userId).append(",");
+						}
+					}
+				}
+				if (ObjectUtils.isNotNull(userIds.toString()) && ",".equals(userIds.substring(userIds.length() - 1))) {
+					item.setAuditUserId(userIds.substring(0, userIds.length() - 1));
+				} else {
+					throw new RuntimeException("未查到对应审核人");
+				}
+			} else if (2 == item.getUserMold()) {
+				//部门
+				List<Long> deptList = Func.toLongList(item.getAuditMoldId());
+				if (!userList.isEmpty() && !deptList.isEmpty()) {
+					for (Long dept : deptList) {
+						List<Long> deptIdList = userList.stream().filter(e -> e.getDeptId().equals(dept + ""))
+							.map(User::getId).collect(Collectors.toList());
+						for (Long userId : deptIdList) {
+							userIds.append(userId).append(",");
+						}
+					}
+				}
+				if (ObjectUtils.isNotNull(userIds.toString()) && ",".equals(userIds.substring(userIds.length() - 1))) {
+					item.setAuditUserId(userIds.substring(0, userIds.length() - 1));
+				} else {
+					throw new RuntimeException("未查到对应审核人");
+				}
+			} else if (3 == item.getUserMold()) {
+				item.setAuditUserId(item.getAuditUserId());
+			}
+
+		}
+		return auditPathsLevels;
+	}
+
+	@Override
+	public Map<String,Object> profitStatus(Long id, String businessType, List<FeeCenter> feeCenterList) {
+		if(ObjectUtils.isNull(id) || id<=0){
+			throw new RuntimeException("PS: 缺少业务 id!");
+		}
+		if(ObjectUtils.isNull(businessType) || businessType.isEmpty()){
+			throw new RuntimeException("PS: 缺少业务类型!");
+		}
+
+		List<FeeCenter> fcList = ObjectUtils.isNotNull(feeCenterList) ? feeCenterList : new ArrayList<>();
+		if(fcList.isEmpty()){
+
+		}
+
+		if("SE,SI".contains(businessType)){
+			return profitStatus_HY(id, businessType, fcList);
+		// }else if("SEA".equals(businessType) || "SEI".equals(businessType)){
+		//	return profitStatus_HY(id, businessType, fcList);
+		}
+
+		return null;
+	}
+
+	public Map<String,Object> profitStatus_HY(Long id, String businessType, List<FeeCenter> feeCenterList) {
+		Map<String, Object> R = new HashMap<>();
+
+		Bills bill = billsMapper.selectOne(new LambdaQueryWrapper<Bills>()
+			.select(Bills::getId, Bills::getQuotationMethod, Bills::getCorpId, Bills::getCarrierId,
+				Bills::getHpaymode, Bills::getMpaymode, Bills::getBillType, Bills::getHblno)
+			.eq(Bills::getId, id)
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0));
+
+		if (ObjectUtils.isNull(bill)) {
+			throw new RuntimeException("请核的业务 id 不存在");
+		}
+
+		// 费用名称
+		// 1722822288795000833	O/F		海运费	145
+		// 1722823384343011329	P/S		P/S		220
+		// 1746015648988901393	HP/S	HP/S	623
+		// 特殊 PS 客户名称
+		// 1425		W0077	W0077
+		// 1561		W0091	W0091
+		// 3415		W0256	W0256
+		// 5110		W0312	W0312
+		// 6363		W0380	W0380
+		// 10120	W0582	W0582
+		// 11794	W0643	W0643
+		// 12247	W0661	W0661
+		// 12431	W0675	W0675
+		// 12731	W0689	W0689
+		// 'F':aAuditItem.RefNo2:='正常';
+		// 'M':aAuditItem.RefNo2:='为负';
+		// 'H':aAuditItem.RefNo2:='过高';
+		// 'L':aAuditItem.RefNo2:='过低';
+		// 'U':aAuditItem.RefNo2:='不成比例';
+		// 'D':aAuditItem.RefNo2:='不成比例且过低';
+
+		String specPScorpIds = ",1425,1561,3415,5110,6363,10120,11794,12247,12431,12731,";
+
+		BigDecimal usdOFProfit = new BigDecimal(BigInteger.ZERO);
+		BigDecimal ofInAmtProfit = new BigDecimal(BigInteger.ZERO);
+		Integer ofCNYCount = 0;
+
+		BigDecimal HPSProfit = new BigDecimal(BigInteger.ZERO);
+		BigDecimal specProfit = new BigDecimal(BigInteger.ZERO);
+		BigDecimal specInAmtProfit = new BigDecimal(BigInteger.ZERO);
+
+		BigDecimal psProfit = new BigDecimal(BigInteger.ZERO);
+		BigDecimal psInAmtProfit = new BigDecimal(BigInteger.ZERO);
+
+		// 特殊ps客户 Id
+		Long specPSCorpId = 0L;
+		// 高收退费客户 Id
+		Long hpsCorpId = 0L;
+
+		for (FeeCenter fee : feeCenterList) {
+			if (specPSCorpId == 0 && ObjectUtils.isNotNull(fee.getCorpId())) {
+				if (specPScorpIds.indexOf("," + fee.getCorpId().toString() + ",") >= 0) {
+					specPSCorpId = fee.getCorpId();
+				}
+			}
+			BigDecimal amt = fee.getAmount();
+			if (MagicValues.C.equals(fee.getDc())) {
+				amt = amt.multiply(new BigDecimal(-1));
+			}
+			if (MagicValues.USD.equals(fee.getCurCode())) {
+				if ("O/F".equals(fee.getFeeCode())) {
+					// 145
+					usdOFProfit = usdOFProfit.add(amt);
+				}
+				if ("P/S".equals(fee.getFeeCode())) {
+					// 220
+					psProfit = psProfit.subtract(amt);
+				}
+				if ("HP/S".equals(fee.getFeeCode())) {
+					if (hpsCorpId == 0 && ObjectUtils.isNotNull(fee.getCorpId())) {
+						hpsCorpId = fee.getCorpId();
+					}
+					// 623
+					HPSProfit = HPSProfit.add(amt);
+					specProfit = specProfit.subtract(amt);
+				}
+			} else {
+				if ("O/F".equals(fee.getFeeCode())) {
+					// 145
+					ofInAmtProfit = ofInAmtProfit.add(amt.divide(new BigDecimal("6.8"), 2, BigDecimal.ROUND_HALF_UP));
+					ofCNYCount += 1;
+				}
+				if ("P/S".equals(fee.getFeeCode())) {
+					// 220
+					psInAmtProfit = psInAmtProfit.add(amt);
+				}
+				if ("HP/S".equals(fee.getFeeCode())) {
+					if (hpsCorpId == 0 && ObjectUtils.isNotNull(fee.getCorpId())) {
+						hpsCorpId = fee.getCorpId();
+					}
+					// 623
+					specInAmtProfit = specInAmtProfit.subtract(amt);
+				}
+			}
+		}
+
+		// 提取客户 PsRate
+		BCorps bCorps11 = bCorpsService.getById(bill.getCorpId());
+		BigDecimal PsRate = new BigDecimal(BigInteger.ZERO);
+		Integer corpIsDC = 0;
+		if (ObjectUtils.isNotNull(bCorps11)) {
+			if ("外部报价".equals(bill.getQuotationMethod())) {
+				PsRate = new BigDecimal(bCorps11.getPsRateExternal());
+			} else {
+				PsRate = new BigDecimal(bCorps11.getPsRate());
+			}
+			if (ObjectUtils.isNotNull(bCorps11.getCorpTypeName()) && bCorps11.getCorpTypeName().contains("国内直接客户")) {
+				corpIsDC = 1;
+			}
+		}
+		BigDecimal specPsRate = new BigDecimal(BigInteger.ZERO);
+		Boolean isPS = false;
+
+		if (specPSCorpId > 0) {
+			BCorps bCorps12 = bCorpsService.getById(specPSCorpId);
+			if (ObjectUtils.isNotNull(bCorps12)) {
+				specPsRate = new BigDecimal(bCorps12.getPsRate());
+			}
+		}
+
+		if (hpsCorpId > 0) {
+			BCorps bCorps13 = bCorpsService.getById(hpsCorpId);
+			if (ObjectUtils.isNotNull(bCorps13)) {
+				Long ownerCorpId = ObjectUtils.isNotNull(bCorps13.getCorpId()) ? bCorps13.getCorpId() : 0L;
+				if (ownerCorpId.equals(bill.getCorpId()) || ownerCorpId.equals(bill.getCarrierId()) || hpsCorpId.equals(bill.getCorpId())) {
+					isPS = ObjectUtils.isNotNull(bCorps13.getIsPs()) && bCorps13.getIsPs() == 1;
+				}
+			}
+		}
+
+		String ps_text = ofCNYCount > 0 ? "(应收/应付)存在RMB海运费" : "";
+		String ps_remarks = "";
+		String ps_ps = "";
+		String ps_spec = "";
+
+		usdOFProfit = usdOFProfit.setScale(2, RoundingMode.HALF_UP);
+		ofInAmtProfit = ofInAmtProfit.setScale(2, RoundingMode.HALF_UP);
+		psInAmtProfit = psInAmtProfit.setScale(2, RoundingMode.HALF_UP);
+		psProfit = psProfit.setScale(2, RoundingMode.HALF_UP);
+		HPSProfit = HPSProfit.setScale(2, RoundingMode.HALF_UP);
+		PsRate = PsRate.setScale(2, RoundingMode.HALF_UP);
+		specPsRate = specPsRate.setScale(2, RoundingMode.HALF_UP);
+		specProfit = specProfit.setScale(2, RoundingMode.HALF_UP);
+		specInAmtProfit = specInAmtProfit.setScale(2, RoundingMode.HALF_UP);
+		if (psInAmtProfit.compareTo(BigDecimal.ZERO) != 0) {
+			ps_remarks += " PS不能出现 RMB 费用\r\n";
+		}
+
+		if ("CC".equals(bill.getMpaymode()) && psProfit.compareTo(BigDecimal.ZERO) != 0) {
+			ps_remarks += " 主单付费方式为CC 不能出现PS\r\n";
+		}
+
+		if (("PP".equals(bill.getMpaymode()) && (MagicValues.DD.equals(bill.getBillType()) || MagicValues.MM.equals(bill.getBillType())))
+			|| ("CC".equals(bill.getMpaymode()) && ObjectUtils.isNotNull(bill.getHblno()))) {
+			if (specPScorpIds.contains("," + specPSCorpId.toString() + ",")) {
+				if (usdOFProfit.compareTo(BigDecimal.ZERO) != 0) {
+					BigDecimal tt1 = usdOFProfit.add(ofInAmtProfit).add(HPSProfit).setScale(2, BigDecimal.ROUND_HALF_UP);
+					if (tt1.compareTo(BigDecimal.ZERO) != 0) {
+						BigDecimal pt1 = psProfit.divide(tt1, 2, BigDecimal.ROUND_HALF_UP);
+						if (pt1.compareTo(specPsRate) > 0) {
+							BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
+							ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
+							BigDecimal psr2 = new BigDecimal(1).subtract(specPsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
+							ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+						}
+					}
+				}
+			} else {
+				if (usdOFProfit.compareTo(BigDecimal.ZERO) != 0) {
+					BigDecimal tt1 = usdOFProfit.add(ofInAmtProfit).add(HPSProfit).setScale(2, BigDecimal.ROUND_HALF_UP);
+					if (tt1.compareTo(BigDecimal.ZERO) != 0) {
+						BigDecimal pt1 = psProfit.divide(tt1, 4, BigDecimal.ROUND_HALF_UP);
+						if (pt1.compareTo(PsRate) > 0) {
+							BigDecimal psr1 = new BigDecimal(1).subtract(pt1).setScale(2, BigDecimal.ROUND_HALF_UP);
+							ps_remarks += " PS比例高,公司比例: " + psr1.toString() + " 系统比例为:" + specPsRate.toString() + "\r\n";
+							BigDecimal psr2 = new BigDecimal(1).subtract(PsRate).setScale(2, BigDecimal.ROUND_HALF_UP);
+							ps_ps += "公司分成比例:" + psr1.toString() + " (" + psr2.toString() + ")\r\n";
+						}
+					}
+				}
+			}
+		} else {
+			if (psProfit.compareTo(BigDecimal.ZERO) != 0) {
+				ps_remarks += "只有预付、直单和主单,或分单和到付才可以输入PS\r\n";
+			}
+		}
+
+		BigDecimal tt2 = specProfit.add(specInAmtProfit).setScale(2, BigDecimal.ROUND_HALF_UP);
+		if (tt2.compareTo(BigDecimal.ZERO) == 1) {
+			if (isPS == true) {
+				ps_spec += "存在高收退费\r\n";
+			} else {
+				ps_remarks += "不应该存在高收退费\r\n";
+				ps_spec += "不应该存在高收退费\r\n";
+			}
+		}
+
+		ps_remarks = ps_remarks.trim();
+		ps_ps = ps_ps.trim();
+
+		R.put("profitStatus", "");
+		R.put("profitRemarks", ps_remarks.trim());
+		R.put("profitSpec", ps_ps.trim() + "\r\n" + ps_spec.trim());
+		R.put("text", ps_text);
+		R.put("corpIsDC", corpIsDC);
+		R.put("ifDCCorp", corpIsDC == 1 ? "DC" : "");
+
+		//   FOverFeeLimit:=Trim(GetSysConst('SEA_ISSUEBILL_OVERFEE_LIMIT', '100000'));
+		// 判断是否国内直客
+
+		BigDecimal sumUSDDr = new BigDecimal(BigInteger.ZERO);
+		BigDecimal sumCNYDr = new BigDecimal(BigInteger.ZERO);
+		BigDecimal sumLocDr = new BigDecimal(BigInteger.ZERO);
+
+		BigDecimal sumUSDCr = new BigDecimal(BigInteger.ZERO);
+		BigDecimal sumCNYCr = new BigDecimal(BigInteger.ZERO);
+		BigDecimal sumLocCr = new BigDecimal(BigInteger.ZERO);
+
+		BigDecimal sumOFPS = new BigDecimal(BigInteger.ZERO);
+		// 当前单据,计算 ProfitStatus
+		for (FeeCenter fee : feeCenterList) {
+			if (MagicValues.C.equals(fee.getDc()) && "P/S".equals(fee.getFeeCode())) {
+				// if("USD".equals(fee.getCurCode())){
+				sumOFPS = sumOFPS.add(fee.getAmountLoc()).setScale(2, BigDecimal.ROUND_HALF_UP);
+			}
+
+			if (MagicValues.D.equals(fee.getDc())) {
+				if ("USD".equals(fee.getCurCode())) {
+					sumUSDDr = sumUSDDr.add(fee.getAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);
+				} else {
+					sumCNYDr = sumCNYDr.add(fee.getAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);
+				}
+				sumLocDr = sumLocDr.add(fee.getAmountLoc()).setScale(2, BigDecimal.ROUND_HALF_UP);
+			}
+
+			if (MagicValues.C.equals(fee.getDc())) {
+				if ("USD".equals(fee.getCurCode())) {
+					sumUSDCr = sumUSDCr.add(fee.getAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);
+				} else {
+					sumCNYCr = sumCNYCr.add(fee.getAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);
+				}
+				sumLocCr = sumLocCr.add(fee.getAmountLoc()).setScale(2, BigDecimal.ROUND_HALF_UP);
+			}
+		}
+
+
+		BigDecimal sumProfitUSD = sumUSDDr.subtract(sumUSDCr).setScale(2, BigDecimal.ROUND_HALF_UP);
+		BigDecimal sumProfitCNY = sumCNYDr.subtract(sumCNYCr).setScale(2, BigDecimal.ROUND_HALF_UP);
+		BigDecimal sumProfitLoc = sumLocDr.subtract(sumLocCr).setScale(2, BigDecimal.ROUND_HALF_UP);
+
+		BigDecimal profitRate = new BigDecimal(BigInteger.ZERO);
+		if (sumLocDr.compareTo(BigDecimal.ZERO) == 1) {
+			profitRate = sumProfitLoc.divide(sumLocDr, 4, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
+		}
+
+		String profitStatus = "F";
+		if (!ps_ps.isEmpty()) {
+			profitStatus = "U";
+		}
+		if (sumProfitLoc.compareTo(BigDecimal.ZERO) == 0) {
+			profitStatus = "Z";
+		} else if (sumProfitLoc.compareTo(BigDecimal.ZERO) < 0) {
+			profitStatus = "M";
+		} else if (sumLocDr.compareTo(BigDecimal.ZERO) > 0) {
+			if (profitRate.compareTo(new BigDecimal("0.4")) >= 0) {
+				profitStatus = "H";
+			} else if (profitRate.compareTo(new BigDecimal("0.02")) < 0) {
+				profitStatus = "U".equals(profitStatus) ? "D" : "L";
+			}
+		}
+
+		R.put("profitStatus", profitStatus);
+		switch (profitStatus) {
+			case "Z":
+				R.put("profitStatusText", "为零");
+				R.put("profitStatusCnText", "利润为零");
+				R.put("profitStatusEnText", "Profit was zero!");
+				break;
+			case "D":
+				R.put("profitStatusText", "不成比例且过低");
+				R.put("profitStatusCnText", "利润不成比例且过低");
+				R.put("profitStatusEnText", "Profit was unfair and low!");
+				break;
+			case "H":
+				R.put("profitStatusText", "过高");
+				R.put("profitStatusCnText", "利润过高");
+				R.put("profitStatusEnText", "Profit was high!");
+				break;
+			case "L":
+				R.put("profitStatusText", "过低");
+				R.put("profitStatusCnText", "利润过低");
+				R.put("profitStatusEnText", "Profit was low!");
+				break;
+			case "F":
+				R.put("profitStatusText", "正常");
+				R.put("profitStatusCnText", "利润正常");
+				R.put("profitStatusEnText", "");
+				break;
+			case "M":
+				R.put("profitStatusText", "为负");
+				R.put("profitStatusCnText", "利润为负");
+				R.put("profitStatusEnText", "Profit was minus!");
+				break;
+			case "U":
+				R.put("profitStatusText", "不成比例");
+				R.put("profitStatusCnText", "不成比例");
+				R.put("profitStatusEnText", "P/S was unfair!");
+				break;
+			default:
+				R.put("profitStatusText", "");
+				R.put("profitStatusCnText", "");
+				R.put("profitStatusEnText", "");
+		}
+
+		return R;
+	}
+
+}

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

@@ -80,7 +80,6 @@ public class AuditProecessController extends BladeController {
 	public R list(LosAuditProecess auditProecess, Query query) {
 		LambdaQueryWrapper<LosAuditProecess> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(LosAuditProecess::getIsDelete, 0);//是否删除
-		lambdaQueryWrapper.like(LosAuditProecess::getAuditUserId, String.valueOf(AuthUtil.getUserId()));//审核人id
 		lambdaQueryWrapper.eq(StringUtils.isNotBlank(auditProecess.getProcessType()), LosAuditProecess::getProcessType, auditProecess.getProcessType());//业务类型
 		lambdaQueryWrapper.eq(StringUtils.isNotBlank(auditProecess.getAuditStatus()), LosAuditProecess::getAuditStatus, auditProecess.getAuditStatus());//审核状态
 		lambdaQueryWrapper.eq(auditProecess.getCorpId() != null, LosAuditProecess::getCorpId, auditProecess.getCorpId());//往来单位
@@ -102,6 +101,7 @@ public class AuditProecessController extends BladeController {
 				auditProecess.getSrcCnName()).or().like(LosAuditProecess::getSrcEnName, auditProecess.getSrcCnName()));
 		lambdaQueryWrapper.ne(StringUtils.isBlank(auditProecess.getAuditStatus()), LosAuditProecess::getAuditStatus, "N");
 		if (!AuthUtil.getUserRole().contains("admin")) {
+			lambdaQueryWrapper.like(LosAuditProecess::getAuditUserId, String.valueOf(AuthUtil.getUserId()));//审核人id
 			lambdaQueryWrapper.eq(LosAuditProecess::getSalesCompanyId, deptUtils.getDeptPid());//公司
 		}
 		IPage pages = auditProecessService.page(Condition.getPage(query), lambdaQueryWrapper);

+ 12 - 28
blade-service/blade-los/src/main/java/org/springblade/los/finance/stl/service/impl/FinStlBillsServiceImpl.java

@@ -43,6 +43,7 @@ import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration
 import org.springblade.los.business.customsDeclaration.mapper.CustomsDeclarationMapper;
 import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.business.sea.mapper.BillsMapper;
+import org.springblade.los.business.sea.service.IDataProcessingService;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -73,7 +74,6 @@ import org.springblade.los.finance.vouchers.entity.FinVouchers;
 import org.springblade.los.finance.vouchers.entity.FinVouchersItems;
 import org.springblade.los.finance.vouchers.mapper.FinVouchersMapper;
 import org.springblade.los.finance.vouchers.service.IFinVouchersItemsService;
-import org.springblade.los.trade.mapper.AgentMapper;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.user.entity.User;
@@ -150,7 +150,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 
 	private final CustomsDeclarationMapper customsDeclarationMapper;
 
-	private final AgentMapper agentMapper;
+	private final IDataProcessingService dataProcessingUtil;
 
 	@Override
 	public IPage<FinStlBillsVO> selectFinStlBillsPage(IPage<FinStlBillsVO> page, FinStlBillsVO finStlBills) {
@@ -179,17 +179,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R submit(FinStlBills finStlBills) {
-		String deptId = "";
-		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
-		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
-			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
-				deptName = String.join(",", res.getData());
-			}
-		}
 		if (ObjectUtils.isNotNull(finStlBills.getBillDate()) && "STL".equals(finStlBills.getBusinessType())) {
 			LocalDate date = finStlBills.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
 			int year = date.getYear();
@@ -231,11 +221,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 			finStlBills.setCreateTime(new Date());
 			finStlBills.setCreateUser(AuthUtil.getUserId());
 			finStlBills.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				finStlBills.setCreateDept(deptId);
-				finStlBills.setBranchId(branchId);
-				finStlBills.setCreateDeptName(deptName);
-			}
+			finStlBills.setBranchId(branchId);
 		} else {
 			finStlBills.setUpdateUser(AuthUtil.getUserId());
 			finStlBills.setUpdateTime(new Date());
@@ -273,11 +259,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setCreateUserName(AuthUtil.getUserName());
-					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-						item.setCreateDept(deptId);
-						item.setBranchId(branchId);
-						item.setCreateDeptName(deptName);
-					}
+					item.setBranchId(branchId);
 				} else {
 					item.setUpdateUser(AuthUtil.getUserId());
 					item.setUpdateTime(new Date());
@@ -439,9 +421,9 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 								feeCenter.setReconciliationAmount(feeCenter.getReconciliationAmount().add(currentStlAmount));
 								currentStlAmount = new BigDecimal("0.00");
 							} else {
-								if (new BigDecimal("0.00").compareTo(currentStlAmount) > 0){
+								if (new BigDecimal("0.00").compareTo(currentStlAmount) > 0) {
 									currentStlAmount = currentStlAmount.add((feeCenter.getAmount().abs().subtract(feeCenter.getReconciliationAmount().abs())).abs());
-								}else{
+								} else {
 									currentStlAmount = currentStlAmount.subtract((feeCenter.getAmount().subtract(feeCenter.getReconciliationAmount())));
 								}
 								feeCenter.setReconciliationAmount(feeCenter.getAmount());
@@ -1096,8 +1078,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 						finAccBills.getAmountDrUsd().abs().compareTo(finAccBills.getStlAmountDrUsd().abs()) == 0) {
 						status = true;
 					}
-				}
-				else if ("C".equals(item.getDc())) {
+				} else if ("C".equals(item.getDc())) {
 					if (finAccBills.getStlAmountCr().abs().compareTo(finAccBills.getAmountCr().abs()) > 0 ||
 						finAccBills.getStlAmountCrUsd().abs().compareTo(finAccBills.getAmountCrUsd().abs()) > 0
 					) {
@@ -1413,8 +1394,7 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 						}
 					}
 
-				}
-				else if ("C".equals(item.getDc())) {
+				} else if ("C".equals(item.getDc())) {
 					if ("CNY".equals(item.getCurCode())) {
 						finAccBills.setStlAmountCr(finAccBills.getStlAmountCr().subtract(item.getCurrentStlAmount().subtract(item.getCurrentStlDiscount())));
 						finAccBills.setStlAmountCrLoc(finAccBills.getStlAmountCrLoc().subtract(item.getCurrentStlAmount().subtract(item.getCurrentStlDiscount())));
@@ -1790,6 +1770,10 @@ public class FinStlBillsServiceImpl extends ServiceImpl<FinStlBillsMapper, FinSt
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
 			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		String business = sysClient.getParamServiceNew("business");
+		if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
+			auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, AuthUtil.getDeptId());
+		}
 		auditProecessDTO.setTimes(1);
 		auditProecessDTO.setProcessType("付费申请");
 

+ 8 - 0
blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java

@@ -327,6 +327,14 @@ public class UserClient implements IUserClient {
 		}
 	}
 
+	@Override
+	public List<User> getUserByDept(Long deptPid, String tenantId) {
+        return service.list(new LambdaQueryWrapper<User>()
+			.eq(User::getTenantId, tenantId)
+			.eq(User::getDeptPid, deptPid)
+			.eq(User::getIsDeleted, 0));
+	}
+
 	/**
 	 * 获取用户
 	 * @param user