|
|
@@ -1,7 +1,6 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
@@ -45,9 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -214,7 +211,9 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
if (CollectionUtils.isEmpty(list)){
|
|
|
return null;
|
|
|
}
|
|
|
- return BuildDescUtils.buildDesc(companyId, BeanUtil.copyToList(list, PtlAgreementUndwrtRulesAttr.class), agreementUndwrtRulesAttrService.getUndwrtRulesAttrList());
|
|
|
+ String desc = BuildDescUtils.buildDesc(companyId, BeanUtil.copyToList(list, PtlAgreementUndwrtRulesAttr.class), agreementUndwrtRulesAttrService.getUndwrtRulesAttrList());
|
|
|
+ // 两个及以上相邻的逗号(中文","或英文",")合并为一个逗号
|
|
|
+ return StringUtils.mergeAdjacentComma(desc);
|
|
|
}
|
|
|
|
|
|
public boolean verify(PtlAgreementCostAdd ptlAgreementCostAdd){
|
|
|
@@ -265,7 +264,7 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
if (StringUtils.isNotEmpty(ruleCondition.getMin()) && ruleCondition.getMin().contains(",")){
|
|
|
ruleCondition.setMinArray(Arrays.asList(ruleCondition.getMin().split(",")));
|
|
|
}else {
|
|
|
- ruleCondition.setMinArray(Arrays.asList(ruleCondition.getMin()));
|
|
|
+ ruleCondition.setMinArray(Collections.singletonList(ruleCondition.getMin()));
|
|
|
//ruleCondition.setMinArray(Collections.singletonList(ruleCondition.getMin()));
|
|
|
}
|
|
|
|
|
|
@@ -412,6 +411,8 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
if(item.getRuleDescription() != null && !item.getRuleDescription().isEmpty()){
|
|
|
item.setRuleDescription(item.getRuleDescription().substring(0,item.getRuleDescription().length()-1));
|
|
|
}
|
|
|
+ // ruleDescription中出现两个相邻的","或","时,转换为"或"字
|
|
|
+ item.setRuleDescription(StringUtils.convertAdjacentCommaToOr(item.getRuleDescription()));
|
|
|
item.setAuditPersonName(userName2Name.getOrDefault(item.getAuditPerson(),item.getAuditPerson()));
|
|
|
});
|
|
|
return HttpResult.ok(costManagementVoPage);
|