Commit 8e8d251a by 翁国栋 Committed by 284718418@qq.com

8小时运营后台--

投保人信息验证
企业列表信息验证
导入信息验证
导入人员信息验证
保单搜索列表更据企业名称查找
parent 92aff9ea
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;
}
...@@ -4,22 +4,21 @@ import cn.timer.api.bean.htzz.HtzzAssoZztx; ...@@ -4,22 +4,21 @@ import cn.timer.api.bean.htzz.HtzzAssoZztx;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.mysql.cj.util.StringUtils;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.*;
import lombok.Builder; import org.springframework.beans.factory.annotation.Value;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**
* 投保人 * 投保人
* *
...@@ -49,6 +48,7 @@ public class InsureApplicant extends Model<InsureApplicant> { ...@@ -49,6 +48,7 @@ public class InsureApplicant extends Model<InsureApplicant> {
* 企业/网点名称 * 企业/网点名称
*/ */
@ApiModelProperty(value = "企业/网点名称") @ApiModelProperty(value = "企业/网点名称")
@NotEmpty
private String applicantEName; private String applicantEName;
/** /**
* 企业/网点地址 * 企业/网点地址
...@@ -132,7 +132,7 @@ public class InsureApplicant extends Model<InsureApplicant> { ...@@ -132,7 +132,7 @@ public class InsureApplicant extends Model<InsureApplicant> {
private String applicantInvoicedAmount; private String applicantInvoicedAmount;
@ApiModelProperty(value = "企业id", example = "") @ApiModelProperty(value = "企业id", example = "")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="银行账号") @ApiModelProperty(value = "银行账号")
private String applicantCorporateBankAccount; private String applicantCorporateBankAccount;
/** /**
...@@ -148,198 +148,231 @@ public class InsureApplicant extends Model<InsureApplicant> { ...@@ -148,198 +148,231 @@ public class InsureApplicant extends Model<InsureApplicant> {
public void setApplicantEName(String applicantEName) { public void setApplicantEName(String applicantEName) {
this.applicantEName = applicantEName; this.applicantEName = applicantEName;
} }
/** /**
* 获取:企业/网点名称 * 获取:企业/网点名称
*/ */
public String getApplicantEName() { public String getApplicantEName() {
return applicantEName; return applicantEName;
} }
/** /**
* 设置:企业/网点地址 * 设置:企业/网点地址
*/ */
public void setApplicantEAddress(String applicantEAddress) { public void setApplicantEAddress(String applicantEAddress) {
this.applicantEAddress = applicantEAddress; this.applicantEAddress = applicantEAddress;
} }
/** /**
* 获取:企业/网点地址 * 获取:企业/网点地址
*/ */
public String getApplicantEAddress() { public String getApplicantEAddress() {
return applicantEAddress; return applicantEAddress;
} }
/** /**
* 设置:人员清单 * 设置:人员清单
*/ */
public void setApplicantEmployeeList(String applicantEmployeeList) { public void setApplicantEmployeeList(String applicantEmployeeList) {
this.applicantEmployeeList = applicantEmployeeList; this.applicantEmployeeList = applicantEmployeeList;
} }
/** /**
* 获取:人员清单 * 获取:人员清单
*/ */
public String getApplicantEmployeeList() { public String getApplicantEmployeeList() {
return applicantEmployeeList; return applicantEmployeeList;
} }
/** /**
* 设置:企业授权操作人姓名 * 设置:企业授权操作人姓名
*/ */
public void setApplicantEContacts(String applicantEContacts) { public void setApplicantEContacts(String applicantEContacts) {
this.applicantEContacts = applicantEContacts; this.applicantEContacts = applicantEContacts;
} }
/** /**
* 获取:企业授权操作人姓名 * 获取:企业授权操作人姓名
*/ */
public String getApplicantEContacts() { public String getApplicantEContacts() {
return applicantEContacts; return applicantEContacts;
} }
/** /**
* 设置:操作人的联系电话 * 设置:操作人的联系电话
*/ */
public void setApplicantEPhone(String applicantEPhone) { public void setApplicantEPhone(String applicantEPhone) {
this.applicantEPhone = applicantEPhone; this.applicantEPhone = applicantEPhone;
} }
/** /**
* 获取:操作人的联系电话 * 获取:操作人的联系电话
*/ */
public String getApplicantEPhone() { public String getApplicantEPhone() {
return applicantEPhone; return applicantEPhone;
} }
/** /**
* 设置:企业证件类型:3646、统一社会信用代码 3924、组织机构代码 * 设置:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/ */
public void setApplicantENoType(String applicantENoType) { public void setApplicantENoType(String applicantENoType) {
this.applicantENoType = applicantENoType; this.applicantENoType = applicantENoType;
} }
/** /**
* 获取:企业证件类型:3646、统一社会信用代码 3924、组织机构代码 * 获取:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/ */
public String getApplicantENoType() { public String getApplicantENoType() {
return applicantENoType; return applicantENoType;
} }
/** /**
* 设置:企业证件号码 * 设置:企业证件号码
*/ */
public void setApplicantENo(String applicantENo) { public void setApplicantENo(String applicantENo) {
this.applicantENo = applicantENo; this.applicantENo = applicantENo;
} }
/** /**
* 获取:企业证件号码 * 获取:企业证件号码
*/ */
public String getApplicantENo() { public String getApplicantENo() {
return applicantENo; return applicantENo;
} }
/** /**
* 设置:企业邮箱 * 设置:企业邮箱
*/ */
public void setApplicantEMail(String applicantEMail) { public void setApplicantEMail(String applicantEMail) {
this.applicantEMail = applicantEMail; this.applicantEMail = applicantEMail;
} }
/** /**
* 获取:企业邮箱 * 获取:企业邮箱
*/ */
public String getApplicantEMail() { public String getApplicantEMail() {
return applicantEMail; return applicantEMail;
} }
/** /**
* 设置:省市区 * 设置:省市区
*/ */
public void setApplicantProvinceCity(String applicantProvinceCity) { public void setApplicantProvinceCity(String applicantProvinceCity) {
this.applicantProvinceCity = applicantProvinceCity; this.applicantProvinceCity = applicantProvinceCity;
} }
/** /**
* 获取:省市区 * 获取:省市区
*/ */
public String getApplicantProvinceCity() { public String getApplicantProvinceCity() {
return applicantProvinceCity; return applicantProvinceCity;
} }
/** /**
* 设置:发票收件地址 * 设置:发票收件地址
*/ */
public void setApplicantInvoiceReceivingAddress(String applicantInvoiceReceivingAddress) { public void setApplicantInvoiceReceivingAddress(String applicantInvoiceReceivingAddress) {
this.applicantInvoiceReceivingAddress = applicantInvoiceReceivingAddress; this.applicantInvoiceReceivingAddress = applicantInvoiceReceivingAddress;
} }
/** /**
* 获取:发票收件地址 * 获取:发票收件地址
*/ */
public String getApplicantInvoiceReceivingAddress() { public String getApplicantInvoiceReceivingAddress() {
return applicantInvoiceReceivingAddress; return applicantInvoiceReceivingAddress;
} }
/** /**
* 设置:发票开票电话 * 设置:发票开票电话
*/ */
public void setApplicantInvoiceBillingPhone(String applicantInvoiceBillingPhone) { public void setApplicantInvoiceBillingPhone(String applicantInvoiceBillingPhone) {
this.applicantInvoiceBillingPhone = applicantInvoiceBillingPhone; this.applicantInvoiceBillingPhone = applicantInvoiceBillingPhone;
} }
/** /**
* 获取:发票开票电话 * 获取:发票开票电话
*/ */
public String getApplicantInvoiceBillingPhone() { public String getApplicantInvoiceBillingPhone() {
return applicantInvoiceBillingPhone; return applicantInvoiceBillingPhone;
} }
/** /**
* 设置:企业开户行名称 * 设置:企业开户行名称
*/ */
public void setApplicantBusinessBankName(String applicantBusinessBankName) { public void setApplicantBusinessBankName(String applicantBusinessBankName) {
this.applicantBusinessBankName = applicantBusinessBankName; this.applicantBusinessBankName = applicantBusinessBankName;
} }
/** /**
* 获取:企业开户行名称 * 获取:企业开户行名称
*/ */
public String getApplicantBusinessBankName() { public String getApplicantBusinessBankName() {
return applicantBusinessBankName; return applicantBusinessBankName;
} }
/** /**
* 设置:保单号 * 设置:保单号
*/ */
public void setPolicyNo(String policyNo) { public void setPolicyNo(String policyNo) {
this.policyNo = policyNo; this.policyNo = policyNo;
} }
/** /**
* 获取:保单号 * 获取:保单号
*/ */
public String getPolicyNo() { public String getPolicyNo() {
return policyNo; return policyNo;
} }
/** /**
* 设置:投保类型:1个人 2 企业 * 设置:投保类型:1个人 2 企业
*/ */
public void setApplicantType(String applicantType) { public void setApplicantType(String applicantType) {
this.applicantType = applicantType; this.applicantType = applicantType;
} }
/** /**
* 获取:投保类型:1个人 2 企业 * 获取:投保类型:1个人 2 企业
*/ */
public String getApplicantType() { public String getApplicantType() {
return applicantType; return applicantType;
} }
/** /**
* 设置:报价请求流水号 * 设置:报价请求流水号
*/ */
public void setTransId(String transId) { public void setTransId(String transId) {
this.transId = transId; this.transId = transId;
} }
/** /**
* 获取:报价请求流水号 * 获取:报价请求流水号
*/ */
public String getTransId() { public String getTransId() {
return transId; return transId;
} }
/** /**
* 设置:报价号 * 设置:报价号
*/ */
public void setCurrency(String currency) { public void setCurrency(String currency) {
this.currency = currency; this.currency = currency;
} }
/** /**
* 获取:报价号 * 获取:报价号
*/ */
public String getCurrency() { public String getCurrency() {
return currency; return currency;
} }
/** /**
* 设置:发票开票金额 * 设置:发票开票金额
*/ */
public void setApplicantInvoicedAmount(String applicantInvoicedAmount) { public void setApplicantInvoicedAmount(String applicantInvoicedAmount) {
this.applicantInvoicedAmount = applicantInvoicedAmount; this.applicantInvoicedAmount = applicantInvoicedAmount;
} }
/** /**
* 获取:发票开票金额 * 获取:发票开票金额
*/ */
...@@ -354,4 +387,30 @@ public class InsureApplicant extends Model<InsureApplicant> { ...@@ -354,4 +387,30 @@ public class InsureApplicant extends Model<InsureApplicant> {
public void setOrgCode(Integer orgCode) { public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode; this.orgCode = orgCode;
} }
/*验证必要字段*/
public String checkValiad() {
if (StringUtils.isNullOrEmpty(applicantEName)) {
return "企业/网点名称未设置";
}
if (StringUtils.isNullOrEmpty(applicantEAddress)) {
return "企业/网点地址未设置";
}
if (StringUtils.isNullOrEmpty(applicantEContacts)) {
return "企业授权操作人姓名未设置";
}
if (StringUtils.isNullOrEmpty(applicantEPhone)) {
return "操作人的联系电话未设置";
}
if (StringUtils.isNullOrEmpty(applicantENoType)) {
return "企业证件类型未设置";
}
if (StringUtils.isNullOrEmpty(applicantENo)) {
return "企业证件号码未设置";
}
if (StringUtils.isNullOrEmpty(applicantEMail)) {
return "企业邮箱未设置";
}
return "true";
}
} }
...@@ -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 {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, params.getOrgCode()));
params.setId(insureApplicant.getId()); params.setId(insureApplicant.getId());
params.updateById(); params.updateById();
return ResultUtil.data(params); 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) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM); insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(orgCode); insureApplicant.setOrgCode(orgCode);
insureApplicant.insert(); insureApplicant.insert();
} }
return ResultUtil.data(insureApplicant); return ResultUtil.data(insureApplicant);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("获取投保人异常");
}
} }
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) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM); insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(userBean.getOrgCode()); insureApplicant.setOrgCode(userBean.getOrgCode());
insureApplicant.insert(); insureApplicant.insert();
} }
return ResultUtil.data(insureApplicant); return ResultUtil.data(insureApplicant);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("获取投保人异常");
}
} }
} }
...@@ -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(){
try {
Date now = DateUtil.date(); Date now = DateUtil.date();
/*获取正常的保单*/ /*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd,now)); 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