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;
}
...@@ -223,8 +223,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -223,8 +223,7 @@ 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;
} }
...@@ -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,15 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -30,12 +30,15 @@ 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/CallBack")
.excludePathPatterns("/callBack/policy/insuredCallBack")
.excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*") .excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*") .excludePathPatterns("/doc*")
.excludePathPatterns("/v2/**") .excludePathPatterns("/v2/**")
...@@ -53,14 +56,14 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -53,14 +56,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 +110,12 @@ public class WebSecurityConfig implements WebMvcConfigurer { ...@@ -107,12 +110,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 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("退出成功");
}
}
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; 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 org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; 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; ...@@ -14,6 +18,11 @@ import cn.timer.api.bean.qyzx.QyzxEntInfoM;
*/ */
@Repository @Repository
public interface QyzxEntInfoMMapper extends BaseMapper<QyzxEntInfoM> { public interface QyzxEntInfoMMapper extends BaseMapper<QyzxEntInfoM> {
public List<EntInfoDto> companyAdminList(@Param("page")Page page);
public Integer companyAdminCount();
public List<Map<String,String>> getCompanyList();
......
...@@ -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);
...@@ -49,75 +49,75 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> { ...@@ -49,75 +49,75 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @param userBean * @param userBean
* @return * @return
*/ */
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode); List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode,@Param("isInsure")Integer isInsure);
/** /**
* 查询在职员工(试用员工人数+正式员工人数) * 查询在职员工(试用员工人数+正式员工人数)
* @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 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;
}
/** /**
* @date 2019年11月16日 * @date 2019年11月16日
* @author 翁东州 * @author 翁东州
* @方法中文名称: * @方法中文名称:
*/ */
...@@ -27,6 +27,8 @@ import lombok.NoArgsConstructor; ...@@ -27,6 +27,8 @@ import lombok.NoArgsConstructor;
public class YgQueryDto extends Page { public class YgQueryDto extends Page {
// private static final long serialVersionUID = -1230023773946170942L; // private static final long serialVersionUID = -1230023773946170942L;
@ApiModelProperty
private Integer id;
@ApiModelProperty(value = "员工姓名", example = "华仔") @ApiModelProperty(value = "员工姓名", example = "华仔")
private String empName; private String empName;
...@@ -72,4 +74,7 @@ public class YgQueryDto extends Page { ...@@ -72,4 +74,7 @@ public class YgQueryDto extends Page {
@ApiModelProperty(value = "性别", example = "1") @ApiModelProperty(value = "性别", example = "1")
private Integer sex; private Integer sex;
@ApiModelProperty(value="是否已购买保险",example = "0")
private Integer isInsure;
} }
...@@ -41,27 +41,25 @@ public class ExcelUtils { ...@@ -41,27 +41,25 @@ public class ExcelUtils {
* @param sheetNum 开始解析的sheet序号,如果不指定,默认传值为-1,则会解析所有sheet * @param sheetNum 开始解析的sheet序号,如果不指定,默认传值为-1,则会解析所有sheet
* @return * @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表格中获取数据 ->> 开始 ========================="); logger.info("========================= ExcelUtils.java ->> importExcel()从Excel表格中获取数据 ->> 开始 =========================");
// 用于存储最终整个Excel表格的数据 // // 用于存储最终整个Excel表格的数据
List<List<Map<String, Object>>> resultList = new ArrayList<>(); List<List<Map<String, Object>>> resultList = new ArrayList<>();
//
// 得到指定路径的文件File对象 // // 得到指定路径的文件File对象
File file = new File(filePath); // File file = new File(filePath);
// 如果不存在 // // 如果不存在
if (!file.exists()) { // if (!file.exists()) {
logger.info("ExcelUtils.java ->> importExcel() ->> 错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到"); // logger.info("ExcelUtils.java ->> importExcel() ->> 错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
throw new RuntimeException("错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到"); // throw new RuntimeException("错误操作:要读取Excel文件在指定路径(" + filePath + ")下找不到");
} // }
InputStream input = null; InputStream input = null;
Workbook workbook = null;
try { try {
// 得到文件的资源输入流 // 得到文件的资源输入流
input = new FileInputStream(file); // input = new FileInputStream(file);
// 得到处理excel的Workbook对象 // 得到处理excel的Workbook对象
workbook = ExcelUtils.getWorkbookByExtensionName(input, filePath);
// 创建一个公式计算器,用于计算并得到Excel中的公式结果 // 创建一个公式计算器,用于计算并得到Excel中的公式结果
FormulaEvaluator formulaEvaluator = workbook.getCreationHelper().createFormulaEvaluator(); FormulaEvaluator formulaEvaluator = workbook.getCreationHelper().createFormulaEvaluator();
...@@ -291,11 +289,11 @@ public class ExcelUtils { ...@@ -291,11 +289,11 @@ public class ExcelUtils {
* @param out 输出流 * @param out 输出流
* @throws Exception * @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中 ->> 开始 ========================="); logger.info("========================= ExcelUtils.java ->> exportExcel()导出数据到Excel中 ->> 开始 =========================");
XSSFWorkbook workbook = null; XSSFWorkbook workbook = null;
try {
/* /*
1,创建工作簿对象,然后创建大标题行,并设置标题 1,创建工作簿对象,然后创建大标题行,并设置标题
*/ */
...@@ -417,22 +415,7 @@ public class ExcelUtils { ...@@ -417,22 +415,7 @@ public class ExcelUtils {
sheet.setColumnWidth(colNum, (columnWidth + 4) * 256); sheet.setColumnWidth(colNum, (columnWidth + 4) * 256);
} }
} }
return workbook;
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中 ->> 结束 =========================");
}
} }
/** /**
...@@ -506,6 +489,23 @@ public class ExcelUtils { ...@@ -506,6 +489,23 @@ public class ExcelUtils {
// 设置垂直对齐的样式为居中对齐 // 设置垂直对齐的样式为居中对齐
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); 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; ...@@ -14,8 +14,6 @@ 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.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
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) {
} }
......
#生产环境 #生产环境
server: server:
port: 8089 port: 8866
servlet: servlet:
# context-path: /YoulinghrApiV100 # context-path: /YoulinghrApiV100
session: session:
...@@ -31,7 +31,7 @@ spring: ...@@ -31,7 +31,7 @@ spring:
# username: tang # username: tang
# password: Tang123456! # 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.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://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 # 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 driver-class-name: com.mysql.cj.jdbc.Driver
...@@ -238,3 +238,17 @@ config-8timer: ...@@ -238,3 +238,17 @@ config-8timer:
zip: zip:
path: 'D:/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'
...@@ -23,14 +23,14 @@ spring: ...@@ -23,14 +23,14 @@ spring:
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
# database: # database:
open-in-view: false open-in-view: false
# naming: # naming:
# spring boot jpa hibernate 根据实体类生成表以及字段的命名策略 # spring boot jpa hibernate 根据实体类生成表以及字段的命名策略
# 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
hibernate: hibernate:
ddl-auto: update ddl-auto: update
show-sql: true show-sql: true
datasource: datasource:
...@@ -85,36 +85,36 @@ spring: ...@@ -85,36 +85,36 @@ spring:
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# 时间戳统一转换 # 时间戳统一转换
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
# spring boot启动打印横幅 配置 # spring boot启动打印横幅 配置
banner: banner:
charset: UTF-8 # Banner file encoding. charset: UTF-8 # Banner file encoding.
location: banner.txt # Banner text resource location. location: banner.txt # Banner text resource location.
image: image:
location: banner.gif # Banner image file location (jpg or png can also be used). location: banner.gif # Banner image file location (jpg or png can also be used).
width: 76 # Width of the banner image in chars. width: 76 # Width of the banner image in chars.
height: 76 # Height of the banner image in chars (default based on image height). height: 76 # Height of the banner image in chars (default based on image height).
margin: 2 # Left hand image margin in chars. margin: 2 # Left hand image margin in chars.
invert: false # Whether images should be inverted for dark terminal themes. invert: false # Whether images should be inverted for dark terminal themes.
mail: mail:
port: 465 port: 465
protocol: smtp protocol: smtp
host: smtp.youlingrc.com host: smtp.youlingrc.com
username: postmaster@youlingrc.com username: postmaster@youlingrc.com
password: YoulingRC2020 password: YoulingRC2020
default-encoding: utf-8 default-encoding: utf-8
properties: properties:
mail: mail:
smtp: smtp:
auth: true auth: true
starttls: starttls:
enable: true enable: true
required: true required: true
ssl: # SSL Config ssl: # SSL Config
enable: true enable: true
socketFactory: socketFactory:
port: 465 port: 465
class: javax.net.ssl.SSLSocketFactory class: javax.net.ssl.SSLSocketFactory
redis: redis:
database: 5 # Redis数据库索引(默认为0),如果设置为1,那么存入的key-value都存放在select 1中 database: 5 # Redis数据库索引(默认为0),如果设置为1,那么存入的key-value都存放在select 1中
host: r-wz9p8pve7uem63b10upd.redis.rds.aliyuncs.com host: r-wz9p8pve7uem63b10upd.redis.rds.aliyuncs.com
...@@ -126,7 +126,7 @@ spring: ...@@ -126,7 +126,7 @@ spring:
min-idle: 0 # 连接池中的最小空闲连接 min-idle: 0 # 连接池中的最小空闲连接
timeout: 5000 # 连接超时 timeout: 5000 # 连接超时
#password: 123456 # 密码,默认密码为空 #password: 123456 # 密码,默认密码为空
#cluster: # 集群配置 #cluster: # 集群配置
#nodes: 127.0.0.1:6381,127.0.0.1:6382,127.0.0.1:6383,127.0.0.1:6384,127.0.0.1:6385,127.0.0.1:6386 #nodes: 127.0.0.1:6381,127.0.0.1:6382,127.0.0.1:6383,127.0.0.1:6384,127.0.0.1:6385,127.0.0.1:6386
#max-redirects: 2 # 最大重定向次数 #max-redirects: 2 # 最大重定向次数
devtools: devtools:
...@@ -134,7 +134,7 @@ spring: ...@@ -134,7 +134,7 @@ spring:
poll-interval: 3000ms poll-interval: 3000ms
quiet-period: 2999ms quiet-period: 2999ms
# mybatis-plus # mybatis-plus
mybatis-plus: mybatis-plus:
mapper-locations: classpath:mapping/**/*Mapper.xml # dao到xml文件映射 mapper-locations: classpath:mapping/**/*Mapper.xml # dao到xml文件映射
type-aliases-package: cn.timer.api.bean # xml中#全局类名别名 type-aliases-package: cn.timer.api.bean # xml中#全局类名别名
...@@ -154,7 +154,7 @@ mybatis-plus: ...@@ -154,7 +154,7 @@ mybatis-plus:
#逻辑删除配置 #逻辑删除配置
#logic-delete-value: 0 #logic-delete-value: 0
#logic-not-delete-value: 1 #logic-not-delete-value: 1
# 分页插件 # 分页插件
pagehelper: pagehelper:
helperDialect: mysql helperDialect: mysql
reasonable: true reasonable: true
...@@ -195,11 +195,11 @@ config-8timer: ...@@ -195,11 +195,11 @@ config-8timer:
expirationTime: 3153600000000L expirationTime: 3153600000000L
expirationTime_pri: 600000L expirationTime_pri: 600000L
esign: # e签宝 esign: # e签宝
callbackUrl: 'https://client.8timer.cn/callback/esign/dev' callbackUrl: 'https://client.8timer.cn/callback/esign/dev'
redirectUrl: 'http://client.8timer.cn/#/ElecCon/index' redirectUrl: 'http://client.8timer.cn/#/ElecCon/index'
# host: https://openapi.esign.cn # host: https://openapi.esign.cn
# PROJECT_ID: 4438775940 # PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af # PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
remind: #合同提醒时间 默认小于等于1天会提醒+三个配置项 remind: #合同提醒时间 默认小于等于1天会提醒+三个配置项
one: 3 one: 3
two: 7 two: 7
...@@ -208,19 +208,21 @@ config-8timer: ...@@ -208,19 +208,21 @@ config-8timer:
# 创建企业默认添加讯息 # 创建企业默认添加讯息
qyxx: qyxx:
title: '欢迎来到8小时' title: '欢迎来到8小时'
cover: 'https://8time-v2.oss-cn-shenzhen.aliyuncs.com/8timer2.0/common/qyxx/welcome/%E6%AC%A2%E8%BF%8E%E5%9B%BE.png' cover: 'https://8time-v2.oss-cn-shenzhen.aliyuncs.com/8timer2.0/common/qyxx/welcome/%E6%AC%A2%E8%BF%8E%E5%9B%BE.png'
summary: '<h1>欢迎来到8小时!可先前往组织管理-组织架构添加公司架构及岗位,再前往员工管理-员工名册添加企业员工。</h1>' summary: '<h1>欢迎来到8小时!可先前往组织管理-组织架构添加公司架构及岗位,再前往员工管理-员工名册添加企业员工。</h1>'
author: 'System' author: 'System'
# 客户管理导入服务器保存路径 # 客户管理导入服务器保存路径
crm-excel: crm-excel:
realPath: '/data/crm-excel/' realPath: '/data/crm-excel/'
#导出zip临时地址 #导出zip临时地址
zip: zip:
path: '/data/crm-zip/' path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://api.8timer.cn'
#sftp 配置 #sftp 配置
sftp: sftp:
client: client:
...@@ -235,4 +237,16 @@ sftp: ...@@ -235,4 +237,16 @@ sftp:
channelConnectedTimeout: '15000' channelConnectedTimeout: '15000'
serverUrl: 'https://img.8timer.cn' serverUrl: 'https://img.8timer.cn'
targetPath: '/disk' targetPath: '/disk'
reservedName: false reservedName: false
\ No newline at end of file
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'
...@@ -3,7 +3,7 @@ server: ...@@ -3,7 +3,7 @@ server:
port: 8189 port: 8189
servlet: servlet:
# context-path: /YoulinghrApiV100 # context-path: /YoulinghrApiV100
session: session:
timeout: 2592000 # session会话过期时间 timeout: 2592000 # session会话过期时间
tomcat: tomcat:
# 最大连接数,默认值是10000 # 最大连接数,默认值是10000
...@@ -15,21 +15,21 @@ tomcat: ...@@ -15,21 +15,21 @@ tomcat:
max-http-post-size: 50MB max-http-post-size: 50MB
min-spare-threads: 100 min-spare-threads: 100
spring: spring:
servlet: servlet:
multipart: multipart:
max-file-size: 500MB max-file-size: 500MB
max-request-size: 500MB max-request-size: 500MB
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
# database: # database:
open-in-view: false open-in-view: false
# naming: # naming:
# spring boot jpa hibernate 根据实体类生成表以及字段的命名策略 # spring boot jpa hibernate 根据实体类生成表以及字段的命名策略
# 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
hibernate: hibernate:
ddl-auto: update ddl-auto: update
show-sql: true show-sql: true
datasource: datasource:
...@@ -64,7 +64,7 @@ spring: ...@@ -64,7 +64,7 @@ spring:
#max-pool-prepared-statement-per-connection-size: 20 #max-pool-prepared-statement-per-connection-size: 20
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录 # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
#connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 #connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
druid: druid:
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 ,不能用log4j,不然报错:Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource: # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 ,不能用log4j,不然报错:Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource:
filters: stat,slf4j filters: stat,slf4j
# 配置监控服务器 # 配置监控服务器
...@@ -87,30 +87,30 @@ spring: ...@@ -87,30 +87,30 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
# spring boot启动打印横幅 配置 # spring boot启动打印横幅 配置
banner: banner:
charset: UTF-8 # Banner file encoding. charset: UTF-8 # Banner file encoding.
location: banner.txt # Banner text resource location. location: banner.txt # Banner text resource location.
image: image:
location: banner.gif # Banner image file location (jpg or png can also be used). location: banner.gif # Banner image file location (jpg or png can also be used).
width: 76 # Width of the banner image in chars. width: 76 # Width of the banner image in chars.
height: 76 # Height of the banner image in chars (default based on image height). height: 76 # Height of the banner image in chars (default based on image height).
margin: 2 # Left hand image margin in chars. margin: 2 # Left hand image margin in chars.
invert: false # Whether images should be inverted for dark terminal themes. invert: false # Whether images should be inverted for dark terminal themes.
mail: mail:
port: 465 port: 465
host: smtp.youlingrc.com host: smtp.youlingrc.com
username: postmaster@youlingrc.com username: postmaster@youlingrc.com
password: YoulingRC2020 password: YoulingRC2020
default-encoding: utf-8 default-encoding: utf-8
properties: properties:
mail: mail:
smtp: smtp:
auth: true auth: true
starttls: starttls:
enable: true enable: true
required: true required: true
ssl: # SSL Config ssl: # SSL Config
enable: true enable: true
socketFactory: socketFactory:
port: 465 port: 465
class: javax.net.ssl.SSLSocketFactor class: javax.net.ssl.SSLSocketFactor
redis: redis:
...@@ -158,7 +158,7 @@ pagehelper: ...@@ -158,7 +158,7 @@ pagehelper:
reasonable: true reasonable: true
supportMethodsArguments: true supportMethodsArguments: true
params: count=countSql params: count=countSql
#showSql #showSql
logging: logging:
level: level:
...@@ -166,7 +166,7 @@ logging: ...@@ -166,7 +166,7 @@ logging:
cn.timer.api.dao: info cn.timer.api.dao: info
pattern: pattern:
console: '--%p--%m%n' console: '--%p--%m%n'
#swagger: #swagger:
# ui-config: # ui-config:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序 # operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
...@@ -204,14 +204,14 @@ config-8timer: ...@@ -204,14 +204,14 @@ config-8timer:
two: 7 two: 7
three: 30 three: 30
init-password: 123456 init-password: 123456
# 创建企业默认添加讯息 # 创建企业默认添加讯息
qyxx: qyxx:
title: '欢迎来到8小时' title: '欢迎来到8小时'
cover: 'https://8time-v2.oss-cn-shenzhen.aliyuncs.com/8timer2.0/common/qyxx/welcome/%E6%AC%A2%E8%BF%8E%E5%9B%BE.png' cover: 'https://8time-v2.oss-cn-shenzhen.aliyuncs.com/8timer2.0/common/qyxx/welcome/%E6%AC%A2%E8%BF%8E%E5%9B%BE.png'
summary: '<h1>欢迎来到8小时!可先前往组织管理-组织架构添加公司架构及岗位,再前往员工管理-员工名册添加企业员工。</h1>' summary: '<h1>欢迎来到8小时!可先前往组织管理-组织架构添加公司架构及岗位,再前往员工管理-员工名册添加企业员工。</h1>'
author: 'System' author: 'System'
# 客户管理导入服务器保存路径 # 客户管理导入服务器保存路径
crm-excel: crm-excel:
realPath: '/data/crm-excel/' realPath: '/data/crm-excel/'
...@@ -219,6 +219,9 @@ config-8timer: ...@@ -219,6 +219,9 @@ config-8timer:
#导出zip临时地址 #导出zip临时地址
zip: zip:
path: '/data/crm-zip/' path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://test-8timer-api.youlingrc.com'
#sftp 配置 #sftp 配置
sftp: sftp:
client: client:
...@@ -234,4 +237,16 @@ sftp: ...@@ -234,4 +237,16 @@ sftp:
serverUrl: 'https://test-img.8timer.cn' serverUrl: 'https://test-img.8timer.cn'
targetPath: '/disk' targetPath: '/disk'
reservedName: false 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>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
attest_time attest_time
</sql> </sql>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxEntInfoM"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxEntInfoM">
INSERT INTO qyzx_ent_info_m INSERT INTO qyzx_ent_info_m
...@@ -199,5 +199,37 @@ ...@@ -199,5 +199,37 @@
</select> </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> </mapper>
\ No newline at end of file
...@@ -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,20 +217,21 @@ ...@@ -214,20 +217,21 @@
</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
a.id,
a.name empName, a.name empName,
a.emp_num empNum, a.emp_num empNum,
b.name deptName, b.name deptName,
...@@ -236,7 +240,8 @@ ...@@ -236,7 +240,8 @@
a.phone phone, a.phone phone,
a.job_status jobStatus, a.job_status jobStatus,
a.head_url headUrl, a.head_url headUrl,
a.sex sex a.sex sex,
a.is_insure isInsure
FROM FROM
yggl_main_emp a yggl_main_emp a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
...@@ -244,44 +249,47 @@ ...@@ -244,44 +249,47 @@
a.org_code = #{orgCode} a.org_code = #{orgCode}
AND AND
a.job_status in (0,1,2) a.job_status in (0,1,2)
<if test="isInsure!=null and isInsure != ''">
AND a.is_insure in (1,2)
</if>
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 +299,7 @@ ...@@ -291,7 +299,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 +316,7 @@ ...@@ -308,7 +316,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 +332,7 @@ ...@@ -324,7 +332,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 +350,24 @@ ...@@ -342,24 +350,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 +383,33 @@ ...@@ -375,22 +383,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