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 {
.excludePathPatterns("/callBack/policy/payCallBack")
.excludePathPatterns("/callBack/policy/issueCallback")
.excludePathPatterns("/callBack/policy/addpPayCallBack")
.excludePathPatterns("/callBack/policy/batchPayCallback")
.excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*")
......
......@@ -9,6 +9,7 @@ import cn.timer.api.bean.insure.InsureApplicant;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.config.annotation.CurrentUser;
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.dto.insure.InsureDto;
import cn.timer.api.utils.HttpUtils;
......@@ -49,32 +50,42 @@ public class InsureApplicantController {
@PostMapping("/insureApplicationSetting")
@ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请")
private Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,params.getOrgCode()));
params.setId(insureApplicant.getId());
params.updateById();
return ResultUtil.data(params);
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, params.getOrgCode()));
params.setId(insureApplicant.getId());
params.updateById();
return ResultUtil.data(params);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("设置投保人异常");
}
}
@GetMapping("/getApplicantAdmin")
@ApiOperation(value = "获取投保人--运营后台", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@RequestParam("orgCode") Integer orgCode) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,orgCode));
if(insureApplicant==null){
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(orgCode);
insureApplicant.insert();
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, orgCode));
if (insureApplicant == null) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
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) {
InsureApplicant insureApplicant;
insureApplicant=new InsureApplicant();
insureApplicant = new InsureApplicant();
insureApplicant.setApplicantEName(qyzxEntInfoM.getName());
insureApplicant.setApplicantEAddress(qyzxEntInfoM.getWorkAddress());
insureApplicant.setApplicantEContacts(qyzxEntInfoM.getOperName());/*这里为避免联系人为空,默认使用法人*/
insureApplicant.setApplicantEContacts(qyzxEntInfoM.getLinkMan());
insureApplicant.setApplicantEPhone(qyzxEntInfoM.getPhone());/*这里为避免联系人为空,默认使用法人*/
insureApplicant.setApplicantType("2");
insureApplicant.setApplicantENoType("3646");
......@@ -86,14 +97,19 @@ public class InsureApplicantController {
@GetMapping("/getApplicant")
@ApiOperation(value = "获取投保人--8小时", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@CurrentUser UserBean userBean) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,userBean.getOrgCode()));
if(insureApplicant==null){
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(userBean.getOrgCode());
insureApplicant.insert();
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, userBean.getOrgCode()));
if (insureApplicant == null) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
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{
policyDto.setCategoryId(categoryId);
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"};
/*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;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureUser;
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.InsureUserMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
......@@ -36,10 +37,12 @@ public class InsureTaskTiming {
private YgglMainEmpMapper ygglMainEmpMapper;
@Scheduled(cron = "0 0 0 1 * ?")//每月第一天
public void updateInsureStatusTask() throws ParseException {
Date now = DateUtil.date();
/*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd,now));
public void updateInsureStatusTask(){
try {
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) {
/*获取已经过期保单*/
for (InsurePolicy insurePolicy : insurePolicyList) {
......@@ -48,14 +51,20 @@ public class InsureTaskTiming {
.eq(InsureUser::getInsureStatus, 1));
if (insureUsersList.size() > 0) {
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));
log.info("总共更新投保人投保状态", uCount);
log.info("总共更新投保人投保状态:"+uCount);
}
insurePolicy.setStatus("3");
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 {
private Integer applyType;
private String monthD;
private String userName;
private String companyName;
}
......@@ -268,6 +268,9 @@
<if test="policy.policyDateStart!=null and policy.policyDateStart!=''">
and ip.policy_date_start <![CDATA[ >= ]]> #{policy.policyDateStart}
</if>
<if test="policy.companyName!=null and policy.companyName!=''">
and qy.name like CONCAT('%',#{policy.companyName},'%')
</if>
</where>
GROUP BY ip.id
order by ip.create_time desc
......@@ -319,17 +322,17 @@
<select id="policyTotalList" resultType="cn.timer.api.dto.insure.PolicyDto">
SELECT
ip.id as id,
ip.name AS schemeName,
ip.id AS id,
ip.NAME AS schemeName,
ip.type AS type,
count(ipp.id) AS totaPolicy,
count(ipp.org_code) AS totalCompany,
(select count(id) from insure_policy WHERE product_id=ip.id ) AS totaPolicy,
(select count(org_code) from insure_policy WHERE product_id=ip.id) as totalCompany,
count( iu.id ) AS totalUser,
sum(iu.price) as totalPremium,
sum( iu.price ) AS totalPremium,
ipp.update_time AS updateTime
FROM
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
WHERE
ip.is_del = 0
......
......@@ -237,6 +237,17 @@
<select id="companyAdminCount" resultType="java.lang.Integer">
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 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