Commit fb13ba76 by jianan

来佣比对查询接口加经纪人类型入参

parent 01951ef6
...@@ -231,11 +231,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -231,11 +231,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
if (orderCommissonCheck == null){ if (orderCommissonCheck == null){
// 获取当前时间 // 获取当前时间
Date curDate = new Date(); Date curDate = new Date();
// 获取代表批次的年月
String yearmonth = CommonUtil.dateParseString(curDate, "yyyy-MM");
orderCommissonCheck = new OrderCommissonCheck(); orderCommissonCheck.setCheckYearmonth(OrderCommissionCheckBatch);
orderCommissonCheck.setCheckYearmonth(yearmonth);
orderCommissonCheck.setCreatedAt(curDate); orderCommissonCheck.setCreatedAt(curDate);
orderCommissonCheck.setCreatedBy(loginId); orderCommissonCheck.setCreatedBy(loginId);
orderCommissonCheck.setUpdatedAt(curDate); orderCommissonCheck.setUpdatedAt(curDate);
......
...@@ -8,6 +8,7 @@ public class QueryComeCommissionListRequestVO { ...@@ -8,6 +8,7 @@ public class QueryComeCommissionListRequestVO {
private String compareDate; private String compareDate;
private String historyDate; private String historyDate;
private Long insurerId; private Long insurerId;
private Long practitionerTypeId;
private String commissionCheckStatus; private String commissionCheckStatus;
private PageInfo<ComeCommissionVO> page; private PageInfo<ComeCommissionVO> page;
} }
...@@ -60,21 +60,22 @@ ...@@ -60,21 +60,22 @@
GROUP BY order_id GROUP BY order_id
) e on e.order_id = o.id ) e on e.order_id = o.id
where 1=1 where 1=1
<choose>
<when test="historyDate != null ">
and c.check_yearmonth = #{historyDate}
</when>
<otherwise>
<if test="compareDate != null">
and date_format(o.order_date, '%Y-%m') &lt; #{compareDate}
</if>
<if test="insurerId != null"> <if test="insurerId != null">
and o.insurer_id = #{insurerId} and o.insurer_id = #{insurerId}
</if> </if>
<if test="practitionerTypeId != null">
and f.practitioner_type_id = #{practitionerTypeId}
</if>
<if test="commissionCheckStatus != null"> <if test="commissionCheckStatus != null">
and o.commission_check_status = #{commissionCheckStatus} and o.commission_check_status = #{commissionCheckStatus}
</if> </if>
</otherwise> <choose>
<when test="historyDate != null ">
and c.check_yearmonth = #{historyDate}
</when>
<when test="compareDate != null ">
and date_format(o.order_date, '%Y-%m') &lt; #{compareDate}
</when>
</choose> </choose>
</select> </select>
...@@ -130,21 +131,22 @@ ...@@ -130,21 +131,22 @@
) o ) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id left join ag_po_order_commission_check c on o.commission_check_id = c.id
where 1=1 where 1=1
<choose>
<when test="historyDate != null ">
and c.check_yearmonth = #{historyDate}
</when>
<otherwise>
<if test="compareDate != null">
and date_format(o.order_date, '%Y-%m') &lt; #{compareDate}
</if>
<if test="insurerId != null"> <if test="insurerId != null">
and o.insurer_id = #{insurerId} and o.insurer_id = #{insurerId}
</if> </if>
<if test="practitionerTypeId != null">
and f.practitioner_type_id = #{practitionerTypeId}
</if>
<if test="commissionCheckStatus != null"> <if test="commissionCheckStatus != null">
and o.commission_check_status = #{commissionCheckStatus} and o.commission_check_status = #{commissionCheckStatus}
</if> </if>
</otherwise> <choose>
<when test="historyDate != null ">
and c.check_yearmonth = #{historyDate}
</when>
<when test="compareDate != null ">
and date_format(o.order_date, '%Y-%m') &lt; #{compareDate}
</when>
</choose> </choose>
</select> </select>
......
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