Commit 4bbffd5c by jianan

发佣检核12-发佣列表查询加预计发用年月

parent dbee7be6
......@@ -43,9 +43,13 @@ public class CommissionPayoutStatusQueryRequestVO {
private String commissionPayoutYearmonth;
/**
* 预计发佣年月
* 实际发佣年月
*/
private String payoutYearmonth;
/**
* 预计发佣年月
*/
private String predictMonthPeriod;
/**
* 系统标志,区分公司营业部和体系,1,分公司,2营业部,3,S1分部,4,S2体系,5,S3纵队
......@@ -175,5 +179,13 @@ public class CommissionPayoutStatusQueryRequestVO {
public void setPage(PageInfo<CommissionPayoutStatus> page) {
this.page = page;
}
public String getPredictMonthPeriod() {
return predictMonthPeriod;
}
public void setPredictMonthPeriod(String predictMonthPeriod) {
this.predictMonthPeriod = predictMonthPeriod;
}
}
......@@ -47,6 +47,10 @@ public class CommissionPayoutStatusQueryInfo {
* 预计发佣年月
*/
private String payoutYearmonth;
/**
* 预计发佣年月
*/
private String predictMonthPeriod;
/**
* 体系子集id
......@@ -148,4 +152,12 @@ public class CommissionPayoutStatusQueryInfo {
public void setPage(PageInfo<CommissionPayoutStatus> page) {
this.page = page;
}
public String getPredictMonthPeriod() {
return predictMonthPeriod;
}
public void setPredictMonthPeriod(String predictMonthPeriod) {
this.predictMonthPeriod = predictMonthPeriod;
}
}
......@@ -133,8 +133,11 @@
<if test="item.commissionPayoutYearmonth != null">
and c.check_yearmonth = #{item.commissionPayoutYearmonth,jdbcType=VARCHAR}
</if>
<if test="item.predictMonthPeriod != null">
and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.predictMonthPeriod,jdbcType=VARCHAR}
</if>
<if test="item.payoutYearmonth != null">
and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.payoutYearmonth,jdbcType=VARCHAR}
and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR}
</if>
UNION ALL
SELECT '' orderId,t.id fortuneId,'' commissionPayoutYearmonth,'' insurerName,'' productName,
......@@ -192,8 +195,11 @@
<!-- <if test="item.commissionPayoutYearmonth != null"> -->
<!-- and c.check_yearmonth = #{item.commissionPayoutYearmonth,jdbcType=VARCHAR} -->
<!-- </if> -->
<if test="item.predictMonthPeriod != null">
and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.predictMonthPeriod,jdbcType=VARCHAR}
</if>
<if test="item.payoutYearmonth != null">
and DATE_FORMAT(t.predict_month_period, '%Y-%m') = #{item.payoutYearmonth,jdbcType=VARCHAR}
and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR}
</if>
</select>
......
......@@ -83,7 +83,6 @@
) p3
on o.config_level = p3.config_level and o.plan_id = p3.plan_id
left join ag_acl_insurer i on o.insurer_id = i.id
left join ag_acl_insurer_branch b on p.insurer_branch_id = b.id
left join (SELECT order_id, name, practitioner_type_id, f.customer_id
from (
select *
......@@ -105,7 +104,7 @@
and o.insurer_id = #{insurerId}
</if>
<if test="insurerBranchId != null">
and b.id = #{insurerBranchId,jdbcType=BIGINT}
and p.insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT}
</if>
<if test="practitionerTypeId != null">
and f.practitioner_type_id = #{practitionerTypeId}
......@@ -212,7 +211,8 @@
) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id
left join ag_acl_insurer i on o.insurer_id = i.id
left join ag_acl_insurer_branch b on o.insurer_id = b.insurer_id
left join ag_product_plan a on o.plan_id = a.id
left join ag_product p on o.product_id = p.id
left join (SELECT order_id, name, practitioner_type_id, f.customer_id
from (
select *
......@@ -227,7 +227,7 @@
and o.insurer_id = #{insurerId}
</if>
<if test="insurerBranchId != null">
and b.id = #{insurerBranchId,jdbcType=BIGINT}
and p.insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT}
</if>
<if test="practitionerTypeId != null">
and f.practitioner_type_id = #{practitionerTypeId}
......@@ -286,9 +286,6 @@
o.commission_type commissionType,
o.commission_item commissionItem,
b.id insurerBranchId,
b.branch_name insurerBranchName,
null as coverageTerm,
null as payTerm,
(case o.config_level when 2 then p2.pName2 else p3.pName3 END) categoryName,
......@@ -324,13 +321,12 @@
) p3
on o.config_level = p3.config_level and o.plan_id = p3.plan_id
left join ag_acl_insurer i on o.insurer_id = i.id
LEFT JOIN ag_acl_insurer_branch b ON o.insurer_id = b.insurer_id
where 1=1
<if test="insurerId != null">
and o.insurer_id = #{insurerId}
</if>
<if test="insurerBranchId != null">
and b.id = #{insurerBranchId,jdbcType=BIGINT}
and p.insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT}
</if>
<if test="commissionType != null">
and o.commission_type = #{commissionType}
......
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