Commit b7380fc2 authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents 35e5e187 b6d19be8
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
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.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; 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.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;
...@@ -117,6 +118,7 @@ public class TEmployeeProject extends BaseEntity { ...@@ -117,6 +118,7 @@ public class TEmployeeProject extends BaseEntity {
*/ */
@Schema(description ="减项时间") @Schema(description ="减项时间")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime leaveTime; private LocalDateTime leaveTime;
/** /**
......
...@@ -215,4 +215,13 @@ public class EmpContractDispatchVo implements Serializable { ...@@ -215,4 +215,13 @@ public class EmpContractDispatchVo implements Serializable {
@ExcelAttribute(name = "客户名称", maxLength = 128) @ExcelAttribute(name = "客户名称", maxLength = 128)
@Schema(description = "客户名称", name = "subjectUnit") @Schema(description = "客户名称", name = "subjectUnit")
private String subjectUnit; private String subjectUnit;
/**
* 合同年限
*/
@NotBlank(message = "合同年限不能为空")
@ExcelAttribute(name = "合同年限", errorInfo = "合同年限不能为空")
@Schema(description = "合同年限", name = "contractTerm")
private String contractTerm;
} }
...@@ -92,6 +92,7 @@ public class InsurancesConstants { ...@@ -92,6 +92,7 @@ public class InsurancesConstants {
* 项目编码不存在 * 项目编码不存在
*/ */
public static final String DEPT_NO_IS_NOT_EXIST = "项目编码不存在"; public static final String DEPT_NO_IS_NOT_EXIST = "项目编码不存在";
/** /**
* 替换员工项目不存在 * 替换员工项目不存在
*/ */
...@@ -399,6 +400,11 @@ public class InsurancesConstants { ...@@ -399,6 +400,11 @@ public class InsurancesConstants {
*/ */
public static final String INSURANCE_BUY_STATUS_TWO_ERROR = "商险投保中,无法减员"; public static final String INSURANCE_BUY_STATUS_TWO_ERROR = "商险投保中,无法减员";
/**
* 商险投保退回,无法减员
*/
public static final String INSURANCE_BUY_STATUS_FOUR_ERROR = "商险投保退回,无法减员";
/** /**
* 商险无效,无法减员 * 商险无效,无法减员
*/ */
...@@ -477,9 +483,9 @@ public class InsurancesConstants { ...@@ -477,9 +483,9 @@ public class InsurancesConstants {
/** /**
* 替换项目ID和原有项目ID相同 * 替换项目编码和原编码一致
*/ */
public static final String DEPT_NO_IDENTICAL = "替换项目ID和原有项目ID相同"; public static final String DEPT_NO_IDENTICAL = "替换项目编码和原编码一致";
/** /**
* 重复数据 * 重复数据
...@@ -673,6 +679,74 @@ public class InsurancesConstants { ...@@ -673,6 +679,74 @@ public class InsurancesConstants {
*/ */
public static final String MONTH_CHANGE = "变更结算月"; public static final String MONTH_CHANGE = "变更结算月";
/**
* 新增的保险公司信息为空
*/
public static final String NEW_COMPANY_IS_EMPTY = "新增的保险公司信息为空";
/**
* 计费方式格式不正确
*/
public static final String COMPANY_BILLING_TYPE_IS_ERROR = "计费方式格式不正确";
/**
* 保险公司名称格式不正确
*/
public static final String COMPANY_NAME_IS_ERROR = "保险公司名称格式不正确";
/**
* 保险公司地址格式不正确
*/
public static final String COMPANY_ADDRESS_IS_ERROR = "保险公司地址格式不正确";
/**
* 保险公司名称不能重复添加
*/
public static final String COMPANY_NAME_IS_USE = "保险公司名称不能重复添加";
/**
* 新增保险公司成功
*/
public static final String NEW_COMPANY_SUCCESS = "新增保险公司成功";
/**
* 修改保险信息公司成功
*/
public static final String UPDATE_COMPANY_SUCCESS = "修改保险信息公司成功";
/**
* 要修改的保险公司id为空
*/
public static final String UPDATE_COMPANY_ID_IS_EMPTY = "要修改的保险公司id为空";
/**
* 要修改的保险公司不存在或已被删除
*/
public static final String COMPANY_IS_DELETE = "要修改的保险公司不存在或已被删除";
/**
* 要修改的保险公司名称格式不正确
*/
public static final String CHANGE_COMPANY_NAME_IS_ERROR = "要修改的保险公司名称格式不正确";
/**
* 当前保险公司的名称已存在对应的商险信息,不能进行修改
*/
public static final String COMPANY_IS_USED = "当前保险公司的名称已存在对应的商险信息,不能进行修改";
......
...@@ -67,18 +67,18 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM ...@@ -67,18 +67,18 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
@Override @Override
public R saveInsuranceCompany(TInsuranceCompany insuranceCompany) { public R saveInsuranceCompany(TInsuranceCompany insuranceCompany) {
if(Common.isEmpty(insuranceCompany)){ if(Common.isEmpty(insuranceCompany)){
return R.failed("新增的信息为空"); return R.failed(InsurancesConstants.NEW_COMPANY_IS_EMPTY);
} }
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String billingType = insuranceCompany.getBillingType(); String billingType = insuranceCompany.getBillingType();
if (!CommonConstants.ZERO_STRING.equals(billingType) && !CommonConstants.ONE_STRING.equals(billingType)){ if (!CommonConstants.ZERO_STRING.equals(billingType) && !CommonConstants.ONE_STRING.equals(billingType)){
return R.failed("计费方式格式不正确"); return R.failed(InsurancesConstants.COMPANY_BILLING_TYPE_IS_ERROR);
} }
if (!ValidityUtil.validate60(insuranceCompany.getCompanyName())){ if (!ValidityUtil.validate60(insuranceCompany.getCompanyName())){
return R.failed("保险公司名称格式不正确"); return R.failed(InsurancesConstants.COMPANY_NAME_IS_ERROR);
} }
if (!ValidityUtil.validate50(insuranceCompany.getCompanyAddress())){ if (!ValidityUtil.validate50(insuranceCompany.getCompanyAddress())){
return R.failed("保险公司地址格式不正确"); return R.failed(InsurancesConstants.COMPANY_ADDRESS_IS_ERROR);
} }
boolean b = companyIsExists(insuranceCompany.getCompanyName()); boolean b = companyIsExists(insuranceCompany.getCompanyName());
if (!b){ if (!b){
...@@ -88,9 +88,9 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM ...@@ -88,9 +88,9 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
insuranceCompany.setDeleteFlag(CommonConstants.ZERO_INT); insuranceCompany.setDeleteFlag(CommonConstants.ZERO_INT);
save(insuranceCompany); save(insuranceCompany);
addOperate(insuranceCompany,user, InsurancesConstants.NEW_INSURANCE_COMPANY); addOperate(insuranceCompany,user, InsurancesConstants.NEW_INSURANCE_COMPANY);
return R.ok("新增成功"); return R.ok(InsurancesConstants.NEW_COMPANY_SUCCESS);
}else{ }else{
return R.failed("保险公司名称不能重复添加"); return R.failed(InsurancesConstants.COMPANY_NAME_IS_USE);
} }
} }
...@@ -106,25 +106,25 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM ...@@ -106,25 +106,25 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String id = insuranceCompany.getId(); String id = insuranceCompany.getId();
if (StringUtils.isEmpty(id)){ if (StringUtils.isEmpty(id)){
return R.failed("要修改的保险公司id为空"); return R.failed(InsurancesConstants.UPDATE_COMPANY_ID_IS_EMPTY);
} }
String billingType = insuranceCompany.getBillingType(); String billingType = insuranceCompany.getBillingType();
if (!CommonConstants.ZERO_STRING.equals(billingType) && !CommonConstants.ONE_STRING.equals(billingType)){ if (!CommonConstants.ZERO_STRING.equals(billingType) && !CommonConstants.ONE_STRING.equals(billingType)){
return R.failed("计费方式格式不正确"); return R.failed(InsurancesConstants.COMPANY_BILLING_TYPE_IS_ERROR);
} }
if (!ValidityUtil.validate50(insuranceCompany.getCompanyAddress())){ if (!ValidityUtil.validate50(insuranceCompany.getCompanyAddress())){
return R.failed("保险公司地址格式不正确"); return R.failed(InsurancesConstants.COMPANY_ADDRESS_IS_ERROR);
} }
LambdaQueryWrapper<TInsuranceCompany> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceCompany> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceCompany::getId,id).eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT); queryWrapper.eq(TInsuranceCompany::getId,id).eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT);
TInsuranceCompany one = this.getOne(queryWrapper); TInsuranceCompany one = this.getOne(queryWrapper);
if (Common.isEmpty(one)){ if (Common.isEmpty(one)){
return R.failed("要修改的保险公司不存在或已被删除"); return R.failed(InsurancesConstants.COMPANY_IS_DELETE);
} }
String companyName = one.getCompanyName(); String companyName = one.getCompanyName();
String newCompanyName = insuranceCompany.getCompanyName(); String newCompanyName = insuranceCompany.getCompanyName();
if (!ValidityUtil.validate60(newCompanyName)){ if (!ValidityUtil.validate60(newCompanyName)){
return R.failed("要修改的保险公司名称格式不正确"); return R.failed(InsurancesConstants.CHANGE_COMPANY_NAME_IS_ERROR);
} }
//如果当前保险公司名称和修改后的名称不同 //如果当前保险公司名称和修改后的名称不同
if (!companyName.equals(insuranceCompany.getCompanyName())){ if (!companyName.equals(insuranceCompany.getCompanyName())){
...@@ -134,24 +134,26 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM ...@@ -134,24 +134,26 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT); .eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT);
List<TInsuranceDetail> list = tInsuranceDetailService.list(detailQueryWrapper); List<TInsuranceDetail> list = tInsuranceDetailService.list(detailQueryWrapper);
if (Common.isNotEmpty(list)){ if (Common.isNotEmpty(list)){
return R.failed("当前保险公司的名称已存在对应的商险信息,不能进行修改"); return R.failed(InsurancesConstants.COMPANY_IS_USED);
}else{ }else{
//校验新的保险公司名称在数据库中是否存在 //校验新的保险公司名称在数据库中是否存在
boolean b = companyIsExists(insuranceCompany.getCompanyName()); boolean b = companyIsExists(insuranceCompany.getCompanyName());
if(b){ if(b){
return R.failed("保险公司名称不能重复"); return R.failed(InsurancesConstants.COMPANY_NAME_IS_USE);
}else { }else {
insuranceCompany.setUpdateBy(user.getId());
insuranceCompany.setUpdateTime(LocalDateTime.now());
updateById(insuranceCompany); updateById(insuranceCompany);
addOperate(insuranceCompany,user, InsurancesConstants.NEW_INSURANCE_COMPANY); addOperate(insuranceCompany,user, InsurancesConstants.NEW_INSURANCE_COMPANY);
return R.ok("修改保险信息公司成功"); return R.ok(InsurancesConstants.UPDATE_COMPANY_SUCCESS);
} }
} }
}else{ }else{
insuranceCompany.setUpdateBy(user.getId()); insuranceCompany.setUpdateBy(user.getId());
insuranceCompany.setUpdateTime(LocalDateTime.now()); insuranceCompany.setUpdateTime(LocalDateTime.now());
updateById(insuranceCompany); updateById(insuranceCompany);
addOperate(one,user, InsurancesConstants.UPDATE_INSURANCE_COMPANY); addOperate(insuranceCompany,user, InsurancesConstants.UPDATE_INSURANCE_COMPANY);
return R.ok("修改保险信息公司成功"); return R.ok(InsurancesConstants.UPDATE_COMPANY_SUCCESS);
} }
} }
/** /**
......
...@@ -2754,7 +2754,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2754,7 +2754,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (!BigDecimalUtils.isNullOrZero(actualPremium)){ if (!BigDecimalUtils.isNullOrZero(actualPremium)){
//变更后为单独结算 //变更后为单独结算
if(CommonConstants.ONE_INT == newSettleType){ if(CommonConstants.ONE_INT == newSettleType){
update(updateWrapper);
//作废旧的数据,生成作废结算信息记录 //作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel cancel = new TInsuranceSettleCancel(); TInsuranceSettleCancel cancel = new TInsuranceSettleCancel();
cancel.setDeptNo(success.getOldDeptNo()); cancel.setDeptNo(success.getOldDeptNo());
...@@ -2764,6 +2763,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2764,6 +2763,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//推送EKP // TODO: 2022/8/2 //推送EKP // TODO: 2022/8/2
TInsuranceSettle byId = tInsuranceSettleService.getById(insuranceDetailId);
//如果已经推送过实际保费,则先作废,再推送新的预估保费和实际保费
if (byId.getIsActualPush() ==1){
}
//新增新的结算数据 //新增新的结算数据
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2909,7 +2913,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2909,7 +2913,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00")); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00"));
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null);
update(updateWrapper); update(updateWrapper);
} }
//变更为合并结算 //变更为合并结算
if (CommonConstants.ZERO_INT == newSettleType){ if (CommonConstants.ZERO_INT == newSettleType){
...@@ -3219,6 +3222,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3219,6 +3222,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//商险投保退回,无法减员
if (CommonConstants.FOUR_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.INSURANCE_BUY_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
Integer reduceHandleStatus = one.getReduceHandleStatus(); Integer reduceHandleStatus = one.getReduceHandleStatus();
if ( null != reduceHandleStatus){ if ( null != reduceHandleStatus){
//当前保单信息的减员状态不为空且不为减员退回时时不能进行导入 //当前保单信息的减员状态不为空且不为减员退回时时不能进行导入
...@@ -3553,6 +3562,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3553,6 +3562,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<DeptChangeCheckParam> successList = new ArrayList<>(); List<DeptChangeCheckParam> successList = new ArrayList<>();
for (int i =0 ;i< deptChangeCheckList.size();i++) { for (int i =0 ;i< deptChangeCheckList.size();i++) {
DeptChangeCheckParam param = deptChangeCheckList.get(i); DeptChangeCheckParam param = deptChangeCheckList.get(i);
//变更后的项目
String newDeptNo = param.getNewDeptNo(); String newDeptNo = param.getNewDeptNo();
if(StringUtils.isBlank(newDeptNo)){ if(StringUtils.isBlank(newDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_NOT_EMPTY); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_NOT_EMPTY);
...@@ -3573,7 +3583,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3573,7 +3583,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//所属项目 //项目
String oldDeptNo = param.getOldDeptNo(); String oldDeptNo = param.getOldDeptNo();
if(StringUtils.isBlank(oldDeptNo)){ if(StringUtils.isBlank(oldDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_EMPTY); param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_EMPTY);
...@@ -3638,7 +3648,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3638,7 +3648,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (MapUtils.isEmpty(data)){ if (MapUtils.isEmpty(data)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_IS_NOT_EXIST); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_IS_NOT_EXIST);
errorList.add(param); errorList.add(param);
continue; continue;
}else { }else {
......
...@@ -68,9 +68,9 @@ public class TDispatchInfoExportVo { ...@@ -68,9 +68,9 @@ public class TDispatchInfoExportVo {
@ExcelProperty("社保公积金类型") @ExcelProperty("社保公积金类型")
private String typeSub; private String typeSub;
@ExcelAttribute(name = "单位名称", maxLength = 50) @ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "单位名称") @Schema(description = "客户名称")
@ExcelProperty("单位名称") @ExcelProperty("客户名称")
private String belongUnitName; private String belongUnitName;
@ExcelAttribute(name = "项目名称", maxLength = 50) @ExcelAttribute(name = "项目名称", maxLength = 50)
...@@ -113,6 +113,36 @@ public class TDispatchInfoExportVo { ...@@ -113,6 +113,36 @@ public class TDispatchInfoExportVo {
@ExcelProperty("社保办理状态") @ExcelProperty("社保办理状态")
private String socialHandleStatus; private String socialHandleStatus;
@ExcelAttribute(name = "养老状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "养老办理状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("养老状态" )
private String pensionHandle;
@ExcelAttribute(name = "医疗状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "医疗状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("医疗状态" )
private String medicalHandle;
@ExcelAttribute(name = "失业状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "失业办理状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("失业状态" )
private String unemployHandle;
@ExcelAttribute(name = "工伤状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "工伤状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("工伤状态" )
private String workInjuryHandle;
@ExcelAttribute(name = "生育状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "生育状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("生育状态" )
private String birthHandle;
@ExcelAttribute(name = "大病状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "大病状态:0待办理1办理成功2办理失败3已派减" )
@ExcelProperty("大病状态" )
private String bigailmentHandle;
@ExcelAttribute(name = "公积金办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减") @ExcelAttribute(name = "公积金办理状态", readConverterExp = "0=待办理,1=办理成功,2=办理失败,3=已派减")
@Schema(description = "公积金办理状态:0 待办理 1办理成功 2 办理失败 3 已派减") @Schema(description = "公积金办理状态:0 待办理 1办理成功 2 办理失败 3 已派减")
@ExcelProperty("公积金办理状态") @ExcelProperty("公积金办理状态")
......
...@@ -49,10 +49,15 @@ public class TDispatchInfoSearchVo extends TDispatchInfo { ...@@ -49,10 +49,15 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
private String ids; private String ids;
/** /**
* 创建时间区间 [开始时间,结束时间] * 申请时间起
*/ */
@Schema(description = "创建时间区间") @Schema(description = "申请时间起")
private LocalDateTime[] createTimes; private LocalDateTime createTimeStart;
/**
* 申请时间止
*/
@Schema(description = "申请时间止")
private LocalDateTime createTimeEnd;
/** /**
* @Author fxj * @Author fxj
* 查询数据起 * 查询数据起
......
...@@ -57,7 +57,7 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> { ...@@ -57,7 +57,7 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
/** /**
* @param socialFundInfo * @param socialFundInfo
* @Description: 批量调基,同步预估库 * @Description: 人员批量调基,同步预估库
* @Author: hgw * @Author: hgw
* @Date: 2022/7/25 17:33 * @Date: 2022/7/25 17:33
* @return: void * @return: void
......
...@@ -210,15 +210,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -210,15 +210,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
idList = searchVo.getIdList(); idList = searchVo.getIdList();
wrapper.in(TDispatchInfo::getId, idList); wrapper.in(TDispatchInfo::getId, idList);
} }
if (Common.isNotNull(searchVo.getCreateTimeStart())) {
wrapper.ge(TDispatchInfo::getCreateTime, searchVo.getCreateTimeStart());
}
if (Common.isNotNull(searchVo.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, searchVo.getCreateTimeEnd());
}
return baseMapper.selectCount(wrapper); return baseMapper.selectCount(wrapper);
} }
private LambdaQueryWrapper buildQueryWrapper(TDispatchInfoSearchVo entity) { private LambdaQueryWrapper buildQueryWrapper(TDispatchInfoSearchVo entity) {
LambdaQueryWrapper<TDispatchInfo> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TDispatchInfo> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) { if (Common.isNotNull(entity.getCreateTimeStart())) {
wrapper.ge(TDispatchInfo::getCreateTime, entity.getCreateTimes()[0]) wrapper.ge(TDispatchInfo::getCreateTime, entity.getCreateTimeStart());
.le(TDispatchInfo::getCreateTime, }
entity.getCreateTimes()[1]); if (Common.isNotNull(entity.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, entity.getCreateTimeEnd());
} }
if (Common.isNotNull(entity.getCreateName())) { if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TDispatchInfo::getCreateName, entity.getCreateName()); wrapper.eq(TDispatchInfo::getCreateName, entity.getCreateName());
...@@ -335,6 +342,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -335,6 +342,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
EmpDispatchAddVo addVo = new EmpDispatchAddVo(); EmpDispatchAddVo addVo = new EmpDispatchAddVo();
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
empVo = null;
excel = excelVOList.get(i); excel = excelVOList.get(i);
fundSet = fundHoldMap.get(excel.getProvidentHousehold()); fundSet = fundHoldMap.get(excel.getProvidentHousehold());
socialSet = socialHoldMap.get(excel.getSocialHousehold()); socialSet = socialHoldMap.get(excel.getSocialHousehold());
...@@ -439,6 +447,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -439,6 +447,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
projectsMap = res.getData().getProjectsMap(); projectsMap = res.getData().getProjectsMap();
} }
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
contract = null;
social = null;
project = null;
fund = null;
excel = excelVOList.get(i); excel = excelVOList.get(i);
if (Common.isNotNull(excelVOTemp) && Common.isNotNull(excelVOTemp.get(excel.getEmpIdcard()))){ if (Common.isNotNull(excelVOTemp) && Common.isNotNull(excelVOTemp.get(excel.getEmpIdcard()))){
continue; continue;
...@@ -819,8 +831,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -819,8 +831,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
SysBaseSetInfo fundSet, SysBaseSetInfo fundSet,
TDispatchImportVo excel, TDispatchImportVo excel,
TSocialFundInfo socialFund) { TSocialFundInfo socialFund) {
TDispatchInfo dispatch; TDispatchInfo dispatch = new TDispatchInfo();
dispatch = new TDispatchInfo();
// 初始化派单项 // 初始化派单项
initAddHandleItem(excel, socialFund,dispatch,socialSet); initAddHandleItem(excel, socialFund,dispatch,socialSet);
dispatch.setOrganName(user.getDeptName()); dispatch.setOrganName(user.getDeptName());
...@@ -875,10 +886,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -875,10 +886,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setEmpId(empVo.getId()); dispatch.setEmpId(empVo.getId());
dispatch.setEmpNo(empVo.getEmpNo()); dispatch.setEmpNo(empVo.getEmpNo());
// 封装合同信息 如果有合同取值实际合同信息 // 封装合同信息 如果有合同取值实际合同信息
dispatch.setContractStart(empVo.getContractStart()); if (Common.isNotNull(empVo.getContractStart())){
dispatch.setContractEnd(empVo.getContractEnd()); dispatch.setContractStart(empVo.getContractStart());
dispatch.setContractTerm(empVo.getContractTerm()); dispatch.setContractEnd(empVo.getContractEnd());
dispatch.setContractType(empVo.getContractType()); dispatch.setContractTerm(empVo.getContractTerm());
dispatch.setContractType(empVo.getContractType());
}
dispatch.setFileProvince(empVo.getFileProvince()); dispatch.setFileProvince(empVo.getFileProvince());
dispatch.setFileCity(empVo.getFileCity()); dispatch.setFileCity(empVo.getFileCity());
dispatch.setFileTown(empVo.getFileTown()); dispatch.setFileTown(empVo.getFileTown());
...@@ -1005,6 +1018,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1005,6 +1018,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund.setPayPolicy(fundSet.getPayPolicy()); fund.setPayPolicy(fundSet.getPayPolicy());
fund.setLowerLimit(fundSet.getLowerLimit()); fund.setLowerLimit(fundSet.getLowerLimit());
fund.setUpperLimit(fundSet.getUpperLimit()); fund.setUpperLimit(fundSet.getUpperLimit());
fund.setInsuranceIsLatestCardinality(fundSet.getInsuranceIsLatestCardinality());
if (Common.isNotNull(fundSet.getProvince())){ if (Common.isNotNull(fundSet.getProvince())){
fund.setFundProvince(Integer.toString(fundSet.getProvince())); fund.setFundProvince(Integer.toString(fundSet.getProvince()));
} }
...@@ -1356,10 +1370,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1356,10 +1370,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setContractSubName(excel.getContractSubName()); contract.setContractSubName(excel.getContractSubName());
contract.setDeptNo(excel.getSettleDomainCode()); contract.setDeptNo(excel.getSettleDomainCode());
contract.setPost(excel.getPost()); contract.setPost(excel.getPost());
contract.setSituation(excel.getContractType()); contract.setSituation("正常签订");
contract.setEmpIdcard(excel.getEmpIdcard()); contract.setEmpIdcard(excel.getEmpIdcard());
contract.setEmpName(excel.getEmpName()); contract.setEmpName(excel.getEmpName());
contract.setWorkingHours(excel.getWorkingHours()); contract.setWorkingHours(excel.getWorkingHours());
contract.setContractTerm(excel.getContractTerm());
if (Common.isNotNull(excel.getSocialHousehold())){ if (Common.isNotNull(excel.getSocialHousehold())){
contract.setContractParty(excel.getSocialHousehold()); contract.setContractParty(excel.getSocialHousehold());
} }
...@@ -2528,6 +2543,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2528,6 +2543,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Date now = new Date(); Date now = new Date();
StringBuffer temp = new StringBuffer(); StringBuffer temp = new StringBuffer();
for (TDispatchInfo dis : disList) { for (TDispatchInfo dis : disList) {
auditInfo = new TAuditInfo();
if (Common.isNotNull(socialFundMap)){ if (Common.isNotNull(socialFundMap)){
sf = socialFundMap.get(dis.getEmpIdcard()); sf = socialFundMap.get(dis.getEmpIdcard());
} }
...@@ -2575,7 +2591,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2575,7 +2591,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
socialMapper.updateById(socialInfo); socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark)); dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
auditInfo = new TAuditInfo();
auditInfo.setType(CommonConstants.ONE_STRING); auditInfo.setType(CommonConstants.ONE_STRING);
if (CommonConstants.ZERO_INT == flag) { if (CommonConstants.ZERO_INT == flag) {
temp.setLength(CommonConstants.ZERO_INT); temp.setLength(CommonConstants.ZERO_INT);
......
...@@ -1376,6 +1376,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1376,6 +1376,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
social.setPersonalBigailmentMoney(socialSet.getPayPersonal()); social.setPersonalBigailmentMoney(socialSet.getPayPersonal());
} }
} }
} else {
social.setUnitBigailmentCardinal(BigDecimal.ZERO);
social.setUnitBigailmentPer(BigDecimal.ZERO);
social.setUnitBigailmentMoney(BigDecimal.ZERO);
social.setPersonalBigailmentCardinal(BigDecimal.ZERO);
social.setPersonalBigailmentPer(BigDecimal.ZERO);
social.setPersonalBigailmentMoney(BigDecimal.ZERO);
} }
} else if (social.getUnitWorkInjuryCardinal() != null) { } else if (social.getUnitWorkInjuryCardinal() != null) {
social.setUnitWorkUnjuryPer(socialSet.getUnitInjuryPro()); social.setUnitWorkUnjuryPer(socialSet.getUnitInjuryPro());
......
...@@ -117,6 +117,12 @@ ...@@ -117,6 +117,12 @@
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/> <result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="status" column="STATUS"/> <result property="status" column="STATUS"/>
<result property="socialHandleStatus" column="SOCIAL_HANDLE_STATUS"/> <result property="socialHandleStatus" column="SOCIAL_HANDLE_STATUS"/>
<result property="pensionHandle" column="PENSION_HANDLE"/>
<result property="medicalHandle" column="MEDICAL_HANDLE"/>
<result property="unemployHandle" column="UNEMPLOY_HANDLE"/>
<result property="workInjuryHandle" column="WORK_INJURY_HANDLE"/>
<result property="birthHandle" column="BIRTH_HANDLE"/>
<result property="bigailmentHandle" column="BIGAILMENT_HANDLE"/>
<result property="fundHandleStatus" column="FUND_HANDLE_STATUS"/> <result property="fundHandleStatus" column="FUND_HANDLE_STATUS"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="organName" column="ORGAN_NAME"/> <result property="organName" column="ORGAN_NAME"/>
...@@ -388,16 +394,18 @@ ...@@ -388,16 +394,18 @@
AND a.BELONG_UNIT_NAME = #{tDispatchInfo.belongUnitName} AND a.BELONG_UNIT_NAME = #{tDispatchInfo.belongUnitName}
</if> </if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND s.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName} AND s.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if> </if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"> <if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName} AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if> </if>
<if test="tDispatchInfo.createTimes != null and tDispatchInfo.createTimes.length>0"> <if test="tDispatchInfo.createTimeStart != null and tDispatchInfo.createTimeStart.trim() != ''">
AND a.UPDATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimes[0]} AND a.CREATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimeStart}
AND a.UPDATE_TIME <![CDATA[ <= ]]> #{tDispatchInfo.createTimes[1]} </if>
</if> <if test="tDispatchInfo.createTimeEnd != null and tDispatchInfo.createTimeEnd.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tDispatchInfo.createTimeEnd}
</if>
</if> </if>
</sql> </sql>
<!--tDispatchInfo简单分页查询--> <!--tDispatchInfo简单分页查询-->
...@@ -435,6 +443,12 @@ ...@@ -435,6 +443,12 @@
f.PROVIDENT_HOUSEHOLD_NAME, f.PROVIDENT_HOUSEHOLD_NAME,
a.STATUS, a.STATUS,
a.SOCIAL_HANDLE_STATUS, a.SOCIAL_HANDLE_STATUS,
s.PENSION_HANDLE,
s.MEDICAL_HANDLE,
s.UNEMPLOY_HANDLE,
s.WORK_INJURY_HANDLE,
s.BIGAILMENT_HANDLE,
s.BIGAILMENT_HANDLE,
a.FUND_HANDLE_STATUS, a.FUND_HANDLE_STATUS,
a.CREATE_NAME, a.CREATE_NAME,
a.ORGAN_NAME, a.ORGAN_NAME,
......
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