From 3974fad5d836431e417e99220cc07bb5b0aba331 Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期一, 08 十二月 2025 14:16:16 +0800
Subject: [PATCH] 提交

---
 tms/src/main/resources/mapper/tms/TmsContractMapper.xml |   62 +++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/tms/src/main/resources/mapper/tms/TmsContractMapper.xml b/tms/src/main/resources/mapper/tms/TmsContractMapper.xml
index b5a7691..4349682 100644
--- a/tms/src/main/resources/mapper/tms/TmsContractMapper.xml
+++ b/tms/src/main/resources/mapper/tms/TmsContractMapper.xml
@@ -19,6 +19,7 @@
         <result property="partyAContact"    column="party_a_contact"    />
         <result property="partyAContactInfo"    column="party_a_contact_info"    />
         <result property="partyBName"    column="party_b_name"    />
+        <result property="partyBId"    column="party_b_id"    />
         <result property="partyBContact"    column="party_b_contact"    />
         <result property="partyBContactInfo"    column="party_b_contact_info"    />
         <result property="contractAmount"    column="contract_amount"    />
@@ -40,10 +41,18 @@
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="isTempContract"    column="is_temp_contract"    />
+        <result property="cycleType"    column="cycle_type"    />
+        <result property="billingCycleLastMonthDay"    column="billing_cycle_last_month_day"    />
+        <result property="billingCycleCurrentMonthDay"    column="billing_cycle_current_month_day"    />
+        <result property="reconciliationDay"    column="reconciliation_day"    />
+        <result property="invoiceDay"    column="invoice_day"    />
+        <result property="paymentDay"    column="payment_day"    />
+        <result property="totalAccountDay"    column="total_account_day"    />
     </resultMap>
 
     <sql id="selectTmsContractVo">
-        select thisTab.id, thisTab.system_code, thisTab.contract_code, thisTab.contract_name, thisTab.contract_type, thisTab.sign_date, thisTab.contract_start_date, thisTab.contract_end_date, thisTab.contract_status, thisTab.party_a_name, thisTab.party_a_id, thisTab.party_a_contact, thisTab.party_a_contact_info, thisTab.party_b_name, thisTab.party_b_contact, thisTab.party_b_contact_info, thisTab.contract_amount, thisTab.payment_method, thisTab.payment_cycle, thisTab.paid_amount, thisTab.unpaid_amount, thisTab.invoice_status, thisTab.fulfillment_status, thisTab.fulfillment_progress, thisTab.acceptance_status, thisTab.attachment_name, thisTab.attachment_path, thisTab.uploaded_by, thisTab.upload_time, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_contract AS thisTab
+        select thisTab.id, thisTab.system_code, thisTab.contract_code, thisTab.contract_name, thisTab.contract_type, thisTab.sign_date, thisTab.contract_start_date, thisTab.contract_end_date, thisTab.contract_status, thisTab.party_a_name, thisTab.party_a_id, thisTab.party_a_contact, thisTab.party_a_contact_info, thisTab.party_b_name, thisTab.party_b_id, thisTab.party_b_contact, thisTab.party_b_contact_info, thisTab.contract_amount, thisTab.payment_method, thisTab.payment_cycle, thisTab.paid_amount, thisTab.unpaid_amount, thisTab.invoice_status, thisTab.fulfillment_status, thisTab.fulfillment_progress, thisTab.acceptance_status, thisTab.attachment_name, thisTab.attachment_path, thisTab.uploaded_by, thisTab.upload_time, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.is_temp_contract,  thisTab.cycle_type, thisTab.billing_cycle_last_month_day, thisTab.billing_cycle_current_month_day, thisTab.reconciliation_day, thisTab.invoice_day, thisTab.payment_day, thisTab.total_account_day  from tms_contract AS thisTab
     </sql>
     <sql id="selectTmsContractVoCount">
         select count(0) from tms_contract as thisTab
