Commit 0156300f by akexiu

Merge remote-tracking branch 'origin/dev' into dev

parents 57a664c0 197320cc
...@@ -228,8 +228,7 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService { ...@@ -228,8 +228,7 @@ public class AgmsDashboardDALServiceImpl implements AgmsDashboardDALService {
if(amount > 0){ if(amount > 0){
item.setRealRate(BigDecimal.valueOf((realAmount.doubleValue() / amount.doubleValue()) * 100).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); item.setRealRate(BigDecimal.valueOf((realAmount.doubleValue() / amount.doubleValue()) * 100).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
} }
// 前端取amount作为报聘人数
item.setAmount(item.getHiringAmount());
} }
} }
return statisticsPractitionerInfos; return statisticsPractitionerInfos;
......
...@@ -48,18 +48,20 @@ ...@@ -48,18 +48,20 @@
o.broker_customer_id, o.broker_customer_id,
o.cover_term_type coverageTerm, o.cover_term_type coverageTerm,
CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '' END)) payTerm CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '' END)) payTerm
from ag_po_order_commission oc from ag_po_order_commission oc
left join inner join
(SELECT id, order_price, product_id, (SELECT id, order_price, product_id,
plan_id, insurer_id, order_date, config_level, cover_term, insurer_branch_id ydBranchId, plan_id, insurer_id, order_date, config_level, cover_term, insurer_branch_id ydBranchId,
payment_term, payment_term_unit,broker_customer_id, payment_term, payment_term_unit,broker_customer_id,
cover_term_type cover_term_type
from ag_po_order t from ag_po_order t
where t.status in (3,4) and t.policy_no is not null where t.status=3 and t.payment_status=3 and t.policy_no is not null
and (t.plan_id not in (424,453,464) or t.plan_id is null) and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o ON o.id = oc.order_id ) o ON o.id = oc.order_id
left join ag_product_life_commission_base b on oc.commission_base_id = b.id left join ag_product_life_commission_base b on oc.commission_base_id = b.id
union all
<include refid="manualCommission"/>
) t ) t
left join ag_acl_insurer_branch ib on t.insurer_branch_id = ib.id left join ag_acl_insurer_branch ib on t.insurer_branch_id = ib.id
left join ag_acl_insurer i ON t.insurer_id = i.id left join ag_acl_insurer i ON t.insurer_id = i.id
...@@ -120,6 +122,40 @@ ...@@ -120,6 +122,40 @@
order by t.orderDate desc order by t.orderDate desc
</select> </select>
<sql id="manualCommission">
SELECT '' as orderId,
b.plan_id plan_id,
b.product_id product_id,
b.config_level config_level,
oc.insurer_id insurer_id,
oc.insurer_branch_id,
oc.commission_check_id,
oc.policy_no policyNo,
'' as orderPrice,
oc.rate commissionRate,
oc.amount commissionAmount,
oc.commission_status commissionCheckStatus,
'' as orderDate,
oc.commission_no commissionNo,
oc.id commissionId,
date_format(oc.commission_year, '%Y-%m-%d') commissionYear,
oc.commission_status commissionStatus,
oc.commission_time commissionTime,
oc.commission_period commissionPeriod,
oc.commission_type commissionType,
oc.commission_item commissionItem,
oc.practitioner_id practitionerId,
'' as ydBranchId,
'' as broker_customer_id,
'' as coverageTerm,
'' as payTerm
from ag_po_order_commission oc
left join ag_product_life_commission_base b on oc.commission_base_id = b.id
where oc.order_id is null
</sql>
<insert id="insertOrderCommissionCheck" parameterType="com.yd.dal.entity.commission.OrderCommissonCheck" <insert id="insertOrderCommissionCheck" parameterType="com.yd.dal.entity.commission.OrderCommissonCheck"
useGeneratedKeys="true" keyColumn="id" keyProperty="id"> useGeneratedKeys="true" keyColumn="id" keyProperty="id">
...@@ -200,7 +236,7 @@ ...@@ -200,7 +236,7 @@
o.cover_term_type coverageTerm, o.cover_term_type coverageTerm,
CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '年' END)) payTerm CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '年' END)) payTerm
from ag_po_order_commission oc from ag_po_order_commission oc
left join inner join
(SELECT id, order_price, product_id, (SELECT id, order_price, product_id,
plan_id, insurer_id, order_date, config_level, cover_term, insurer_branch_id ydBranchId, plan_id, insurer_id, order_date, config_level, cover_term, insurer_branch_id ydBranchId,
payment_term, payment_term_unit,broker_customer_id, payment_term, payment_term_unit,broker_customer_id,
...@@ -210,6 +246,8 @@ ...@@ -210,6 +246,8 @@
and (t.plan_id not in (424,453,464) or t.plan_id is null) and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o ON o.id = oc.order_id ) o ON o.id = oc.order_id
left join ag_product_life_commission_base b on oc.commission_base_id = b.id left join ag_product_life_commission_base b on oc.commission_base_id = b.id
union all
<include refid="manualCommission"/>
) t ) t
left join ag_acl_insurer_branch ib on t.insurer_branch_id = ib.id left join ag_acl_insurer_branch ib on t.insurer_branch_id = ib.id
left join ag_acl_insurer i ON t.insurer_id = i.id left join ag_acl_insurer i ON t.insurer_id = i.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