From cddcf22a61489ee9c2dfee169d817ccd66f95430 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期五, 03 九月 2021 02:23:43 +0800
Subject: [PATCH] 优化代码
---
java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml | 456 +++++++++++++++++++++++++++++----------------------------
1 files changed, 232 insertions(+), 224 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
index d07ceef..2ac9dd1 100644
--- a/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
@@ -5,249 +5,257 @@
<mapper namespace="contractChangePlanDetailServiceDaoImpl">
-
-
-
<!-- 淇濆瓨鍚堝悓鍙樻洿鏄庣粏淇℃伅 add by wuxw 2018-07-03 -->
<insert id="saveContractChangePlanDetailInfo" parameterType="Map">
insert into contract_change_plan_detail(
-a_link,a_contacts,amount,contract_type,detail_id,store_id,operator,signing_time,b_contacts,party_a,operate,b_link,party_b,contract_id,obj_id,plan_id,contract_name,start_time,end_time,state,contract_code,obj_type,operator_link
-) values (
-#{aLink},#{aContacts},#{amount},#{contractType},#{detailId},#{storeId},#{operator},#{signingTime},#{bContacts},#{partyA},#{operate},#{bLink},#{partyB},#{contractId},#{objId},#{planId},#{contractName},#{startTime},#{endTime},#{state},#{contractCode},#{objType},#{operatorLink}
-)
+ a_link,a_contacts,amount,contract_type,detail_id,store_id,operator,signing_time,b_contacts,party_a,b_link,
+ party_b,contract_id,obj_id,plan_id,contract_name,start_time,end_time,contract_code,obj_type,operator_link,operate
+ ) values (
+ #{aLink},#{aContacts},#{amount},#{contractType},#{detailId},#{storeId},#{operator},#{signingTime},#{bContacts},
+ #{partyA},#{bLink},#{partyB},#{contractId},#{objId},#{planId},#{contractName},#{startTime},#{endTime},
+ #{contractCode},#{objType},#{operatorLink},#{operate}
+ )
</insert>
-
<!-- 鏌ヨ鍚堝悓鍙樻洿鏄庣粏淇℃伅 add by wuxw 2018-07-03 -->
<select id="getContractChangePlanDetailInfo" parameterType="Map" resultType="Map">
- select t.a_link,t.a_link aLink,t.a_contacts,t.a_contacts aContacts,t.amount,t.contract_type,t.contract_type contractType,t.detail_id,t.detail_id detailId,t.store_id,t.store_id storeId,t.operator,t.signing_time,t.signing_time signingTime,t.b_contacts,t.b_contacts bContacts,t.party_a,t.party_a partyA,t.b_link,t.b_link bLink,t.party_b,t.party_b partyB,t.contract_id,t.contract_id contractId,t.obj_id,t.obj_id objId,t.plan_id,t.plan_id planId,t.contract_name,t.contract_name contractName,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.state,t.contract_code,t.contract_code contractCode,t.obj_type,t.obj_type objType,t.operator_link,t.operator_link operatorLink
-from contract_change_plan_detail t
-where 1 =1
-<if test="aLink !=null and aLink != ''">
- and t.a_link= #{aLink}
-</if>
-<if test="aContacts !=null and aContacts != ''">
- and t.a_contacts= #{aContacts}
-</if>
-<if test="amount !=null and amount != ''">
- and t.amount= #{amount}
-</if>
-<if test="contractType !=null and contractType != ''">
- and t.contract_type= #{contractType}
-</if>
-<if test="detailId !=null and detailId != ''">
- and t.detail_id= #{detailId}
-</if>
-<if test="storeId !=null and storeId != ''">
- and t.store_id= #{storeId}
-</if>
-<if test="operator !=null and operator != ''">
- and t.operator= #{operator}
-</if>
-<if test="signingTime !=null and signingTime != ''">
- and t.signing_time= #{signingTime}
-</if>
-<if test="bContacts !=null and bContacts != ''">
- and t.b_contacts= #{bContacts}
-</if>
-<if test="partyA !=null and partyA != ''">
- and t.party_a= #{partyA}
-</if>
-<if test="bLink !=null and bLink != ''">
- and t.b_link= #{bLink}
-</if>
-<if test="partyB !=null and partyB != ''">
- and t.party_b= #{partyB}
-</if>
-<if test="contractId !=null and contractId != ''">
- and t.contract_id= #{contractId}
-</if>
-<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
-</if>
-<if test="planId !=null and planId != ''">
- and t.plan_id= #{planId}
-</if>
-<if test="contractName !=null and contractName != ''">
- and t.contract_name= #{contractName}
-</if>
-<if test="startTime !=null and startTime != ''">
- and t.start_time= #{startTime}
-</if>
-<if test="endTime !=null and endTime != ''">
- and t.end_time= #{endTime}
-</if>
-<if test="state !=null and state != ''">
- and t.state= #{state}
-</if>
-<if test="contractCode !=null and contractCode != ''">
- and t.contract_code= #{contractCode}
-</if>
-<if test="objType !=null and objType != ''">
- and t.obj_type= #{objType}
-</if>
-<if test="operatorLink !=null and operatorLink != ''">
- and t.operator_link= #{operatorLink}
-</if>
-order by t.create_time desc
-<if test="page != -1 and page != null ">
- limit #{page}, #{row}
-</if>
+ select t.a_link,t.a_link aLink,t.a_contacts,t.a_contacts aContacts,t.amount,t.contract_type,t.contract_type
+ contractType,t.detail_id,t.detail_id detailId,t.store_id,t.store_id
+ storeId,t.operator,t.signing_time,t.signing_time signingTime,t.b_contacts,t.b_contacts
+ bContacts,t.party_a,t.party_a partyA,t.b_link,t.b_link bLink,t.party_b,t.party_b
+ partyB,t.contract_id,t.contract_id contractId,t.obj_id,t.obj_id objId,t.plan_id,t.plan_id
+ planId,t.contract_name,t.contract_name contractName,t.start_time,t.start_time startTime,t.end_time,t.end_time
+ endTime,t.contract_code,t.contract_code contractCode,t.obj_type,t.obj_type
+ objType,t.operator_link,t.operator_link operatorLink,t.operate,td.`name` planTypeName,ccp.plan_type planType
+ from contract_change_plan_detail t
+ inner join contract_change_plan ccp on t.plan_id = ccp.plan_id and ccp.status_cd = '0' and ccp.store_id = t.store_id
+ left join t_dict td on ccp.plan_type = td.status_cd and td.table_name = 'contract_change_plan' and td.table_columns = 'plan_type'
+ where 1 =1
+ <if test="aLink !=null and aLink != ''">
+ and t.a_link= #{aLink}
+ </if>
+ <if test="aContacts !=null and aContacts != ''">
+ and t.a_contacts= #{aContacts}
+ </if>
+ <if test="amount !=null and amount != ''">
+ and t.amount= #{amount}
+ </if>
+ <if test="contractType !=null and contractType != ''">
+ and t.contract_type= #{contractType}
+ </if>
+ <if test="detailId !=null and detailId != ''">
+ and t.detail_id= #{detailId}
+ </if>
+ <if test="storeId !=null and storeId != ''">
+ and t.store_id= #{storeId}
+ </if>
+ <if test="operator !=null and operator != ''">
+ and t.operator= #{operator}
+ </if>
+ <if test="signingTime !=null and signingTime != ''">
+ and t.signing_time= #{signingTime}
+ </if>
+ <if test="bContacts !=null and bContacts != ''">
+ and t.b_contacts= #{bContacts}
+ </if>
+ <if test="partyA !=null and partyA != ''">
+ and t.party_a= #{partyA}
+ </if>
+ <if test="bLink !=null and bLink != ''">
+ and t.b_link= #{bLink}
+ </if>
+ <if test="partyB !=null and partyB != ''">
+ and t.party_b= #{partyB}
+ </if>
+ <if test="contractId !=null and contractId != ''">
+ and t.contract_id= #{contractId}
+ </if>
+ <if test="objId !=null and objId != ''">
+ and t.obj_id= #{objId}
+ </if>
+ <if test="planId !=null and planId != ''">
+ and t.plan_id= #{planId}
+ </if>
+ <if test="contractName !=null and contractName != ''">
+ and t.contract_name= #{contractName}
+ </if>
+ <if test="startTime !=null and startTime != ''">
+ and t.start_time= #{startTime}
+ </if>
+ <if test="endTime !=null and endTime != ''">
+ and t.end_time= #{endTime}
+ </if>
+
+ <if test="contractCode !=null and contractCode != ''">
+ and t.contract_code= #{contractCode}
+ </if>
+ <if test="objType !=null and objType != ''">
+ and t.obj_type= #{objType}
+ </if>
+ <if test="operatorLink !=null and operatorLink != ''">
+ and t.operator_link= #{operatorLink}
+ </if>
+ <if test="operate !=null and operate != ''">
+ and t.operate= #{operate}
+ </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="updateContractChangePlanDetailInfo" parameterType="Map">
- update contract_change_plan_detail t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if>
-<if test="aLink !=null and aLink != ''">
-, t.a_link= #{aLink}
-</if>
-<if test="aContacts !=null and aContacts != ''">
-, t.a_contacts= #{aContacts}
-</if>
-<if test="amount !=null and amount != ''">
-, t.amount= #{amount}
-</if>
-<if test="contractType !=null and contractType != ''">
-, t.contract_type= #{contractType}
-</if>
-<if test="storeId !=null and storeId != ''">
-, t.store_id= #{storeId}
-</if>
-<if test="operator !=null and operator != ''">
-, t.operator= #{operator}
-</if>
-<if test="signingTime !=null and signingTime != ''">
-, t.signing_time= #{signingTime}
-</if>
-<if test="bContacts !=null and bContacts != ''">
-, t.b_contacts= #{bContacts}
-</if>
-<if test="partyA !=null and partyA != ''">
-, t.party_a= #{partyA}
-</if>
-<if test="bLink !=null and bLink != ''">
-, t.b_link= #{bLink}
-</if>
-<if test="partyB !=null and partyB != ''">
-, t.party_b= #{partyB}
-</if>
-<if test="contractId !=null and contractId != ''">
-, t.contract_id= #{contractId}
-</if>
-<if test="objId !=null and objId != ''">
-, t.obj_id= #{objId}
-</if>
-<if test="planId !=null and planId != ''">
-, t.plan_id= #{planId}
-</if>
-<if test="contractName !=null and contractName != ''">
-, t.contract_name= #{contractName}
-</if>
-<if test="startTime !=null and startTime != ''">
-, t.start_time= #{startTime}
-</if>
-<if test="endTime !=null and endTime != ''">
-, t.end_time= #{endTime}
-</if>
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if>
-<if test="contractCode !=null and contractCode != ''">
-, t.contract_code= #{contractCode}
-</if>
-<if test="objType !=null and objType != ''">
-, t.obj_type= #{objType}
-</if>
-<if test="operatorLink !=null and operatorLink != ''">
-, t.operator_link= #{operatorLink}
-</if>
- where 1=1 <if test="detailId !=null and detailId != ''">
-and t.detail_id= #{detailId}
-</if>
+ update contract_change_plan_detail t set t.status_cd = #{statusCd}
+ <if test="newBId != null and newBId != ''">
+ ,t.b_id = #{newBId}
+ </if>
+ <if test="aLink !=null and aLink != ''">
+ , t.a_link= #{aLink}
+ </if>
+ <if test="aContacts !=null and aContacts != ''">
+ , t.a_contacts= #{aContacts}
+ </if>
+ <if test="amount !=null and amount != ''">
+ , t.amount= #{amount}
+ </if>
+ <if test="contractType !=null and contractType != ''">
+ , t.contract_type= #{contractType}
+ </if>
+ <if test="storeId !=null and storeId != ''">
+ , t.store_id= #{storeId}
+ </if>
+ <if test="operator !=null and operator != ''">
+ , t.operator= #{operator}
+ </if>
+ <if test="signingTime !=null and signingTime != ''">
+ , t.signing_time= #{signingTime}
+ </if>
+ <if test="bContacts !=null and bContacts != ''">
+ , t.b_contacts= #{bContacts}
+ </if>
+ <if test="partyA !=null and partyA != ''">
+ , t.party_a= #{partyA}
+ </if>
+ <if test="bLink !=null and bLink != ''">
+ , t.b_link= #{bLink}
+ </if>
+ <if test="partyB !=null and partyB != ''">
+ , t.party_b= #{partyB}
+ </if>
+ <if test="contractId !=null and contractId != ''">
+ , t.contract_id= #{contractId}
+ </if>
+ <if test="objId !=null and objId != ''">
+ , t.obj_id= #{objId}
+ </if>
+ <if test="planId !=null and planId != ''">
+ , t.plan_id= #{planId}
+ </if>
+ <if test="contractName !=null and contractName != ''">
+ , t.contract_name= #{contractName}
+ </if>
+ <if test="startTime !=null and startTime != ''">
+ , t.start_time= #{startTime}
+ </if>
+ <if test="endTime !=null and endTime != ''">
+ , t.end_time= #{endTime}
+ </if>
+
+ <if test="contractCode !=null and contractCode != ''">
+ , t.contract_code= #{contractCode}
+ </if>
+ <if test="objType !=null and objType != ''">
+ , t.obj_type= #{objType}
+ </if>
+ <if test="operatorLink !=null and operatorLink != ''">
+ , t.operator_link= #{operatorLink}
+ </if>
+ where 1=1
+ <if test="detailId !=null and detailId != ''">
+ and t.detail_id= #{detailId}
+ </if>
</update>
<!-- 鏌ヨ鍚堝悓鍙樻洿鏄庣粏鏁伴噺 add by wuxw 2018-07-03 -->
- <select id="queryContractChangePlanDetailsCount" parameterType="Map" resultType="Map">
- select count(1) count
-from contract_change_plan_detail t
-where 1 =1
-<if test="aLink !=null and aLink != ''">
- and t.a_link= #{aLink}
-</if>
-<if test="aContacts !=null and aContacts != ''">
- and t.a_contacts= #{aContacts}
-</if>
-<if test="amount !=null and amount != ''">
- and t.amount= #{amount}
-</if>
-<if test="contractType !=null and contractType != ''">
- and t.contract_type= #{contractType}
-</if>
-<if test="detailId !=null and detailId != ''">
- and t.detail_id= #{detailId}
-</if>
-<if test="storeId !=null and storeId != ''">
- and t.store_id= #{storeId}
-</if>
-<if test="operator !=null and operator != ''">
- and t.operator= #{operator}
-</if>
-<if test="signingTime !=null and signingTime != ''">
- and t.signing_time= #{signingTime}
-</if>
-<if test="bContacts !=null and bContacts != ''">
- and t.b_contacts= #{bContacts}
-</if>
-<if test="partyA !=null and partyA != ''">
- and t.party_a= #{partyA}
-</if>
-<if test="bLink !=null and bLink != ''">
- and t.b_link= #{bLink}
-</if>
-<if test="partyB !=null and partyB != ''">
- and t.party_b= #{partyB}
-</if>
-<if test="contractId !=null and contractId != ''">
- and t.contract_id= #{contractId}
-</if>
-<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
-</if>
-<if test="planId !=null and planId != ''">
- and t.plan_id= #{planId}
-</if>
-<if test="contractName !=null and contractName != ''">
- and t.contract_name= #{contractName}
-</if>
-<if test="startTime !=null and startTime != ''">
- and t.start_time= #{startTime}
-</if>
-<if test="endTime !=null and endTime != ''">
- and t.end_time= #{endTime}
-</if>
-<if test="state !=null and state != ''">
- and t.state= #{state}
-</if>
-<if test="contractCode !=null and contractCode != ''">
- and t.contract_code= #{contractCode}
-</if>
-<if test="objType !=null and objType != ''">
- and t.obj_type= #{objType}
-</if>
-<if test="operatorLink !=null and operatorLink != ''">
- and t.operator_link= #{operatorLink}
-</if>
+ <select id="queryContractChangePlanDetailsCount" parameterType="Map" resultType="Map">
+ select count(1) count
+ from contract_change_plan_detail t
+ where 1 =1
+ <if test="aLink !=null and aLink != ''">
+ and t.a_link= #{aLink}
+ </if>
+ <if test="aContacts !=null and aContacts != ''">
+ and t.a_contacts= #{aContacts}
+ </if>
+ <if test="amount !=null and amount != ''">
+ and t.amount= #{amount}
+ </if>
+ <if test="contractType !=null and contractType != ''">
+ and t.contract_type= #{contractType}
+ </if>
+ <if test="detailId !=null and detailId != ''">
+ and t.detail_id= #{detailId}
+ </if>
+ <if test="storeId !=null and storeId != ''">
+ and t.store_id= #{storeId}
+ </if>
+ <if test="operator !=null and operator != ''">
+ and t.operator= #{operator}
+ </if>
+ <if test="signingTime !=null and signingTime != ''">
+ and t.signing_time= #{signingTime}
+ </if>
+ <if test="bContacts !=null and bContacts != ''">
+ and t.b_contacts= #{bContacts}
+ </if>
+ <if test="partyA !=null and partyA != ''">
+ and t.party_a= #{partyA}
+ </if>
+ <if test="bLink !=null and bLink != ''">
+ and t.b_link= #{bLink}
+ </if>
+ <if test="partyB !=null and partyB != ''">
+ and t.party_b= #{partyB}
+ </if>
+ <if test="contractId !=null and contractId != ''">
+ and t.contract_id= #{contractId}
+ </if>
+ <if test="objId !=null and objId != ''">
+ and t.obj_id= #{objId}
+ </if>
+ <if test="planId !=null and planId != ''">
+ and t.plan_id= #{planId}
+ </if>
+ <if test="contractName !=null and contractName != ''">
+ and t.contract_name= #{contractName}
+ </if>
+ <if test="startTime !=null and startTime != ''">
+ and t.start_time= #{startTime}
+ </if>
+ <if test="endTime !=null and endTime != ''">
+ and t.end_time= #{endTime}
+ </if>
- </select>
+ <if test="contractCode !=null and contractCode != ''">
+ and t.contract_code= #{contractCode}
+ </if>
+ <if test="objType !=null and objType != ''">
+ and t.obj_type= #{objType}
+ </if>
+ <if test="operatorLink !=null and operatorLink != ''">
+ and t.operator_link= #{operatorLink}
+ </if>
+ <if test="operate !=null and operate != ''">
+ and t.operate= #{operate}
+ </if>
+
+
+ </select>
</mapper>
--
Gitblit v1.8.0