Commit 957fa46a authored by fangxinjiang's avatar fangxinjiang

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

parents b7b41633 e0e49f95
...@@ -275,7 +275,8 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -275,7 +275,8 @@ public class TEmployeeInfo extends BaseEntity {
/** /**
* 员工合同状态(字典) * 员工合同状态(字典)
*/ */
@Schema(description = "员工合同状态(字典)0初始状态") @Schema(description = "员工合同状态(字典)0初始状态 personnel_state")
@ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE)
private Integer contractStatus; private Integer contractStatus;
/** /**
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -341,6 +343,7 @@ public class TEmployeeProject extends BaseEntity { ...@@ -341,6 +343,7 @@ public class TEmployeeProject extends BaseEntity {
* 员工合同状态(字典) * 员工合同状态(字典)
*/ */
@Schema(description = "员工合同状态(字典)0初始状态") @Schema(description = "员工合同状态(字典)0初始状态")
@ExcelAttribute(name = "合同状态", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_STATE)
private Integer contractStatus; private Integer contractStatus;
} }
...@@ -58,7 +58,6 @@ public class EmployeeContractUpdateVO extends RowIndex implements Serializable { ...@@ -58,7 +58,6 @@ public class EmployeeContractUpdateVO extends RowIndex implements Serializable {
/** /**
* 合同编号 * 合同编号
*/ */
@NotBlank(message = "合同编号不能为空")
@Length(max = 50, message = "合同编号不能超过50个字符") @Length(max = 50, message = "合同编号不能超过50个字符")
@ExcelAttribute(name = "合同编号", maxLength = 50) @ExcelAttribute(name = "合同编号", maxLength = 50)
@Schema(description = "合同编号", name = "contractNo") @Schema(description = "合同编号", name = "contractNo")
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.constants; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.constants;
public class EmployeeContractConstants { public class EmployeeContractConstants {
public static final String NO_CONTRACT_FILE_CABINET = "合同编号、档案柜号不可同时为空";
public static final String NO_INFO = "未找到记录"; public static final String NO_INFO = "未找到记录";
public static final String NOT_CREATE_USER = "不是创建人,无法删除"; public static final String NOT_CREATE_USER = "不是创建人,无法删除";
......
...@@ -223,30 +223,35 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -223,30 +223,35 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo.setIsObsolete(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setIsObsolete(CommonConstants.ZERO_STRING);
tEmployeeContractInfo.setDeleteFlag(CommonConstants.ZERO_INT); tEmployeeContractInfo.setDeleteFlag(CommonConstants.ZERO_INT);
if (Common.isEmpty(tEmployeeContractInfo.getApplyNo())) { if (Common.isEmpty(tEmployeeContractInfo.getApplyNo())) {
tEmployeeContractInfo.setApplyNo(this.getCode()); tEmployeeContractInfo.setApplyNo(this.getCode(false));
} }
} }
/** /**
* @param * @param isNew true:取数据库最新的
* @Description: 获取 申请编码 * @Description: 获取 申请编码
* @Author: hgw * @Author: hgw
* @Date: 2022/6/22 17:52 * @Date: 2022/6/22 17:52
* @return: java.lang.String * @return: java.lang.String
**/ **/
private synchronized String getCode() { private synchronized String getCode(boolean isNew) {
String nowDay = DateUtil.getThisDay(); String nowDay = DateUtil.getThisDay();
int nowNums;
String empCode = null;
Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CONTRACT_CODE); Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_EMP_CONTRACT_CODE);
Object nowNumObj = cache.get(nowDay); if (isNew) {
int nowNums = 1; empCode = baseMapper.getMaxContractCode();
if (Common.isNotNull(nowNumObj)) { nowNums = Integer.parseInt(empCode) + 1;
SimpleValueWrapper value = (SimpleValueWrapper) nowNumObj;
nowNums = (Integer) value.get() + 1;
} else { } else {
String empCode = null;
try { try {
empCode = baseMapper.getMaxContractCode(); Object nowNumObj = cache.get(nowDay);
nowNums = Integer.parseInt(empCode) + 1; if (Common.isNotNull(nowNumObj)) {
SimpleValueWrapper value = (SimpleValueWrapper) nowNumObj;
nowNums = (Integer) value.get() + 1;
} else {
empCode = baseMapper.getMaxContractCode();
nowNums = Integer.parseInt(empCode) + 1;
}
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
log.error("获取人员合同当日最大编码时出错:" + empCode); log.error("获取人员合同当日最大编码时出错:" + empCode);
nowNums = 1; nowNums = 1;
...@@ -307,11 +312,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -307,11 +312,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 针对编码再做一次重复性校验 // 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo()); String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
if (Common.isNotNull(isCur)) { if (Common.isNotNull(isCur)) {
String code = this.getCode(); String code = this.getCode(true);
isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
if (Common.isNotNull(isCur)) {
return R.failed("编码已被占用,请稍后再新增:" + code);
}
tEmployeeContractInfo.setApplyNo(code); tEmployeeContractInfo.setApplyNo(code);
} }
baseMapper.insert(tEmployeeContractInfo); baseMapper.insert(tEmployeeContractInfo);
...@@ -414,17 +415,65 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -414,17 +415,65 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return R.failed("不是待审核状态!"); return R.failed("不是待审核状态!");
} }
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
//先停用项目内的其他的员工合同
baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain()
, contractInfo.getId(), CommonConstants.ONE_STRING);
// 作废、终止,不变为在用 // 作废、终止,不变为在用
if (Common.isEmpty(contractInfo.getSituation()) if (Common.isEmpty(contractInfo.getSituation())
|| (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation()) || (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) { && !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) {
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
// 更新档案、项目合同状态为(1可用)
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
.lambda().eq(TEmployeeProject::getEmpId, contractInfo.getEmpId())
.eq(TEmployeeProject::getDeptId, contractInfo.getSettleDomain())
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.last(CommonConstants.LAST_ONE_SQL));
if (tEmployeeProject != null) {
tEmployeeProject.setContractStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(tEmployeeProject);
}
// 更新档案、项目合同状态为(1在用)
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(tEmployeeContractInfo.getEmpId());
if (tEmployeeInfo != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
tEmployeeInfoService.updateById(tEmployeeInfo);
}
} else {
// 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
.lambda().eq(TEmployeeProject::getEmpId, contractInfo.getEmpId())
.eq(TEmployeeProject::getDeptId, contractInfo.getSettleDomain())
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.last(CommonConstants.LAST_ONE_SQL));
if (tEmployeeProject != null) {
tEmployeeProject.setContractStatus(CommonConstants.TWO_INT);
tEmployeeProjectService.updateById(tEmployeeProject);
}
// 更新档案、项目合同状态为(0无合同 1在用 2不在用)
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(tEmployeeContractInfo.getEmpId());
if (tEmployeeInfo != null) {
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contractInfo.getEmpId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfoInUse != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
} else {
tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT);
}
tEmployeeInfoService.updateById(tEmployeeInfo);
}
} }
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now()); tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
//先停用项目内的其他的员工合同
baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain()
, contractInfo.getId(), CommonConstants.ONE_STRING);
} }
// 不是待提交,记录审核记录 // 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
...@@ -617,7 +666,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -617,7 +666,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeContractConstants.NO_INFO)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeContractConstants.NO_CONTRACT_FILE_CABINET));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(CommonConstants.ZERO_INT, EmployeeContractConstants.NO_INFO)); errorMessageList.add(new ErrorMessage(CommonConstants.ZERO_INT, EmployeeContractConstants.NO_INFO));
......
...@@ -170,6 +170,7 @@ public interface CommonConstants { ...@@ -170,6 +170,7 @@ public interface CommonConstants {
* @author fxj * @author fxj
*/ */
int ONE_INT = 1; int ONE_INT = 1;
int TWO_INT = 2;
/** /**
* 个位数字(阿里编码规约不允许直接使用‘魔法值’) * 个位数字(阿里编码规约不允许直接使用‘魔法值’)
...@@ -226,6 +227,8 @@ public interface CommonConstants { ...@@ -226,6 +227,8 @@ public interface CommonConstants {
char ADD_CHAR = '+'; char ADD_CHAR = '+';
//int 4 //int 4
int FOUR_INT = 4; int FOUR_INT = 4;
//int 5
int FIVE_INT = 5;
String TEN_STRING = "10"; String TEN_STRING = "10";
public static final String SPOT = "."; public static final String SPOT = ".";
......
...@@ -11,10 +11,50 @@ public class InsurancesConstants { ...@@ -11,10 +11,50 @@ public class InsurancesConstants {
* 新增投保成功 * 新增投保成功
*/ */
public static final String ADD_SUCCESS = "新增投保成功"; public static final String ADD_SUCCESS = "新增投保成功";
/**
* 批增投保成功
*/
public static final String BATCH_SUCCESS = "批增投保成功";
/**
* 替换成功
*/
public static final String REPLACE_SUCCESS = "替换成功";
/**
* 操作成功
*/
public static final String OPERATE_SUCCESS = "操作成功";
/**
* 非投保退回状态,无法删除
*/
public static final String DELETE_ERROR = "非投保退回状态,无法删除";
/** /**
* 投保信息已存在 * 投保信息已存在
*/ */
public static final String DATA_IS_EXIST = "投保信息已存在"; public static final String DATA_IS_EXIST = "投保信息已存在";
/**
* 投保信息不存在
*/
public static final String DATA_IS_NOT_EXIST = "投保信息不存在";
/**
* 被替换信息不存在
*/
public static final String REPLACE_IS_NOT_EXIST = "被替换信息不存在";
/**
* 项目编码不存在
*/
public static final String DEPT_NO_IS_NOT_EXIST = "项目编码不存在";
/**
* 未找到结算主体的结算方式
*/
public static final String PROJECT_NOT_FIND_SETTLE_TYPE = "未找到结算主体的结算方式";
/**
* 替换者信息已存在
*/
public static final String REPLACE_IS_EXIST = "替换者信息已存在";
/**
* 无效、已过期、已出险、已减员的 不能替换
*/
public static final String REPLACE_IS_NOT_ALLOW = "无效、已过期、已出险、已减员的 不能替换";
/** /**
* 订单编号不能为空 * 订单编号不能为空
*/ */
...@@ -23,18 +63,34 @@ public class InsurancesConstants { ...@@ -23,18 +63,34 @@ public class InsurancesConstants {
* 员工姓名不能为空 * 员工姓名不能为空
*/ */
public static final String EMP_NAME_NOT_EMPTY = "员工姓名不能为空"; public static final String EMP_NAME_NOT_EMPTY = "员工姓名不能为空";
/**
* 替换员工姓名不能为空
*/
public static final String REPLACE_EMP_NAME_NOT_EMPTY = "替换员工姓名不能为空";
/** /**
* 员工身份证号不能为空 * 员工身份证号不能为空
*/ */
public static final String EMP_IDCARD_NO_NOT_EMPTY = "员工身份证号不能为空"; public static final String EMP_IDCARD_NO_NOT_EMPTY = "员工身份证号不能为空";
/**
* 替换员工身份证号不能为空
*/
public static final String REPLACE_EMP_IDCARD_NO_NOT_EMPTY = "替换员工身份证号不能为空";
/** /**
* 员工身份证号格式有误 * 员工身份证号格式有误
*/ */
public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式有误"; public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式有误";
/**
* 替换员工身份证号格式有误
*/
public static final String REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE = "替换员工身份证号格式有误";
/** /**
* 项目编码不能为空 * 项目编码不能为空
*/ */
public static final String DEPT_NO_NOT_EMPTY = "项目编码不能为空"; public static final String DEPT_NO_NOT_EMPTY = "项目编码不能为空";
/**
* 替换项目编码不能为空
*/
public static final String REPLACE_DEPT_NO_NOT_EMPTY = "替换项目编码不能为空";
/** /**
* 保险公司名称不能为空 * 保险公司名称不能为空
*/ */
......
...@@ -30,12 +30,6 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -30,12 +30,6 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 员工档案id
*/
@Schema(description = "员工档案id")
private String empId;
/** /**
* 员工姓名 * 员工姓名
*/ */
...@@ -199,9 +193,9 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -199,9 +193,9 @@ public class TInsuranceDetail extends BaseEntity {
private String insuranceHandleCityName; private String insuranceHandleCityName;
/** /**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算) * 结算类型 (0、预估 1、实缴)
*/ */
@Schema(description = "结算类型 (1、单独结算 2、合并结算-和工资一起结算)") @Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType; private Integer settleType;
/** /**
...@@ -228,11 +222,11 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -228,11 +222,11 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员") @Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus; private Integer buyHandleStatus;
/** /**
* 结算办理状态 1待结算 2结算中 3已结算 * 默认结算信息id
*/ */
@Schema(description = "结算办理状态 1待结算 2结算中 3已结算") @Schema(description = "默认结算信息id")
private Integer settleHandleStatus; private Integer defaultSettleId;
/** /**
* 减员状态 1待减员 2减员中3减员退回 * 减员状态 1待减员 2减员中3减员退回
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 商险替换表 t_insurance_replace
* @date 2022-07-20 14:20:16
*/
@Data
@TableName("t_insurance_replace")
@Tag(name = "商险替换表")
public class TInsuranceReplace implements Serializable {
private static final long serialVersionUID = -8528017421473755436L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 被替换人明细id
*/
@Schema(description = "被替换人明细id")
private String fromInsuranceDetailId;
/**
* 替换人明细ID
*/
@Schema(description = "替换人明细ID")
private String toInsuranceDetailId;
/**
* 原始明细id
*/
@Schema(description = "原始明细id")
private String originInsuranceDetailId;
/**
* 0失败 1成功
*/
@Schema(description = "0失败 1成功")
private Integer replaceStatus;
/**
* 替换成功时间
*/
@Schema(description = "替换成功时间")
private LocalDateTime replaceTime;
/**
* 创建人
*/
@Schema(description = "创建人")
private String createBy;
/**
* 创建人姓名
*/
@Schema(description = "创建人-姓名")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
}
\ No newline at end of file
...@@ -112,6 +112,7 @@ public class InsuranceAddParam implements Serializable { ...@@ -112,6 +112,7 @@ public class InsuranceAddParam implements Serializable {
/** /**
* 错误信息 * 错误信息
*/ */
@Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/ /***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
......
...@@ -108,6 +108,7 @@ public class InsuranceBatchParam implements Serializable { ...@@ -108,6 +108,7 @@ public class InsuranceBatchParam implements Serializable {
/** /**
* 错误信息 * 错误信息
*/ */
@Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/ /***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 投保详情VO
* @date 2022-07-20 19:23:17
*/
@Data
@Tag(name = "投保详情VO")
public class InsuranceDetailVO implements Serializable {
private static final long serialVersionUID = 628032758008497542L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@JsonIgnore
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单生效日期")
private LocalDate policyEffect;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 费用类型
*/
@Schema(description = "费用类型 0、预估 1、实缴")
private Integer premiumType;
/**
* 预估保费
*/
@Schema(description = "预估保费")
private BigDecimal estimatePremium;
/**
* 实际保费
*/
@Schema(description = "实际保费")
private BigDecimal actualPremium;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 结算类型 (0、与薪资结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、与薪资结算 1、单独结算)")
private Integer settleType;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
/**
* 结算办理状态 1待结算 2结算中 3已结算
*/
@Schema(description = "结算办理状态 1待结算 2结算中 3已结算")
private Integer settleHandleStatus;
/**
* 是否出险 0未出险 1已出险
*/
@Schema(description = "是否出险 0未出险 1已出险")
private Integer isUse;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 投保列表请求参数
* @date 2022-07-20 16:14:19
*/
@Data
@Tag(name = "投保列表请求参数")
public class InsuranceListParam implements Serializable {
private static final long serialVersionUID = -4692341622141432288L;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
* @description 投保列表VO
* @date 2022-07-20 16:18:41
*/
@Data
@Tag(name = "投保列表VO")
public class InsuranceListVO implements Serializable {
private static final long serialVersionUID = -6673220061558171816L;
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@JsonIgnore
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
* @description 商险办理替换入参
* @date 2022-07-20 08:43:31
*/
@Data
@Tag(name = "商险办理替换入参")
public class InsuranceReplaceParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 替换员工姓名
*/
@Schema(description = "替换员工姓名")
private String replaceEmpName;
/**
* 替换员工身份证号
*/
@Schema(description = "替换员工身份证号")
private String replaceEmpIdcardNo;
/**
* 替换员工项目编码
*/
@Schema(description = "替换员工项目编码")
private String replaceDeptNo;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 岗位
*/
@Schema(description = "岗位")
private String post;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller; package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck; import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
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.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.List; import java.util.List;
import java.util.List;
/** /**
* @author licancan * @author licancan
...@@ -40,6 +36,33 @@ public class TInsuranceDetailController { ...@@ -40,6 +36,33 @@ public class TInsuranceDetailController {
private TInsuranceDetailService tInsuranceDetailService; private TInsuranceDetailService tInsuranceDetailService;
/***********************商险办理********************************/ /***********************商险办理********************************/
/**
* 投保办理分页查询
*
* @author licancan
* @param page
* @param param
* @return {@link R<IPage<InsuranceListVO>>}
*/
@Operation(summary = "投保办理分页查询", description = "投保办理分页查询")
@PostMapping("/getInsuranceListPage")
public R<IPage<InsuranceListVO>> getInsuranceListPage(Page<InsuranceListVO> page, @RequestBody InsuranceListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceListPage(page, param));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation(summary = "投保办理不分页查询", description = "投保办理不分页查询")
@PostMapping("/getInsuranceList")
public R<List<InsuranceListVO>> getInsuranceList(@RequestBody InsuranceListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceList(param));
}
/** /**
* 商险新增 * 商险新增
* *
...@@ -47,6 +70,7 @@ public class TInsuranceDetailController { ...@@ -47,6 +70,7 @@ public class TInsuranceDetailController {
* @param paramList * @param paramList
* @return {@link R<List<InsuranceAddParam>>} * @return {@link R<List<InsuranceAddParam>>}
*/ */
@Operation(summary = "投保新增", description = "投保新增")
@PostMapping("/addInsurance") @PostMapping("/addInsurance")
public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){ public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){
return tInsuranceDetailService.addInsurance(paramList); return tInsuranceDetailService.addInsurance(paramList);
...@@ -59,13 +83,53 @@ public class TInsuranceDetailController { ...@@ -59,13 +83,53 @@ public class TInsuranceDetailController {
* @param paramList * @param paramList
* @return {@link R<List<InsuranceBatchParam>>} * @return {@link R<List<InsuranceBatchParam>>}
*/ */
@Operation(summary = "投保批增", description = "投保批增")
@PostMapping("/batchInsurance") @PostMapping("/batchInsurance")
public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){ public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){
return tInsuranceDetailService.batchInsurance(paramList); return tInsuranceDetailService.batchInsurance(paramList);
} }
/***********************减员办理********************************/ /**
* 商险替换
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
@Operation(summary = "投保替换", description = "投保替换")
@PostMapping("/replaceInsurance")
public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){
return tInsuranceDetailService.replaceInsurance(paramList);
}
/**
* 通过id删除
*
* @author licancan
* @param id
* @return {@link R<String>}
*/
@GetMapping("/deleteInsurance")
@Operation(summary = "通过id删除", description = "通过id删除")
//@PreAuthorize("@pms.hasPermission('temployeeinfo_del')")
public R<String> deleteInsurance(@RequestParam String id) {
return tInsuranceDetailService.deleteInsurance(id);
}
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link R<InsuranceDetailVO>}
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<InsuranceDetailVO> getInsuranceDetailById(@PathVariable("id") String id) {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
}
/***********************减员办理********************************/
/** /**
* 导入减员校验 * 导入减员校验
* @param insuranceRefundCheckList 导入减员校验 * @param insuranceRefundCheckList 导入减员校验
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper; package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author licancan * @author licancan
...@@ -11,5 +19,34 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -11,5 +19,34 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
/***********************商险办理********************************/
/**
* 投保办理分页查询
*
* @author licancan
* @param page
* @param param
* @return {@link IPage< InsuranceListVO>}
*/
IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, @Param("param") InsuranceListParam param);
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link List<InsuranceListVO>}
*/
List<InsuranceListVO> getInsuranceList(@Param("param") InsuranceListParam param);
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link InsuranceDetailVO}
*/
InsuranceDetailVO getInsuranceDetailById(@Param("id") String id);
/***********************减员办理********************************/
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Mapper
* @date 2022-07-20 14:20:16
*/
@Mapper
public interface TInsuranceReplaceMapper extends BaseMapper<TInsuranceReplace> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service; package com.yifu.cloud.plus.v1.yifu.insurances.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck; import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam;
import java.util.List;
import java.util.List; import java.util.List;
...@@ -21,6 +19,25 @@ import java.util.List; ...@@ -21,6 +19,25 @@ import java.util.List;
public interface TInsuranceDetailService extends IService<TInsuranceDetail> { public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
/***********************商险办理********************************/ /***********************商险办理********************************/
/**
* 投保办理分页查询
*
* @author licancan
* @param page
* @param param
* @return {@link IPage<InsuranceListVO>}
*/
IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, InsuranceListParam param);
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link List<InsuranceListVO>}
*/
List<InsuranceListVO> getInsuranceList(InsuranceListParam param);
/** /**
* 商险新增 * 商险新增
* *
...@@ -38,6 +55,32 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -38,6 +55,32 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R<List<InsuranceBatchParam>>} * @return {@link R<List<InsuranceBatchParam>>}
*/ */
R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList); R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList);
/**
* 商险替换
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList);
/**
* 通过id删除
*
* @author licancan
* @param id
* @return {@link R<String>}
*/
R<String> deleteInsurance(String id);
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link InsuranceDetailVO}
*/
InsuranceDetailVO getInsuranceDetailById(String id);
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
...@@ -48,4 +91,5 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -48,4 +91,5 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R} * @return {@link R}
*/ */
R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList); R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Service
* @date 2022-07-20 14:20:16
*/
public interface TInsuranceReplaceService extends IService<TInsuranceReplace> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceReplaceMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceReplaceService;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Service实现
* @date 2022-07-20 14:20:16
*/
@Service
public class TInsuranceReplaceServiceImpl extends ServiceImpl<TInsuranceReplaceMapper, TInsuranceReplace> implements TInsuranceReplaceService {
}
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
<id property="id" column="ID" jdbcType="VARCHAR"/> <id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empId" column="EMP_ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/> <result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/> <result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/> <result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
<result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/> <result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/>
<result property="settleBalance" column="SETTLE_BALANCE" jdbcType="DECIMAL"/> <result property="settleBalance" column="SETTLE_BALANCE" jdbcType="DECIMAL"/>
<result property="buyHandleStatus" column="BUY_HANDLE_STATUS" jdbcType="TINYINT"/> <result property="buyHandleStatus" column="BUY_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="settleHandleStatus" column="SETTLE_HANDLE_STATUS" jdbcType="TINYINT"/> <result property="defaultSettleId" column="DEFAULT_SETTLE_ID" jdbcType="VARCHAR"/>
<result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/> <result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="isUse" column="IS_USE" jdbcType="TINYINT"/> <result property="isUse" column="IS_USE" jdbcType="TINYINT"/>
<result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/> <result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/>
...@@ -54,7 +53,7 @@ ...@@ -54,7 +53,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,EMP_ID,EMP_NAME, ID,EMP_NAME,
EMP_IDCARD_NO,ORDER_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME, EMP_IDCARD_NO,ORDER_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA,POLICY_NO, INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA,POLICY_NO,
POLICY_START,POLICY_END,POLICY_EFFECT, POLICY_START,POLICY_END,POLICY_EFFECT,
...@@ -62,9 +61,121 @@ ...@@ -62,9 +61,121 @@
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME, BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE, INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SETTLE_BALANCE, ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SETTLE_BALANCE,
BUY_HANDLE_STATUS,SETTLE_HANDLE_STATUS,REDUCE_HANDLE_STATUS, BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK, IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME, CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG UPDATE_BY,UPDATE_TIME,DELETE_FLAG
</sql> </sql>
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
select
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo,
detail.POST as post,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect,
detail.POLICY_NO as policyNo,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.SETTLE_TYPE as premiumType,
detail.ESTIMATE_PREMIUM as estimatePremium,
detail.ACTUAL_PREMIUM as actualPremium,
detail.INVOICE_NO as invoiceNo,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
tis.SETTLE_HANDLE_STATUS as settleHandleStatus,
detail.IS_USE as isUse,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.CREATE_NAME as createName,
detail.CREATE_TIME as createTime
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
</select>
</mapper> </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.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceReplaceMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="fromInsuranceDetailId" column="FROM_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="toInsuranceDetailId" column="TO_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="originInsuranceDetailId" column="ORIGIN_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="replaceStatus" column="REPLACE_STATUS" jdbcType="TINYINT"/>
<result property="replaceTime" column="REPLACE_TIME" jdbcType="TIMESTAMP"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
ID,FROM_INSURANCE_DETAIL_ID,TO_INSURANCE_DETAIL_ID,
ORIGIN_INSURANCE_DETAIL_ID,REPLACE_STATUS,REPLACE_TIME,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
</mapper>
...@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity { ...@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity {
@ExcelAttribute(name = "数据同步:0未同步;1已同步") @ExcelAttribute(name = "数据同步:0未同步;1已同步")
@ExcelProperty("数据同步:0未同步;1已同步") @ExcelProperty("数据同步:0未同步;1已同步")
private Integer dataPush; private Integer dataPush;
/**
* 类型:0社保;1公积金
*/
@ExcelAttribute(name = "类型:0社保;1公积金")
@ExcelProperty("类型:0社保;1公积金")
private Integer dataType;
@TableField(exist = false) @TableField(exist = false)
private List<String> idList; private List<String> idList;
......
package com.yifu.cloud.plus.v1.yifu.social.constants;
/**
* @author hgw2
* @description 社保固定文字
* @date 2022/7/19
*/
public class SocialConstants {
// 社保补缴配置有误!
public static final String SOCIAL_SET_ERROR = "社保补缴配置有误!";
}
...@@ -19,7 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -19,7 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary; import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
...@@ -28,11 +28,9 @@ import io.swagger.v3.oas.annotations.Operation; ...@@ -28,11 +28,9 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
...@@ -147,4 +145,27 @@ public class TForecastLibraryController { ...@@ -147,4 +145,27 @@ public class TForecastLibraryController {
public void export(HttpServletResponse response, @RequestBody TForecastLibrary searchVo) { public void export(HttpServletResponse response, @RequestBody TForecastLibrary searchVo) {
tForecastLibraryService.listExport(response, searchVo); tForecastLibraryService.listExport(response, searchVo);
} }
/**
* @param payMonths 缴纳月
* @param empIdCard 身份证
* @param settleDomainIds 项目ids
* @Description: 按缴纳月重新生成
* @Author: hgw
* @Date: 2022/7/18 17:12
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Operation(summary = "按缴纳月重新生成", description = "按缴纳月重新生成:hasPermission('social_tforecastlibrary_create')")
@SysLog("按缴纳月重新生成")
@PostMapping("/createForecastlibary")
@PreAuthorize("@pms.hasPermission('social_tforecastlibrary_create')")
public R<Boolean> createForecastlibary(@RequestParam String payMonths,
@RequestParam(value = "empIdCard", required = false) String empIdCard,
@RequestParam(value = "settleDomainIds", required = false) String settleDomainIds) {
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDomainIds)) {
return R.failed("参数有误:身份证或项目ID不可为空!");
}
return tForecastLibraryService.createForecastlibary(payMonths, empIdCard, settleDomainIds);
}
} }
...@@ -44,6 +44,16 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> { ...@@ -44,6 +44,16 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
List<SysBaseSetInfo> getAllByEntity(@Param("sysBaseSetInfo")SysBaseSetInfo sysBaseSetInfo); List<SysBaseSetInfo> getAllByEntity(@Param("sysBaseSetInfo")SysBaseSetInfo sysBaseSetInfo);
/**
* 获取基数配置
* @Author fxj
* @Date 2019-10-08
* @param sysBaseSetInfo
* @return
**/
List<SysBaseSetInfo> getSysBaseSetInfoNoPage(@Param("sysBaseSetInfo")SysBaseSetInfo sysBaseSetInfo);
/** /**
* @Author fxj * @Author fxj
* @Description 获取对应户名称的公积金基数信息 * @Description 获取对应户名称的公积金基数信息
......
...@@ -23,6 +23,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 社保公积金查询表 * 社保公积金查询表
* *
...@@ -37,4 +40,21 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -37,4 +40,21 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
* @return * @return
*/ */
IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, @Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo); IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, @Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
/**
* @Description: 获取可生成预估的社保
* @Author: hgw
* @Date: 2022/7/19 19:09
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo>
**/
List<TSocialFundInfo> getSocialList(@Param("empIdCard") String empIdCard, @Param("settleDomainIds") List<String> settleDomainIds);
/**
* @Description: 获取可生成预估的公积金
* @Author: hgw
* @Date: 2022/7/19 19:09
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo>
**/
List<TSocialFundInfo> getFundList(@Param("empIdCard") String empIdCard, @Param("settleDomainIds") List<String> settleDomainIds);
} }
...@@ -20,12 +20,13 @@ package com.yifu.cloud.plus.v1.yifu.social.service; ...@@ -20,12 +20,13 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary; import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
...@@ -46,4 +47,26 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> { ...@@ -46,4 +47,26 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void listExport(HttpServletResponse response, TForecastLibrary searchVo); void listExport(HttpServletResponse response, TForecastLibrary searchVo);
List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo); List<TForecastLibrary> noPageDiy(TForecastLibrary searchVo);
/**
* @param payMonths 缴纳月
* @param empIdCard 身份证
* @param settleDomainIds 项目id
* @Description: 按缴纳月重新生成
* @Author: hgw
* @Date: 2022/7/18 17:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
R<Boolean> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds);
/**
* @Description: 填充预估实际金额
* @Author: hgw
* @Date: 2020/10/10 16:45
* @return: com.yifu.cloud.v1.hrms.api.entity.TForecastLibrary
**/
TForecastLibrary initForecastLibrary(TForecastLibrary library
, TSocialFundInfo socialInfo, TSocialFundInfo fund, Integer month, boolean isReduceFund
, boolean isReduceSocial, HashMap<String, TAgentConfig> agentConfigMap);
} }
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import java.time.LocalDateTime;
/**
* 公用方法提取
*
* @author fxj
* @date 2019-09-29
**/
@Slf4j
public class ServiceUtil {
private ServiceUtil() {
throw new IllegalStateException("ServiceUtil class");
}
/**
* @Description: 返回字符串对应的int值
* @Author: hgw
* @Date: 2022/7/18 17:29
* @return: int
**/
public static int convertStringToInt(String num1) {
if (Common.isEmpty(num1) || !Common.isNumber(num1)) {
return -1;
}
return Integer.parseInt(num1);
}
/**
* 按派单日期生成生成月份
* @Author fxj
* @Date 2020-03-25
* @param createDate
* @return
**/
public static String initCreateMonth(LocalDateTime createDate, String payMonth){
if (null == createDate || Common.isEmpty(payMonth) || payMonth.length() != 6){
return DateUtil.getYearAndMonth(LocalDateTime.now(), 1);
}
if (createDate.getYear() < Integer.parseInt(payMonth.substring(0,4))){
return payMonth;
}
if (createDate.getYear() > Integer.parseInt(payMonth.substring(0,4))){
return DateUtil.getYearAndMonth(createDate, 1);
}
if (createDate.getYear() == Integer.parseInt(payMonth.substring(0,4))){
if (createDate.getMonthValue() < Integer.parseInt(payMonth.substring(4,6))){
return payMonth;
}
if (createDate.getMonthValue() >= Integer.parseInt(payMonth.substring(4,6))){
return DateUtil.getYearAndMonth(createDate, 1);
}
}
return null;
}
}
...@@ -368,4 +368,15 @@ ...@@ -368,4 +368,15 @@
and a.BASE_TYPE = '1' and a.BASE_TYPE = '1'
</where> </where>
</select> </select>
<!--sysBaseSetInfo不分页查询-->
<select id="getSysBaseSetInfoNoPage" resultMap="sysBaseSetInfoMap">
<include refid="base_column_list"/>
FROM sys_base_set_info a
<where>
1=1
<include refid="sysBaseSetInfo_where"/>
</where>
ORDER BY a.apply_start_date desc
</select>
</mapper> </mapper>
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/> <result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentNo" column="PROVIDENT_NO"/> <result property="providentNo" column="PROVIDENT_NO"/>
<result property="dataPush" column="DATA_PUSH"/> <result property="dataPush" column="DATA_PUSH"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
...@@ -101,84 +102,82 @@ ...@@ -101,84 +102,82 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a a.ID,
. a.EMP_ID,
ID a.EMP_NO,
, a.EMP_NAME,
a.EMP_ID, a.EMP_IDCARD,
a.EMP_NO, a.SOCIAL_ID,
a.EMP_NAME, a.SETTLE_DOMAIN_ID,
a.EMP_IDCARD, a.UNIT_ID,
a.SOCIAL_ID, a.PROVIDENT_ID,
a.SETTLE_DOMAIN_ID, a.UNIT_PENSION_FEE,
a.UNIT_ID, a.UNIT_MEDICAL_FEE,
a.PROVIDENT_ID, a.UNIT_UNEMPLOYMENT_FEE,
a.UNIT_PENSION_FEE, a.UNIT_WORK_INJURY_FEE,
a.UNIT_MEDICAL_FEE, a.UNIT_BIRTH_FEE,
a.UNIT_UNEMPLOYMENT_FEE, a.UNIT_BITAILMENT_FEE,
a.UNIT_WORK_INJURY_FEE, a.PERSONAL_PENSION_FEE,
a.UNIT_BIRTH_FEE, a.PERSONAL_MEDICAL_FEE,
a.UNIT_BITAILMENT_FEE, a.PERSONAL_UNEMPLOYMENT_FEE,
a.PERSONAL_PENSION_FEE, a.PERSONAL_BIGAILMENT_FEE,
a.PERSONAL_MEDICAL_FEE, a.SOCIAL_PAY_MONTH,
a.PERSONAL_UNEMPLOYMENT_FEE, a.SOCIAL_CREATE_MONTH,
a.PERSONAL_BIGAILMENT_FEE, a.PROVIDENT_PAY_MONTH,
a.SOCIAL_PAY_MONTH, a.PROVIDENT_CREATE_MONTH,
a.SOCIAL_CREATE_MONTH, a.UNIT_SOCIAL_SUM,
a.PROVIDENT_PAY_MONTH, a.UNIT_FUND_SUM,
a.PROVIDENT_CREATE_MONTH, a.PERSONAL_SOCIAL_SUM,
a.UNIT_SOCIAL_SUM, a.PERSONAL_FUND_SUM,
a.UNIT_FUND_SUM, a.FUND_PROVINCE,
a.PERSONAL_SOCIAL_SUM, a.FUND_CITY,
a.PERSONAL_FUND_SUM, a.FUND_TOWN,
a.FUND_PROVINCE, a.SOCIAL_PROVINCE,
a.FUND_CITY, a.SOCIAL_CITY,
a.FUND_TOWN, a.SOCIAL_TOWN,
a.SOCIAL_PROVINCE, a.UNIT_PENSION_BASE,
a.SOCIAL_CITY, a.UNIT_MEDICAL_BASE,
a.SOCIAL_TOWN, a.UNIT_UNEMPLOYMENT_BASE,
a.UNIT_PENSION_BASE, a.UNIT_INJURY_BASE,
a.UNIT_MEDICAL_BASE, a.UNIT_BIRTH_BASE,
a.UNIT_UNEMPLOYMENT_BASE, a.UNIT_BIGAILMENT_BASE,
a.UNIT_INJURY_BASE, a.PERSONAL_PENSION_BASE,
a.UNIT_BIRTH_BASE, a.PERSONAL_MEDICAL_BASE,
a.UNIT_BIGAILMENT_BASE, a.PERSONAL_UNEMPLOYMENT_BASE,
a.PERSONAL_PENSION_BASE, a.PERSONAL_BIGAILMENT_BASE,
a.PERSONAL_MEDICAL_BASE, a.UNIT_PERSION_PRO,
a.PERSONAL_UNEMPLOYMENT_BASE, a.UNIT_MEDICAL_PRO,
a.PERSONAL_BIGAILMENT_BASE, a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_PERSION_PRO, a.UNIT_INJURY_PRO,
a.UNIT_MEDICAL_PRO, a.UNIT_BIRTH_PRO,
a.UNIT_UNEMPLOYMENT_PRO, a.UNIT_BIGAILMENT_PRO,
a.UNIT_INJURY_PRO, a.PERSONAL_PERSION_PRO,
a.UNIT_BIRTH_PRO, a.PERSONAL_MEDICAL_PRO,
a.UNIT_BIGAILMENT_PRO, a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_PERSION_PRO, a.PERSONAL_BIGAILMENT_PRO,
a.PERSONAL_MEDICAL_PRO, a.UNIT_FUND_BASE,
a.PERSONAL_UNEMPLOYMENT_PRO, a.PERSONAL_FUND_BASE,
a.PERSONAL_BIGAILMENT_PRO, a.UNIT_FUND_PROP,
a.UNIT_FUND_BASE, a.PERSONAL_FUND_PROP,
a.PERSONAL_FUND_BASE, a.REMARK,
a.UNIT_FUND_PROP, a.PROJECT_ID,
a.PERSONAL_FUND_PROP, a.UNIT_NAME,
a.REMARK, a.DEPT_NAME,
a.PROJECT_ID, a.EMP_NATRUE,
a.UNIT_NAME, a.UNIT_INTEREST_FEE,
a.DEPT_NAME, a.PERSONAL_INTEREST_FEE,
a.EMP_NATRUE, a.SOCIAL_HOUSEHOLD,
a.UNIT_INTEREST_FEE, a.SOCIAL_HOUSEHOLD_NAME,
a.PERSONAL_INTEREST_FEE, a.PROVIDENT_HOUSEHOLD,
a.SOCIAL_HOUSEHOLD, a.PROVIDENT_HOUSEHOLD_NAME,
a.SOCIAL_HOUSEHOLD_NAME, a.PROVIDENT_NO,
a.PROVIDENT_HOUSEHOLD, a.DATA_PUSH,
a.PROVIDENT_HOUSEHOLD_NAME, a.DATA_TYPE,
a.PROVIDENT_NO, a.CREATE_BY,
a.DATA_PUSH, a.CREATE_NAME,
a.CREATE_BY, a.CREATE_TIME,
a.CREATE_NAME, a.UPDATE_BY,
a.CREATE_TIME, a.UPDATE_TIME
a.UPDATE_BY,
a.UPDATE_TIME
</sql> </sql>
<sql id="tForecastLibrary_where"> <sql id="tForecastLibrary_where">
<if test="tForecastLibrary != null"> <if test="tForecastLibrary != null">
...@@ -398,6 +397,9 @@ ...@@ -398,6 +397,9 @@
<if test="tForecastLibrary.dataPush != null"> <if test="tForecastLibrary.dataPush != null">
AND a.DATA_PUSH = #{tForecastLibrary.dataPush} AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
</if> </if>
<if test="tForecastLibrary.dataType != null">
AND a.DATA_TYPE = #{tForecastLibrary.dataType}
</if>
<if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''"> <if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''">
AND a.CREATE_BY = #{tForecastLibrary.createBy} AND a.CREATE_BY = #{tForecastLibrary.createBy}
</if> </if>
......
...@@ -637,4 +637,41 @@ ...@@ -637,4 +637,41 @@
<include refid="tSocialFundInfo_where"/> <include refid="tSocialFundInfo_where"/>
</where> </where>
</select> </select>
<!--获取在用社保-->
<select id="getSocialList" resultMap="tSocialFundInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_fund_info a
<where>
a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2'
<if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard}
</if>
<if test="settleDomainIds != null">
AND a.SETTLE_DOMAIN in
<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<!--获取在用公积金-->
<select id="getFundList" resultMap="tSocialFundInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_fund_info a
<where>
a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2'
<if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard}
</if>
<if test="settleDomainIds != null">
AND a.SETTLE_DOMAIN in
<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper> </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