Ver Fonte

修改v2.0.0 遇到的bug

wanghao há 6 meses atrás
pai
commit
3d9471095a

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/vo/PtlAgreementCostVo.java

@@ -78,4 +78,7 @@ public class PtlAgreementCostVo {
     @Schema(description = "规则条件集合")
     private List<PtlAgreementCostRuleVo> ruleConditions;
 
+    @Schema(description = "优先级")
+    private int priorityLevel;
+
 }

+ 10 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -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()));

+ 2 - 0
tenant/organization/src/main/resources/mapper/PtlAgreementCostMapper.xml

@@ -21,6 +21,7 @@
         <result column="review_description" property="reviewDescription" jdbcType="VARCHAR"/>
         <result column="agreement_code" property="ptlAgreementCode" jdbcType="VARCHAR"/>
         <result column="agreement_title" property="ptlAgreementName" jdbcType="VARCHAR"/>
+        <result column="priority_level" property="priorityLevel" jdbcType="INTEGER"/>
         <collection property="ptlAgreementCostTypeList" column="{costId=id}" ofType="com.jzg.commons.entity.vo.PtlAgreementCostTypeVo" select="selectCostType" />
         <collection property="ruleConditions" column="{costId=id}" ofType="com.jzg.commons.entity.vo.PtlAgreementCostRuleVo" select="selectCostRule" />
     </resultMap>
@@ -211,6 +212,7 @@
             t.audit_person,
             t.review_description,
             t.audit_time,
+            t.priority_level,
             pa.agreement_code,
             pa.agreement_title
         FROM