Commit 902d8608 by 翁国栋

8小时运营后台--

投保人信息验证
企业列表信息验证
导入信息验证
导入人员信息验证
保单搜索列表更据企业名称查找
parent 09698502
package cn.timer.api.bean.insure;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/5/30 11:01
*/
@Data
public class BatchPayCallBack {
private String order_import_uuid;
private String pay_status;
private String transaction_id;
private String pay_time;
private String pay_money;
private String method;
}
...@@ -41,6 +41,7 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -41,6 +41,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
.excludePathPatterns("/callBack/policy/payCallBack") .excludePathPatterns("/callBack/policy/payCallBack")
.excludePathPatterns("/callBack/policy/issueCallback") .excludePathPatterns("/callBack/policy/issueCallback")
.excludePathPatterns("/callBack/policy/addpPayCallBack") .excludePathPatterns("/callBack/policy/addpPayCallBack")
.excludePathPatterns("/callBack/policy/batchPayCallback")
.excludePathPatterns("/superLogin/**") .excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*") .excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*") .excludePathPatterns("/doc*")
......
...@@ -9,6 +9,7 @@ import cn.timer.api.bean.insure.InsureApplicant; ...@@ -9,6 +9,7 @@ import cn.timer.api.bean.insure.InsureApplicant;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.dao.insure.InsureApplicantMapper; import cn.timer.api.dao.insure.InsureApplicantMapper;
import cn.timer.api.dto.insure.InsureDto; import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.utils.HttpUtils; import cn.timer.api.utils.HttpUtils;
...@@ -49,32 +50,42 @@ public class InsureApplicantController { ...@@ -49,32 +50,42 @@ public class InsureApplicantController {
@PostMapping("/insureApplicationSetting") @PostMapping("/insureApplicationSetting")
@ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请") @ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请")
private Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) { private Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,params.getOrgCode())); try {
params.setId(insureApplicant.getId()); InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, params.getOrgCode()));
params.updateById(); params.setId(insureApplicant.getId());
return ResultUtil.data(params); params.updateById();
return ResultUtil.data(params);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("设置投保人异常");
}
} }
@GetMapping("/getApplicantAdmin") @GetMapping("/getApplicantAdmin")
@ApiOperation(value = "获取投保人--运营后台", httpMethod = "GET", notes = "获取投保人") @ApiOperation(value = "获取投保人--运营后台", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@RequestParam("orgCode") Integer orgCode) { private Result<Object> getApplicant(@RequestParam("orgCode") Integer orgCode) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,orgCode)); try {
if(insureApplicant==null){ InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, orgCode));
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(orgCode).build().selectById(); if (insureApplicant == null) {
insureApplicant = getInsureApplicant(qyzxEntInfoM); QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant.setOrgCode(orgCode); insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.insert(); insureApplicant.setOrgCode(orgCode);
insureApplicant.insert();
}
return ResultUtil.data(insureApplicant);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("获取投保人异常");
} }
return ResultUtil.data(insureApplicant);
} }
private InsureApplicant getInsureApplicant(QyzxEntInfoM qyzxEntInfoM) { private InsureApplicant getInsureApplicant(QyzxEntInfoM qyzxEntInfoM) {
InsureApplicant insureApplicant; InsureApplicant insureApplicant;
insureApplicant=new InsureApplicant(); insureApplicant = new InsureApplicant();
insureApplicant.setApplicantEName(qyzxEntInfoM.getName()); insureApplicant.setApplicantEName(qyzxEntInfoM.getName());
insureApplicant.setApplicantEAddress(qyzxEntInfoM.getWorkAddress()); insureApplicant.setApplicantEAddress(qyzxEntInfoM.getWorkAddress());
insureApplicant.setApplicantEContacts(qyzxEntInfoM.getOperName());/*这里为避免联系人为空,默认使用法人*/ insureApplicant.setApplicantEContacts(qyzxEntInfoM.getLinkMan());
insureApplicant.setApplicantEPhone(qyzxEntInfoM.getPhone());/*这里为避免联系人为空,默认使用法人*/ insureApplicant.setApplicantEPhone(qyzxEntInfoM.getPhone());/*这里为避免联系人为空,默认使用法人*/
insureApplicant.setApplicantType("2"); insureApplicant.setApplicantType("2");
insureApplicant.setApplicantENoType("3646"); insureApplicant.setApplicantENoType("3646");
...@@ -86,14 +97,19 @@ public class InsureApplicantController { ...@@ -86,14 +97,19 @@ public class InsureApplicantController {
@GetMapping("/getApplicant") @GetMapping("/getApplicant")
@ApiOperation(value = "获取投保人--8小时", httpMethod = "GET", notes = "获取投保人") @ApiOperation(value = "获取投保人--8小时", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@CurrentUser UserBean userBean) { private Result<Object> getApplicant(@CurrentUser UserBean userBean) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,userBean.getOrgCode())); try {
if(insureApplicant==null){ InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, userBean.getOrgCode()));
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById(); if (insureApplicant == null) {
insureApplicant = getInsureApplicant(qyzxEntInfoM); QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant.setOrgCode(userBean.getOrgCode()); insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.insert(); insureApplicant.setOrgCode(userBean.getOrgCode());
insureApplicant.insert();
}
return ResultUtil.data(insureApplicant);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("获取投保人异常");
} }
return ResultUtil.data(insureApplicant);
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -114,6 +114,7 @@ public class InsureUserController{ ...@@ -114,6 +114,7 @@ public class InsureUserController{
policyDto.setCategoryId(categoryId); policyDto.setCategoryId(categoryId);
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto); List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
String[] rowName = new String[]{"ID", "name", "ID_type", "ID_number", "Scheme_name", "Date_start", "Branch", "Tricycle_frame_number", "benefit_occupation_category"}; String[] rowName = new String[]{"ID", "name", "ID_type", "ID_number", "Scheme_name", "Date_start", "Branch", "Tricycle_frame_number", "benefit_occupation_category"};
/*XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);*/ // for ()
// XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);
} }
} }
...@@ -5,6 +5,7 @@ import cn.timer.api.bean.insure.InsureLog; ...@@ -5,6 +5,7 @@ import cn.timer.api.bean.insure.InsureLog;
import cn.timer.api.bean.insure.InsurePolicy; import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureUser; import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.dao.insure.InsurePolicyMapper; import cn.timer.api.dao.insure.InsurePolicyMapper;
import cn.timer.api.dao.insure.InsureUserMapper; import cn.timer.api.dao.insure.InsureUserMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper; import cn.timer.api.dao.yggl.YgglMainEmpMapper;
...@@ -36,10 +37,12 @@ public class InsureTaskTiming { ...@@ -36,10 +37,12 @@ public class InsureTaskTiming {
private YgglMainEmpMapper ygglMainEmpMapper; private YgglMainEmpMapper ygglMainEmpMapper;
@Scheduled(cron = "0 0 0 1 * ?")//每月第一天 @Scheduled(cron = "0 0 0 1 * ?")//每月第一天
public void updateInsureStatusTask() throws ParseException { public void updateInsureStatusTask(){
Date now = DateUtil.date(); try {
/*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd,now)); Date now = DateUtil.date();
/*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd, now));
if (insurePolicyList.size() > 0) { if (insurePolicyList.size() > 0) {
/*获取已经过期保单*/ /*获取已经过期保单*/
for (InsurePolicy insurePolicy : insurePolicyList) { for (InsurePolicy insurePolicy : insurePolicyList) {
...@@ -48,14 +51,20 @@ public class InsureTaskTiming { ...@@ -48,14 +51,20 @@ public class InsureTaskTiming {
.eq(InsureUser::getInsureStatus, 1)); .eq(InsureUser::getInsureStatus, 1));
if (insureUsersList.size() > 0) { if (insureUsersList.size() > 0) {
int count = ygglMainEmpMapper.updateInsure(insureUsersList.stream().map(InsureUser::getUserId).toArray(Integer[]::new)); int count = ygglMainEmpMapper.updateInsure(insureUsersList.stream().map(InsureUser::getUserId).toArray(Integer[]::new));
log.info("总共更新员工投保状态", count); log.info("总共更新员工投保状态:"+count);
int uCount = insureUserMapper.updateInsure(insurePolicyList.stream().map(InsurePolicy::getId).toArray(Integer[]::new)); int uCount = insureUserMapper.updateInsure(insurePolicyList.stream().map(InsurePolicy::getId).toArray(Integer[]::new));
log.info("总共更新投保人投保状态", uCount); log.info("总共更新投保人投保状态:"+uCount);
} }
insurePolicy.setStatus("3"); insurePolicy.setStatus("3");
insurePolicy.updateById(); insurePolicy.updateById();
InsureLog.builder().type(7)
.createTime(new Date()).requestType(1).returnMsg("保单已到期,自动失效").policyId(insurePolicy.getId()).build().insert();
} }
} }
log.error("暂无过期保单"); log.error("暂无过期保单");
}catch (Exception e){
e.printStackTrace();
throw new CustomException("保单失效定时器异常");
}
} }
} }
...@@ -46,4 +46,5 @@ public class PolicyDto { ...@@ -46,4 +46,5 @@ public class PolicyDto {
private Integer applyType; private Integer applyType;
private String monthD; private String monthD;
private String userName; private String userName;
private String companyName;
} }
...@@ -268,6 +268,9 @@ ...@@ -268,6 +268,9 @@
<if test="policy.policyDateStart!=null and policy.policyDateStart!=''"> <if test="policy.policyDateStart!=null and policy.policyDateStart!=''">
and ip.policy_date_start <![CDATA[ >= ]]> #{policy.policyDateStart} and ip.policy_date_start <![CDATA[ >= ]]> #{policy.policyDateStart}
</if> </if>
<if test="policy.companyName!=null and policy.companyName!=''">
and qy.name like CONCAT('%',#{policy.companyName},'%')
</if>
</where> </where>
GROUP BY ip.id GROUP BY ip.id
order by ip.create_time desc order by ip.create_time desc
...@@ -319,17 +322,17 @@ ...@@ -319,17 +322,17 @@
<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.id AS id,
ip.name AS schemeName, ip.NAME AS schemeName,
ip.type AS type, ip.type AS type,
count(ipp.id) AS totaPolicy, (select count(id) from insure_policy WHERE product_id=ip.id ) AS totaPolicy,
count(ipp.org_code) AS totalCompany, (select count(org_code) from insure_policy WHERE product_id=ip.id) as totalCompany,
count( iu.id ) AS totalUser, count( iu.id ) AS totalUser,
sum(iu.price) 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
LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id and ipp.`status`=1
LEFT JOIN insure_user iu ON iu.policy_id = ipp.id LEFT JOIN insure_user iu ON iu.policy_id = ipp.id
WHERE WHERE
ip.is_del = 0 ip.is_del = 0
......
...@@ -237,6 +237,17 @@ ...@@ -237,6 +237,17 @@
<select id="companyAdminCount" resultType="java.lang.Integer"> <select id="companyAdminCount" resultType="java.lang.Integer">
select count(qeim.id) from qyzx_ent_info_m qeim select count(qeim.id) from qyzx_ent_info_m qeim
<where>
<if test="param.name != null and param.name !=''">
and qeim.NAME like CONCAT('%',#{param.name},'%')
</if>
<if test="param.linkMan != null and param.linkMan !=''">
and qeim.link_man like CONCAT('%',#{param.linkMan},'%')
</if>
<if test="param.linkManPhone != null and param.linkManPhone !=''">
and qeim.phone like CONCAT('%',#{param.linkManPhone},'%')
</if>
</where>
</select> </select>
<select id ="getCompanyList" resultType="java.util.HashMap"> <select id ="getCompanyList" resultType="java.util.HashMap">
......
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