sen
2025-12-22 08b030a4cb662725c4f73e3b8a531de2c593369b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.cwgl.mapper.PayableFeeManagementMapper">
 
    <resultMap type="com.ruoyi.cwgl.domain.PayableFeeManagement" id="PayableFeeManagementResult">
        <result property="id"    column="id"    />
        <result property="systemNo"    column="system_no"    />
        <result property="relatedBillNo"    column="related_bill_no"    />
        <result property="sourceSystem"    column="source_system"    />
        <result property="businessSector"    column="business_sector"    />
        <result property="documentType"    column="document_type"    />
        <result property="documentNo"    column="document_no"    />
        <result property="isInternalSettlement"    column="is_internal_settlement"    />
        <result property="internalSettlementUnit"    column="internal_settlement_unit"    />
        <result property="supplierName"    column="supplier_name"    />
        <result property="projectName"    column="project_name"    />
        <result property="businessTime"    column="business_time"    />
        <result property="payableConfirmTime"    column="payable_confirm_time"    />
        <result property="payableAmount"    column="payable_amount"    />
        <result property="status"    column="status"    />
        <result property="remark"    column="remark"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="deleted"    column="deleted"    />
    </resultMap>
 
    <sql id="selectPayableFeeManagementVo">
        select thisTab.id, thisTab.system_no, thisTab.related_bill_no, thisTab.source_system, thisTab.business_sector, thisTab.document_type, thisTab.document_no, thisTab.is_internal_settlement, thisTab.internal_settlement_unit, thisTab.supplier_name, thisTab.project_name, thisTab.business_time, thisTab.payable_confirm_time, thisTab.payable_amount, thisTab.status, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from payable_fee_management AS thisTab
    </sql>
    <sql id="selectPayableFeeManagementVoCount">
        select count(0) from payable_fee_management as thisTab
    </sql>
 
    <sql id="whereCondition">
        <if test="systemNo != null  and systemNo != ''"> and thisTab.system_no = #{systemNo}</if>
        <if test="relatedBillNo != null  and relatedBillNo != ''"> and thisTab.related_bill_no = #{relatedBillNo}</if>
        <if test="sourceSystem != null  and sourceSystem != ''"> and thisTab.source_system = #{sourceSystem}</if>
        <if test="businessSector != null  and businessSector != ''"> and thisTab.business_sector = #{businessSector}</if>
        <if test="documentType != null  and documentType != ''"> and thisTab.document_type = #{documentType}</if>
        <if test="documentNo != null  and documentNo != ''"> and thisTab.document_no = #{documentNo}</if>
        <if test="isInternalSettlement != null  and isInternalSettlement != ''"> and thisTab.is_internal_settlement = #{isInternalSettlement}</if>
        <if test="internalSettlementUnit != null  and internalSettlementUnit != ''"> and thisTab.internal_settlement_unit = #{internalSettlementUnit}</if>
        <if test="supplierName != null  and supplierName != ''"> and  thisTab.supplier_name like concat('%', #{supplierName}, '%')</if>
        <if test="projectName != null  and projectName != ''"> and  thisTab.project_name like concat('%', #{projectName}, '%')</if>
        <if test="businessTime != null "> and thisTab.business_time = #{businessTime}</if>
        <if test="payableConfirmTime != null "> and thisTab.payable_confirm_time = #{payableConfirmTime}</if>
        <if test="payableAmount != null "> and thisTab.payable_amount = #{payableAmount}</if>
        <if test="status != null  and status != ''"> and thisTab.status = #{status}</if>
        <if test="deleted != null "> and thisTab.deleted = #{deleted}</if>
    </sql>
 
    <!--查询-->
    <select id="selectPayableFeeManagementById" parameterType="Integer" resultMap="PayableFeeManagementResult">
        <include refid="selectPayableFeeManagementVo"/>
        where id = #{id}
    </select>
 
    <select id="selectPayableFeeManagementCount" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagement" resultType="int">
        <include refid="selectPayableFeeManagementVoCount"/>
        <where>
            <include refid="whereCondition"/>
        </where>
    </select>
 
    <select id="selectPayableFeeManagementList" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagement" resultMap="PayableFeeManagementResult">
        <include refid="selectPayableFeeManagementVo"/>
        <where>
            <include refid="whereCondition"/>
        </where>
        order by thisTab.id desc
    </select>
 
    <!-- 新增 -->
    <insert id="insertPayableFeeManagement" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagement"  useGeneratedKeys="true" keyProperty="id">
        insert into payable_fee_management
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="systemNo != null and systemNo != ''">system_no,</if>
            <if test="relatedBillNo != null and relatedBillNo != ''">related_bill_no,</if>
            <if test="sourceSystem != null and sourceSystem != ''">source_system,</if>
            <if test="businessSector != null and businessSector != ''">business_sector,</if>
            <if test="documentType != null and documentType != ''">document_type,</if>
            <if test="documentNo != null and documentNo != ''">document_no,</if>
            <if test="isInternalSettlement != null and isInternalSettlement != ''">is_internal_settlement,</if>
            <if test="internalSettlementUnit != null">internal_settlement_unit,</if>
            <if test="supplierName != null and supplierName != ''">supplier_name,</if>
            <if test="projectName != null">project_name,</if>
            <if test="businessTime != null">business_time,</if>
            <if test="payableConfirmTime != null">payable_confirm_time,</if>
            <if test="payableAmount != null">payable_amount,</if>
            <if test="status != null">status,</if>
            <if test="remark != null">remark,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="deleted != null">deleted,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemNo != null and systemNo != ''">#{systemNo},</if>
            <if test="relatedBillNo != null and relatedBillNo != ''">#{relatedBillNo},</if>
            <if test="sourceSystem != null and sourceSystem != ''">#{sourceSystem},</if>
            <if test="businessSector != null and businessSector != ''">#{businessSector},</if>
            <if test="documentType != null and documentType != ''">#{documentType},</if>
            <if test="documentNo != null and documentNo != ''">#{documentNo},</if>
            <if test="isInternalSettlement != null and isInternalSettlement != ''">#{isInternalSettlement},</if>
            <if test="internalSettlementUnit != null">#{internalSettlementUnit},</if>
            <if test="supplierName != null and supplierName != ''">#{supplierName},</if>
            <if test="projectName != null">#{projectName},</if>
            <if test="businessTime != null">#{businessTime},</if>
            <if test="payableConfirmTime != null">#{payableConfirmTime},</if>
            <if test="payableAmount != null">#{payableAmount},</if>
            <if test="status != null">#{status},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="deleted != null">#{deleted},</if>
         </trim>
    </insert>
 
    <insert id="insertPayableFeeManagementBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into payable_fee_management
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,system_no,related_bill_no,source_system,business_sector,document_type,document_no,is_internal_settlement,internal_settlement_unit,supplier_name,project_name,business_time,payable_confirm_time,payable_amount,status,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.relatedBillNo},#{item.sourceSystem},#{item.businessSector},#{item.documentType},#{item.documentNo},#{item.isInternalSettlement},#{item.internalSettlementUnit},#{item.supplierName},#{item.projectName},#{item.businessTime},#{item.payableConfirmTime},#{item.payableAmount},#{item.status},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted},
            </trim>
        </foreach>
    </insert>
 
    <!-- 修改 -->
    <update id="updatePayableFeeManagement" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagement">
        update payable_fee_management
        <trim prefix="SET" suffixOverrides=",">
            <if test="systemNo != null and systemNo != ''">system_no = #{systemNo},</if>
            <if test="relatedBillNo != null and relatedBillNo != ''">related_bill_no = #{relatedBillNo},</if>
            <if test="sourceSystem != null and sourceSystem != ''">source_system = #{sourceSystem},</if>
            <if test="businessSector != null and businessSector != ''">business_sector = #{businessSector},</if>
            <if test="documentType != null and documentType != ''">document_type = #{documentType},</if>
            <if test="documentNo != null and documentNo != ''">document_no = #{documentNo},</if>
            <if test="isInternalSettlement != null and isInternalSettlement != ''">is_internal_settlement = #{isInternalSettlement},</if>
            <if test="internalSettlementUnit != null">internal_settlement_unit = #{internalSettlementUnit},</if>
            <if test="supplierName != null and supplierName != ''">supplier_name = #{supplierName},</if>
            <if test="projectName != null">project_name = #{projectName},</if>
            <if test="businessTime != null">business_time = #{businessTime},</if>
            <if test="payableConfirmTime != null">payable_confirm_time = #{payableConfirmTime},</if>
            <if test="payableAmount != null">payable_amount = #{payableAmount},</if>
            <if test="status != null">status = #{status},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="deleted != null">deleted = #{deleted},</if>
        </trim>
        where id = #{id}
    </update>
    <!-- 修改 -->
    <update id="updatePayableFeeManagementBatch" parameterType="java.util.List">
        <foreach collection="list" item="item" index="index" separator=";">
            update payable_fee_management
            <trim prefix="SET" suffixOverrides=",">
                <if test="item.systemNo != null and item.systemNo != ''">system_no = #{item.systemNo},</if>
                <if test="item.relatedBillNo != null and item.relatedBillNo != ''">related_bill_no = #{item.relatedBillNo},</if>
                <if test="item.sourceSystem != null and item.sourceSystem != ''">source_system = #{item.sourceSystem},</if>
                <if test="item.businessSector != null and item.businessSector != ''">business_sector = #{item.businessSector},</if>
                <if test="item.documentType != null and item.documentType != ''">document_type = #{item.documentType},</if>
                <if test="item.documentNo != null and item.documentNo != ''">document_no = #{item.documentNo},</if>
                <if test="item.isInternalSettlement != null and item.isInternalSettlement != ''">is_internal_settlement = #{item.isInternalSettlement},</if>
                <if test="item.internalSettlementUnit != null">internal_settlement_unit = #{item.internalSettlementUnit},</if>
                <if test="item.supplierName != null and item.supplierName != ''">supplier_name = #{item.supplierName},</if>
                <if test="item.projectName != null">project_name = #{item.projectName},</if>
                <if test="item.businessTime != null">business_time = #{item.businessTime},</if>
                <if test="item.payableConfirmTime != null">payable_confirm_time = #{item.payableConfirmTime},</if>
                <if test="item.payableAmount != null">payable_amount = #{item.payableAmount},</if>
                <if test="item.status != null">status = #{item.status},</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>
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.deleted != null">deleted = #{item.deleted},</if>
            </trim>
        where id = #{item.id}
        </foreach>
    </update>
 
    <!--删除-->
    <delete id="deletePayableFeeManagementById" parameterType="Integer">
        delete from payable_fee_management where id = #{id}
    </delete>
    <delete id="deletePayableFeeManagementByIds" parameterType="Integer">
        delete from payable_fee_management where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
</mapper>