|
@@ -309,6 +309,73 @@
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryAmount" resultType="com.ydtech.modules.fnc.entity.SettlementDocumentaryFeesEntity">
|
|
|
|
|
+ select
|
|
|
|
|
+ a.id as "id",
|
|
|
|
|
+ a.total_orders as "totalOrders",
|
|
|
|
|
+ DATE_FORMAT( a.signing_time, '%Y-%m') as "yearMonthSignDate",
|
|
|
|
|
+ a.time_frame as "timeFrame",
|
|
|
|
|
+ a.total_amount as "totalAmount",
|
|
|
|
|
+ a.create_time as "createTime",
|
|
|
|
|
+ a.start_time as "startTime",
|
|
|
|
|
+ a.end_time as "endTime",
|
|
|
|
|
+ a.invoiced_settled_amount as "settlementAmount",
|
|
|
|
|
+ a.agree_ment_id as "agreeMentId",
|
|
|
|
|
+ a.partner_companies_id as "partnerCompaniesId",
|
|
|
|
|
+ a.invoicing_method as "invoicingMethod",
|
|
|
|
|
+ a.tax_points as "taxPoints",
|
|
|
|
|
+ a.expend_amount as "expendAmount",
|
|
|
|
|
+ a.parent_id as "parentId",
|
|
|
|
|
+ a.handling_fees_status as "handlingFeesStatus",
|
|
|
|
|
+ a.agreement_type as "agreementType",
|
|
|
|
|
+ a.settlement_time as "settlementTime",
|
|
|
|
|
+ a.settlement_image_id as "settlementImageId",
|
|
|
|
|
+ a.Invoiced_not_settled_amount as "InvoicedNotSettledAmount",
|
|
|
|
|
+ a.completion_status as "completionStatus",
|
|
|
|
|
+ a.task_id as "taskId",
|
|
|
|
|
+ upf.url as "imageUrl",
|
|
|
|
|
+ a.unsettled_amount as "unsettledAmount"
|
|
|
|
|
+ from settlement_documentary_fees a
|
|
|
|
|
+ LEFT JOIN ins_upload_files upf on a.settlement_image_id=upf.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ 1=1
|
|
|
|
|
+ <if test="partnerCompaniesId !=null and partnerCompaniesId !=''">
|
|
|
|
|
+ and a.partner_companies_id =#{partnerCompaniesId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="handlingFeesStatus !=null and handlingFeesStatus !=''">
|
|
|
|
|
+ and a.handling_fees_status =#{handlingFeesStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isNotCar !=null and isNotCar !=''">
|
|
|
|
|
+ and a.is_not_car =#{isNotCar}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="agreementType !=null and agreementType !=''">
|
|
|
|
|
+ and a.agreement_type =#{agreementType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="parentId !=null and parentId !=''">
|
|
|
|
|
+ and a.parent_id =#{parentId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="settlementStatus !=null and settlementStatus !=''">
|
|
|
|
|
+ and a.settlement_status =#{settlementStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completionStatus !=null and completionStatus !=''">
|
|
|
|
|
+ and a.completion_status =#{completionStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="year !=null and year !=''">
|
|
|
|
|
+ AND YEAR(a.signing_time) =#{year}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="month !=null and month !=''">
|
|
|
|
|
+ AND month(a.signing_time) =#{month}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="day !=null and day !=''">
|
|
|
|
|
+ AND day(a.signing_time) =#{day}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ORDER BY a.create_time desc
|
|
|
|
|
+
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<select id="querySettleNew" resultType="com.ydtech.modules.fnc.entity.SettlementDocumentaryFeesEntity">
|
|
<select id="querySettleNew" resultType="com.ydtech.modules.fnc.entity.SettlementDocumentaryFeesEntity">
|
|
|
select
|
|
select
|
|
|
a.id as "id",
|
|
a.id as "id",
|