|
|
@@ -3,7 +3,7 @@
|
|
|
<mapper namespace="org.jeecg.modules.hlwsubcontractor.mapper.HlwSubcontractorAccountFlowMapper">
|
|
|
|
|
|
|
|
|
- <!--合作商户数据-->
|
|
|
+ <!--合作商户数据(新)-->
|
|
|
<select id="companyBusinessList" resultType="org.jeecg.modules.hlwsubcontractor.entity.HlwSubcontractorAccountFlow" >
|
|
|
select t.* from ((
|
|
|
SELECT
|
|
|
@@ -87,7 +87,7 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <!--合作商户数据计算金额-->
|
|
|
+ <!--合作商户数据计算金额(新)-->
|
|
|
<select id="findCompanyBusinessList" resultType="org.jeecg.modules.hlwsubcontractor.entity.HlwSubcontractorAccountFlow" >
|
|
|
select t.* from ((
|
|
|
SELECT
|
|
|
@@ -171,4 +171,43 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+ <!--合作商户业务明细list(新)-->
|
|
|
+ <select id="companyBusinessDetailList" resultType="org.jeecg.modules.hlwsubcontractor.entity.HlwSubcontractorAccountFlow" >
|
|
|
+ SELECT
|
|
|
+ a.id AS "id",
|
|
|
+ (a.amount+a.service_fee) AS "totalPayment",
|
|
|
+ a.create_time AS "createTime",
|
|
|
+ hr.name as "requirementName",
|
|
|
+ hr.description as "description",
|
|
|
+ hi.invoice as "invoice",
|
|
|
+ hr.id as "requirementId",
|
|
|
+ a.is_through_platform AS "isThroughPlatform",
|
|
|
+ has.file_path_prefix as "filePathPrefix",
|
|
|
+ ho.id as "orderId"
|
|
|
+ FROM hlw_subcontractor_account_flow a
|
|
|
+ left join hlw_payment hpa on a.payment_id=hpa.id
|
|
|
+ left join hlw_payment_detail hp on hp.payment_id=a.payment_id
|
|
|
+ left join hlw_order ho on ho.id=hp.order_id
|
|
|
+ left join hlw_requirement hr on hr.id=ho.requirement_id
|
|
|
+ left join hlw_invoice hi on hi.id=a.invoice_id
|
|
|
+ left join hlw_application_setting has on has.id=hpa.application_id
|
|
|
+ <where>
|
|
|
+
|
|
|
+
|
|
|
+ a.type=0
|
|
|
+ and a.is_through_platform=#{hlwSubcontractorAccountFlow.isThroughPlatform}
|
|
|
+ <if test="hlwSubcontractorAccountFlow.paymentResultTime_begin != null and hlwSubcontractorAccountFlow.paymentResultTime_begin !=''">
|
|
|
+ and a.create_time between #{hlwSubcontractorAccountFlow.paymentResultTime_begin} and #{hlwSubcontractorAccountFlow.paymentResultTime_end}
|
|
|
+ </if>
|
|
|
+ <if test="hlwSubcontractorAccountFlow.isThroughPlatform ==''">
|
|
|
+ and hpa.company_id=#{hlwSubcontractorAccountFlow.companyId}
|
|
|
+ </if>
|
|
|
+ <if test="hlwSubcontractorAccountFlow.subcontractorId != null">
|
|
|
+ and hpa.subcontractor_id=#{hlwSubcontractorAccountFlow.subcontractorId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by a.id
|
|
|
+ ORDER BY a.update_time DESC, a.id ASC
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|