java110 лет назад: 5
Родитель
Сommit
6947ff96f8

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/contractType/ContractTypeDto.java

@@ -20,6 +20,7 @@ public class ContractTypeDto extends PageDto implements Serializable {
     public static final String ADMIN_AUDIT = "3003";
     public static final String PROXY_AUDIT = "4004";
     private String audit;
+    private String auditName;
     private String typeName;
     private String remark;
     private String storeId;
@@ -87,4 +88,12 @@ public class ContractTypeDto extends PageDto implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getAuditName() {
+        return auditName;
+    }
+
+    public void setAuditName(String auditName) {
+        this.auditName = auditName;
+    }
 }

+ 74 - 77
java110-db/src/main/resources/mapper/store/ContractTypeServiceDaoImplMapper.xml

@@ -5,102 +5,99 @@
 <mapper namespace="contractTypeServiceDaoImpl">
 
 
-
-
-
     <!-- 保存合同类型信息 add by wuxw 2018-07-03 -->
     <insert id="saveContractTypeInfo" parameterType="Map">
         insert into contract_type(
-audit,type_name,remark,store_id,contract_type_id
-) values (
-#{audit},#{typeName},#{remark},#{storeId},#{contractTypeId}
-)
+        audit,type_name,remark,store_id,contract_type_id
+        ) values (
+        #{audit},#{typeName},#{remark},#{storeId},#{contractTypeId}
+        )
     </insert>
 
 
-
     <!-- 查询合同类型信息 add by wuxw 2018-07-03 -->
     <select id="getContractTypeInfo" parameterType="Map" resultType="Map">
-        select  t.audit,t.type_name,t.type_name typeName,t.remark,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.contract_type_id,t.contract_type_id contractTypeId 
-from contract_type t 
-where 1 =1 
-<if test="audit !=null and audit != ''">
-   and t.audit= #{audit}
-</if> 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="storeId !=null and storeId != ''">
-   and t.store_id= #{storeId}
-</if> 
-<if test="contractTypeId !=null and contractTypeId != ''">
-   and t.contract_type_id= #{contractTypeId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.audit,t.type_name,t.type_name typeName,t.remark,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id
+        storeId,t.contract_type_id,t.contract_type_id contractTypeId,td.`name` auditName
+        from contract_type t
+        LEFT JOIN t_dict td on td.table_name = 'contract_type' and td.table_columns = 'audit' and t.audit = td.status_cd
+        where 1 =1
+        <if test="audit !=null and audit != ''">
+            and t.audit= #{audit}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="contractTypeId !=null and contractTypeId != ''">
+            and t.contract_type_id= #{contractTypeId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改合同类型信息 add by wuxw 2018-07-03 -->
     <update id="updateContractTypeInfo" parameterType="Map">
-        update  contract_type t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="audit !=null and audit != ''">
-, t.audit= #{audit}
-</if> 
-<if test="typeName !=null and typeName != ''">
-, t.type_name= #{typeName}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="storeId !=null and storeId != ''">
-, t.store_id= #{storeId}
-</if> 
- where 1=1 <if test="contractTypeId !=null and contractTypeId != ''">
-and t.contract_type_id= #{contractTypeId}
-</if> 
+        update contract_type t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="audit !=null and audit != ''">
+            , t.audit= #{audit}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            , t.type_name= #{typeName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            , t.store_id= #{storeId}
+        </if>
+        where 1=1
+        <if test="contractTypeId !=null and contractTypeId != ''">
+            and t.contract_type_id= #{contractTypeId}
+        </if>
 
     </update>
 
     <!-- 查询合同类型数量 add by wuxw 2018-07-03 -->
-     <select id="queryContractTypesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from contract_type t 
-where 1 =1 
-<if test="audit !=null and audit != ''">
-   and t.audit= #{audit}
-</if> 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="storeId !=null and storeId != ''">
-   and t.store_id= #{storeId}
-</if> 
-<if test="contractTypeId !=null and contractTypeId != ''">
-   and t.contract_type_id= #{contractTypeId}
-</if> 
+    <select id="queryContractTypesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract_type t
+        where 1 =1
+        <if test="audit !=null and audit != ''">
+            and t.audit= #{audit}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="contractTypeId !=null and contractTypeId != ''">
+            and t.contract_type_id= #{contractTypeId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>