|
|
@@ -124,6 +124,16 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
if (ListUtils.hasDuplicates(ptlAgreementCostEnd.getRuleConditions())){
|
|
|
return HttpResult.error("已存在相同且有效的费用规则,请检查");
|
|
|
}
|
|
|
+ // 校验ptlAgreementCostTypeList 数据 exportKeepPointRatio 不能大于 export
|
|
|
+ if (!CollectionUtils.isEmpty(ptlAgreementCostEnd.getPtlAgreementCostTypeList())) {
|
|
|
+ for (PtlAgreementCostEnd.PtlAgreementCostTypeDto ptlAgreementCostTypeDto : ptlAgreementCostEnd.getPtlAgreementCostTypeList()) {
|
|
|
+ if (ptlAgreementCostTypeDto.getExportKeepPointRatio().compareTo(ptlAgreementCostTypeDto.getExport()) > 0) {
|
|
|
+ return HttpResult.error("出口留点比例不能大于出口比例");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
PtlAgreementCost ptlAgreementCost = BeanUtil.copyProperties(ptlAgreementCostEnd, PtlAgreementCost.class);
|
|
|
ptlAgreementCost.setCostRules(buildDescString(ptlAgreementCostEnd.getRuleConditions()));
|