From b497ff41e47f4ebe69b86f13f6972f34f33f4884 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 01 六月 2021 09:35:46 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
index b99ad77..2ac9dd1 100644
--- a/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/store/ContractChangePlanDetailServiceDaoImplMapper.xml
@@ -9,11 +9,11 @@
     <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,b_link,
-        party_b,contract_id,obj_id,plan_id,contract_name,start_time,end_time,state,contract_code,obj_type,operator_link,operate
+        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},
-        #{state},#{contractCode},#{objType},#{operatorLink},#{operate}
+        #{contractCode},#{objType},#{operatorLink},#{operate}
         )
     </insert>
 
@@ -26,9 +26,11 @@
         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,t.operate
+        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}
@@ -84,9 +86,7 @@
         <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>
@@ -164,9 +164,7 @@
         <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>
@@ -242,9 +240,8 @@
         <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>

--
Gitblit v1.8.0