Commit 065e806b by 翁国栋 Committed by 284718418@qq.com

8小时后台--

新增一个保单列表
parent ec118016
...@@ -25,9 +25,10 @@ public interface InsurePolicyMapper extends BaseMapper<InsurePolicy> { ...@@ -25,9 +25,10 @@ public interface InsurePolicyMapper extends BaseMapper<InsurePolicy> {
PolicyDto getPolicyDetail(@Param("id")Integer id); PolicyDto getPolicyDetail(@Param("id")Integer id);
Integer totalPolicy(@Param("policy")PolicyDto policyDto); Integer totalPolicy(@Param("policy")PolicyDto policyDto);
List<PolicyDto> policyTotalList(); List<PolicyDto> policyTotalList();
List<InsureUserDto> selectPlansListByorgCode(@Param("orgCode")Integer id); List<InsureUserDto> selectPolicyListByorgCode(@Param("orgCode")Integer id);
List<InsurePolicy> selectPolicyListByStatus(@Param("date") Date date); List<InsurePolicy> selectPolicyListByStatus(@Param("date") Date date);
Integer selectPlansTotalByorgCode(@Param("orgCode")Integer id); Integer selectPlansTotalByorgCode(@Param("orgCode")Integer id);
} }
...@@ -2,6 +2,8 @@ package cn.timer.api.dto.insure; ...@@ -2,6 +2,8 @@ package cn.timer.api.dto.insure;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* @Description TODO * @Description TODO
* @Author wgd * @Author wgd
...@@ -9,10 +11,13 @@ import lombok.Data; ...@@ -9,10 +11,13 @@ import lombok.Data;
*/ */
@Data @Data
public class InsureUserDto { public class InsureUserDto {
private Integer id;
private Integer policyId; private Integer policyId;
private String benefitBasicPlan; private String benefitBasicPlan;
private String benefitOccupationCategory; private String benefitOccupationCategory;
private Integer totalUser; private Integer totalUser;
private String[] oldIds; private String[] oldIds;
private String policyNo; private String policyNo;
private String name;
private Date updateTime;
} }
...@@ -337,22 +337,18 @@ ...@@ -337,22 +337,18 @@
ip.id ip.id
</select> </select>
<select id="selectPlansListByorgCode" resultType="cn.timer.api.dto.insure.InsureUserDto"> <select id="selectPolicyListByorgCode" resultType="cn.timer.api.dto.insure.InsureUserDto">
SELECT SELECT
ip.id as policyId, ip.id as id,
ip.policy_no as policyNo, ip.policy_no as policyNo,
iu.benefit_basic_plan as benefitBasicPlan, ir.name,
iu.benefit_occupation_category as benefitOccupationCategory, ip.update_time as updateTime
count(iu.id) as totalUser
FROM FROM
insure_policy ip insure_policy ip
LEFT JOIN insure_user iu ON iu.policy_id = ip.id LEFT JOIN insure_product ir on ir.id=ip.product_id
WHERE ip.org_code=#{orgCode} WHERE ip.org_code=#{orgCode}
GROUP BY
ip.id,
iu.benefit_basic_plan,
iu.benefit_occupation_category
</select> </select>
<select id="selectPlansTotalByorgCode" resultType="java.lang.Integer"> <select id="selectPlansTotalByorgCode" resultType="java.lang.Integer">
SELECT SELECT
count(ip.id) count(ip.id)
......
...@@ -219,18 +219,18 @@ ...@@ -219,18 +219,18 @@
LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id
<where> <where>
<if test="param.name != null and param.name !=''"> <if test="param.name != null and param.name !=''">
and qeim.NAME like CONCAT('%',#{name},'%') and qeim.NAME like CONCAT('%',#{param.name},'%')
</if> </if>
<if test="param.linkMan != null and param.linkMan !=''"> <if test="param.linkMan != null and param.linkMan !=''">
and qeim.link_man like CONCAT('%',#{linkMan},'%') and qeim.link_man like CONCAT('%',#{param.linkMan},'%')
</if> </if>
<if test="param.linkManPhone != null and param.linkManPhone !=''"> <if test="param.linkManPhone != null and param.linkManPhone !=''">
and qeim.phone like CONCAT('%',#{linkManPhone},'%') and qeim.phone like CONCAT('%',#{param.linkManPhone},'%')
</if> </if>
</where> </where>
GROUP BY GROUP BY
qeim.id qeim.id
<if test="param.page.offset != null and param.page.totalPage !=null"> <if test="param.page.currentPage != null and param.page.totalPage !=null">
limit #{param.page.offset},#{param.page.totalPage} limit #{param.page.offset},#{param.page.totalPage}
</if> </if>
</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