From fa0c90d5a05eac4e83b204b86311de7cb0e4b418 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期三, 17 十二月 2025 16:08:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master

---
 service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml b/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml
index 002b531..2a5e1c3 100644
--- a/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml
@@ -25,10 +25,11 @@
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="deleted"    column="deleted"    />
+        <result property="feeType"    column="fee_type"    />
     </resultMap>
 
     <sql id="selectEstimatedReceivableVo">
-        select thisTab.id, thisTab.fee_system_no, thisTab.dispatch_no, thisTab.customer_name, thisTab.project_name, thisTab.order_date, thisTab.fee_name, thisTab.estimated_amount, thisTab.currency, thisTab.related_bill_name, thisTab.related_bill_status, thisTab.is_confirmed, thisTab.confirm_by, thisTab.confirm_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.create_time, thisTab.update_time, thisTab.deleted from estimated_receivable AS thisTab
+        select thisTab.id, thisTab.fee_system_no, thisTab.dispatch_no, thisTab.customer_name, thisTab.project_name, thisTab.order_date, thisTab.fee_name, thisTab.estimated_amount, thisTab.currency, thisTab.related_bill_name, thisTab.related_bill_status, thisTab.is_confirmed, thisTab.confirm_by, thisTab.confirm_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.create_time, thisTab.update_time, thisTab.deleted , thisTab.fee_type from estimated_receivable AS thisTab
     </sql>
     <sql id="selectEstimatedReceivableVoCount">
         select count(0) from estimated_receivable as thisTab
@@ -39,7 +40,8 @@
         <if test="dispatchNo != null  and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if>
         <if test="customerName != null  and customerName != ''"> and  thisTab.customer_name like concat('%', #{customerName}, '%')</if>
         <if test="projectName != null  and projectName != ''"> and  thisTab.project_name like concat('%', #{projectName}, '%')</if>
-        <if test="orderDate != null "> and thisTab.order_date = #{orderDate}</if>
+        <if test="orderDateBegin != null and orderDateBegin!='' and orderDateEnd != null and orderDateEnd!='' "> and thisTab.order_date between #{orderDateBegin} and #{orderDateEnd}</if>
+
         <if test="feeName != null  and feeName != ''"> and  thisTab.fee_name like concat('%', #{feeName}, '%')</if>
         <if test="estimatedAmount != null "> and thisTab.estimated_amount = #{estimatedAmount}</if>
         <if test="currency != null  and currency != ''"> and thisTab.currency = #{currency}</if>
@@ -49,6 +51,7 @@
         <if test="confirmBy != null  and confirmBy != ''"> and thisTab.confirm_by = #{confirmBy}</if>
         <if test="confirmTime != null "> and thisTab.confirm_time = #{confirmTime}</if>
         <if test="deleted != null "> and thisTab.deleted = #{deleted}</if>
+        <if test="feeType != null "> and thisTab.fee_type = #{feeType}</if>
     </sql>
 
     <!--鏌ヨ-->
@@ -95,6 +98,7 @@
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="deleted != null">deleted,</if>
+            <if test="feeType != null">fee_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="feeSystemNo != null and feeSystemNo != ''">#{feeSystemNo},</if>
@@ -116,17 +120,18 @@
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="deleted != null">#{deleted},</if>
+            <if test="feeType != null">#{feeType},</if>
          </trim>
     </insert>
 
     <insert id="insertEstimatedReceivableBatch" parameterType="java.util.List"  >
         insert into estimated_receivable
         <trim prefix="(" suffix=") values" suffixOverrides=",">
-            id,fee_system_no,dispatch_no,customer_name,project_name,order_date,fee_name,estimated_amount,currency,related_bill_name,related_bill_status,is_confirmed,confirm_by,confirm_time,remark,create_by,update_by,create_time,update_time,deleted,
+           fee_system_no,dispatch_no,customer_name,project_name,order_date,fee_name,estimated_amount,currency,related_bill_name,related_bill_status,is_confirmed,confirm_by,confirm_time,remark,create_by,update_by,create_time,update_time,deleted,fee_type,
         </trim>
         <foreach item="item" index="index" collection="list" separator=",">
             <trim prefix="(" suffix=") " suffixOverrides=",">
-                #{item.id},#{item.feeSystemNo},#{item.dispatchNo},#{item.customerName},#{item.projectName},#{item.orderDate},#{item.feeName},#{item.estimatedAmount},#{item.currency},#{item.relatedBillName},#{item.relatedBillStatus},#{item.isConfirmed},#{item.confirmBy},#{item.confirmTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.createTime},#{item.updateTime},#{item.deleted},
+                #{item.feeSystemNo},#{item.dispatchNo},#{item.customerName},#{item.projectName},#{item.orderDate},#{item.feeName},#{item.estimatedAmount},#{item.currency},#{item.relatedBillName},#{item.relatedBillStatus},#{item.isConfirmed},#{item.confirmBy},#{item.confirmTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.createTime},#{item.updateTime},#{item.deleted},#{item.feeType},
             </trim>
         </foreach>
     </insert>
@@ -154,6 +159,7 @@
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="deleted != null">deleted = #{deleted},</if>
+            <if test="feeType != null">fee_type = #{feeType},</if>
         </trim>
         where id = #{id}
     </update>
@@ -181,10 +187,23 @@
                 <if test="item.createTime != null">create_time = #{item.createTime},</if>
                 <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                 <if test="item.deleted != null">deleted = #{item.deleted},</if>
+                <if test="item.feeType != null">fee_type = #{item.feeType},</if>
             </trim>
         where id = #{item.id}
         </foreach>
     </update>
+    <update id="updateEstimatedReceivableBillStatus">
+        UPDATE estimated_receivable
+        SET related_bill_status = #{status}
+        <if test="billName !=null and billName != ''">
+            , related_bill_name = #{billName}
+        </if>
+
+        WHERE dispatch_no IN
+        <foreach item="item" collection="list" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </update>
 
     <!--鍒犻櫎-->
     <delete id="deleteEstimatedReceivableById" parameterType="Integer">

--
Gitblit v1.8.0