Commit a1a031a6 by 284718418@qq.com

Merge remote-tracking branch 'origin/feature_20220317_policy' into develop

# Conflicts:
#	src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
#	src/main/java/cn/timer/api/controller/insure/InsureContorll.java
#	src/main/java/cn/timer/api/utils/HttpUtils.java
#	src/main/resources/application-pro.yml
#	src/main/resources/application.yml
parents 2f548a67 d669820f
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;
import java.util.List;
/**
* @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;
private String endorsement_file;
private OrderImportInfo order_import_info;
}
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;
@ApiModelProperty(value="银行账号")
private String applicantCorporateBankAccount;
/**
* 设置: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-22 09:55:46
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "insure_log")
@ApiModel("投保日志")
public class InsureLog extends Model<InsureLog> {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 请求路径
*/
private String requestPath;
/**
* 请求参数
*/
private String requestData;
/**
* 请求参数
*/
private String requestParam;
/**
* 请求时间
*/
private Date createTime;
/**
* 返回时间
*/
private Date returnTime;
/**
* 返回编码
*/
private String returnCode;
/**
* 返回参数
*/
private String returnBody;
/**
* 返回编码文本
*/
private String returnMsg;
/**
* 请求流水号
*/
private String transId;
/**
* 类型:1成功 2失败 3等待
*/
private Integer type;
/**
* 请求方式1 post 2get 3put
*/
private Integer requestType;
private Integer policyId;
public String fileUrl;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:请求路径
*/
public void setRequestPath(String requestPath) {
this.requestPath = requestPath;
}
/**
* 获取:请求路径
*/
public String getRequestPath() {
return requestPath;
}
/**
* 设置:请求参数
*/
public void setRequestData(String requestData) {
this.requestData = requestData;
}
/**
* 获取:请求参数
*/
public String getRequestData() {
return requestData;
}
/**
* 设置:请求参数
*/
public void setRequestParam(String requestParam) {
this.requestParam = requestParam;
}
/**
* 获取:请求参数
*/
public String getRequestParam() {
return requestParam;
}
/**
* 设置:请求时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:请求时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:返回时间
*/
public void setReturnTime(Date returnTime) {
this.returnTime = returnTime;
}
/**
* 获取:返回时间
*/
public Date getReturnTime() {
return returnTime;
}
/**
* 设置:返回编码
*/
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
/**
* 获取:返回编码
*/
public String getReturnCode() {
return returnCode;
}
/**
* 设置:返回参数
*/
public void setReturnBody(String returnBody) {
this.returnBody = returnBody;
}
/**
* 获取:返回参数
*/
public String getReturnBody() {
return returnBody;
}
/**
* 设置:返回编码文本
*/
public void setReturnMsg(String returnMsg) {
this.returnMsg = returnMsg;
}
/**
* 获取:返回编码文本
*/
public String getReturnMsg() {
return returnMsg;
}
/**
* 设置:请求流水号
*/
public void setTransId(String transId) {
this.transId = transId;
}
/**
* 获取:请求流水号
*/
public String getTransId() {
return transId;
}
/**
* 设置:类型:1成功 2失败 3等待
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 获取:类型:1成功 2失败 3等待
*/
public Integer getType() {
return type;
}
}
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;
private Integer productId;
}
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-30 11:36:30
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "insure_product")
@ApiModel("保险产品")
public class InsureProduct extends Model<InsureProduct> {
private static final long serialVersionUID = 1L;
/**
* id
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 产品名称
*/
private String name;
/**
* 计划代码
*/
private String planCodeId;
/**
* 产品代码
*/
private String productCodeId;
/**
* 类型:1年单 2月单
*/
private Integer type;
/**
* 创建时间
*/
private Date createTime;
/**
* 是否删除 0否 1是
*/
private Integer isDel;
/**
* 设置:id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:id
*/
public Integer getId() {
return id;
}
/**
* 设置:产品名称
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:产品名称
*/
public String getName() {
return name;
}
/**
* 设置:计划代码
*/
public void setPlanCodeId(String planCodeId) {
this.planCodeId = planCodeId;
}
/**
* 获取:计划代码
*/
public String getPlanCodeId() {
return planCodeId;
}
/**
* 设置:产品代码
*/
public void setProductCodeId(String productCodeId) {
this.productCodeId = productCodeId;
}
/**
* 获取:产品代码
*/
public String getProductCodeId() {
return productCodeId;
}
/**
* 设置:类型:1年单 2月单
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 获取:类型:1年单 2月单
*/
public Integer getType() {
return type;
}
/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:是否删除 0否 1是
*/
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
/**
* 获取:是否删除 0否 1是
*/
public Integer getIsDel() {
return isDel;
}
}
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;
@ApiModelProperty(value = "投保状态:1成功 2失败 3待更新")
private Integer insureStatus;
@ApiModelProperty(value = "保单id")
private Integer policyId;
@ApiModelProperty(value = "替换流水号,使用trans_id,RP_开头")
private String replaceTransId;
@ApiModelProperty(value = "申请类型:1新增 2投保 3批增")
private Integer applyType;
}
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;
}
package cn.timer.api.bean.insure;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/22 17:02
*/
@Data
public class OrderImportInfo implements Serializable {
private static final long serialVersionUID = -6208327653541160864L;
private String uuid;
private String single_serial_no;
private String third_uuid;
private String total_money;
private String endorsement_file;
private String err_msg;
private List<Map> err_list;
private String err_content;
}
......@@ -224,7 +224,6 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="员工登陆账号(手机号)",example="员工登陆账号(手机号)")
private String empLoginPhone;
@ApiModelProperty(value="是否已投保:0否 1是",example="")
private int isInsure;
}
......@@ -51,7 +51,9 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
*/
// 无论访问的地址是不是正确的,都进行登录验证,登录成功后的访问再进行分发,404的访问自然会进入到错误控制器中
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);
return false;
}
......
......@@ -30,12 +30,15 @@ public class WebSecurityConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 所有已api开头的访问都要进入RedisSessionInterceptor拦截器进行登录验证,并排除login接口(全路径)。必须写成链式,分别设置的话会创建多个拦截器。
// 所有已api开头的访问都要进入RedilsSessionInterceptor拦截器进行登录验证,并排除login接口(全路径)。必须写成链式,分别设置的话会创建多个拦截器。
// 必须写成getSessionInterceptor(),否则SessionInterceptor中的@Autowired会无效
//.excludePathPatterns("/")
registry.addInterceptor(getSessionInterceptor())
.addPathPatterns("/**")
.excludePathPatterns("/callback/**")
.excludePathPatterns("/callBack/policy/CallBack")
.excludePathPatterns("/callBack/policy/insuredCallBack")
.excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*")
.excludePathPatterns("/v2/**")
......
package cn.timer.api.controller.insure;
import cn.timer.api.bean.insure.CallBack;
import cn.timer.api.bean.insure.InsureLog;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.bean.yggl.YgglMainEmp;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Maps;
import com.mysql.cj.util.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @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);
/*保全测试用*/
@Value("${insure.appidq}")
private String appidq;
@Value("${insure.secretq}")
private String secretq;
@Value("${BASE_API_URL}")
private String base_api_url;
@PostMapping(value = "/insuredCallBack")
@ApiOperation(value = "6.投保申请回调", httpMethod = "Post", notes = "投保申请回调")
@ApiOperationSupport(order = 2)
private Map insuredCallBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
Map map = Maps.newHashMap();
map.put("status", "error");
if (StringUtils.isNullOrEmpty(pid) || StringUtils.isNullOrEmpty(sign) && StringUtils.isNullOrEmpty(timestamp)) {
return map;
}
if (!pid.equals(appidq)) {
return map;
}
InputStream is = null;
is = request.getInputStream();
StringBuilder sb = new StringBuilder();
byte[] b = new byte[4096];
for (int n; (n = is.read(b)) != -1; ) {
sb.append(new String(b, 0, n));
}
String value = DigestUtils.md5Hex(appidq + secretq + timestamp + sb.toString());
if (!value.equals(sign)) {
return map;
}
CallBack callBack = JSONObject.parseObject(sb.toString(), CallBack.class);
Map trueMap = Maps.newHashMap();
trueMap.put("status", "1");
return trueMap;
}
@PostMapping(value = "/CallBack")
@ApiOperation(value = "7.保全增员申请回调", httpMethod = "Post", notes = "投保申请回调")
@ApiOperationSupport(order = 2)
private Map callBack(HttpServletRequest request, @RequestParam String pid, @RequestParam String sign, @RequestParam String timestamp) throws IOException {
Map map = Maps.newHashMap();
map.put("status", "error");
if (StringUtils.isNullOrEmpty(pid) || StringUtils.isNullOrEmpty(sign) && StringUtils.isNullOrEmpty(timestamp)) {
return map;
}
if (!pid.equals(appidq)) {
return map;
}
InputStream is = null;
is = request.getInputStream();
StringBuilder sb = new StringBuilder();
byte[] b = new byte[4096];
for (int n; (n = is.read(b)) != -1; ) {
sb.append(new String(b, 0, n));
}
String value = DigestUtils.md5Hex(appidq + secretq + timestamp + sb.toString());
if (!value.equals(sign)) {
return map;
}
Map paramsMap = Maps.newHashMap();
paramsMap.put("pid", pid);
paramsMap.put("timestamp", timestamp);
paramsMap.put("sign", sign);
CallBack callBack = JSONObject.parseObject(sb.toString(), CallBack.class);
log.info("callBack=====" + sb.toString());
if (callBack.getStatus().equals("1")) {
List<InsureUser> list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getBatchNo, callBack.getOrder_import_info().getUuid()).eq(InsureUser::getInsureStatus, 3));
list.forEach(i -> {
i.setInsureStatus(1);
i.updateById();
YgglMainEmp.builder().isInsure(1).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getId, i.getUserId()));
});
List<InsureUser> oldlist = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getReplaceTransId, callBack.getOrder_import_info().getUuid()));
if (oldlist != null && oldlist.size() > 0) {
oldlist.forEach(i -> {
i.setInsureStatus(4);
i.setStatus("2");
i.updateById();
YgglMainEmp.builder().isInsure(0).build().update(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getId, i.getUserId()));
});
}
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getPolicyNo, list.get(0).getPolicyNo()));
if (oldlist == null || oldlist.size() == 0) {
insurePolicy.setTotalPremium(String.valueOf(Double.valueOf(insurePolicy.getTotalPremium()) + Double.valueOf(callBack.getOrder_import_info().getTotal_money())));
}
insurePolicy.setPolicyFile(callBack.getOrder_import_info().getEndorsement_file());
insurePolicy.setUpdateTime(new Date());
insurePolicy.updateById();
InsureLog.builder().requestParam(JSONObject.toJSONString(paramsMap)).type(7)
.requestData(sb.toString()).createTime(new Date()).requestType(1).returnBody(JSONObject.toJSONString(callBack)).requestPath(base_api_url + "/callBack/policy/CallBack")
.returnCode(callBack.getStatus()).returnMsg("更新成功").policyId(insurePolicy.getId()).build().insert();
} else {
String errorMsg = "";
InsureLog insureLog = InsureLog.builder().build().selectOne(new QueryWrapper<InsureLog>().lambda().eq(InsureLog::getTransId, callBack.getOrder_import_info().getThird_uuid()));
List<Map> errMap = callBack.getOrder_import_info().getErr_list();
if (errMap.size() > 0) {
for (int i = 0; i < errMap.size(); i++) {
errorMsg = errorMsg + ("姓名:"+errMap.get(i).get("name").toString()+",错误:"+errMap.get(i).get("err_content").toString() + ',');
}
} else {
errorMsg = callBack.getErr_msg();
}
//TODO 写入日志
InsureLog.builder().requestParam(JSONObject.toJSONString(paramsMap)).type(7)
.requestData(sb.toString()).createTime(new Date()).requestType(1).returnBody(JSONObject.toJSONString(callBack)).requestPath(base_api_url + "/callBack/policy/CallBack")
.returnCode(callBack.getStatus()).returnMsg(errorMsg).policyId(insureLog.getPolicyId()).build().insert();
}
Map trueMap = Maps.newHashMap();
trueMap.put("status", "1");
return trueMap;
}
}
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 = "8.0保险列表")
@RestController
@Transactional
@RequestMapping(value = "/insureApplicant", produces = {"application/json"})
public class InsureApplicantController {
@PostMapping("/insureApplicationSetting")
@ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请")
private Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) {
InsureApplicant insureApplicant = InsureApplicant.builder().id(1).build().selectById();if(insureApplicant==null){
params.insert();
return ResultUtil.data(params);
}
params.setId(insureApplicant.getId());
params.updateById();
return ResultUtil.data(params);
}
@GetMapping("/getApplicant")
@ApiOperation(value = "获取投保人", httpMethod = "Get", notes = "获取投保人")
private Result<Object> getApplicant() {
InsureApplicant insureApplicant = InsureApplicant.builder().id(1).build().selectById();
if(insureApplicant==null){
return ResultUtil.data(null);
}
return ResultUtil.data(insureApplicant);
}
}
package cn.timer.api.controller.insure;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;
import java.util.Map;
import cn.timer.api.bean.insure.InsureLog;
import cn.timer.api.bean.insure.InsureProduct;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.insure.InsureLogMapper;
import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.dto.insure.PolicyLogDto;
import cn.timer.api.utils.Page;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.oss.common.utils.StringUtils;
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 org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-22 09:55:46
*/
@Api(tags = "8.0保险列表")
@RestController
@Transactional
@RequestMapping(value = "/insureLog", produces = {"application/json"})
public class InsureLogController {
@Autowired
private InsureLogMapper insureLogMapper;
@GetMapping(value = "/logList")
@ApiOperation(value = "12.日志列表", httpMethod = "Get", notes = "日志列表")
public Result<Object> logList(@RequestParam("policyId") String policyId) {
List<InsureLog> list = insureLogMapper.selectListById(policyId);
if (list.size() > 0) {
return ResultUtil.data(list);
}
return ResultUtil.error("暂无日志");
}
@GetMapping(value = "/downUserExcel")
@ApiOperation(value = "12.人员清单", httpMethod = "Get", notes = "人员清单")
public void downUserExcel(@RequestParam("logId") String logId, HttpServletRequest request, HttpServletResponse response) {
InsureLog insureLog = InsureLog.builder().id(Integer.parseInt(logId)).build().selectById();
if (insureLog == null || StringUtils.isNullOrEmpty(insureLog.getFileUrl())) {
return;
}
DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
OutputStream sos = null;
BufferedInputStream bis = null;
try {
response.setContentType("application/octet-stream");
response.setHeader("content-disposition", "attachment; filename=" + new String((dtf2.format(LocalDateTime.now()) + ".xlsx").getBytes("UTF8"), "ISO-8859-1"));
response.setCharacterEncoding("UTF-8");
sos = response.getOutputStream();
String destUrl = "http:" + insureLog.getFileUrl();
URL url = new URL(destUrl);
HttpURLConnection httpUrl = (HttpURLConnection) url.openConnection();
//连接指定的网络资源
httpUrl.connect();
//获取网络输入流
bis = new BufferedInputStream(httpUrl.getInputStream());
int b;
while ((b = bis.read()) != -1) {
sos.write(b);
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
sos.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
bis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
@PostMapping(value = "/insureLogList")
@ApiOperation(value = "日志列表--8小时端", httpMethod = "Get", notes = "日志列表")
public Result<Object> insureLogList(@CurrentUser UserBean userBean, @RequestBody Page page) {
Map map = Maps.newHashMap();
List<PolicyLogDto> list = insureLogMapper.selectLogListByOrgCode(userBean.getOrgCode(),page);
map.put("list", list);
map.put("total", insureLogMapper.selectLogTotalByOrgCode(userBean.getOrgCode()));
return ResultUtil.data(map);
}
}
package cn.timer.api.controller.insure;
import java.util.List;
import java.util.Map;
import cn.timer.api.bean.insure.InsureProduct;
import cn.timer.api.dao.insure.InsureProductMapper;
import cn.timer.api.dto.insure.PolicyDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.beust.jcommander.internal.Lists;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
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.*;
/**
* 保险产品
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-30 11:36:30
*/
@Api(tags = "8.0保险列表")
@RestController
@Transactional
@RequestMapping(value = "/insureProduct", produces = {"application/json"})
public class InsureProductController{
@Autowired
private InsureProductMapper insureProductMapper;
@GetMapping(value = "/productList")
@ApiOperation(value = "12.产品列表", httpMethod = "Get", notes = "产品列表")
public Result<Object> productList() {
List<InsureProduct> productList = InsureProduct.builder().build().selectList(new QueryWrapper<InsureProduct>().lambda().eq(InsureProduct::getIsDel,0));
if (productList.size()>0) {
return ResultUtil.data(productList);
}
return ResultUtil.error("暂无产品");
}
}
package cn.timer.api.controller.insure;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.insure.InsureUserMapper;
import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.dto.insure.InsureUserDto;
import cn.timer.api.dto.insure.PolicyDto;
import cn.timer.api.utils.Page;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.beust.jcommander.internal.Lists;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Maps;
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.*;
/**
* 被保人
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-11 09:06:53
*/
@Api(tags = "8.0保险列表")
@RestController
@Transactional
@RequestMapping(value ="/insureUser", produces = {"application/json"})
public class InsureUserController{
@Autowired
private InsureUserMapper insureUserMapper;
@PostMapping(value = "/policyList")
@ApiOperation(value = "3.保单列表--运营后台", httpMethod = "Post", notes = "保单列表")
public Result<Object> policyList(@RequestBody PolicyDto policyDto) {
Map map = Maps.newHashMap();
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
map.put("list", Optional.ofNullable(list).orElse(Lists.newArrayList()));
map.put("total", insureUserMapper.totalUser(policyDto));
return ResultUtil.data(map);
}
@GetMapping(value = "/userDetial")
@ApiOperation(value = "被保人详情", httpMethod = "Post", notes = "保单列表")
public Result<Object> userDetial(@RequestParam("userId") String userId) {
InsureUser user = InsureUser.builder().id(Integer.parseInt(userId)).build().selectById();
return ResultUtil.data(user);
}
@PostMapping(value = "/userPolicyList")
@ApiOperation(value = "3.保单列表--8小时端", httpMethod = "Post", notes = "保单列表")
public Result<Object> userPolicyList(@CurrentUser UserBean userBean, @RequestBody PolicyDto policyDto) {
Map map = Maps.newHashMap();
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getOrgCode,userBean.getOrgCode()).eq(InsurePolicy::getStatus,1));
if(insurePolicy==null){
return ResultUtil.error("保单号不存在");
}
policyDto.setId(insurePolicy.getId());
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
map.put("list", Optional.ofNullable(list).orElse(Lists.newArrayList()));
map.put("total", insureUserMapper.totalUser(policyDto));
return ResultUtil.data(map);
}
@PostMapping(value = "/getPolicyUserList")
@ApiOperation(value = "获取选中用户方案信息", httpMethod = "Post", notes = "获取选中用户方案信息")
public Result<Object> getPolicyUserList(@RequestBody InsureDto dto){
List<InsureUserDto> userList= insureUserMapper.selectPlansListByIds(dto.getOldIds());
if(userList.size()<=0){
return ResultUtil.error("用户方案错误");
}
return ResultUtil.data(userList);
}
@GetMapping(value = "/getPolicyPlansList")
@ApiOperation(value = "获取方案列表", httpMethod = "Get", notes = "获取选中用户方案信息")
public Result<Object> getPolicyUserList(@RequestParam("policyId") String policyId){
List<InsureUserDto> userList= insureUserMapper.selectPlansListById(policyId);
if(userList.size()<=0){
return ResultUtil.error("用户方案错误");
}
return ResultUtil.data(userList);
}
}
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.insure.enums;
import io.swagger.models.auth.In;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/24 17:20
*/
public enum InsuranceEnum {
A_30(12,"30万意外/3万医疗/扩展24小时(A类)","A类","36968","63119"),
A_50(15,"50万意外/5万医疗/扩展24小时(A类)","A类","36969","63119"),
A_80(18,"80万意外/10万医疗/扩展24小时(A类)","A类","36970","63119"),
A_80_20(25,"80万意外/20万医疗/扩展24小时(A类)","A类","36971","63119"),
A_100(28,"100万意外/10万医疗/扩展24小时(A类)","A类","36972","63119"),
B_30(18,"30万意外/3万医疗/扩展24小时(B类)","B类","36968","63120"),
B_50(20,"50万意外/5万医疗/扩展24小时(B类)","B类","36969","63120"),
B_80(35,"80万意外/10万医疗/扩展24小时(B类)","B类","36970","63120"),
B_80_20(38,"80万意外/20万医疗/扩展24小时(B类)","B类","36971","63120"),
B_100(40,"100万意外/10万医疗/扩展24小时(B类)","B类","36972","63120"),
C_50(60,"50万意外/5万医疗/扩展24小时(C类)","C类","36969","63121"),
C_80(75,"80万意外/10万医疗/扩展24小时(C类)","C类","36970","63121");
private Integer price;
private String name;
private String type;
private String plan;
private String category;
InsuranceEnum(Integer price, String name,String type,String plan,String category) {
this.price = price;
this.name = name;
this.type=type;
this.plan=plan;
this.category=category;
}
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPlan() {
return plan;
}
public void setPlan(String plan) {
this.plan = plan;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public static InsuranceEnum getEnum(String plan,String category) {
for(InsuranceEnum v : values())
if(v.getPlan().equals(plan)&&v.getCategory().equals(category)) return v;
throw new IllegalArgumentException();
}
}
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<Object> 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,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("退出成功");
}
}
......@@ -33,13 +33,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
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 org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -1596,7 +1590,7 @@ public class YgglController {
@ApiOperation(value = "62.查询员工列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 62)
public Result<List<YgQueryDto>> queryEmpMessage(@CurrentUser UserBean userBean) {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean.getOrgCode());
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean.getOrgCode(),null);
for (YgQueryDto yg : ygQueryDto) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
......@@ -2034,5 +2028,18 @@ public class YgglController {
}
@GetMapping(value = "/getUserList")
@ApiOperation(value = "62-1.运营后台--查询员工列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 62)
public Result<List<YgQueryDto>> getUserList(@RequestParam("companyId") String companyId) {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(Integer.parseInt(companyId),0);
for (YgQueryDto yg : ygQueryDto) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
}
}
return ResultUtil.data(ygQueryDto);
}
}
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.InsureLog;
import cn.timer.api.dto.insure.PolicyLogDto;
import cn.timer.api.utils.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-22 09:55:46
*/
@Repository
public interface InsureLogMapper extends BaseMapper<InsureLog> {
List<InsureLog> selectListById(@Param("policyId")String policyId);
List<InsureLog> selectListByIds(@Param("array")Integer[] ids);
List<PolicyLogDto> selectLogListByOrgCode(@Param("orgCode") Integer orgCode, @Param("page") Page page);
Integer selectLogTotalByOrgCode(@Param("orgCode") Integer orgCode);
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.dto.insure.InsureUserDto;
import cn.timer.api.dto.insure.PolicyDto;
import cn.timer.api.utils.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
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> {
List<PolicyDto> policyList(@Param("policy") PolicyDto policyDto);
PolicyDto getPolicyDetail(@Param("id")Integer id);
Integer totalPolicy(@Param("policy")PolicyDto policyDto);
List<PolicyDto> policyTotalList();
List<InsureUserDto> selectPlansListByorgCode(@Param("orgCode")Integer id);
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsureProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 保险产品
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-30 11:36:30
*/
@Repository
public interface InsureProductMapper extends BaseMapper<InsureProduct> {
}
package cn.timer.api.dao.insure;
import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.dto.insure.InsureUserDto;
import cn.timer.api.dto.insure.PolicyDto;
import cn.timer.api.utils.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
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> {
List<PolicyDto> selectPolicyList(@Param("policyDto") PolicyDto policyDto );
Integer totalUser(@Param("policyDto") PolicyDto policyDto);
List<InsureUser> selectListByIds(@Param("array")String[] ids);
List<InsureUserDto> selectPlansListByIds(@Param("array")String[] ids);
List<InsureUserDto> selectPlansListById(@Param("policyId")String id);
}
package cn.timer.api.dao.qyzx;
import cn.timer.api.dto.qyzx.EntInfoDto;
import cn.timer.api.utils.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import java.util.List;
import java.util.Map;
/**
......@@ -14,6 +18,11 @@ import cn.timer.api.bean.qyzx.QyzxEntInfoM;
*/
@Repository
public interface QyzxEntInfoMMapper extends BaseMapper<QyzxEntInfoM> {
public List<EntInfoDto> companyAdminList(@Param("page")Page page);
public Integer companyAdminCount();
public List<Map<String,String>> getCompanyList();
......
......@@ -49,7 +49,7 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @param userBean
* @return
*/
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode);
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode,@Param("isInsure")Integer isInsure);
/**
......@@ -131,4 +131,6 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
IPage<YgglMainEmp> selectME(Page<YgglMainEmp> page,@Param("param") EmpQuery empQuery);
List<DepartmentStaffDto> DepartmentStaff(Integer orgcode,Integer upid);
List<YgglMainEmp> selectListByIds(@Param("array")String[] ids);
}
package cn.timer.api.dto.insure;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/7 18:15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsureDto {
private String id;
private String orgCode;/*企业id*/
private String companyName;/*用工单位实际工作单位*/
private String policyDateStart;
private String policyDateEnd;
private Integer type;/*类型 1是新增 3是替换*/
private String productId;
private List<PlansDto> plans;
private String benefitBasicPlan;/*方案名称*/
private String benefitOccupationCategory;
private String tricycleFrameNumber;
private String[] oldIds;
private String[] userIds;
private Double totalPrice;
private MultipartFile file;
// private String
}
package cn.timer.api.dto.insure;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/4/7 17:13
*/
@Data
public class InsureUserDto {
private Integer policyId;
private String benefitBasicPlan;
private String benefitOccupationCategory;
private Integer totalUser;
private String[] oldIds;
private String policyNo;
}
package cn.timer.api.dto.insure;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/4/6 9:14
*/
@Data
public class PlansDto{
private int index;
private String[] userIds;
private String benefitBasicPlan;/*方案名称*/
private String benefitOccupationCategory;
private String tricycleFrameNumber;
private Integer price;
}
package cn.timer.api.dto.insure;
import cn.timer.api.utils.Page;
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;
private String orgCode;
private Page page;
private String policyFile;
private String benefitOccupationCategory;
private Integer userId;
private Integer insureStatus;
private String planId;
private String categoryId;
}
package cn.timer.api.dto.insure;
import lombok.Data;
import java.util.Date;
/**
* @Description TODO
* @Author wgd
* @Date 2022/4/11 16:39
*/
@Data
public class PolicyLogDto {
private Integer id;
private String policyNo;
private String returnCode;
private String returnMsg;
private Integer type;
private Date createTime;
}
package cn.timer.api.dto.qyzx;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/17 10:09
*/
@Data
public class EntInfoDto {
private Integer id;
private String name;
private String linkMan;
private String linkManPhone;
private String areaName;
private String totalNum;
private String logoUrl;
private String registerTime;
private String endTime;
private Integer totlaSpmk;
private Integer totlaCc;
}
......@@ -27,6 +27,8 @@ import lombok.NoArgsConstructor;
public class YgQueryDto extends Page {
// private static final long serialVersionUID = -1230023773946170942L;
@ApiModelProperty
private Integer id;
@ApiModelProperty(value = "员工姓名", example = "华仔")
private String empName;
......@@ -72,4 +74,7 @@ public class YgQueryDto extends Page {
@ApiModelProperty(value = "性别", example = "1")
private Integer sex;
@ApiModelProperty(value="是否已购买保险",example = "0")
private Integer isInsure;
}
......@@ -41,27 +41,25 @@ public class ExcelUtils {
* @param sheetNum 开始解析的sheet序号,如果不指定,默认传值为-1,则会解析所有sheet
* @return
*/
public static List<List<Map<String, Object>>> importExcel(String filePath, int startRow, int startCol, int sheetNum) {
public static List<List<Map<String, Object>>> importExcel(XSSFWorkbook workbook, int startRow, int startCol, int sheetNum) {
logger.info("========================= ExcelUtils.java ->> importExcel()从Excel表格中获取数据 ->> 开始 =========================");
// 用于存储最终整个Excel表格的数据
// // 用于存储最终整个Excel表格的数据
List<List<Map<String, Object>>> resultList = new ArrayList<>();
// 得到指定路径的文件File对象
File file = new File(filePath);
// 如果不存在
if (!file.exists()) {
logger.info("ExcelUtils.java ->> importExcel() ->> 错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
throw new RuntimeException("错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
}
//
// // 得到指定路径的文件File对象
// File file = new File(filePath);
// // 如果不存在
// if (!file.exists()) {
// logger.info("ExcelUtils.java ->> importExcel() ->> 错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
// throw new RuntimeException("错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
// }
InputStream input = null;
Workbook workbook = null;
try {
// 得到文件的资源输入流
input = new FileInputStream(file);
// input = new FileInputStream(file);
// 得到处理excel的Workbook对象
workbook = ExcelUtils.getWorkbookByExtensionName(input, filePath);
// 创建一个公式计算器,用于计算并得到Excel中的公式结果
FormulaEvaluator formulaEvaluator = workbook.getCreationHelper().createFormulaEvaluator();
......@@ -291,11 +289,11 @@ public class ExcelUtils {
* @param out 输出流
* @throws Exception
*/
public static void exportExcel(String title, String[] rowName, List<Object[]> dataList, OutputStream out) {
public static XSSFWorkbook exportExcel(String title, String[] rowName, List<Object[]> dataList) {
logger.info("========================= ExcelUtils.java ->> exportExcel()导出数据到Excel中 ->> 开始 =========================");
XSSFWorkbook workbook = null;
try {
/*
1,创建工作簿对象,然后创建大标题行,并设置标题
*/
......@@ -417,22 +415,7 @@ public class ExcelUtils {
sheet.setColumnWidth(colNum, (columnWidth + 4) * 256);
}
}
workbook.write(out);
} catch (Exception e) {
logger.info("ExcelUtils.java ->> exportExcel() ->> 异常信息:" + e);
throw new RuntimeException(e);
} finally {
try {
if (workbook != null) {
workbook.close();
logger.info("ExcelUtils.java ->> exportExcel() ->> 关闭Workbook资源");
}
} catch (Exception e) {
e.printStackTrace();
}
logger.info("========================= ExcelUtils.java ->> exportExcel()导出数据到Excel中 ->> 结束 =========================");
}
return workbook;
}
/**
......@@ -506,6 +489,23 @@ public class ExcelUtils {
// 设置垂直对齐的样式为居中对齐
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
}
/**
* 把单元格的内容转为字符串
*
* @param xssfCell 单元格
* @return String
*/
public static String getString(XSSFCell xssfCell) {
if (xssfCell == null) {
return "";
}
if (xssfCell.getCellTypeEnum() == CellType.NUMERIC) {
return String.valueOf(xssfCell.getNumericCellValue());
} else if (xssfCell.getCellTypeEnum() == CellType.BOOLEAN) {
return String.valueOf(xssfCell.getBooleanCellValue());
} else {
return xssfCell.getStringCellValue();
}
}
}
......@@ -14,8 +14,6 @@ import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
package cn.timer.api.utils;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
//import org.apache.shiro.crypto.hash.SimpleHash;
/**
......@@ -29,7 +33,8 @@ public class Md5 {
// 生成一个MD5加密计算摘要
MessageDigest md = MessageDigest.getInstance("MD5");
// 对字符串进行加密
md.update(plainText.getBytes());
secretBytes=plainText.getBytes(StandardCharsets.ISO_8859_1);
md.update(secretBytes);
// 获得加密后的数据
secretBytes = md.digest();
} catch (NoSuchAlgorithmException e) {
......@@ -43,7 +48,6 @@ public class Md5 {
}
return md5code;
}
public static void main(String[] args) {
}
......
#生产环境
server:
port: 8089
port: 8866
servlet:
# context-path: /YoulinghrApiV100
session:
......@@ -31,7 +31,7 @@ spring:
# username: tang
# password: Tang123456!
# url: jdbc:mysql://120.24.172.51:3306/youlingrc_tang?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
url: jdbc:mysql://120.78.162.177:3306/8timer_20210904?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
url: jdbc:mysql://120.78.162.177:3306/timer_test?useUnicode=SpmkApproveSummaryMappertrue&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
# url: jdbc:mysql://192.168.172.200:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
# url: jdbc:mysql://db.hhlsz.com:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
driver-class-name: com.mysql.cj.jdbc.Driver
......@@ -238,3 +238,17 @@ config-8timer:
zip:
path: 'D:/zip/'
insure:
#投保
appid: '1002303100602312445'
secret: 'acb329868c31d5b3ba03de40dac13dd9'
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#保全
appidq: '1000115041006006938'
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
batchUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
# base_api_url
BASE_API_URL: 'http://test-8timer-api.youlingrc.com'
......@@ -221,6 +221,8 @@ config-8timer:
zip:
path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://api.8timer.cn'
#sftp 配置
sftp:
client:
......@@ -236,3 +238,15 @@ sftp:
serverUrl: 'https://img.8timer.cn'
targetPath: '/disk'
reservedName: false
insure:
#投保
appid: '1002209110212305335'
secret: '1ef7b79471be7f6b5489832c65109f81'
uploadUrl: 'https://portal-unistar-ins.com /service/Home/Index/fileUpload'
insuredUrl: 'https://portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#保全
appidq: '1000711000604326196'
secretq: 'a2da17a2797c63dff9172df50af9da65'
uploadUrlq: 'https://portal-unistar-ins.com /fuli/Home/Index/file_upload'
batchUrl: 'https://portal. unistar-ins.com /fuli/Home/WelfareProduct/batch_declare'
......@@ -219,6 +219,9 @@ config-8timer:
#导出zip临时地址
zip:
path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://test-8timer-api.youlingrc.com'
#sftp 配置
sftp:
client:
......@@ -235,3 +238,15 @@ sftp:
targetPath: '/disk'
reservedName: false
insure:
#投保
appid: '1002303100602312445'
secret: 'acb329868c31d5b3ba03de40dac13dd9'
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#保全
appidq: '1000115041006006938'
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
batchUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.insure.InsureLogMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.insure.InsureLog" id="insureLogMap">
<result property="id" column="id"/>
<result property="requestPath" column="request_path"/>
<result property="requestData" column="request_data"/>
<result property="requestParam" column="request_param"/>
<result property="createTime" column="create_time"/>
<result property="returnTime" column="return_time"/>
<result property="returnCode" column="return_code"/>
<result property="returnBody" column="return_body"/>
<result property="returnMsg" column="return_msg"/>
<result property="transId" column="trans_id"/>
<result property="type" column="type"/>
<result property="requestType" column="request_type"/>
<result property="policyId" column="policy_id"/>
<result property="fileUrl" column="file_url"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.insure.InsureLog">
select *
from insure_log
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.insure.InsureLog">
select * from insure_log
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="requestPath != null and requestPath != ''">AND `request_path` = #{requestPath}</if>
<if test="requestData != null and requestData != ''">AND `request_data` = #{requestData}</if>
<if test="requestParam != null and requestParam != ''">AND `request_param` = #{requestParam}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="returnTime != null and returnTime != ''">AND `return_time` = #{returnTime}</if>
<if test="returnCode != null and returnCode != ''">AND `return_code` = #{returnCode}</if>
<if test="returnBody != null and returnBody != ''">AND `return_body` = #{returnBody}</if>
<if test="returnMsg != null and returnMsg != ''">AND `return_msg` = #{returnMsg}</if>
<if test="transId != null and transId != ''">AND `trans_id` = #{transId}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from insure_log
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="requestPath != null and requestPath != ''">AND `request_path` = #{requestPath}</if>
<if test="requestData != null and requestData != ''">AND `request_data` = #{requestData}</if>
<if test="requestParam != null and requestParam != ''">AND `request_param` = #{requestParam}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="returnTime != null and returnTime != ''">AND `return_time` = #{returnTime}</if>
<if test="returnCode != null and returnCode != ''">AND `return_code` = #{returnCode}</if>
<if test="returnBody != null and returnBody != ''">AND `return_body` = #{returnBody}</if>
<if test="returnMsg != null and returnMsg != ''">AND `return_msg` = #{returnMsg}</if>
<if test="transId != null and transId != ''">AND `trans_id` = #{transId}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.insure.InsureLog">
insert into insure_log
(`id`,
`request_path`,
`request_data`,
`request_param`,
`create_time`,
`return_time`,
`return_code`,
`return_body`,
`return_msg`,
`trans_id`,
`type`)
values (#{id},
#{requestPath},
#{requestData},
#{requestParam},
#{createTime},
#{returnTime},
#{returnCode},
#{returnBody},
#{returnMsg},
#{transId},
#{type})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.insure.InsureLog">
insert into insure_log
(
<if test="id != null">`id`</if>
<if test="requestPath != null">,`request_path`</if>
<if test="requestData != null">,`request_data`</if>
<if test="requestParam != null">,`request_param`</if>
<if test="createTime != null">,`create_time`</if>
<if test="returnTime != null">,`return_time`</if>
<if test="returnCode != null">,`return_code`</if>
<if test="returnBody != null">,`return_body`</if>
<if test="returnMsg != null">,`return_msg`</if>
<if test="transId != null">,`trans_id`</if>
<if test="type != null">,`type`</if>
)
values
(
<if test="id != null">#{id}</if>
<if test="requestPath != null">,#{requestPath}</if>
<if test="requestData != null">,#{requestData}</if>
<if test="requestParam != null">,#{requestParam}</if>
<if test="createTime != null">,#{createTime}</if>
<if test="returnTime != null">,#{returnTime}</if>
<if test="returnCode != null">,#{returnCode}</if>
<if test="returnBody != null">,#{returnBody}</if>
<if test="returnMsg != null">,#{returnMsg}</if>
<if test="transId != null">,#{transId}</if>
<if test="type != null">,#{type}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.insure.InsureLog">
insert into insure_log
(
`id`,
`request_path`,
`request_data`,
`request_param`,
`create_time`,
`return_time`,
`return_code`,
`return_body`,
`return_msg`,
`trans_id`,
`type`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.requestPath},
#{item.requestData},
#{item.requestParam},
#{item.createTime},
#{item.returnTime},
#{item.returnCode},
#{item.returnBody},
#{item.returnMsg},
#{item.transId},
#{item.type}
)
</foreach>
</insert>
<delete id="deleteBatch">
delete from insure_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectListById" resultType="cn.timer.api.bean.insure.InsureLog">
select id,return_msg,`type`,create_time,file_url from insure_log
where policy_id = #{policyId}
ORDER BY create_time DESC
</select>
<select id="selectListByIds" resultType="cn.timer.api.bean.insure.InsureLog">
select * from insure_log
where type = 1 and policy_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectLogListByOrgCode" resultType="cn.timer.api.dto.insure.PolicyLogDto">
select ip.policy_no as policyNo,il.return_code as returnCode,il.return_msg as returnMsg,il.type as type,il.create_time as createTime from insure_log il
LEFT JOIN insure_policy ip on ip.id=il.policy_id
WHERE ip.org_code = #{orgCode}
order by ip.create_time desc
<if test="page.currentPage != null and page.totalPage != null">
limit #{page.offset}, #{page.totalPage}
</if>
</select>
<select id="selectLogTotalByOrgCode" resultType="java.lang.Integer">
select count(il.id) from insure_log il
LEFT JOIN insure_policy ip on ip.id=il.policy_id
WHERE ip.org_code = #{orgCode}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.core.db.dao.InsureProductMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.insure.InsureProduct" id="insureProductMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="planCodeId" column="plan_code_id"/>
<result property="productCodeId" column="product_code_id"/>
<result property="type" column="type"/>
<result property="createTime" column="create_time"/>
<result property="isDel" column="is_del"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.insure.InsureProduct">
select *
from insure_product
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.insure.InsureProduct">
select * from insure_product
<where>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="planCodeId != null and planCodeId != ''">AND `plan_code_id` = #{planCodeId}</if>
<if test="productCodeId != null and productCodeId != ''">AND `product_code_id` = #{productCodeId}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="isDel != null and isDel != ''">AND `is_del` = #{isDel}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from insure_product
<where>
<if test="name != null and name != ''">AND `name` = #{name}</if>
<if test="planCodeId != null and planCodeId != ''">AND `plan_code_id` = #{planCodeId}</if>
<if test="productCodeId != null and productCodeId != ''">AND `product_code_id` = #{productCodeId}</if>
<if test="type != null and type != ''">AND `type` = #{type}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="isDel != null and isDel != ''">AND `is_del` = #{isDel}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.insure.InsureProduct" useGeneratedKeys="true" keyProperty="id">
insert into insure_product
(`name`,
`plan_code_id`,
`product_code_id`,
`type`,
`create_time`,
`is_del`)
values (#{name},
#{planCodeId},
#{productCodeId},
#{type},
#{createTime},
#{isDel})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.insure.InsureProduct" useGeneratedKeys="true"
keyProperty="id">
insert into insure_product
(
<if test="name != null">,`name`</if>
<if test="planCodeId != null">,`plan_code_id`</if>
<if test="productCodeId != null">,`product_code_id`</if>
<if test="type != null">,`type`</if>
<if test="createTime != null">,`create_time`</if>
<if test="isDel != null">,`is_del`</if>
)
values
(
<if test="name != null">,#{name}</if>
<if test="planCodeId != null">,#{planCodeId}</if>
<if test="productCodeId != null">,#{productCodeId}</if>
<if test="type != null">,#{type}</if>
<if test="createTime != null">,#{createTime}</if>
<if test="isDel != null">,#{isDel}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.insure.InsureProduct" useGeneratedKeys="true"
keyProperty="id">
insert into insure_product
(
`name`,
`plan_code_id`,
`product_code_id`,
`type`,
`create_time`,
`is_del`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.name},
#{item.planCodeId},
#{item.productCodeId},
#{item.type},
#{item.createTime},
#{item.isDel}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.insure.InsureProduct">
update insure_product
<set>
<if test="name != null">`name` = #{name},</if>
<if test="planCodeId != null">`plan_code_id` = #{planCodeId},</if>
<if test="productCodeId != null">`product_code_id` = #{productCodeId},</if>
<if test="type != null">`type` = #{type},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="isDel != null">`is_del` = #{isDel}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from insure_product
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from insure_product where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
......@@ -199,5 +199,37 @@
</select>
-->
<select id="companyAdminList" resultType="cn.timer.api.dto.qyzx.EntInfoDto">
SELECT
qeim.id AS id,
qeim.logo_url AS logoUrl,
qeim.NAME AS NAME,
qeim.link_man AS linkMan,
qeim.phone AS linkManPhone,
qeim.area_name AS areaName,
count( yme.id ) AS totalNum,
qeim.register_time AS registerTime,
qeim.end_time AS endTime,
IFNULL(a.totlaSpmk,0) as totlaSpmk,
IFNULL(b.totlaCc,0) as totlaCc
FROM
qyzx_ent_info_m qeim
LEFT JOIN yggl_main_emp yme ON yme.org_code = qeim.id
LEFT JOIN ( SELECT sas.org_code AS oid, count( sas.id ) AS totlaSpmk FROM spmk_approve_summary sas GROUP BY sas.org_code ) AS a ON a.oid = qeim.id
LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id
GROUP BY
qeim.id
<if test="page.offset != null and page.totalPage !=null">
limit #{page.offset},#{page.totalPage}
</if>
</select>
<select id="companyAdminCount" resultType="java.lang.Integer">
select count(qeim.id) from qyzx_ent_info_m qeim
</select>
<select id ="getCompanyList" resultType="java.util.HashMap">
select id as value , name as label from qyzx_ent_info_m
</select>
</mapper>
......@@ -55,6 +55,7 @@
<result column="openid" property="openid" />
<result column="mpopenid" property="mpopenid" />
<result column="appopenid" property="appopenid" />
<result column="is_insure" property="isInsure"/>
</resultMap>
<resultMap id="Bintu" type="cn.timer.api.dto.yggl.YgbintuDto" >
......@@ -126,7 +127,8 @@
openid,
mpopenid,
appopenid,
custom_num
custom_num,
is_insure
</sql>
<sql id="Base_Column_List_a">
......@@ -148,7 +150,8 @@
a.zj_num,
a.syq,
a.zz_time,
a.custom_num
a.custom_num,
a.is_insure
</sql>
......@@ -228,6 +231,7 @@
<!-- 查询员工信息 搜索 分页 -->
<select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto">
SELECT
a.id,
a.name empName,
a.emp_num empNum,
b.name deptName,
......@@ -236,7 +240,8 @@
a.phone phone,
a.job_status jobStatus,
a.head_url headUrl,
a.sex sex
a.sex sex,
a.is_insure isInsure
FROM
yggl_main_emp a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
......@@ -244,6 +249,9 @@
a.org_code = #{orgCode}
AND
a.job_status in (0,1,2)
<if test="isInsure!=null and isInsure != ''">
AND a.is_insure in (1,2)
</if>
ORDER BY
emp_num DESC
</select>
......@@ -393,4 +401,15 @@
]]>
</select>
<!--根据id数组查询员工-->
<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