Commit e20443f6 by jianan

历史数据来佣比对

parent f7b31227
......@@ -81,14 +81,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
List<PoOrder> orders = poOrderDALService.findByIds(orderIds);
// 查询保单下的所有寿险经纪人的fortune记录
List<AclCustomerFortune> fortuneList = customerFortuneDalService.queryLifeFortuneListByOrderIds(orderIds);
// 已退保的订单不能修改状态
for (PoOrder o:orders) {
// 已退保的订单不能改状态
if (Integer.valueOf(4).equals(o.getStatus()) || "3".equals(o.getCommissionCheckStatus())) {
resp.setCommonResult(new CommonResult(false, "已退保的订单不能改状态"));
return resp;
}
}
// 已关帐的订单,则该笔订单来佣比对状态不能改为待来佣和已比对,但能改为已退保
// 处理历史记录,暂时关闭
// this.validateClosed(orders, fortuneList, status);
......
......@@ -26,7 +26,7 @@
CONCAT(payment_term, (case payment_term_unit when 'Y' then '年' when 'M' then '月' else '日' END)) payTerm,
CONCAT(cover_term, cover_term_type) coverageTerm
from ag_po_order t
where t.status = 3 and policy_no is not null
where t.status in (3,4) and policy_no is not null
and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id
......@@ -113,6 +113,7 @@
<select id="findByCheckYearmonth" parameterType="String" resultType="com.yd.dal.entity.commission.OrderCommissonCheck">
select * from ag_po_order_commission_check
where check_yearmonth = #{orderCommissionCheckBatch,jdbcType=VARCHAR}
order by id asc
</select>
<select id="getSummaries" resultType="java.util.Map">
......@@ -126,7 +127,7 @@
from (SELECT order_price, commission_amount, commission_check_status, commission_check_id, order_date,
insurer_id,id
from ag_po_order t
where t.status = 3 and policy_no is not null
where t.status in (3,4) and policy_no is not null
and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id
......
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