Commit d9882707 by jianan

前端对接问题修复110

parent 73719ba7
...@@ -10,6 +10,12 @@ import java.time.LocalDate; ...@@ -10,6 +10,12 @@ import java.time.LocalDate;
@Data @Data
public class PayableReportVO { public class PayableReportVO {
/** /**
* 应付款编号
*/
@Schema(description = "应付款编号")
private String payableNo;
/**
* 保单号 * 保单号
*/ */
@Schema(description = "policy no") @Schema(description = "policy no")
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<select id="payableReportPage" resultType="com.yd.csf.service.vo.PayableReportVO"> <select id="payableReportPage" resultType="com.yd.csf.service.vo.PayableReportVO">
select select
null as payable_no,
ef.policy_no as policyNo, ef.policy_no as policyNo,
ef.premium as premium, ef.premium as premium,
ef.insurance_company_biz_id as insuranceCompanyBizId, ef.insurance_company_biz_id as insuranceCompanyBizId,
...@@ -88,8 +89,9 @@ ...@@ -88,8 +89,9 @@
AND pb1.is_deleted = 0 AND pb1.is_deleted = 0
) first_broker on ef.policy_no = first_broker.policy_no ) first_broker on ef.policy_no = first_broker.policy_no
<where> <where>
ef.fortune_biz_type = 'R'
<if test="expectedFortuneIds != null and expectedFortuneIds.size > 0"> <if test="expectedFortuneIds != null and expectedFortuneIds.size > 0">
ef.id in and ef.id in
<foreach collection="expectedFortuneIds" item="item" open="(" close=")" separator=","> <foreach collection="expectedFortuneIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
...@@ -97,6 +99,43 @@ ...@@ -97,6 +99,43 @@
and ef.is_deleted = 0 and ef.is_deleted = 0
</where> </where>
group by ef.policy_no, ef.fortune_period group by ef.policy_no, ef.fortune_period
order by ef.policy_no, ef.fortune_period union all
select
ef.payable_no as payable_no,
ef.policy_no as policyNo,
ef.premium as premium,
ef.insurance_company_biz_id as insuranceCompanyBizId,
p.insurance_company as insuranceCompany,
ef.product_launch_biz_id as productLaunchBizId,
p.product_name as productName,
ef.fortune_period as fortunePeriod,
ef.fortune_total_period as fortuneTotalPeriod,
ifnull(sum(ef.amount), 0) as amount,
ifnull(sum(ef.hkd_amount), 0) as hkdAmount,
ef.currency as currency,
ifnull(sum(ef.paid_amount), 0) as paidAmount,
ifnull(sum(ef.unpaid_amount), 0) as unpaidAmount,
case when ifnull(sum(ef.hkd_amount), 0) > 0
then round(ifnull(sum(ef.paid_amount), 0) / ifnull(sum(ef.hkd_amount), 0) * 100, 2)
else 0
end as paidRatio,
case when ifnull(sum(ef.hkd_amount), 0) > 0
then round(ifnull(sum(ef.unpaid_amount), 0) / ifnull(sum(ef.hkd_amount), 0) * 100, 2)
else 0
end as unpaidRatio,
ef.broker as broker,
ef.payout_date as payoutDate
from expected_fortune ef
left join policy p on ef.policy_no = p.policy_no
<where>
ef.fortune_biz_type = 'U'
<if test="expectedFortuneIds != null and expectedFortuneIds.size > 0">
and ef.id in
<foreach collection="expectedFortuneIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
and ef.is_deleted = 0
</where>
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment