|
|
@@ -610,6 +610,8 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
}
|
|
|
|
|
|
if (wasAdjusted) {
|
|
|
+ // 出口留点比例 大于 出口比例 设置 出口留点比例 等于 出口比例
|
|
|
+ clampKeepPointRatios(costType);
|
|
|
adjustedCount++;
|
|
|
}
|
|
|
}
|
|
|
@@ -624,6 +626,18 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
|
|
|
return HttpResult.ok("批量调整成功,共调整 " + adjustedCount + " 条记录");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 出口留点比例 大于 出口比例 设置 出口留点比例 等于 出口比例
|
|
|
+ */
|
|
|
+ private void clampKeepPointRatios(PtlAgreementCostType costType) {
|
|
|
+ // 出口留点 ≤ 出口比例
|
|
|
+ BigDecimal exportKeep = costType.getExportKeepPointRatio();
|
|
|
+ BigDecimal export = costType.getExport();
|
|
|
+ if (exportKeep != null && export != null && exportKeep.compareTo(export) > 0) {
|
|
|
+ costType.setExportKeepPointRatio(export);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 调整费用类型的各项比例
|
|
|
*/
|