Commit 88bb8a29 by 翁国栋 Committed by 284718418@qq.com

修改为可选择产品

parent 2ebeff8a
...@@ -39,5 +39,6 @@ public class PolicyDto { ...@@ -39,5 +39,6 @@ public class PolicyDto {
private Integer insureStatus; private Integer insureStatus;
private String planId; private String planId;
private String categoryId; private String categoryId;
private String productId;
} }
...@@ -249,6 +249,9 @@ ...@@ -249,6 +249,9 @@
LEFT JOIN insure_user iu ON iu.policy_id = ip.id LEFT JOIN insure_user iu ON iu.policy_id = ip.id
LEFT JOIN qyzx_ent_info_m qy on qy.id=ip.org_code LEFT JOIN qyzx_ent_info_m qy on qy.id=ip.org_code
<where> <where>
<if test="policy.productId!=null and policy.productId!=''">
and ip.product_id = #{policy.productId}
</if>
<if test="policy.status!=null and policy.status!=''"> <if test="policy.status!=null and policy.status!=''">
and ip.status = #{policy.status} and ip.status = #{policy.status}
</if> </if>
...@@ -307,12 +310,13 @@ ...@@ -307,12 +310,13 @@
<select id="policyTotalList" resultType="cn.timer.api.dto.insure.PolicyDto"> <select id="policyTotalList" resultType="cn.timer.api.dto.insure.PolicyDto">
SELECT SELECT
ip.id as id,
ip.name AS schemeName, ip.name AS schemeName,
ip.type AS type, ip.type AS type,
(select count(id) from insure_policy) AS totaPolicy, count(ipp.id) AS totaPolicy,
(select count(org_code) from insure_policy) AS totalCompany, count(ipp.org_code) AS totalCompany,
count( iu.id ) AS totalUser, count( iu.id ) AS totalUser,
IFNULL((select sum(price) from insure_user),0) as totalPremium, sum(iu.price) as totalPremium,
ipp.update_time AS updateTime ipp.update_time AS updateTime
FROM FROM
insure_product ip insure_product ip
......
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