From 849648e82e5dec96f9f30fcc9c9bd799268b1f4c Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 09 四月 2026 10:40:44 +0800
Subject: [PATCH] 新增资金流水导入
---
service/src/main/resources/mapper/cwgl/PayableBillManagementMapper.xml | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/service/src/main/resources/mapper/cwgl/PayableBillManagementMapper.xml b/service/src/main/resources/mapper/cwgl/PayableBillManagementMapper.xml
index 8ef03e2..0136e4b 100644
--- a/service/src/main/resources/mapper/cwgl/PayableBillManagementMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/PayableBillManagementMapper.xml
@@ -28,6 +28,8 @@
<result property="billSendDate" column="bill_send_date" />
<result property="billDueDate" column="bill_due_date" />
<result property="status" column="status" />
+ <result property="auditStatus" column="audit_status" />
+ <result property="sourceSystemId" column="source_system_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
@@ -37,7 +39,7 @@
</resultMap>
<sql id="selectPayableBillManagementVo">
- select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.supplier_name, thisTab.is_internal_settlement, thisTab.internal_settlement_unit, thisTab.document_count, thisTab.total_amount, thisTab.currency, thisTab.discount_amount, thisTab.paid_amount, thisTab.pending_amount, thisTab.exchange_rate, thisTab.cny_amount, thisTab.period_type, thisTab.business_start_date, thisTab.business_end_date, thisTab.billing_start_date, thisTab.billing_end_date, thisTab.bill_generate_date, thisTab.bill_send_date, thisTab.bill_due_date, thisTab.status, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from payable_bill_management AS thisTab
+ select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.supplier_name, thisTab.is_internal_settlement, thisTab.internal_settlement_unit, thisTab.document_count, thisTab.total_amount, thisTab.currency, thisTab.discount_amount, thisTab.paid_amount, thisTab.pending_amount, thisTab.exchange_rate, thisTab.cny_amount, thisTab.period_type, thisTab.business_start_date, thisTab.business_end_date, thisTab.billing_start_date, thisTab.billing_end_date, thisTab.bill_generate_date, thisTab.bill_send_date, thisTab.bill_due_date, thisTab.status, thisTab.audit_status, thisTab.source_system_id, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from payable_bill_management AS thisTab
</sql>
<sql id="selectPayableBillManagementVoCount">
select count(0) from payable_bill_management as thisTab
@@ -65,7 +67,16 @@
<if test="billGenerateDate != null "> and thisTab.bill_generate_date = #{billGenerateDate}</if>
<if test="billSendDate != null "> and thisTab.bill_send_date = #{billSendDate}</if>
<if test="billDueDate != null "> and thisTab.bill_due_date = #{billDueDate}</if>
- <if test="status != null and status != ''"> and thisTab.status = #{status}</if>
+ <if test="status != null and status != ''">
+ <choose>
+ <when test="status == -1">
+ and thisTab.status in (0, 1)
+ </when>
+ <when test="status > 0">
+ and thisTab.status = #{status}
+ </when>
+ </choose>
+ </if>
<if test="deleted != null "> and thisTab.deleted = #{deleted}</if>
</sql>
@@ -88,6 +99,11 @@
<include refid="whereCondition"/>
</where>
order by thisTab.id desc
+ </select>
+
+ <select id="selectPayableBillManagementBySystemNo" parameterType="String" resultMap="PayableBillManagementResult">
+ <include refid="selectPayableBillManagementVo"/>
+ where system_no = #{systemNo}
</select>
<!-- 鏂板 -->
@@ -116,6 +132,8 @@
<if test="billSendDate != null">bill_send_date,</if>
<if test="billDueDate != null">bill_due_date,</if>
<if test="status != null">status,</if>
+ <if test="auditStatus != null">audit_status,</if>
+ <if test="sourceSystemId != null">source_system_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@@ -146,6 +164,8 @@
<if test="billSendDate != null">#{billSendDate},</if>
<if test="billDueDate != null">#{billDueDate},</if>
<if test="status != null">#{status},</if>
+ <if test="auditStatus != null">#{auditStatus},</if>
+ <if test="sourceSystemId != null">#{sourceSystemId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@@ -158,11 +178,11 @@
<insert id="insertPayableBillManagementBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert into payable_bill_management
<trim prefix="(" suffix=") values" suffixOverrides=",">
- id,system_no,bill_name,supplier_name,is_internal_settlement,internal_settlement_unit,document_count,total_amount,currency,discount_amount,paid_amount,pending_amount,exchange_rate,cny_amount,period_type,business_start_date,business_end_date,billing_start_date,billing_end_date,bill_generate_date,bill_send_date,bill_due_date,status,remark,create_by,create_time,update_by,update_time,deleted,
+ id,system_no,bill_name,supplier_name,is_internal_settlement,internal_settlement_unit,document_count,total_amount,currency,discount_amount,paid_amount,pending_amount,exchange_rate,cny_amount,period_type,business_start_date,business_end_date,billing_start_date,billing_end_date,bill_generate_date,bill_send_date,bill_due_date,status,audit_status,source_system_id,remark,create_by,create_time,update_by,update_time,deleted,
</trim>
<foreach item="item" index="index" collection="list" separator=",">
- <trim prefix="(" suffix=") " suffixOverrides=",">
- #{item.id},#{item.systemNo},#{item.billName},#{item.supplierName},#{item.isInternalSettlement},#{item.internalSettlementUnit},#{item.documentCount},#{item.totalAmount},#{item.currency},#{item.discountAmount},#{item.paidAmount},#{item.pendingAmount},#{item.exchangeRate},#{item.cnyAmount},#{item.periodType},#{item.businessStartDate},#{item.businessEndDate},#{item.billingStartDate},#{item.billingEndDate},#{item.billGenerateDate},#{item.billSendDate},#{item.billDueDate},#{item.status},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted},
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ #{item.id},#{item.systemNo},#{item.billName},#{item.supplierName},#{item.isInternalSettlement},#{item.internalSettlementUnit},#{item.documentCount},#{item.totalAmount},#{item.currency},#{item.discountAmount},#{item.paidAmount},#{item.pendingAmount},#{item.exchangeRate},#{item.cnyAmount},#{item.periodType},#{item.businessStartDate},#{item.businessEndDate},#{item.billingStartDate},#{item.billingEndDate},#{item.billGenerateDate},#{item.billSendDate},#{item.billDueDate},#{item.status},#{item.auditStatus},#{item.sourceSystemId},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted},
</trim>
</foreach>
</insert>
@@ -193,6 +213,8 @@
<if test="billSendDate != null">bill_send_date = #{billSendDate},</if>
<if test="billDueDate != null">bill_due_date = #{billDueDate},</if>
<if test="status != null">status = #{status},</if>
+ <if test="auditStatus != null">audit_status = #{auditStatus},</if>
+ <if test="sourceSystemId != null">source_system_id = #{sourceSystemId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@@ -229,6 +251,8 @@
<if test="item.billSendDate != null">bill_send_date = #{item.billSendDate},</if>
<if test="item.billDueDate != null">bill_due_date = #{item.billDueDate},</if>
<if test="item.status != null">status = #{item.status},</if>
+ <if test="item.auditStatus != null">audit_status = #{item.auditStatus},</if>
+ <if test="item.sourceSystemId != null">source_system_id = #{item.sourceSystemId},</if>
<if test="item.remark != null">remark = #{item.remark},</if>
<if test="item.createBy != null">create_by = #{item.createBy},</if>
<if test="item.createTime != null">create_time = #{item.createTime},</if>
--
Gitblit v1.8.0