@@ -60,6 +69,8 @@
         <if test="contractStatus != null "> and thisTab.contract_status = #{contractStatus}</if>
         <if test="partyAName != null  and partyAName != ''"> and  thisTab.party_a_name like concat('%', #{partyAName}, '%')</if>
         <if test="partyAId != null "> and thisTab.party_a_id = #{partyAId}</if>
+        <if test="partyBId != null "> and thisTab.party_b_id = #{partyBId}</if>
+
         <if test="partyBName != null  and partyBName != ''"> and  thisTab.party_b_name like concat('%', #{partyBName}, '%')</if>
         <if test="contractAmount != null "> and thisTab.contract_amount = #{contractAmount}</if>
         <if test="paymentMethod != null "> and thisTab.payment_method = #{paymentMethod}</if>
@@ -67,6 +78,14 @@
         <if test="fulfillmentStatus != null "> and thisTab.fulfillment_status = #{fulfillmentStatus}</if>
         <if test="acceptanceStatus != null "> and thisTab.acceptance_status = #{acceptanceStatus}</if>
         <if test="status != null "> and thisTab.status = #{status}</if>
+        <if test="isTempContract != null "> and thisTab.is_temp_contract = #{isTempContract}</if>
+        <if test="cycleType != null "> and thisTab.cycle_type = #{cycleType}</if>
+        <if test="billingCycleLastMonthDay != null "> and thisTab.billing_cycle_last_month_day = #{billingCycleLastMonthDay}</if>
+        <if test="billingCycleCurrentMonthDay != null "> and thisTab.billing_cycle_current_month_day = #{billingCycleCurrentMonthDay}</if>
+        <if test="reconciliationDay != null "> and thisTab.reconciliation_day = #{reconciliationDay}</if>
+        <if test="invoiceDay != null "> and thisTab.invoice_day = #{invoiceDay}</if>
+        <if test="paymentDay != null "> and thisTab.payment_day = #{paymentDay}</if>
+        <if test="totalAccountDay != null "> and thisTab.total_account_day = #{totalAccountDay}</if>
     </sql>
 
     <!--鏌ヨ-->
@@ -107,6 +126,7 @@
             <if test="partyAContact != null">party_a_contact,</if>
             <if test="partyAContactInfo != null">party_a_contact_info,</if>
             <if test="partyBName != null and partyBName != ''">party_b_name,</if>
+            <if test="partyBId != null">party_b_id,</if>
             <if test="partyBContact != null">party_b_contact,</if>
             <if test="partyBContactInfo != null">party_b_contact_info,</if>
             <if test="contractAmount != null">contract_amount,</if>
@@ -128,6 +148,14 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="isTempContract != null">is_temp_contract,</if>
+            <if test="cycleType != null">cycle_type,</if>
+            <if test="billingCycleLastMonthDay != null">billing_cycle_last_month_day,</if>
+            <if test="billingCycleCurrentMonthDay != null">billing_cycle_current_month_day,</if>
+            <if test="reconciliationDay != null">reconciliation_day,</if>
+            <if test="invoiceDay != null">invoice_day,</if>
+            <if test="paymentDay != null">payment_day,</if>
+            <if test="totalAccountDay != null">total_account_day,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -143,6 +171,7 @@
             <if test="partyAContact != null">#{partyAContact},</if>
             <if test="partyAContactInfo != null">#{partyAContactInfo},</if>
             <if test="partyBName != null and partyBName != ''">#{partyBName},</if>
+            <if test="partyBId != null">#{partyBId},</if>
             <if test="partyBContact != null">#{partyBContact},</if>
             <if test="partyBContactInfo != null">#{partyBContactInfo},</if>
             <if test="contractAmount != null">#{contractAmount},</if>
@@ -164,17 +193,25 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="isTempContract != null">#{isTempContract},</if>
+            <if test="cycleType != null">#{cycleType},</if>
+            <if test="billingCycleLastMonthDay != null">#{billingCycleLastMonthDay},</if>
+            <if test="billingCycleCurrentMonthDay != null">#{billingCycleCurrentMonthDay},</if>
+            <if test="reconciliationDay != null">#{reconciliationDay},</if>
+            <if test="invoiceDay != null">#{invoiceDay},</if>
+            <if test="paymentDay != null">#{paymentDay},</if>
+            <if test="totalAccountDay != null">#{totalAccountDay},</if>
         </trim>
     </insert>
 
     <insert id="insertTmsContractBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
         insert into tms_contract
         <trim prefix="(" suffix=") values" suffixOverrides=",">
-            id,system_code,contract_code,contract_name,contract_type,sign_date,contract_start_date,contract_end_date,contract_status,party_a_name,party_a_id,party_a_contact,party_a_contact_info,party_b_name,party_b_contact,party_b_contact_info,contract_amount,payment_method,payment_cycle,paid_amount,unpaid_amount,invoice_status,fulfillment_status,fulfillment_progress,acceptance_status,attachment_name,attachment_path,uploaded_by,upload_time,status,create_by,create_time,update_by,update_time,remark,
+            id,system_code,contract_code,contract_name,contract_type,sign_date,contract_start_date,contract_end_date,contract_status,party_a_name,party_a_id,party_a_contact,party_a_contact_info,party_b_name,party_b_id,party_b_contact,party_b_contact_info,contract_amount,payment_method,payment_cycle,paid_amount,unpaid_amount,invoice_status,fulfillment_status,fulfillment_progress,acceptance_status,attachment_name,attachment_path,uploaded_by,upload_time,status,create_by,create_time,update_by,update_time,remark,is_temp_contract,cycle_type,billing_cycle_last_month_day,billing_cycle_current_month_day,reconciliation_day,invoice_day,payment_day,total_account_day,
         </trim>
         <foreach item="item" index="index" collection="list" separator=",">
             <trim prefix="(" suffix=") " suffixOverrides=",">
-                #{item.id},#{item.systemCode},#{item.contractCode},#{item.contractName},#{item.contractType},#{item.signDate},#{item.contractStartDate},#{item.contractEndDate},#{item.contractStatus},#{item.partyAName},#{item.partyAId},#{item.partyAContact},#{item.partyAContactInfo},#{item.partyBName},#{item.partyBContact},#{item.partyBContactInfo},#{item.contractAmount},#{item.paymentMethod},#{item.paymentCycle},#{item.paidAmount},#{item.unpaidAmount},#{item.invoiceStatus},#{item.fulfillmentStatus},#{item.fulfillmentProgress},#{item.acceptanceStatus},#{item.attachmentName},#{item.attachmentPath},#{item.uploadedBy},#{item.uploadTime},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
+                #{item.id},#{item.systemCode},#{item.contractCode},#{item.contractName},#{item.contractType},#{item.signDate},#{item.contractStartDate},#{item.contractEndDate},#{item.contractStatus},#{item.partyAName},#{item.partyAId},#{item.partyAContact},#{item.partyAContactInfo},#{item.partyBName},#{item.partyBId},#{item.partyBContact},#{item.partyBContactInfo},#{item.contractAmount},#{item.paymentMethod},#{item.paymentCycle},#{item.paidAmount},#{item.unpaidAmount},#{item.invoiceStatus},#{item.fulfillmentStatus},#{item.fulfillmentProgress},#{item.acceptanceStatus},#{item.attachmentName},#{item.attachmentPath},#{item.uploadedBy},#{item.uploadTime},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.isTempContract},#{item.cycleType},#{item.billingCycleLastMonthDay},#{item.billingCycleCurrentMonthDay},#{item.reconciliationDay},#{item.invoiceDay},#{item.paymentDay},#{item.totalAccountDay},
             </trim>
         </foreach>
     </insert>
@@ -196,6 +233,7 @@
             <if test="partyAContact != null">party_a_contact = #{partyAContact},</if>
             <if test="partyAContactInfo != null">party_a_contact_info = #{partyAContactInfo},</if>
             <if test="partyBName != null and partyBName != ''">party_b_name = #{partyBName},</if>
+            <if test="partyBId != null">party_b_id = #{partyBId},</if>
             <if test="partyBContact != null">party_b_contact = #{partyBContact},</if>
             <if test="partyBContactInfo != null">party_b_contact_info = #{partyBContactInfo},</if>
             <if test="contractAmount != null">contract_amount = #{contractAmount},</if>
@@ -217,6 +255,14 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="isTempContract != null">is_temp_contract = #{isTempContract},</if>
+            <if test="cycleType != null">cycle_type = #{cycleType},</if>
+            <if test="billingCycleLastMonthDay != null">billing_cycle_last_month_day = #{billingCycleLastMonthDay},</if>
+            <if test="billingCycleCurrentMonthDay != null">billing_cycle_current_month_day = #{billingCycleCurrentMonthDay},</if>
+            <if test="reconciliationDay != null">reconciliation_day = #{reconciliationDay},</if>
+            <if test="invoiceDay != null">invoice_day = #{invoiceDay},</if>
+            <if test="paymentDay != null">payment_day = #{paymentDay},</if>
+            <if test="totalAccountDay != null">total_account_day = #{totalAccountDay},</if>
         </trim>
         where id = #{id}
     </update>
@@ -238,6 +284,7 @@
                 <if test="item.partyAContact != null">party_a_contact = #{item.partyAContact},</if>
                 <if test="item.partyAContactInfo != null">party_a_contact_info = #{item.partyAContactInfo},</if>
                 <if test="item.partyBName != null and item.partyBName != ''">party_b_name = #{item.partyBName},</if>
+                <if test="item.partyBId != null">party_b_id = #{item.partyBId},</if>
                 <if test="item.partyBContact != null">party_b_contact = #{item.partyBContact},</if>
                 <if test="item.partyBContactInfo != null">party_b_contact_info = #{item.partyBContactInfo},</if>
                 <if test="item.contractAmount != null">contract_amount = #{item.contractAmount},</if>
@@ -259,6 +306,14 @@
                 <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                 <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                 <if test="item.remark != null">remark = #{item.remark},</if>
+                <if test="item.isTempContract != null">is_temp_contract = #{item.isTempContract},</if>
+                <if test="item.cycleType != null">cycle_type = #{item.cycleType},</if>
+                <if test="item.billingCycleLastMonthDay != null">billing_cycle_last_month_day = #{item.billingCycleLastMonthDay},</if>
+                <if test="item.billingCycleCurrentMonthDay != null">billing_cycle_current_month_day = #{item.billingCycleCurrentMonthDay},</if>
+                <if test="item.reconciliationDay != null">reconciliation_day = #{item.reconciliationDay},</if>
+                <if test="item.invoiceDay != null">invoice_day = #{item.invoiceDay},</if>
+                <if test="item.paymentDay != null">payment_day = #{item.paymentDay},</if>
+                <if test="item.totalAccountDay != null">total_account_day = #{item.totalAccountDay},</if>
             </trim>
             where id = #{item.id}
         </foreach>
@@ -275,4 +330,5 @@
         </foreach>
     </delete>
 
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0