|
@@ -76,6 +76,8 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private BaseController baseController;
|
|
private BaseController baseController;
|
|
|
|
|
|
|
|
|
|
+ private static final String[] COST_TYPE_DICT_KEY = new String[]{"checkbox", "select"};
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public HttpResult save(PtlAgreemenCostAdd ptlAgreemenCostAdd) {
|
|
public HttpResult save(PtlAgreemenCostAdd ptlAgreemenCostAdd) {
|
|
@@ -178,8 +180,14 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
}
|
|
}
|
|
|
RList<SysDict> rules = redissonClient.getList(DICT_REDIS_KEY + "rule_operator");
|
|
RList<SysDict> rules = redissonClient.getList(DICT_REDIS_KEY + "rule_operator");
|
|
|
for (PtlAgreementCostRuleVo ruleCondition : ptlAgreementCostVo.getRuleConditions()) {
|
|
for (PtlAgreementCostRuleVo ruleCondition : ptlAgreementCostVo.getRuleConditions()) {
|
|
|
- if (StringUtils.isNotEmpty(ruleCondition.getMin()) && ruleCondition.getMin().contains(",")){
|
|
|
|
|
- ruleCondition.setMinArray(Arrays.asList(ruleCondition.getMin().split(",")));
|
|
|
|
|
|
|
+ String attrType = ruleCondition.getAttrType();
|
|
|
|
|
+ if (StringUtils.isNotEmpty(attrType) && java.util.Arrays.stream(COST_TYPE_DICT_KEY).anyMatch(attrType::equals)){
|
|
|
|
|
+ if (StringUtils.isNotEmpty(ruleCondition.getMin()) && ruleCondition.getMin().contains(",")){
|
|
|
|
|
+ ruleCondition.setMinArray(Arrays.asList(ruleCondition.getMin().split(",")));
|
|
|
|
|
+ }else {
|
|
|
|
|
+ ruleCondition.setMinArray(Arrays.asList(ruleCondition.getMin()));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
ruleCondition.setRulesDict(rules);
|
|
ruleCondition.setRulesDict(rules);
|
|
|
}
|
|
}
|