|
|
@@ -122,6 +122,14 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
List<String> createdIds = new ArrayList<>();
|
|
|
for (CostAdd costAdd : costAddList) {
|
|
|
for (PtlAgreementCostAdd ptlAgreementCostAdd : costAdd.getPtlAgreementCostAddList()){
|
|
|
+ // 规则条件 min 根据 minArray 重组:多选/下拉等多值场景前端以数组提交,落库需以逗号分隔
|
|
|
+ if (CollUtil.isNotEmpty(ptlAgreementCostAdd.getRuleConditions())) {
|
|
|
+ ptlAgreementCostAdd.getRuleConditions().forEach(item -> {
|
|
|
+ if (CollUtil.isNotEmpty(item.getMinArray())) {
|
|
|
+ item.setMin(String.join(",", item.getMinArray()));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
if (ListUtils.hasDuplicates(ptlAgreementCostAdd.getRuleConditions())){
|
|
|
throw new SystemException("添加数据存在相同费用规则,请检查");
|
|
|
}
|
|
|
@@ -203,7 +211,6 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
min.substring(0,min.length()-1);
|
|
|
item.setMin(min.toString());
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
costRuleService.saveOrUpdateCostRule(BeanUtil.copyToList(ptlAgreementCostEnd.getRuleConditions(), PtlAgreementCostRule.class), ptlAgreementCost.getId());
|
|
|
}
|