✨ 客商评分双模式与金蝶公司代码改回组织维护

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-04 23:46:19 +08:00
parent 3100fd046c
commit 07cffd29ab
18 changed files with 524 additions and 85 deletions
@@ -112,9 +112,15 @@ public class BusinessDeptConfigServiceImpl extends BaseServiceImpl<BusinessDeptC
businessDeptConfig.setPlatformCompanyName(platformCompany.getDeptName());
businessDeptConfig.setBusinessDeptName(businessDept.getDeptName());
businessDeptConfig.setContractCodePrefix(trimToEmpty(businessDeptConfig.getContractCodePrefix()));
businessDeptConfig.setKingdeeCompanyCode(trimToNull(businessDeptConfig.getKingdeeCompanyCode()));
businessDeptConfig.setKingdeeDeptCode(trimToNull(businessDeptConfig.getKingdeeDeptCode()));
businessDeptConfig.setRemark(trimToNull(businessDeptConfig.getRemark()));
// 金蝶公司代码始终关联平台公司组织中配置的金蝶代码(业务部门配置仅展示)
businessDeptConfig.setKingdeeCompanyCode(trimToNull(platformCompany.getKingdeeDeptCode()));
// Avue number 空值常传 -1,未填时落库 null,禁止保存哨兵值
Integer initialSerial = businessDeptConfig.getInitialSerial();
if (initialSerial != null && initialSerial < 1) {
businessDeptConfig.setInitialSerial(null);
}
if (Func.isEmpty(businessDeptConfig.getStatus())) {
businessDeptConfig.setStatus(1);
}
@@ -133,9 +139,6 @@ public class BusinessDeptConfigServiceImpl extends BaseServiceImpl<BusinessDeptC
if (businessDeptConfig.getContractCodePrefix().length() > PREFIX_MAX_LENGTH) {
throw new ServiceException("合同编码前缀不能超过64字");
}
if (Func.isEmpty(businessDeptConfig.getKingdeeCompanyCode())) {
throw new ServiceException("请输入金蝶公司代码");
}
if (Func.isNotEmpty(businessDeptConfig.getPlatformCompanyName())
&& businessDeptConfig.getPlatformCompanyName().length() > NAME_MAX_LENGTH) {
throw new ServiceException("平台公司名称不能超过100字");
@@ -144,7 +147,8 @@ public class BusinessDeptConfigServiceImpl extends BaseServiceImpl<BusinessDeptC
&& businessDeptConfig.getBusinessDeptName().length() > NAME_MAX_LENGTH) {
throw new ServiceException("业务部门名称不能超过100字");
}
if (businessDeptConfig.getKingdeeCompanyCode().length() > CODE_MAX_LENGTH) {
if (Func.isNotEmpty(businessDeptConfig.getKingdeeCompanyCode())
&& businessDeptConfig.getKingdeeCompanyCode().length() > CODE_MAX_LENGTH) {
throw new ServiceException("金蝶公司代码不能超过64字");
}
if (Func.isNotEmpty(businessDeptConfig.getKingdeeDeptCode())