Commit 9e21787f by 翁国栋

保单批量投保接口

运营后台
parent 2304e69a
package cn.timer.api.bean.adminaccount;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Table;
import java.util.Date;
/**
* 管理员列表
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-14 18:24:20
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "admin_account")
@ApiModel("APP更新记录")
public class AdminAccount extends Model<AdminAccount> {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
* 姓名
*/
private String realname;
/**
* 电话
*/
private String tel;
/**
* 级别 1超级管理员 2普通管理员
*/
private Integer types;
/**
* 创建者id,0表示系统创建
*/
private Integer createrid;
/**
* 创建日期
*/
private Date createtime;
/**
* 所属部门
*/
private String department;
/**
* 分组
*/
private Integer groupid;
/**
* 状态 1 正常 0 禁用
*/
private Integer statu;
/**
* 标注
*/
private String mark;
/**
* 帐号,首次注册手机号码
*/
private String account;
/**
* 登录密码
*/
private String pwd;
/**
* 头像名称,访问地址需要拼接
*/
private String avatar;
/**
* 1 内部(优领) 2外部(分销商)
*/
private Integer category;
/**
* 登录密码错误次数,大于5次将禁用
*/
private Integer lfc;
/**
* 禁用时间
*/
private Date prohibittime;
/**
* 登录ip
*/
private String ip;
/**
* 登录时间
*/
private Date logintime;
/**
* 更新时间
*/
private Date updatetime;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:姓名
*/
public void setRealname(String realname) {
this.realname = realname;
}
/**
* 获取:姓名
*/
public String getRealname() {
return realname;
}
/**
* 设置:电话
*/
public void setTel(String tel) {
this.tel = tel;
}
/**
* 获取:电话
*/
public String getTel() {
return tel;
}
/**
* 设置:级别 1超级管理员 2普通管理员
*/
public void setTypes(Integer types) {
this.types = types;
}
/**
* 获取:级别 1超级管理员 2普通管理员
*/
public Integer getTypes() {
return types;
}
/**
* 设置:创建者id,0表示系统创建
*/
public void setCreaterid(Integer createrid) {
this.createrid = createrid;
}
/**
* 获取:创建者id,0表示系统创建
*/
public Integer getCreaterid() {
return createrid;
}
/**
* 设置:创建日期
*/
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
/**
* 获取:创建日期
*/
public Date getCreatetime() {
return createtime;
}
/**
* 设置:所属部门
*/
public void setDepartment(String department) {
this.department = department;
}
/**
* 获取:所属部门
*/
public String getDepartment() {
return department;
}
/**
* 设置:分组
*/
public void setGroupid(Integer groupid) {
this.groupid = groupid;
}
/**
* 获取:分组
*/
public Integer getGroupid() {
return groupid;
}
/**
* 设置:状态 1 正常 0 禁用
*/
public void setStatu(Integer statu) {
this.statu = statu;
}
/**
* 获取:状态 1 正常 0 禁用
*/
public Integer getStatu() {
return statu;
}
/**
* 设置:标注
*/
public void setMark(String mark) {
this.mark = mark;
}
/**
* 获取:标注
*/
public String getMark() {
return mark;
}
/**
* 设置:帐号,首次注册手机号码
*/
public void setAccount(String account) {
this.account = account;
}
/**
* 获取:帐号,首次注册手机号码
*/
public String getAccount() {
return account;
}
/**
* 设置:登录密码
*/
public void setPwd(String pwd) {
this.pwd = pwd;
}
/**
* 获取:登录密码
*/
public String getPwd() {
return pwd;
}
/**
* 设置:头像名称,访问地址需要拼接
*/
public void setAvatar(String avatar) {
this.avatar = avatar;
}
/**
* 获取:头像名称,访问地址需要拼接
*/
public String getAvatar() {
return avatar;
}
/**
* 设置:1 内部(优领) 2外部(分销商)
*/
public void setCategory(Integer category) {
this.category = category;
}
/**
* 获取:1 内部(优领) 2外部(分销商)
*/
public Integer getCategory() {
return category;
}
/**
* 设置:登录密码错误次数,大于5次将禁用
*/
public void setLfc(Integer lfc) {
this.lfc = lfc;
}
/**
* 获取:登录密码错误次数,大于5次将禁用
*/
public Integer getLfc() {
return lfc;
}
/**
* 设置:禁用时间
*/
public void setProhibittime(Date prohibittime) {
this.prohibittime = prohibittime;
}
/**
* 获取:禁用时间
*/
public Date getProhibittime() {
return prohibittime;
}
/**
* 设置:登录ip
*/
public void setIp(String ip) {
this.ip = ip;
}
/**
* 获取:登录ip
*/
public String getIp() {
return ip;
}
/**
* 设置:登录时间
*/
public void setLogintime(Date logintime) {
this.logintime = logintime;
}
/**
* 获取:登录时间
*/
public Date getLogintime() {
return logintime;
}
/**
* 设置:更新时间
*/
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
/**
* 获取:更新时间
*/
public Date getUpdatetime() {
return updatetime;
}
}
package cn.timer.api.bean.insure;
import lombok.Data;
import java.io.Serializable;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/3 8:48
*/
@Data
public class CallBack implements Serializable {
private static final long serialVersionUID = 61499950876094044L;
private String status;
private String policy_status;
private String err_msg;
private String policy_no;
private String serial_number;
private String quote_trans_id;
private String serial_no;
private String policy_file;
private String total_expenditure;
}
package cn.timer.api.bean.insure;
import cn.timer.api.bean.htzz.HtzzAssoZztx;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 投保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-08 16:05:26
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "insure_applicant")
@ApiModel("投保人")
public class InsureApplicant extends Model<InsureApplicant> {
private static final long serialVersionUID = 1L;
/**
* id
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 企业/网点名称
*/
@ApiModelProperty(value = "目录名称")
private String applicantEName;
/**
* 企业/网点地址
*/
@ApiModelProperty(value = "企业/网点地址")
private String applicantEAddress;
/**
* 人员清单
*/
@ApiModelProperty(value = "人员清单")
private String applicantEmployeeList;
/**
* 企业授权操作人姓名
*/
@ApiModelProperty(value = "企业授权操作人姓名")
private String applicantEContacts;
/**
* 操作人的联系电话
*/
@ApiModelProperty(value = "操作人的联系电话")
private String applicantEPhone;
/**
* 企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/
@ApiModelProperty(value = "企业证件类型")
private String applicantENoType;
/**
* 企业证件号码
*/
@ApiModelProperty(value = "企业证件号码")
private String applicantENo;
/**
* 企业邮箱
*/
@ApiModelProperty(value = "企业邮箱")
private String applicantEMail;
/**
* 省市区
*/
@ApiModelProperty(value = "省市区")
private String applicantProvinceCity;
/**
* 发票收件地址
*/
@ApiModelProperty(value = "发票收件地址")
private String applicantInvoiceReceivingAddress;
/**
* 发票开票电话
*/
@ApiModelProperty(value = "发票开票电话")
private String applicantInvoiceBillingPhone;
/**
* 企业开户行名称
*/
@ApiModelProperty(value = "企业开户行名称")
private String applicantBusinessBankName;
/**
* 保单号
*/
@ApiModelProperty(value = "保单号")
private String policyNo;
/**
* 投保类型:1个人 2 企业
*/
@ApiModelProperty(value = "投保类型")
private String applicantType;
/**
* 报价请求流水号
*/
@ApiModelProperty(value = "报价请求流水号")
private String transId;
/**
* 报价号
*/
@ApiModelProperty(value = "报价号")
private String currency;
/**
* 发票开票金额
*/
@ApiModelProperty(value = "发票开票金额")
private String applicantInvoicedAmount;
@ApiModelProperty(value = "企业id", example = "")
private Integer orgCode;
/**
* 设置:id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置:企业/网点名称
*/
public void setApplicantEName(String applicantEName) {
this.applicantEName = applicantEName;
}
/**
* 获取:企业/网点名称
*/
public String getApplicantEName() {
return applicantEName;
}
/**
* 设置:企业/网点地址
*/
public void setApplicantEAddress(String applicantEAddress) {
this.applicantEAddress = applicantEAddress;
}
/**
* 获取:企业/网点地址
*/
public String getApplicantEAddress() {
return applicantEAddress;
}
/**
* 设置:人员清单
*/
public void setApplicantEmployeeList(String applicantEmployeeList) {
this.applicantEmployeeList = applicantEmployeeList;
}
/**
* 获取:人员清单
*/
public String getApplicantEmployeeList() {
return applicantEmployeeList;
}
/**
* 设置:企业授权操作人姓名
*/
public void setApplicantEContacts(String applicantEContacts) {
this.applicantEContacts = applicantEContacts;
}
/**
* 获取:企业授权操作人姓名
*/
public String getApplicantEContacts() {
return applicantEContacts;
}
/**
* 设置:操作人的联系电话
*/
public void setApplicantEPhone(String applicantEPhone) {
this.applicantEPhone = applicantEPhone;
}
/**
* 获取:操作人的联系电话
*/
public String getApplicantEPhone() {
return applicantEPhone;
}
/**
* 设置:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/
public void setApplicantENoType(String applicantENoType) {
this.applicantENoType = applicantENoType;
}
/**
* 获取:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/
public String getApplicantENoType() {
return applicantENoType;
}
/**
* 设置:企业证件号码
*/
public void setApplicantENo(String applicantENo) {
this.applicantENo = applicantENo;
}
/**
* 获取:企业证件号码
*/
public String getApplicantENo() {
return applicantENo;
}
/**
* 设置:企业邮箱
*/
public void setApplicantEMail(String applicantEMail) {
this.applicantEMail = applicantEMail;
}
/**
* 获取:企业邮箱
*/
public String getApplicantEMail() {
return applicantEMail;
}
/**
* 设置:省市区
*/
public void setApplicantProvinceCity(String applicantProvinceCity) {
this.applicantProvinceCity = applicantProvinceCity;
}
/**
* 获取:省市区
*/
public String getApplicantProvinceCity() {
return applicantProvinceCity;
}
/**
* 设置:发票收件地址
*/
public void setApplicantInvoiceReceivingAddress(String applicantInvoiceReceivingAddress) {
this.applicantInvoiceReceivingAddress = applicantInvoiceReceivingAddress;
}
/**
* 获取:发票收件地址
*/
public String getApplicantInvoiceReceivingAddress() {
return applicantInvoiceReceivingAddress;
}
/**
* 设置:发票开票电话
*/
public void setApplicantInvoiceBillingPhone(String applicantInvoiceBillingPhone) {
this.applicantInvoiceBillingPhone = applicantInvoiceBillingPhone;
}
/**
* 获取:发票开票电话
*/
public String getApplicantInvoiceBillingPhone() {
return applicantInvoiceBillingPhone;
}
/**
* 设置:企业开户行名称
*/
public void setApplicantBusinessBankName(String applicantBusinessBankName) {
this.applicantBusinessBankName = applicantBusinessBankName;
}
/**
* 获取:企业开户行名称
*/
public String getApplicantBusinessBankName() {
return applicantBusinessBankName;
}
/**
* 设置:保单号
*/
public void setPolicyNo(String policyNo) {
this.policyNo = policyNo;
}
/**
* 获取:保单号
*/
public String getPolicyNo() {
return policyNo;
}
/**
* 设置:投保类型:1个人 2 企业
*/
public void setApplicantType(String applicantType) {
this.applicantType = applicantType;
}
/**
* 获取:投保类型:1个人 2 企业
*/
public String getApplicantType() {
return applicantType;
}
/**
* 设置:报价请求流水号
*/
public void setTransId(String transId) {
this.transId = transId;
}
/**
* 获取:报价请求流水号
*/
public String getTransId() {
return transId;
}
/**
* 设置:报价号
*/
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* 获取:报价号
*/
public String getCurrency() {
return currency;
}
/**
* 设置:发票开票金额
*/
public void setApplicantInvoicedAmount(String applicantInvoicedAmount) {
this.applicantInvoicedAmount = applicantInvoicedAmount;
}
/**
* 获取:发票开票金额
*/
public String getApplicantInvoicedAmount() {
return applicantInvoicedAmount;
}
public Integer getOrgCode() {
return orgCode;
}
public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode;
}
}
package cn.timer.api.bean.insure;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 保单信息
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-14 08:53:04
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "insure_policy")
@ApiModel("保单信息")
public class InsurePolicy extends Model<InsurePolicy> {
private static final long serialVersionUID = 1L;
/**
*
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 方案名称(必选)
*/
private String schemeName;
/**
* 保单生效日
*/
private Date policyDateStart;
/**
* 保单终止日
*/
private Date policyDateEnd;
/**
* 产品代码
*/
private String productCodeId;
/**
* 计划代码
*/
private String planCodeId;
/**
* 分销商pid
*/
private String partnerPid;
/**
* 保单号
*/
private String policyNo;
/**
* 保单类型:1、年单 2、月单
*/
private Integer type;
/**
* 5-人民币,其他币种请参见全局数据字典
*/
private String currency;
/**
* 总保费
*/
private String totalPremium;
/**
* 1-正常
*/
private String status;
/**
* 电子保单
*/
private String policyFile;
/**
* 保单kit的地址
*/
private String kitUrl;
/**
* 投保人id
*/
private Integer insureApplicantId;
/**
* 企业id
*/
private Integer orgCode;
/**
* 投保时间
*/
private Date createTime;
/**
* 最近操作时间
*/
private Date updateTime;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:方案名称(必选)
*/
public void setSchemeName(String schemeName) {
this.schemeName = schemeName;
}
/**
* 获取:方案名称(必选)
*/
public String getSchemeName() {
return schemeName;
}
/**
* 设置:保单生效日
*/
public void setPolicyDateStart(Date policyDateStart) {
this.policyDateStart = policyDateStart;
}
/**
* 获取:保单生效日
*/
public Date getPolicyDateStart() {
return policyDateStart;
}
/**
* 设置:保单终止日
*/
public void setPolicyDateEnd(Date policyDateEnd) {
this.policyDateEnd = policyDateEnd;
}
/**
* 获取:保单终止日
*/
public Date getPolicyDateEnd() {
return policyDateEnd;
}
/**
* 设置:产品代码
*/
public void setProductCodeId(String productCodeId) {
this.productCodeId = productCodeId;
}
/**
* 获取:产品代码
*/
public String getProductCodeId() {
return productCodeId;
}
/**
* 设置:计划代码
*/
public void setPlanCodeId(String planCodeId) {
this.planCodeId = planCodeId;
}
/**
* 获取:计划代码
*/
public String getPlanCodeId() {
return planCodeId;
}
/**
* 设置:分销商pid
*/
public void setPartnerPid(String partnerPid) {
this.partnerPid = partnerPid;
}
/**
* 获取:分销商pid
*/
public String getPartnerPid() {
return partnerPid;
}
/**
* 设置:保单号
*/
public void setPolicyNo(String policyNo) {
this.policyNo = policyNo;
}
/**
* 获取:保单号
*/
public String getPolicyNo() {
return policyNo;
}
/**
* 设置:保单类型:1、年单 2、月单
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 获取:保单类型:1、年单 2、月单
*/
public Integer getType() {
return type;
}
/**
* 设置:5-人民币,其他币种请参见全局数据字典
*/
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* 获取:5-人民币,其他币种请参见全局数据字典
*/
public String getCurrency() {
return currency;
}
/**
* 设置:总保费
*/
public void setTotalPremium(String totalPremium) {
this.totalPremium = totalPremium;
}
/**
* 获取:总保费
*/
public String getTotalPremium() {
return totalPremium;
}
/**
* 设置:1-正常
*/
public void setStatus(String status) {
this.status = status;
}
/**
* 获取:1-正常
*/
public String getStatus() {
return status;
}
/**
* 设置:电子保单
*/
public void setPolicyFile(String policyFile) {
this.policyFile = policyFile;
}
/**
* 获取:电子保单
*/
public String getPolicyFile() {
return policyFile;
}
/**
* 设置:保单kit的地址
*/
public void setKitUrl(String kitUrl) {
this.kitUrl = kitUrl;
}
/**
* 获取:保单kit的地址
*/
public String getKitUrl() {
return kitUrl;
}
/**
* 设置:投保人id
*/
public void setInsureApplicantId(Integer insureApplicantId) {
this.insureApplicantId = insureApplicantId;
}
/**
* 获取:投保人id
*/
public Integer getInsureApplicantId() {
return insureApplicantId;
}
/**
* 设置:企业id
*/
public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode;
}
/**
* 获取:企业id
*/
public Integer getOrgCode() {
return orgCode;
}
/**
* 设置:投保时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:投保时间
*/
public Date getCreateTime() {
return createTime;
}
}
package cn.timer.api.bean.insure;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 被保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-11 09:06:53
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "insure_user")
@ApiModel("被保人")
public class InsureUser extends Model<InsureUser> {
private static final long serialVersionUID = 1L;
/**
* id
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 被保险人请求流水号
*/
@ApiModelProperty(value = "被保险人请求流水号")
private String transId;
/**
* 批次核算保费
*/
@ApiModelProperty(value = "批次核算保费")
private String price;
/**
* 姓名
*/
@ApiModelProperty(value = "姓名")
private String insuredName;
/**
* 被保险人批次号
*/
@ApiModelProperty(value = "被保险人批次号")
private String batchNo;
/**
* 保单批次保费
*/
@ApiModelProperty(value = "保单批次保费")
private String premium;
/**
* 被保险人联系电话
*/
@ApiModelProperty(value = "被保险人联系电话")
private String insuredMobile;
/**
* 证件号码
*/
@ApiModelProperty(value = "证件号码")
private String insuredNo;
/**
* 联系人姓名
*/
@ApiModelProperty(value = "联系人姓名")
private String insuredEContact;
/**
* 基础计划 30万雇主/3万医疗 36968,50万雇主/5万医疗 36969,80万雇主/10万医疗 36970,80万雇主/20万医疗 36971,100万雇主/10万医疗 36972
*/
@ApiModelProperty(value = "基础计划")
private String benefitBasicPlan;
/**
* 职业类别 A类 63119 B类 63120 C类 63121
*/
@ApiModelProperty(value = "职业类别")
private String benefitOccupationCategory;
/**
* 参保人数
*/
@ApiModelProperty(value = "参保人数")
private String benefitElEmployeeNumberT;
/**
* 二、三轮车车架号(必选)
*/
@ApiModelProperty(value = "二、三轮车车架号")
private String tricycleFrameNumber;
/**
* 保单号
*/
@ApiModelProperty(value = "保单号")
private String policyNo;
/**
* 参保状态:1参保中 2已失效
*/
@ApiModelProperty(value = "参保状态")
private String status;
/**
* 被保人类型:1个人 2企业
*/
@ApiModelProperty(value = "被保人类型")
private Integer type;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer orgCode;
/**
* 个人id
*/
@ApiModelProperty(value = "个人id")
private Integer userId;
/**
* 人员清单
*/
@ApiModelProperty(value = "人员清单")
private String applicantEmployeeList;
@ApiModelProperty(value = "生效日期")
private Date policyDateStart;
@ApiModelProperty(value = "失效日期")
private Date policyDateEnd;
@Transient
private String[] userIds;
}
package cn.timer.api.bean.insure;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/3 18:01
*/
import java.io.Serializable;
/**
* 投保订单详情
*/
public class InsuredOrderDetail implements Serializable {
private static final long serialVersionUID = -1695869258491138853L;
private String is_ss;
/**
*
*/
private String transId;
private String serialNumber;
}
...@@ -39,63 +39,63 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -39,63 +39,63 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@TableId (type = IdType.AUTO) @TableId (type = IdType.AUTO)
@ApiModelProperty(value="员工编号 员工编号",example="101") @ApiModelProperty(value="员工编号 员工编号",example="101")
private Integer id; private Integer id;
@ApiModelProperty(value="员工工号 ",example="员工工号") @ApiModelProperty(value="员工工号 ",example="员工工号")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="手机号码 手机号码",example="101") @ApiModelProperty(value="手机号码 手机号码",example="101")
private String phone; private String phone;
@ApiModelProperty(value="密码 ",example="密码") @ApiModelProperty(value="密码 ",example="密码")
private String password; private String password;
@ApiModelProperty(value="头像 ",example="base64来处理头像") @ApiModelProperty(value="头像 ",example="base64来处理头像")
private String headUrl; private String headUrl;
@ApiModelProperty(value="名称 ",example="名称") @ApiModelProperty(value="名称 ",example="名称")
private String name; private String name;
@ApiModelProperty(value="英文名称 ",example="英文名称") @ApiModelProperty(value="英文名称 ",example="英文名称")
private String englishName; private String englishName;
@ApiModelProperty(value="性别 0:男;1:女",example="0") @ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex; private Integer sex;
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101") @ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="101")
private Integer zjType; private Integer zjType;
@ApiModelProperty(value="证件号码 ",example="证件号码") @ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum; private String zjNum;
@ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日") @ApiModelProperty(value="身份证有效期 ",example="身份证有效到期日")
private Date sfzyxTime; private Date sfzyxTime;
@ApiModelProperty(value="出生日期 ",example="出生日期") @ApiModelProperty(value="出生日期 ",example="出生日期")
private Date birthday; private Date birthday;
@ApiModelProperty(value="年龄 年龄",example="101") @ApiModelProperty(value="年龄 年龄",example="101")
private Integer age; private Integer age;
@ApiModelProperty(value="是否已婚 0:否、1:是",example="101") @ApiModelProperty(value="是否已婚 0:否、1:是",example="101")
private Integer isMarried; private Integer isMarried;
@ApiModelProperty(value="是否已育 0:否、1:是",example="101") @ApiModelProperty(value="是否已育 0:否、1:是",example="101")
private Integer isPregnant; private Integer isPregnant;
@ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101") @ApiModelProperty(value="国家地区 0:中国;1:中国香港;2:中国澳门;3:中国台湾",example="101")
private Integer area; private Integer area;
@ApiModelProperty(value="民族 56个名族",example="101") @ApiModelProperty(value="民族 56个名族",example="101")
private Integer mz; private Integer mz;
@ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101") @ApiModelProperty(value="政治面貌 1:中共党员;2:中共预备党员;3共青团员;4:民革党员;5:民盟盟员;6:民建会员;7:民进会员;8:农工党党员;9:致公党党员;10:九三学社社员;11:台盟盟员;12:无党派人士;13:群众",example="101")
private Integer zzmm; private Integer zzmm;
@ApiModelProperty(value="籍贯 省",example="101") @ApiModelProperty(value="籍贯 省",example="101")
private String jg; private String jg;
@ApiModelProperty(value="籍贯 省id",example="101") @ApiModelProperty(value="籍贯 省id",example="101")
private String jgId; private String jgId;
@ApiModelProperty(value = "省") @ApiModelProperty(value = "省")
private String province; private String province;
@ApiModelProperty(value = "省id") @ApiModelProperty(value = "省id")
...@@ -108,113 +108,113 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -108,113 +108,113 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
private String district; private String district;
@ApiModelProperty(value = "区编号") @ApiModelProperty(value = "区编号")
private String districtId; private String districtId;
@ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101") @ApiModelProperty(value="户口性质 1:城镇户口;2:农村户口;3:居民户口",example="101")
private Integer hkType; private Integer hkType;
@ApiModelProperty(value="户籍地址 ",example="详细地址") @ApiModelProperty(value="户籍地址 ",example="详细地址")
private String hkAddress; private String hkAddress;
@ApiModelProperty(value="QQ QQ",example="101") @ApiModelProperty(value="QQ QQ",example="101")
private Integer qq; private Integer qq;
@ApiModelProperty(value="微信 ",example="微信") @ApiModelProperty(value="微信 ",example="微信")
private String wechat; private String wechat;
// @ApiModelProperty(value="个人邮箱 ",example="个人邮箱") // @ApiModelProperty(value="个人邮箱 ",example="个人邮箱")
// private String email; // private String email;
@ApiModelProperty(value="血型 ",example="血型") @ApiModelProperty(value="血型 ",example="血型")
private String bloodType; private String bloodType;
@ApiModelProperty(value="语言 ",example="语言") @ApiModelProperty(value="语言 ",example="语言")
private String language; private String language;
@ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101") @ApiModelProperty(value="最高学历 1:小学;2:初中;3:高中;4:中专;5:大专;6:本科;7:研究生;8:硕士;9:博士;",example="101")
private Integer edu; private Integer edu;
@ApiModelProperty(value="专业 ",example="专业") @ApiModelProperty(value="专业 ",example="专业")
private String zy; private String zy;
@ApiModelProperty(value="转正备注 ",example="转正备注") @ApiModelProperty(value="转正备注 ",example="转正备注")
private String zzRemark; private String zzRemark;
@ApiModelProperty(value="工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101") @ApiModelProperty(value="工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="101")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime; private Date rzTime;
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101") @ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="101")
private Integer syq; private Integer syq;
@ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期") @ApiModelProperty(value="应转正日期 ",example="人事记录要自动转正的日期")
private Date zzTime; private Date zzTime;
@ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期") @ApiModelProperty(value="实际转正日期 ",example="人事手动记录要转正的日期")
private Date sjzzTime; private Date sjzzTime;
@ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101") @ApiModelProperty(value="是否计入考勤 0:否;1:是",example="101")
private Integer isJrkq; private Integer isJrkq;
@ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101") @ApiModelProperty(value="公司内部工号 就是公司内部自己设置的工号",example="101")
private String jobNum; private String jobNum;
@ApiModelProperty(value="工作地点 ",example="工作地点") @ApiModelProperty(value="工作地点 ",example="工作地点")
private String workAddress; private String workAddress;
@ApiModelProperty(value="工作电话 工作电话",example="101") @ApiModelProperty(value="工作电话 工作电话",example="101")
private Integer workPhone; private Integer workPhone;
@ApiModelProperty(value="工作邮箱 ",example="工作邮箱") @ApiModelProperty(value="工作邮箱 ",example="工作邮箱")
private String workEmail; private String workEmail;
@ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101") @ApiModelProperty(value="招聘渠道 招聘渠道应该是活性的",example="101")
private Integer zpqd; private Integer zpqd;
@ApiModelProperty(value="部门岗位id 部门岗位id",example="101") @ApiModelProperty(value="部门岗位id 部门岗位id",example="101")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="部门名称",example="") @ApiModelProperty(value="部门名称",example="")
private String bmgwName; private String bmgwName;
@ApiModelProperty(value="修改时间",example="修改时间") @ApiModelProperty(value="修改时间",example="修改时间")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value="修改人",example="修改人") @ApiModelProperty(value="修改人",example="修改人")
private Integer updateMan; private Integer updateMan;
@ApiModelProperty(value="组织机构代码 组织机构代码",example="101") @ApiModelProperty(value="组织机构代码 组织机构代码",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="微信id",example="UnionID微信系统唯一id") @ApiModelProperty(value="微信id",example="UnionID微信系统唯一id")
private String unionid; private String unionid;
@ApiModelProperty(value="公众号id",example="openid公众号唯一id") @ApiModelProperty(value="公众号id",example="openid公众号唯一id")
private String openid; private String openid;
@ApiModelProperty(value="小程序id",example="mpopenid小程序") @ApiModelProperty(value="小程序id",example="mpopenid小程序")
private String mpopenid; private String mpopenid;
@ApiModelProperty(value="手机APPid",example="appopenid手机app") @ApiModelProperty(value="手机APPid",example="appopenid手机app")
private String appopenid; private String appopenid;
// @ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号") // @ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
// private Integer isManager; // private Integer isManager;
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式") @ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts; private Integer beforeLeavingSts;
@ApiModelProperty(value="自定义工号",example="") @ApiModelProperty(value="自定义工号",example="")
private String customNum; private String customNum;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String error;//错误信息提示 private String error;//错误信息提示
...@@ -223,7 +223,8 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -223,7 +223,8 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="员工登陆账号(手机号)",example="员工登陆账号(手机号)") @ApiModelProperty(value="员工登陆账号(手机号)",example="员工登陆账号(手机号)")
private String empLoginPhone; private String empLoginPhone;
@ApiModelProperty(value="是否已投保:0否 1是",example="")
private int isInsure;
}
\ No newline at end of file }
...@@ -27,22 +27,22 @@ public class RedisSessionInterceptor implements HandlerInterceptor { ...@@ -27,22 +27,22 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception { throws Exception {
// response.setHeader("Access-Control-Allow-Origin","http://120.24.24.239:8088"); // response.setHeader("Access-Control-Allow-Origin","http://120.24.24.239:8088");
//// response.setHeader("Access-Control-Allow-Origin",request.getHeader("Origin")); //// response.setHeader("Access-Control-Allow-Origin",request.getHeader("Origin"));
// response.setHeader("Access-Control-Allow-Methods", "*"); // response.setHeader("Access-Control-Allow-Methods", "*");
// response.setHeader("Access-Control-Allow-Credentials", "true"); // response.setHeader("Access-Control-Allow-Credentials", "true");
// response.setHeader("Access-Control-Allow-Headers", "*"); // response.setHeader("Access-Control-Allow-Headers", "*");
// //
// System.out.print("request.Origin>"+request.getHeader("Origin")); // System.out.print("request.Origin>"+request.getHeader("Origin"));
// //option预检查,直接通过请求 // //option预检查,直接通过请求
// if ("OPTIONS".equals(request.getMethod())){ // if ("OPTIONS".equals(request.getMethod())){
// return true; // return true;
// } // }
/* /*
* Enumeration<String> names = request.getHeaderNames(); * Enumeration<String> names = request.getHeaderNames();
* while(names.hasMoreElements()) { String name = (String)names.nextElement(); * while(names.hasMoreElements()) { String name = (String)names.nextElement();
...@@ -50,8 +50,10 @@ public class RedisSessionInterceptor implements HandlerInterceptor { ...@@ -50,8 +50,10 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
* value); } * value); }
*/ */
// 无论访问的地址是不是正确的,都进行登录验证,登录成功后的访问再进行分发,404的访问自然会进入到错误控制器中 // 无论访问的地址是不是正确的,都进行登录验证,登录成功后的访问再进行分发,404的访问自然会进入到错误控制器中
HttpSession session = request.getSession(); HttpSession session = request.getSession();
if(session.getAttribute("ui")==null) { Object ai = session.getAttribute("ai");
Object ui = session.getAttribute("ui");
if(session.getAttribute("ui")==null&&session.getAttribute("ai")==null) {
response401(response); response401(response);
return false; return false;
} }
...@@ -71,7 +73,7 @@ public class RedisSessionInterceptor implements HandlerInterceptor { ...@@ -71,7 +73,7 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
// response401(response); // response401(response);
return true; return true;
} }
private void response401(HttpServletResponse response) { private void response401(HttpServletResponse response) {
......
...@@ -19,10 +19,10 @@ import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; ...@@ -19,10 +19,10 @@ import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
@Configuration @Configuration
public class WebSecurityConfig implements WebMvcConfigurer { public class WebSecurityConfig implements WebMvcConfigurer {
@Resource @Resource
private UserMethodArgumentResolver userMethodArgumentResolver; private UserMethodArgumentResolver userMethodArgumentResolver;
@Bean @Bean
public RedisSessionInterceptor getSessionInterceptor() { public RedisSessionInterceptor getSessionInterceptor() {
return new RedisSessionInterceptor(); return new RedisSessionInterceptor();
...@@ -30,12 +30,14 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -30,12 +30,14 @@ public class WebSecurityConfig implements WebMvcConfigurer {
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
// 所有已api开头的访问都要进入RedisSessionInterceptor拦截器进行登录验证,并排除login接口(全路径)。必须写成链式,分别设置的话会创建多个拦截器。 // 所有已api开头的访问都要进入RedilsSessionInterceptor拦截器进行登录验证,并排除login接口(全路径)。必须写成链式,分别设置的话会创建多个拦截器。
// 必须写成getSessionInterceptor(),否则SessionInterceptor中的@Autowired会无效 // 必须写成getSessionInterceptor(),否则SessionInterceptor中的@Autowired会无效
//.excludePathPatterns("/") //.excludePathPatterns("/")
registry.addInterceptor(getSessionInterceptor()) registry.addInterceptor(getSessionInterceptor())
.addPathPatterns("/**") .addPathPatterns("/**")
.excludePathPatterns("/callback/**") .excludePathPatterns("/callback/**")
.excludePathPatterns("/callBack/policy/**")
.excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*") .excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*") .excludePathPatterns("/doc*")
.excludePathPatterns("/v2/**") .excludePathPatterns("/v2/**")
...@@ -53,14 +55,14 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -53,14 +55,14 @@ public class WebSecurityConfig implements WebMvcConfigurer {
.excludePathPatterns("/check/**"); .excludePathPatterns("/check/**");
// registry.addInterceptor(getSessionInterceptor()).addPathPatterns("/**").excludePathPatterns("/swagger-ui*"); // registry.addInterceptor(getSessionInterceptor()).addPathPatterns("/**").excludePathPatterns("/swagger-ui*");
} }
/** /**
* 配置消息转换器--这里我用的是alibaba 开源的 fastjson * 配置消息转换器--这里我用的是alibaba 开源的 fastjson
* @param converters * @param converters
*/ */
@Override @Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// Iterator<HttpMessageConverter<?>> iterator = converters.iterator(); // Iterator<HttpMessageConverter<?>> iterator = converters.iterator();
// while(iterator.hasNext()){ // while(iterator.hasNext()){
// HttpMessageConverter<?> converter = iterator.next(); // HttpMessageConverter<?> converter = iterator.next();
...@@ -107,12 +109,12 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -107,12 +109,12 @@ public class WebSecurityConfig implements WebMvcConfigurer {
converters.add(0,fastConverter); converters.add(0,fastConverter);
} }
@Override @Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(userMethodArgumentResolver); argumentResolvers.add(userMethodArgumentResolver);
} }
// @Override // @Override
// public void addCorsMappings(CorsRegistry registry) { // public void addCorsMappings(CorsRegistry registry) {
//// System.out.println("我是MyWebConfig跨域"); //// System.out.println("我是MyWebConfig跨域");
......
package cn.timer.api.controller.insure;
import cn.timer.api.bean.insure.CallBack;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.security.auth.callback.Callback;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/3 8:45
*/
@Api(tags = "8.0回调接口")
@RestController
@Transactional
@RequestMapping(value = "/callBack/policy", produces = {"application/json"})
public class CallBackContorll {
private static final Logger log = LoggerFactory.getLogger(CallBackContorll.class);
@PostMapping(value = "/insuredCallBack")
@ApiOperation(value = "6.投保申请回调", httpMethod = "Post", notes = "投保申请回调")
@ApiOperationSupport(order = 2)
private Integer callBack(@RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp, @RequestBody CallBack callBack){
log.info(String.valueOf(callBack));
return 1;
}
}
package cn.timer.api.controller.insure;
import java.io.IOException;
import java.util.Map;
import java.util.Optional;
import java.util.Random;
import cn.timer.api.bean.insure.InsureApplicant;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.insure.InsureApplicantMapper;
import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.utils.HttpUtils;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.alibaba.druid.util.Base64;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Maps;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* 投保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-07 17:02:46
*/
@Api(tags = "23.0保险列表")
@RestController
@Transactional
@RequestMapping(value = "/insureApplicant", produces = {"application/json"})
public class InsureApplicantController {
private static final Logger log = LoggerFactory.getLogger(InsureApplicantController.class);
@Autowired
private InsureApplicantMapper insureApplicantMapper;
@Value("insure.type.test.appid")
private String appid;
@Value("insure.type.test.secret")
private String secret;
@Value("insure.type.test.appidq")
private String appidq;
@Value("insure.type.test.secretq")
private String secretq;
@Value("insure.type.test.uploadUrl")
private String uploadUrl;
@Value("insure.type.test.insuredUrl")
private String insuredUrl;
@Value("insure.type.test.uploadUrlq")
private String uploadUrl2;
@PostMapping("/insureApplicationSetting")
@ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请")
private Result<Object> insureApplicationSetting(@CurrentUser UserBean userBean, @RequestBody InsureApplicant params) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,userBean.getOrgCode()));
if(insureApplicant==null){
params.insert();
return ResultUtil.data(params);
}
BeanUtils.copyProperties(params,insureApplicant);
insureApplicant.updateById();
return ResultUtil.data(insureApplicant);
}
@PostMapping("/getApplicant")
@ApiOperation(value = "获取投保人", httpMethod = "POST", 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){
return ResultUtil.data(null);
}
return ResultUtil.data(insureApplicant);
}
/**
* 设置链接参数
*
* @param sign
* @return
*/
private Map setParams(String sign) {
/*当前时间戳*/
long timestamp = System.currentTimeMillis()/1000;
log.info("时间戳" + timestamp);
Map paramsMap = Maps.newHashMap();
paramsMap.put("pid", appidq);
paramsMap.put("timestamp", String.valueOf(timestamp));
paramsMap.put("trace_id", appidq + timestamp + new Random().nextInt((9999 - 100) + 1) + 10);
// paramsMap.put("sign",Md5.md5(appid+secret+timestamp+sign.trim()));
String value = appidq + secretq + timestamp + sign;
log.info("body参数======" + sign);
paramsMap.put("sign", DigestUtils.md5Hex(value));
log.info("params参数======" + JSONObject.toJSONString(paramsMap));
return paramsMap;
}
/**
* 设置返回信息
*
* @param data
* @return
*/
private Object message(String data) {
Map<String, Object> dataMap = JSONObject.parseObject(data);
if (dataMap.get("errcode").toString().equals("suc")) {
return dataMap.get("data");
}
return dataMap.get("errmsg");
}
}
package cn.timer.api.controller.insure;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* 被保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-11 09:06:53
*/
@RestController
@RequestMapping("insureuser")
public class InsureUserController{
}
package cn.timer.api.controller.insure.bean;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/10 14:28
*/
@Data
public class ExcelBean {
private String id;
private String name;
private String idType;
private String idNumber;
private String schemeName;
private String dateStart;
private String branch;
private String tricycleFrameNumber;
private String benefitOccupationCategory;
}
package cn.timer.api.controller.superadmin;
import cn.timer.api.bean.adminaccount.AdminAccount;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.dto.qyzx.EntRegisterDto;
import cn.timer.api.utils.Md5;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.UserIp;
import cn.timer.api.utils.redis.RedisConfig;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/14 18:14
*/
@RestController
@Api(tags = "33.0运营后台登录")
@Transactional
@RequestMapping(value = "/superLogin", produces = { "application/json" })
public class SuperLoginController {
@Autowired
private HttpSession session;
@PostMapping(value = "/adminLogin")
@ApiOperation(value = "运营后台登录", httpMethod = "POST", notes = "接口发布说明")
public Result<AdminAccount> adminLogin(@RequestBody EntRegisterDto entRegisterDto, HttpServletRequest request){
String ip = UserIp.getIpAddr(request);
AdminAccount adminAccount = AdminAccount.builder().build().selectOne(new QueryWrapper<AdminAccount>().lambda()
.eq(AdminAccount::getAccount,entRegisterDto.getPhone())
.eq(AdminAccount::getPwd,Md5.md5(entRegisterDto.getPw())));
if(adminAccount==null){
return ResultUtil.error("用户不存在或密码错误");
}
session=request.getSession();
session.setAttribute("ai", adminAccount);
System.err.println(session.getId());
return ResultUtil.data(adminAccount);
};
@PostMapping(value = "/adminOutLogin")
@ApiOperation(value = "运营后台退出", httpMethod = "POST", notes = "接口发布说明")
public Result<String> adminOutLogin(HttpServletRequest request){
session= request.getSession();
session.removeAttribute("ai");
return ResultUtil.data("退出成功");
}
}
package cn.timer.api.dao.adminaccount;
import cn.timer.api.bean.adminaccount.AdminAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 管理员列表
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-14 18:24:20
*/
@Repository
public interface AdminAccountMapper extends BaseMapper<AdminAccount> {
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsureApplicant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 投保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-07 17:02:46
*/
@Repository
public interface InsureApplicantMapper extends BaseMapper<InsureApplicant> {
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.dto.insure.PolicyDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 保单信息
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-14 08:53:04
*/
@Repository
public interface InsurePolicyMapper extends BaseMapper<InsurePolicy> {
public List<PolicyDto> policyList();
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.dto.insure.PolicyDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 被保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-11 09:06:53
*/
@Repository
public interface InsureUserMapper extends BaseMapper<InsureUser> {
public List<PolicyDto> selectPolicyList(String id);
}
...@@ -19,7 +19,7 @@ import cn.timer.api.dto.zzgl.DepartmentStaffDto; ...@@ -19,7 +19,7 @@ import cn.timer.api.dto.zzgl.DepartmentStaffDto;
/** /**
* 员工档案+统计图查询 * 员工档案+统计图查询
* *
* @author dsc 2019-11-23 * @author dsc 2019-11-23
*/ */
@Repository @Repository
...@@ -30,17 +30,17 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -30,17 +30,17 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
List<YgbintuDto> rsybp(Integer orgCode); List<YgbintuDto> rsybp(Integer orgCode);
/** /**
* 查询当月离职人数 * 查询当月离职人数
* @param userBean * @param userBean
* @return * @return
*/ */
Integer benyueLz(Integer orgCode); Integer benyueLz(Integer orgCode);
/** /**
* 查询当月转正人数 * 查询当月转正人数
* @param userBean * @param userBean
* @return * @return
*/ */
Integer benyueZz(Integer orgCode); Integer benyueZz(Integer orgCode);
...@@ -50,74 +50,74 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -50,74 +50,74 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode); List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode);
/** /**
* 查询在职员工(试用员工人数+正式员工人数) * 查询在职员工(试用员工人数+正式员工人数)
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryInservice(UserBean userBean); YgglCartogramDto queryInservice(UserBean userBean);
/** /**
* 查询当月入职人数 * 查询当月入职人数
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryInduction(UserBean userBean); YgglCartogramDto queryInduction(UserBean userBean);
/** /**
* 查询本月转正人数 * 查询本月转正人数
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryPositive(UserBean userBean); YgglCartogramDto queryPositive(UserBean userBean);
/** /**
* 查询员工平均年龄 * 查询员工平均年龄
* @param userBean * @param userBean
* @return * @return
*/ */
YgglCartogramDto queryAvgAge(UserBean userBean); YgglCartogramDto queryAvgAge(UserBean userBean);
/** /**
* 查询部门名称及人数 * 查询部门名称及人数
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryDepartmentNum(UserBean userBean); List<YgglCartogramDto> queryDepartmentNum(UserBean userBean);
/** /**
* 查询岗位名称及人数 * 查询岗位名称及人数
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryJobsNum(UserBean userBean); List<YgglCartogramDto> queryJobsNum(UserBean userBean);
/** /**
* 学历及人数查询 * 学历及人数查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryEducation(UserBean userBean); List<YgglCartogramDto> queryEducation(UserBean userBean);
/** /**
* 员工年龄分布查询 * 员工年龄分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryEmpAge(UserBean userBean); List<YgglCartogramDto> queryEmpAge(UserBean userBean);
/** /**
* 籍贯统计(省份)人数分布查询 * 籍贯统计(省份)人数分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryNativeplace(UserBean userBean); List<YgglCartogramDto> queryNativeplace(UserBean userBean);
/** /**
* 员工工龄分布查询 * 员工工龄分布查询
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgglCartogramDto> queryWorkingAge(UserBean userBean); List<YgglCartogramDto> queryWorkingAge(UserBean userBean);
...@@ -129,6 +129,8 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -129,6 +129,8 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return * @return
*/ */
IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery); IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery);
List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid); List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid);
List<YgglMainEmp> selectListByIds(@Param("array")String[] ids);
} }
package cn.timer.api.dto.insure;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import sun.dc.pr.PRError;
import java.util.Date;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/7 18:15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsureDto {
private String orgCode;/*劳动合同*/
private String companyName;/*用工单位实际工作单位*/
private String[] userIds;
private String policyDateStart;
private String policyDateEnd;
private String benefitBasicPlan;/*方案名称*/
private String benefitOccupationCategory;
private String tricycleFrameNumber;
// private String
}
package cn.timer.api.dto.insure;
import lombok.Data;
import java.util.Date;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/14 11:01
*/
@Data
public class PolicyDto {
private long id;
private String name;
private Integer zjType;
private String zjNum;
private String policyNo;
private String status;
private String schemeName;
private String policyDateStart;
private String policyDateEnd;
private String createTime;
private Integer type;
private Integer totaPolicy;
private Integer totalCompany;
private Integer totalUser;
private Double totalPremium;
private Date updateTime;
private String insuredName;
private String benefitBasicPlan;
private String price;
}
package cn.timer.api.utils; package cn.timer.api.utils;
import java.io.BufferedReader; import java.io.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.SocketTimeoutException; import java.net.SocketTimeoutException;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.util.Map;
import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager; import javax.net.ssl.X509TrustManager;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* 通用http发送方法 * 通用http发送方法
* *
* @author Tang * @author Tang
*/ */
public class HttpUtils public class HttpUtils
...@@ -44,10 +45,10 @@ public class HttpUtils ...@@ -44,10 +45,10 @@ public class HttpUtils
String urlNameString = url + "?" + param; String urlNameString = url + "?" + param;
log.info("sendGet - {}", urlNameString); log.info("sendGet - {}", urlNameString);
URL realUrl = new URL(urlNameString); URL realUrl = new URL(urlNameString);
URLConnection connection = realUrl.openConnection(); HttpsURLConnection connection = (HttpsURLConnection)realUrl.openConnection();
connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36)");
connection.connect(); connection.connect();
in = new BufferedReader(new InputStreamReader(connection.getInputStream())); in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line; String line;
...@@ -97,11 +98,12 @@ public class HttpUtils ...@@ -97,11 +98,12 @@ public class HttpUtils
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return 所代表远程资源的响应结果 * @return 所代表远程资源的响应结果
*/ */
public static String sendPost(String url, String param) public static String sendPost(String url, Map paramMap, Map bodyMap)
{ {
PrintWriter out = null; DataOutputStream out=null;
BufferedReader in = null; BufferedReader in = null;
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
String param = getParamString(paramMap);
try try
{ {
String urlNameString = url + "?" + param; String urlNameString = url + "?" + param;
...@@ -110,15 +112,16 @@ public class HttpUtils ...@@ -110,15 +112,16 @@ public class HttpUtils
URLConnection conn = realUrl.openConnection(); URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36)");
conn.setRequestProperty("Accept-Charset", "utf-8"); conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("contentType", "utf-8"); conn.setRequestProperty("contentType", "text/json;charset=UTF-8");
conn.setDoOutput(true); conn.setDoOutput(true);
conn.setDoInput(true); conn.setDoInput(true);
out = new PrintWriter(conn.getOutputStream()); out = new DataOutputStream(conn.getOutputStream());
out.print(param); String json = JSONObject.toJSONString(bodyMap);
out.write(json.getBytes(StandardCharsets.UTF_8));
out.flush(); out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line; String line;
while ((line = in.readLine()) != null) while ((line = in.readLine()) != null)
{ {
...@@ -176,9 +179,9 @@ public class HttpUtils ...@@ -176,9 +179,9 @@ public class HttpUtils
HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); HttpsURLConnection conn = (HttpsURLConnection) console.openConnection();
conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
conn.setRequestProperty("Accept-Charset", "utf-8"); conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("contentType", "utf-8"); conn.setRequestProperty("contentType", "text/json;charset=UTF-8");
conn.setDoOutput(true); conn.setDoOutput(true);
conn.setDoInput(true); conn.setDoInput(true);
...@@ -245,4 +248,16 @@ public class HttpUtils ...@@ -245,4 +248,16 @@ public class HttpUtils
return true; return true;
} }
} }
} /*参数转为字符串*/
\ No newline at end of file private static String getParamString(Map<String, String> paramMap){
if(null==paramMap || paramMap.isEmpty()){
return "";
}
StringBuilder builder = new StringBuilder();
for(String key : paramMap.keySet() ){
builder.append("&")
.append(key).append("=").append(paramMap.get(key));
}
return builder.deleteCharAt(0).toString();
}
}
package cn.timer.api.utils; package cn.timer.api.utils;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger; import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Base64;
//import org.apache.shiro.crypto.hash.SimpleHash; //import org.apache.shiro.crypto.hash.SimpleHash;
/** /**
* *
* @ClassName: Md5 * @ClassName: Md5
* @Description: TODO(Md5加密) * @Description: TODO(Md5加密)
* @author TZQ chess222_com * @author TZQ chess222_com
* @date 2019年3月2日 下午12:34:50 * @date 2019年3月2日 下午12:34:50
* *
*/ */
public class Md5 { public class Md5 {
...@@ -29,7 +33,8 @@ public class Md5 { ...@@ -29,7 +33,8 @@ public class Md5 {
// 生成一个MD5加密计算摘要 // 生成一个MD5加密计算摘要
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
// 对字符串进行加密 // 对字符串进行加密
md.update(plainText.getBytes()); secretBytes=plainText.getBytes(StandardCharsets.ISO_8859_1);
md.update(secretBytes);
// 获得加密后的数据 // 获得加密后的数据
secretBytes = md.digest(); secretBytes = md.digest();
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
...@@ -40,10 +45,9 @@ public class Md5 { ...@@ -40,10 +45,9 @@ public class Md5 {
// 如果生成数字未满32位,需要前面补0 // 如果生成数字未满32位,需要前面补0
for (int i = 0; i < 32 - md5code.length(); i++) { for (int i = 0; i < 32 - md5code.length(); i++) {
md5code = "0" + md5code; md5code = "0" + md5code;
} }
return md5code; return md5code;
} }
public static void main(String[] args) { public static void main(String[] args) {
} }
......
/*
Navicat MySQL Data Transfer
Source Server : 120.78.162.177
Source Server Type : MySQL
Source Server Version : 50734
Source Host : 120.78.162.177:3306
Source Schema : timer_test
Target Server Type : MySQL
Target Server Version : 50734
File Encoding : 65001
Date: 05/03/2022 11:40:47
*/
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for insure_applicant
-- ----------------------------
DROP TABLE IF EXISTS `insure_applicant`;
CREATE TABLE `insure_applicant`
(
`id` int(11) NOT NULL COMMENT 'id',
`applicant_e_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业/网点名称',
`applicant_e_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业/网点地址',
`applicant_employee_list` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '人员清单',
`applicant_e_contacts` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业授权操作人姓名',
`applicant_e_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人的联系电话',
`applicant_e_no_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业证件类型:3646、统一社会信用代码 3924、组织机构代码',
`applicant_e_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业证件号码',
`applicant_e_mail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业邮箱',
`applicant_province_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省市区',
`applicant_invoice_receiving_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票收件地址',
`applicant_corporate_bank_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票开票电话',
`applicant_business_bank_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '企业开户行名称',
`policy_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单号',
`applicant_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '投保类型:1个人 2 企业',
`trans_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报价请求流水号',
`currency` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报价号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '投保人' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for insure_policy
-- ----------------------------
DROP TABLE IF EXISTS `insure_policy`;
CREATE TABLE `insure_policy`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`Scheme_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方案名称(必选)',
`policy_date_start` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单生效日',
`policy_date_end` datetime NULL DEFAULT NULL COMMENT '保单终止日',
`product_code_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品代码',
`plan_code_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计划代码',
`partner_pid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分销商pid',
`policy_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单号',
`type` int(11) NULL DEFAULT NULL COMMENT '保单类型:1、年单 2、月单',
`currency` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '5-人民币,其他币种请参见全局数据字典',
`total_premium` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '总保费\r\n\r\n',
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-正常',
`policy_file` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单',
`kit_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单kit的地址',
`insure_applicant_id` int(11) NULL DEFAULT NULL COMMENT '投保人id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_polivy_no`(`policy_no`) USING BTREE COMMENT '保单唯一索引'
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '保单信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for insure_province
-- ----------------------------
DROP TABLE IF EXISTS `insure_province`;
CREATE TABLE `insure_province`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名字',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '省市区' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for insure_user
-- ----------------------------
DROP TABLE IF EXISTS `insure_user`;
CREATE TABLE `insure_user`
(
`id` int(11) NOT NULL COMMENT 'id',
`trans_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被保险人请求流水号',
`price` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '批次核算保费',
`insured_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名',
`insured_applicant_relations` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其他526、同投保人36960、本人 59、其他详见数据字典',
`insured_no_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '15-身份证,其他详见数据字典',
`batch_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被保险人批次号',
`premium` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单批次保费',
`insured_mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '被保险人联系电话',
`insured_no` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '证件号码',
`insured_e_contact` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人姓名',
`benefit_basic_plan` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基础计划\r\n30万雇主/3万医疗 36968,50万雇主/5万医疗 36969,80万雇主/10万医疗 36970,80万雇主/20万医疗 36971,100万雇主/10万医疗 36972\r\n',
`benefit_occupation_category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职业类别\r\nA类 63119\r\nB类 63120\r\nC类 63121\r\n',
`benefit_EL_employee_number_t` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参保人数',
`Tricycle_frame_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二、三轮车车架号(必选)',
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '人员状态',
`policy_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保单号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET
FOREIGN_KEY_CHECKS = 1;
ALTER TABLE `timer_test`.`yggl_main_emp`
ADD COLUMN `is_insure` int(11) NULL DEFAULT 0 COMMENT '是否已投保:0否 1是' AFTER `custom_num`;
...@@ -49,14 +49,15 @@ ...@@ -49,14 +49,15 @@
<result column="bmgw_id" property="bmgwId" /> <result column="bmgw_id" property="bmgwId" />
<result column="bmgw_name" property="bmgwName" /> <result column="bmgw_name" property="bmgwName" />
<result column="custom_num" property="customNum" /> <result column="custom_num" property="customNum" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="unionid" property="unionid" /> <result column="unionid" property="unionid" />
<result column="openid" property="openid" /> <result column="openid" property="openid" />
<result column="mpopenid" property="mpopenid" /> <result column="mpopenid" property="mpopenid" />
<result column="appopenid" property="appopenid" /> <result column="appopenid" property="appopenid" />
<result column="is_insure" property="isInsure"/>
</resultMap> </resultMap>
<resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" > <resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="age" property="age" /> <result column="age" property="age" />
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
<result column="jobStatus" property="jobStatus" /> <result column="jobStatus" property="jobStatus" />
<result column="workage" property="workage" /> <result column="workage" property="workage" />
</resultMap> </resultMap>
<resultMap id="DepartmentStaffMap" type="cn.timer.api.dto.zzgl.DepartmentStaffDto" > <resultMap id="DepartmentStaffMap" type="cn.timer.api.dto.zzgl.DepartmentStaffDto" >
<id column="id" property="id" /> <id column="id" property="id" />
<result column="empNum" property="empNum" /> <result column="empNum" property="empNum" />
...@@ -126,9 +127,10 @@ ...@@ -126,9 +127,10 @@
openid, openid,
mpopenid, mpopenid,
appopenid, appopenid,
custom_num custom_num,
is_insure
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
a.id, a.id,
a.emp_num, a.emp_num,
...@@ -148,37 +150,38 @@ ...@@ -148,37 +150,38 @@
a.zj_num, a.zj_num,
a.syq, a.syq,
a.zz_time, a.zz_time,
a.custom_num a.custom_num,
a.is_insure
</sql> </sql>
<!-- rsybp人事仪表盘 --> <!-- rsybp人事仪表盘 -->
<select id="rsybp" resultMap="Bintu"> <select id="rsybp" resultMap="Bintu">
SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw, SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw,
IFNULL(bb.`name`,'null') AS bm,IFNULL( p.`name`,'null') AS proname,IFNULL(d.`name` ,'null')AS eduname, IFNULL(bb.`name`,'null') AS bm,IFNULL( p.`name`,'null') AS proname,IFNULL(d.`name` ,'null')AS eduname,
IFNULL(e.job_status,0) AS jobStatus,IFNULL(datediff(CURDATE(),e.rz_time),0)AS workage IFNULL(e.job_status,0) AS jobStatus,IFNULL(datediff(CURDATE(),e.rz_time),0)AS workage
FROM yggl_main_emp e FROM yggl_main_emp e
LEFT JOIN zzgl_bmgw_m b ON b.id = e.bmgw_id LEFT JOIN zzgl_bmgw_m b ON b.id = e.bmgw_id
LEFT JOIN zzgl_bmgw_m bb ON bb.id = b.up_id LEFT JOIN zzgl_bmgw_m bb ON bb.id = b.up_id
LEFT JOIN province_class p ON left (e.`jg`,2) = p.province LEFT JOIN province_class p ON left (e.`jg`,2) = p.province
LEFT JOIN education_class d ON d.number = e.edu LEFT JOIN education_class d ON d.number = e.edu
WHERE e.org_code = #{orgCode} WHERE e.org_code = #{orgCode}
</select> </select>
<select id="DepartmentStaff" resultMap="DepartmentStaffMap"> <select id="DepartmentStaff" resultMap="DepartmentStaffMap">
select em.emp_num as empNum, select em.emp_num as empNum,
em.`name` as empname, em.`name` as empname,
bm.`name` as bmgwname, bm.`name` as bmgwname,
em.phone em.phone
from yggl_main_emp em from yggl_main_emp em
LEFT JOIN zzgl_bmgw_m as bm on bm.id = em.bmgw_id LEFT JOIN zzgl_bmgw_m as bm on bm.id = em.bmgw_id
where em.org_code = #{orgcode} where em.org_code = #{orgcode}
and em.bmgw_id in (select bm.id from zzgl_bmgw_m bm and em.bmgw_id in (select bm.id from zzgl_bmgw_m bm
WHERE bm.up_id = #{upid}) WHERE bm.up_id = #{upid})
</select> </select>
<select id="selectME" resultMap="BaseResultMap"> <select id="selectME" resultMap="BaseResultMap">
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = a.bmgw_id limit 1) limit 1) as bmgw_name (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = a.bmgw_id limit 1) limit 1) as bmgw_name
FROM yggl_main_emp a FROM yggl_main_emp a
...@@ -205,7 +208,7 @@ ...@@ -205,7 +208,7 @@
<foreach item="it" index="index" collection="param.empNums" separator="," close="" > <foreach item="it" index="index" collection="param.empNums" separator="," close="" >
#{it} #{it}
</foreach> </foreach>
) )
</when> </when>
<otherwise> <otherwise>
AND a.emp_num = #{param.empNums[0]} AND a.emp_num = #{param.empNums[0]}
...@@ -214,17 +217,17 @@ ...@@ -214,17 +217,17 @@
</if> </if>
</where> </where>
</select> </select>
<!-- benyueLz本月离职人数 --> <!-- benyueLz本月离职人数 -->
<select id="benyueLz" resultType="Integer"> <select id="benyueLz" resultType="Integer">
SELECT COUNT(datediff(CURDATE(),l.sjlz_time)) FROM yggl_main_lzb l WHERE datediff(CURDATE(),l.sjlz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode}; SELECT COUNT(datediff(CURDATE(),l.sjlz_time)) FROM yggl_main_lzb l WHERE datediff(CURDATE(),l.sjlz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
</select> </select>
<!-- benyueZz本月转正人数 --> <!-- benyueZz本月转正人数 -->
<select id="benyueZz" resultType="Integer"> <select id="benyueZz" resultType="Integer">
SELECT COUNT(datediff(CURDATE(),e.sjzz_time)) FROM yggl_main_emp e WHERE datediff(CURDATE(),e.sjzz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode}; SELECT COUNT(datediff(CURDATE(),e.sjzz_time)) FROM yggl_main_emp e WHERE datediff(CURDATE(),e.sjzz_time) <![CDATA[ <= ]]> 30 AND org_code = #{orgCode};
</select> </select>
<!-- 查询员工信息 搜索 分页 --> <!-- 查询员工信息 搜索 分页 -->
<select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto"> <select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto">
SELECT SELECT
...@@ -247,41 +250,41 @@ ...@@ -247,41 +250,41 @@
ORDER BY ORDER BY
emp_num DESC emp_num DESC
</select> </select>
<!-- 查询在职员工(试用员工人数+正式员工人数) --> <!-- 查询在职员工(试用员工人数+正式员工人数) -->
<select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryInservice" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
SUM(job_status=1) AS probation, SUM(job_status=1) AS probation,
SUM(job_status=2) AS regular SUM(job_status=2) AS regular
FROM FROM
yggl_main_emp yggl_main_emp
WHERE WHERE
org_code=#{orgCode} org_code=#{orgCode}
</select> </select>
<!-- 查询当月入职人数 --> <!-- 查询当月入职人数 -->
<select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryInduction" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
EXTRACT(MONTH FROM rz_time) AS month, EXTRACT(MONTH FROM rz_time) AS month,
COUNT(emp_num) induction COUNT(emp_num) induction
FROM FROM
yggl_main_emp yggl_main_emp
WHERE WHERE
org_code=#{orgCode} org_code=#{orgCode}
</select> </select>
<!-- 查询本月转正人数 --> <!-- 查询本月转正人数 -->
<select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryPositive" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
EXTRACT(MONTH FROM sjzz_time) AS month, EXTRACT(MONTH FROM sjzz_time) AS month,
COUNT(emp_num) positive COUNT(emp_num) positive
FROM FROM
yggl_main_emp yggl_main_emp
WHERE WHERE
org_code=#{orgCode} org_code=#{orgCode}
</select> </select>
<!-- 查询员工平均年龄 --> <!-- 查询员工平均年龄 -->
<select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryAvgAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
...@@ -291,7 +294,7 @@ ...@@ -291,7 +294,7 @@
WHERE WHERE
org_code=#{orgCode} org_code=#{orgCode}
</select> </select>
<!-- 查询岗位上级部门id及名称及人数 --> <!-- 查询岗位上级部门id及名称及人数 -->
<select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryDepartmentNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
...@@ -308,7 +311,7 @@ ...@@ -308,7 +311,7 @@
c.name, c.name,
b.up_id b.up_id
</select> </select>
<!-- 查询岗位名称及人数 --> <!-- 查询岗位名称及人数 -->
<select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryJobsNum" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
...@@ -324,7 +327,7 @@ ...@@ -324,7 +327,7 @@
y.bmgw_id, y.bmgw_id,
b.name; b.name;
</select> </select>
<!-- 学历及人数查询 --> <!-- 学历及人数查询 -->
<select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryEducation" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
...@@ -342,24 +345,24 @@ ...@@ -342,24 +345,24 @@
ORDER BY ORDER BY
e.id ASC e.id ASC
</select> </select>
<!-- 员工年龄分布查询 --> <!-- 员工年龄分布查询 -->
<select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryEmpAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
<![CDATA[ <![CDATA[
SELECT SELECT
SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen, SUM((CASE WHEN age < 0.5 THEN 1 ELSE 0 END)) AS lowerEighteen,
SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive, SUM((CASE WHEN age >= 18 AND age < 25 THEN 1 ELSE 0 END)) AS eighteenToTwentyfive,
SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo, SUM((CASE WHEN age >= 25 AND age < 32 THEN 1 ELSE 0 END)) AS twentyfiveToThirtytwo,
SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight, SUM((CASE WHEN age >= 32 AND age < 38 THEN 1 ELSE 0 END)) AS thirtytwoToThirtyeight,
SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive, SUM((CASE WHEN age >= 38 AND age < 45 THEN 1 ELSE 0 END)) AS thirtyeightToFortyfive,
SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive SUM((CASE WHEN age >=45 THEN 1 ELSE 0 END)) AS higherFortyfive
FROM FROM
yggl_main_emp yggl_main_emp
WHERE WHERE
org_code = #{orgCode} org_code = #{orgCode}
]]> ]]>
</select> </select>
<!-- 籍贯统计(省份)查询 --> <!-- 籍贯统计(省份)查询 -->
<select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
...@@ -375,22 +378,33 @@ ...@@ -375,22 +378,33 @@
GROUP BY GROUP BY
c.city_name c.city_name
</select> </select>
<!-- 员工工龄分布查询 --> <!-- 员工工龄分布查询 -->
<select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryWorkingAge" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
<![CDATA[ <![CDATA[
SELECT SELECT
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 < 0.5 THEN 1 ELSE 0 END)) AS lowerHalfyear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 0.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1 THEN 1 ELSE 0 END)) AS halfYear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 1.5 THEN 1 ELSE 0 END)) AS oneYear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 1.5 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2 THEN 1 ELSE 0 END)) AS onehalfYear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear, SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >= 2 AND TIMESTAMPDIFF(day, rz_time,now())/365 < 2.5 THEN 1 ELSE 0 END)) AS twoYear,
SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear SUM((CASE WHEN TIMESTAMPDIFF(day, rz_time,now())/365 >=2.5 THEN 1 ELSE 0 END)) AS higherTwohalfYear
FROM FROM
yggl_main_emp yggl_main_emp
WHERE WHERE
org_code = #{orgCode} org_code = #{orgCode}
]]> ]]>
</select> </select>
</mapper> <!--根据id数组查询员工-->
\ No newline at end of file <select id="selectListByIds" resultType="cn.timer.api.bean.yggl.YgglMainEmp">
SELECT
<include refid="Base_Column_List"/>
FROM yggl_main_emp
WHERE id IN
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</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