Commit 32f70d13 by 翁国栋

运营后台--

8小时后台保险列表
parent 669fd39d
......@@ -413,8 +413,7 @@ public class InsureContorll {
if (insurePolicy == null) {
return ResultUtil.error("保单不存在");
}
Integer price = getPrice(insureDto.getBenefitBasicPlan(),insureDto.getBenefitOccupationCategory());
LocalDateTime now = LocalDateTime.now();
LocalDateTime now = LocalDateTime.now();
String url = creaXSSFWorkbook1(insureDto);
log.info("保全增员文件地址", url);
DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
......
......@@ -60,7 +60,7 @@ public class InsureUserController{
@PostMapping(value = "/userPolicyList")
@ApiOperation(value = "3.保单列表--8小时端", httpMethod = "Post", notes = "保单列表")
public Result<Object> userPolicyList(@CurrentUser UserBean userBean, PolicyDto policyDto) {
public Result<Object> userPolicyList(@CurrentUser UserBean userBean, @RequestBody PolicyDto policyDto) {
Map map = Maps.newHashMap();
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getOrgCode,userBean.getOrgCode()).eq(InsurePolicy::getStatus,1));
if(insurePolicy==null){
......
......@@ -277,22 +277,32 @@
</delete>
<select id="selectPolicyList" resultType="cn.timer.api.dto.insure.PolicyDto">
select iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,ip.scheme_name,iu.policy_date_start,iu.insure_status,
iu.policy_date_end,ip.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory
select
iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,ip.scheme_name,iu.policy_date_start,iu.insure_status,
iu.policy_date_end,ip.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory
from insure_user iu
LEFT JOIN yggl_main_emp yme on yme.id=iu.user_id
LEFT JOIN insure_policy ip on ip.id=iu.policy_id
LEFT JOIN yggl_main_emp yme on yme.id=iu.user_id
LEFT JOIN insure_policy ip on ip.id=iu.policy_id
<where>
ip.id=#{policyDto.id}
<if test="policyDto.orgCode !=null and policyDto.orgCode !=''">
and ip.org_code=#{policyDto.orgCode}
</if>
<if test="policyDto.id !=null and policyDto.id !=''">
and ip.id=#{policyDto.id}
</if>
<if test="policyDto.planId !=null and policyDto.planId !=''">
and iu.benefit_basic_plan = #{policyDto.planId}
</if>
<if test="policyDto.categoryId !=null and policyDto.categoryId !=''">
and iu.benefit_occupation_category = #{policyDto.categoryId}
<if test="policyDto.name !=null and policyDto.name !=''">
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''">
and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateStart}
</if>
</if>
<if test="policyDto.name !=null and policyDto.name !=''">
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''">
and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateStart}
</if>
<if test="policyDto.status !=null and policyDto.status !=''">
and iu.insure_status = #{policyDto.status}
</if>
......@@ -306,19 +316,26 @@
select count(iu.id) from insure_user iu
LEFT JOIN yggl_main_emp yme on yme.id=iu.user_id
LEFT JOIN insure_policy ip on ip.id=iu.policy_id
<where>
<if test="policyDto.id !=null and policyDto.id !=''">
and ip.id=#{policyDto.id}
</if>
<if test="policyDto.name !=null and policyDto.name !=''">
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''">
and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateStart}
</if>
and iu.benefit_basic_plan = #{policyDto.planId}
and iu.benefit_occupation_category = #{policyDto.categoryId}
</where>
<where>
<if test="policyDto.orgCode !=null and policyDto.orgCode !=''">
and ip.org_code=#{policyDto.orgCode}
</if>
<if test="policyDto.id !=null and policyDto.id !=''">
and ip.id=#{policyDto.id}
</if>
<if test="policyDto.planId !=null and policyDto.planId !=''">
and iu.benefit_basic_plan = #{policyDto.planId}
</if>
<if test="policyDto.categoryId !=null and policyDto.categoryId !=''">
and iu.benefit_occupation_category = #{policyDto.categoryId}
</if>
<if test="policyDto.name !=null and policyDto.name !=''">
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''">
and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateStart}
</if>
</where>
</select>
<!--根据id数组查询员工-->
......@@ -344,17 +361,16 @@
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
group by benefit_basic_plan,benefit_occupation_category
group by benefit_basic_plan,benefit_occupation_category
</select>
<select id="selectPlansListById" resultType="cn.timer.api.dto.insure.InsureUserDto">
SELECT
policy_id as policyId,
benefit_basic_plan as benefitBasicPlan,
benefit_occupation_category as benefitOccupationCategory,
count(id) as totalUser
SELECT policy_id as policyId,
benefit_basic_plan as benefitBasicPlan,
benefit_occupation_category as benefitOccupationCategory,
count(id) as totalUser
FROM insure_user
WHERE policy_id = #{policyId}
group by benefit_basic_plan,benefit_occupation_category
group by benefit_basic_plan, benefit_occupation_category
</select>
</mapper>
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