xuqiang 1 год назад
Родитель
Сommit
6b6b6a6f5e

+ 0 - 4
commons/src/main/java/com/jzg/commons/entity/dto/PtlAgreementCostAdd.java

@@ -32,10 +32,6 @@ public class PtlAgreementCostAdd {
     @NotNull(message = "生效时间不能为空")
     @NotNull(message = "生效时间不能为空")
     private Date effectiveTime;
     private Date effectiveTime;
 
 
-    @Schema(description = "手动审核截止日期")
-    @NotNull(message = "手动审核截止日期不能为空")
-    private Date deadlineTime;
-
     @Schema(description = "失效时间")
     @Schema(description = "失效时间")
     @NotNull(message = "失效时间不能为空")
     @NotNull(message = "失效时间不能为空")
     private Date failureTime;
     private Date failureTime;

+ 0 - 4
commons/src/main/java/com/jzg/commons/entity/dto/PtlAgreementCostEnd.java

@@ -36,10 +36,6 @@ public class PtlAgreementCostEnd {
     @NotNull(message = "生效时间不能为空")
     @NotNull(message = "生效时间不能为空")
     private Date effectiveTime;
     private Date effectiveTime;
 
 
-    @Schema(description = "手动审核截止日期")
-    @NotNull(message = "手动审核截止日期不能为空")
-    private Date deadlineTime;
-
     @Schema(description = "失效时间")
     @Schema(description = "失效时间")
     @NotNull(message = "失效时间不能为空")
     @NotNull(message = "失效时间不能为空")
     private Date failureTime;
     private Date failureTime;

+ 0 - 2
commons/src/main/java/com/jzg/commons/entity/po/PtlAgreementCost.java

@@ -28,8 +28,6 @@ public class PtlAgreementCost extends BaseModel {
 
 
     private Long productId;
     private Long productId;
 
 
-    private Date deadlineTime;
-
     private Date effectiveTime;
     private Date effectiveTime;
 
 
     private Date failureTime;
     private Date failureTime;

+ 10 - 2
commons/src/main/java/com/jzg/commons/entity/vo/PtlAgreementCostRuleVo.java

@@ -12,11 +12,19 @@ public class PtlAgreementCostRuleVo{
 
 
     private String ptlAgreementCostId;
     private String ptlAgreementCostId;
 
 
-    private String ruleId;
+    private String rulesId;
+
+    private String attrId;
+
+    private String attrCode;
+
+    private String min;
+
+    private String max;
 
 
     private String operator;
     private String operator;
 
 
-    private String dataValue;
+    private String batch;
 
 
 
 
 }
 }

+ 5 - 4
commons/src/main/java/com/jzg/commons/entity/vo/PtlAgreementCostVo.java

@@ -1,6 +1,7 @@
 package com.jzg.commons.entity.vo;
 package com.jzg.commons.entity.vo;
 
 
 
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 import java.util.Date;
 import java.util.Date;
@@ -23,13 +24,13 @@ public class PtlAgreementCostVo {
     private String productId;
     private String productId;
 
 
     @Schema(description = "生效时间")
     @Schema(description = "生效时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date effectiveTime;
     private Date effectiveTime;
 
 
     @Schema(description = "失效时间")
     @Schema(description = "失效时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date failureTime;
     private Date failureTime;
 
 
-    @Schema(description = "手动审核截止日期(超过设置的截日期,审核会变为自动审核)")
-    private Date deadlineTime;
 
 
     @Schema(description = "审核方式0-自动审核;1-手动审核")
     @Schema(description = "审核方式0-自动审核;1-手动审核")
     private String auditMethod;
     private String auditMethod;
@@ -43,7 +44,6 @@ public class PtlAgreementCostVo {
     @Schema(description = "是否启用0-禁用;1-启用")
     @Schema(description = "是否启用0-禁用;1-启用")
     private boolean isEnabled;
     private boolean isEnabled;
 
 
-
     @Schema(description = "费用描述")
     @Schema(description = "费用描述")
     private String costDescribe;
     private String costDescribe;
 
 
@@ -54,7 +54,8 @@ public class PtlAgreementCostVo {
     private List<PtlAgreementCostRuleVo> ruleConditions;
     private List<PtlAgreementCostRuleVo> ruleConditions;
 
 
 
 
-
+    @Schema(description = "规则条件集合")
+    private List<String> rulesList;
 
 
 
 
 
 

+ 4 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -14,6 +14,7 @@ import com.jzg.commons.entity.po.PtlAgreementCost;
 import com.jzg.commons.entity.po.PtlAgreementCostRule;
 import com.jzg.commons.entity.po.PtlAgreementCostRule;
 import com.jzg.commons.entity.po.PtlAgreementCostType;
 import com.jzg.commons.entity.po.PtlAgreementCostType;
 import com.jzg.commons.entity.po.RuleConditionsVerify;
 import com.jzg.commons.entity.po.RuleConditionsVerify;
+import com.jzg.commons.entity.vo.PtlAgreementCostRuleVo;
 import com.jzg.commons.entity.vo.PtlAgreementCostVo;
 import com.jzg.commons.entity.vo.PtlAgreementCostVo;
 import com.jzg.commons.util.ListUtils;
 import com.jzg.commons.util.ListUtils;
 import com.jzg.organization.mapper.PtlAgreementCostMapper;
 import com.jzg.organization.mapper.PtlAgreementCostMapper;
@@ -125,7 +126,9 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
 
 
     @Override
     @Override
     public HttpResult queryById(Long id) {
     public HttpResult queryById(Long id) {
-        return HttpResult.ok(ptlAgreementCostMapper.queryById(id));
+        PtlAgreementCostVo ptlAgreementCostVo = ptlAgreementCostMapper.queryById(id);
+        ptlAgreementCostVo.setRulesList(ptlAgreementCostVo.getRuleConditions().stream().map(PtlAgreementCostRuleVo::getAttrId).collect(Collectors.toList()));
+        return HttpResult.ok(ptlAgreementCostVo);
     }
     }
 
 
     @Override
     @Override

+ 7 - 4
tenant/organization/src/main/resources/mapper/PtlAgreementCostMapper.xml

@@ -13,7 +13,6 @@
         <result column="failure_time" property="failureTime" jdbcType="TIMESTAMP"/>
         <result column="failure_time" property="failureTime" jdbcType="TIMESTAMP"/>
         <result column="audit_method" property="auditMethod" jdbcType="VARCHAR"/>
         <result column="audit_method" property="auditMethod" jdbcType="VARCHAR"/>
         <result column="cost_describe" property="costDescribe" jdbcType="VARCHAR"/>
         <result column="cost_describe" property="costDescribe" jdbcType="VARCHAR"/>
-        <result column="deadline_time" property="deadlineTime" jdbcType="VARCHAR"/>
         <result column="approved" property="approved" jdbcType="VARCHAR"/>
         <result column="approved" property="approved" jdbcType="VARCHAR"/>
         <result column="is_valid" property="isValid" jdbcType="VARCHAR"/>
         <result column="is_valid" property="isValid" jdbcType="VARCHAR"/>
         <result column="is_enabled" property="isEnabled" jdbcType="VARCHAR"/>
         <result column="is_enabled" property="isEnabled" jdbcType="VARCHAR"/>
@@ -35,9 +34,13 @@
     <resultMap id="costRule" type="com.jzg.commons.entity.vo.PtlAgreementCostRuleVo">
     <resultMap id="costRule" type="com.jzg.commons.entity.vo.PtlAgreementCostRuleVo">
         <id column="id" property="id" jdbcType="BIGINT"/>
         <id column="id" property="id" jdbcType="BIGINT"/>
         <result column="ptl_agreement_cost_id" property="ptlAgreementCostId" jdbcType="INTEGER"/>
         <result column="ptl_agreement_cost_id" property="ptlAgreementCostId" jdbcType="INTEGER"/>
-        <result column="rule_id" property="ruleId" jdbcType="INTEGER"/>
+        <result column="rules_id" property="rulesId" jdbcType="INTEGER"/>
+        <result column="attr_Id" property="attrId" jdbcType="INTEGER"/>
+        <result column="attr_code" property="attrCode" jdbcType="INTEGER"/>
+        <result column="min" property="min" jdbcType="INTEGER"/>
+        <result column="max" property="max" jdbcType="INTEGER"/>
         <result column="operator" property="operator" jdbcType="INTEGER"/>
         <result column="operator" property="operator" jdbcType="INTEGER"/>
-        <result column="data_value" property="dataValue" jdbcType="INTEGER"/>
+        <result column="batch" property="batch" jdbcType="INTEGER"/>
     </resultMap>
     </resultMap>
 
 
 
 
@@ -102,7 +105,7 @@
 
 
 
 
     <select id="selectCostRule" resultMap="costRule">
     <select id="selectCostRule" resultMap="costRule">
-        select tr.id ,tr.ptl_agreement_cost_id,tr.rule_id,tr.operator,tr.data_value
+        select tr.id ,tr.ptl_agreement_cost_id,tr.rules_id,tr.attr_id,tr.attr_code,tr.min,tr.max,tr.operator,tr.batch
         from ptl_agreement_cost_rule tr where tr.ptl_agreement_cost_id = #{costId}
         from ptl_agreement_cost_rule tr where tr.ptl_agreement_cost_id = #{costId}
     </select>
     </select>