Commit c16097ca authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.9' into MVP1.7.9

parents 6b3b7450 488c396e
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.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -42,6 +43,7 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -42,6 +43,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "就职岗位") @Schema(description = "就职岗位")
private String position; private String position;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "入职日期") @Schema(description = "入职日期")
private Date joinLeaveDate; private Date joinLeaveDate;
...@@ -75,6 +77,7 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -75,6 +77,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "数据来源") @Schema(description = "数据来源")
private String dataSource; private String dataSource;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "预计收集时间") @Schema(description = "预计收集时间")
private LocalDateTime expectedCollectionTime; private LocalDateTime expectedCollectionTime;
...@@ -104,6 +107,7 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -104,6 +107,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "确认人") @Schema(description = "确认人")
private String confirmUser; private String confirmUser;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "确认时间") @Schema(description = "确认时间")
private Date confirmTime; private Date confirmTime;
......
...@@ -33,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EmployeePreLogListVo; ...@@ -33,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EmployeePreLogListVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceExitCheckVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceExitCheckVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -494,11 +493,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -494,11 +493,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} else { } else {
return R.failed("保险公司、险种、购买标准、保单起、止日期不可同时重复!"); return R.failed("保险公司、险种、购买标准、保单起、止日期不可同时重复!");
} }
// 2:是否工作日判断
String error = checkInsuranceBuy(insurancePreVo);
if (null != error) {
return R.failed(error);
}
insurancePreVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard()); insurancePreVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard());
insurancePreVo.setDeptNo(employeeRegistrationPre.getDeptNo()); insurancePreVo.setDeptNo(employeeRegistrationPre.getDeptNo());
...@@ -785,35 +779,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -785,35 +779,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
private String checkInsuranceBuy(TEmployeeInsurancePre preVo) {
//新增判断保单开始日期
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
R<Boolean> dataR;
if (preVo.getBuyType() == 1) {
vo.setRegistDate(preVo.getPolicyStart());
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "新增类型的保单开始日期不能为工作日;";
}
}
if (preVo.getBuyType() == 3 && Common.isNotNull(preVo.getExpectedCollectionTime())){
// 将 LocalDateTime 转换为 java.util.Date
vo.setRegistDate(DateUtil.convertToDateByLocalDateTime(preVo.getExpectedCollectionTime()));
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "批增类型的预计派单日期不能为工作日;";
}
}
if (preVo.getBuyType() == 4 && Common.isNotNull(preVo.getExpectedCollectionTime())){
vo.setRegistDate(DateUtil.convertToDateByLocalDateTime(preVo.getExpectedCollectionTime()));
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "替换类型的预计派单日期不能为工作日;";
}
}
return null;
}
// 商险是否存在判断 type 1 单个接收 2 批量接收 // 商险是否存在判断 type 1 单个接收 2 批量接收
private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo) { private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo) {
//查询入职确认信息数据 //查询入职确认信息数据
......
...@@ -126,7 +126,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -126,7 +126,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
return wrapper; return wrapper;
} }
private SerializerFeature[] features = new SerializerFeature[]{ private static final SerializerFeature[] features = new SerializerFeature[]{
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty, WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty, WriteDateUseDateFormat WriteNullStringAsEmpty, WriteDateUseDateFormat
}; };
......
...@@ -644,11 +644,30 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -644,11 +644,30 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TEmployeeInsuranceExitCheckVo checkVo; TEmployeeInsuranceExitCheckVo checkVo;
List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>(); List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>();
R<TEmployeeInsuranceWorkDayVo> dataR;
for (EmployeeRegistration registration:registrationList) { for (EmployeeRegistration registration:registrationList) {
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0); TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0);
insurancePreVo.setEmpIdcard(registration.getEmpIdcard()); insurancePreVo.setEmpIdcard(registration.getEmpIdcard());
insurancePreVo.setDeptNo(registration.getDeptNo()); insurancePreVo.setDeptNo(registration.getDeptNo());
//日期赋值
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(registration.getJoinLeaveDate());
dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())
&& Common.isNotNull(dataR.getData().getPriDisDate())) {
insurancePreVo.setExpectedCollectionTime(dataR.getData().getPriDisDate());
insurancePreVo.setPolicyEffect(dataR.getData().getRegistDate());
if (Common.isEmpty(insurancePreVo.getPolicyStart())) {
insurancePreVo.setPolicyStart(dataR.getData().getRegistDate());
}
} else {
insurancePreVo.setExpectedCollectionTime(registration.getJoinLeaveDate());
insurancePreVo.setPolicyEffect(registration.getJoinLeaveDate());
insurancePreVo.setPolicyStart(registration.getJoinLeaveDate());
}
//商险是否存在判断 //商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo, registration.getEmployeeName(), registration.getEmpIdcard()); checkVo = checkInsuranceExit(insurancePreVo, registration.getEmployeeName(), registration.getEmpIdcard());
if (null != checkVo) { if (null != checkVo) {
...@@ -1208,58 +1227,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1208,58 +1227,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setUpdateBy(user.getId()); preVo.setUpdateBy(user.getId());
//预计派单日期 //预计派单日期
if (Common.isEmpty(preVo.getExpectedCollectionTime()) && Common.isNotNull(preVo.getPolicyStartType()) && CommonConstants.ONE_STRING.equals(preVo.getPolicyStartType())) { // if (Common.isEmpty(preVo.getExpectedCollectionTime()) && Common.isNotNull(preVo.getPolicyStartType()) && CommonConstants.ONE_STRING.equals(preVo.getPolicyStartType())) {
//新增选择保单开始日期类型= 默认等于入职日期 // //新增选择保单开始日期类型= 默认等于入职日期
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); // TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); // dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(preVo.getJoinLeaveDate()); // dayVo.setRegistDate(preVo.getJoinLeaveDate());
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo); // R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData()) // if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate()) // && Common.isNotNull(dataR.getData().getRegistDate())
&& Common.isNotNull(dataR.getData().getPriDisDate())) { // && Common.isNotNull(dataR.getData().getPriDisDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getPriDisDate()); // preVo.setExpectedCollectionTime(dataR.getData().getPriDisDate());
preVo.setPolicyEffect(dataR.getData().getRegistDate()); // preVo.setPolicyEffect(dataR.getData().getRegistDate());
preVo.setPolicyStart(dataR.getData().getRegistDate()); // preVo.setPolicyStart(dataR.getData().getRegistDate());
} else { // } else {
preVo.setExpectedCollectionTime(preVo.getJoinLeaveDate()); // preVo.setExpectedCollectionTime(preVo.getJoinLeaveDate());
preVo.setPolicyEffect(preVo.getJoinLeaveDate()); // preVo.setPolicyEffect(preVo.getJoinLeaveDate());
preVo.setPolicyStart(preVo.getJoinLeaveDate()); // preVo.setPolicyStart(preVo.getJoinLeaveDate());
} // }
// }
}
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString( preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE)); preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
} }
//商险的工作日判断 type 1 单个接收 2 批量接收
private String checkInsuranceBuy(TEmployeeInsurancePreVo preVo,String type) {
//新增判断保单开始日期
TEmployeeInsuranceWorkDayVo vo = new TEmployeeInsuranceWorkDayVo();
R<Boolean> dataR;
if (preVo.getBuyType() == 1) {
vo.setRegistDate(preVo.getPolicyStart());
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "新增类型的保单开始日期不能为工作日;";
}
}
if (preVo.getBuyType() == 3 && CommonConstants.ONE_STRING.equals(type)){
vo.setRegistDate(preVo.getExpectedCollectionTime());
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "批增类型的预计派单日期不能为工作日;";
}
}
if (preVo.getBuyType() == 4 && CommonConstants.ONE_STRING.equals(type)){
vo.setRegistDate(preVo.getExpectedCollectionTime());
dataR = socialDaprUtils.checkIsWorkDay(vo);
if (Common.isNotNull(dataR) && Boolean.TRUE.equals(dataR.getData())) {
return "替换类型的预计派单日期不能为工作日;";
}
}
return null;
}
//商险是否存在判断 //商险是否存在判断
private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,String empName,String empIdcard) { private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,String empName,String empIdcard) {
//查询入职确认信息数据 //查询入职确认信息数据
...@@ -1269,7 +1258,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1269,7 +1258,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//查询商险数据 //查询商险数据
TInsuranceDetail insuranceDetail= null; TInsuranceDetail insuranceDetail= null;
R<TEmployeeInsuranceSelectVo> dataInsurR = insuranceDaprUtil.selectInsuranceInfo(preVo); R<TEmployeeInsuranceSelectVo> dataInsurR = insuranceDaprUtil.selectInsuranceInfo(preVo);
if (Common.isNotNull(dataInsurR) && Common.isNotNull(dataInsurR.getData().getInsuranceDetail())) { if (Common.isNotNull(dataInsurR) && Common.isNotNull(dataInsurR.getData())&& Common.isNotNull(dataInsurR.getData().getInsuranceDetail())) {
insuranceDetail = dataInsurR.getData().getInsuranceDetail(); insuranceDetail = dataInsurR.getData().getInsuranceDetail();
} }
//二次确认接收场景 //二次确认接收场景
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
...@@ -136,6 +137,7 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -136,6 +137,7 @@ public class TInsuranceDetail extends BaseEntity {
* 办理时间 * 办理时间
*/ */
@Schema(description = "办理时间") @Schema(description = "办理时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime batchDate; private LocalDateTime batchDate;
/** /**
...@@ -289,6 +291,7 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -289,6 +291,7 @@ public class TInsuranceDetail extends BaseEntity {
* 商险办理时间 * 商险办理时间
*/ */
@Schema(description = "商险办理时间") @Schema(description = "商险办理时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime handledTime; private LocalDateTime handledTime;
/** /**
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -17,6 +18,7 @@ import java.util.Date; ...@@ -17,6 +18,7 @@ import java.util.Date;
* @date 2025-03-31 12:25:13 * @date 2025-03-31 12:25:13
*/ */
@Data @Data
@ColumnWidth(18)
public class TEmployeeInsurancePreExportVo implements Serializable { public class TEmployeeInsurancePreExportVo implements Serializable {
/** /**
......
...@@ -37,7 +37,7 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran ...@@ -37,7 +37,7 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
void updateBatchById(@Param("idList") List<String> idList); void updateBatchById(@Param("idList") List<String> idList);
List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration); List<TEmployeeInsurancePreExportVo> selectExportList(@Param("tEmployeeInsurancePre") TEmployeeInsurancePreSearchVo employeeRegistration);
List<TEmployeeInsurancePre> getAllUnconfimData(); List<TEmployeeInsurancePre> getAllUnconfimData();
......
...@@ -226,20 +226,20 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -226,20 +226,20 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setInsurancePreId(insurancePre.getId()); addParam.setInsurancePreId(insurancePre.getId());
batchAddParamList.add(addParam); batchAddParamList.add(addParam);
} }
if (CommonConstants.THREE_INT == insurancePre.getBuyType()) { if (CommonConstants.FOUR_INT == insurancePre.getBuyType()) {
InsuranceReplaceParam addParam = new InsuranceReplaceParam(); InsuranceReplaceParam addParam = new InsuranceReplaceParam();
addParam.setEmpName(insurancePre.getEmployeeName()); addParam.setEmpName(insurancePre.getReplaceEmployeeName());
addParam.setEmpIdcardNo(insurancePre.getEmpIdcard()); addParam.setEmpIdcardNo(insurancePre.getReplaceEmpIdcard());
addParam.setDeptNo(insurancePre.getDeptNo()); addParam.setDeptNo(insurancePre.getReplaceDeptNo());
addParam.setInsuranceCompanyName(insurancePre.getInsuranceCompanyName()); addParam.setInsuranceCompanyName(insurancePre.getInsuranceCompanyName());
addParam.setInsuranceTypeName(insurancePre.getInsuranceTypeName()); addParam.setInsuranceTypeName(insurancePre.getInsuranceTypeName());
addParam.setBuyStandard(insurancePre.getBuyStandard()); addParam.setBuyStandard(insurancePre.getBuyStandard());
addParam.setPolicyStart(DateUtil.dateToString(insurancePre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)); addParam.setPolicyStart(DateUtil.dateToString(insurancePre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT));
addParam.setPolicyEnd(DateUtil.dateToString(insurancePre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)); addParam.setPolicyEnd(DateUtil.dateToString(insurancePre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT));
addParam.setPost(insurancePre.getPosition()); addParam.setPost(insurancePre.getPosition());
addParam.setReplaceEmpName(insurancePre.getReplaceEmployeeName()); addParam.setReplaceEmpName(insurancePre.getEmployeeName());
addParam.setReplaceDeptNo(insurancePre.getReplaceDeptNo()); addParam.setReplaceDeptNo(insurancePre.getDeptNo());
addParam.setReplaceEmpIdcardNo(insurancePre.getReplaceEmpIdcard()); addParam.setReplaceEmpIdcardNo(insurancePre.getEmpIdcard());
addParam.setRemark(CommonConstants.EMPTY_STRING); addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId()); addParam.setInsurancePreId(insurancePre.getId());
replaceAddParamList.add(addParam); replaceAddParamList.add(addParam);
......
...@@ -2979,12 +2979,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2979,12 +2979,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示) // 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if(!LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR);
listResult.add(param); listResult.add(param);
continue; continue;
} }
if(!LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE);
listResult.add(param); listResult.add(param);
continue; continue;
...@@ -3347,12 +3347,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3347,12 +3347,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示) // 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if(!LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR);
listResult.add(param); listResult.add(param);
continue; continue;
} }
if(!LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE);
listResult.add(param); listResult.add(param);
continue; continue;
...@@ -3564,18 +3564,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3564,18 +3564,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); // TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getReplaceEmpName()); // checkIdCard.setName(param.getReplaceEmpName());
checkIdCard.setIdCard(param.getReplaceEmpIdcardNo()); // checkIdCard.setIdCard(param.getReplaceEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); // R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){ // if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
TCheckIdCard data = tCheckIdCardR.getData(); // TCheckIdCard data = tCheckIdCardR.getData();
if (CommonConstants.ONE_INT != data.getIsTrue()){ // if (CommonConstants.ONE_INT != data.getIsTrue()){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT); // param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param); // listResult.add(param);
continue; // continue;
} // }
} // }
if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){ if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME); param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME);
...@@ -6470,12 +6470,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6470,12 +6470,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示) // 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if(!LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
if(!LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){ if(Common.isNotNull(param.getSettleMonth()) && !LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE);
errorList.add(param); errorList.add(param);
continue; continue;
...@@ -8295,8 +8295,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8295,8 +8295,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getBuyStandard, preVo.getBuyStandard()) .eq(TInsuranceDetail::getBuyStandard, preVo.getBuyStandard())
.eq(TInsuranceDetail::getInsuranceTypeName, preVo.getInsuranceTypeName()) .eq(TInsuranceDetail::getInsuranceTypeName, preVo.getInsuranceTypeName())
.eq(TInsuranceDetail::getInsuranceCompanyName, preVo.getInsuranceCompanyName()) .eq(TInsuranceDetail::getInsuranceCompanyName, preVo.getInsuranceCompanyName())
.eq(TInsuranceDetail::getPolicyStart, preVo.getPolicyStart()) .eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(DateUtil.dateToString(preVo.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.eq(TInsuranceDetail::getPolicyEnd, preVo.getPolicyEnd()) .eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(DateUtil.dateToString(preVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
//有效 //有效
.and(wrapper -> wrapper.eq(TInsuranceDetail::getIsEffect, CommonConstants.ZERO_INT) .and(wrapper -> wrapper.eq(TInsuranceDetail::getIsEffect, CommonConstants.ZERO_INT)
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
<result property="replaceEmpIdcard" column="replace_emp_idcard"/> <result property="replaceEmpIdcard" column="replace_emp_idcard"/>
<result property="replaceDeptNo" column="replace_dept_no"/> <result property="replaceDeptNo" column="replace_dept_no"/>
<result property="configName" column="config_name"/> <result property="configName" column="config_name"/>
<result property="insurancesId" column="insurances_id"/>
<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"/>
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
a.create_name, a.create_name,
a.create_time, a.create_time,
a.update_by, a.update_by,
a.update_time,a.policy_no,a.config_name,a.policy_effect a.update_time,a.policy_no,a.config_name,a.policy_effect,a.insurances_id
</sql> </sql>
<sql id="tEmployeeInsurancePre_where"> <sql id="tEmployeeInsurancePre_where">
<if test="tEmployeeInsurancePre != null"> <if test="tEmployeeInsurancePre != null">
...@@ -181,7 +182,7 @@ ...@@ -181,7 +182,7 @@
AND a.is_address = #{tEmployeeInsurancePre.isAddress} AND a.is_address = #{tEmployeeInsurancePre.isAddress}
</if> </if>
<if test="tEmployeeInsurancePre.position != null and tEmployeeInsurancePre.position.trim() != ''"> <if test="tEmployeeInsurancePre.position != null and tEmployeeInsurancePre.position.trim() != ''">
AND a.position = #{tEmployeeInsurancePre.position} AND a.position like CONCAT('%',#{tEmployeeInsurancePre.position},'%')
</if> </if>
<if test="tEmployeeInsurancePre.dataSource != null and tEmployeeInsurancePre.dataSource.trim() != ''"> <if test="tEmployeeInsurancePre.dataSource != null and tEmployeeInsurancePre.dataSource.trim() != ''">
AND a.data_source = #{tEmployeeInsurancePre.dataSource} AND a.data_source = #{tEmployeeInsurancePre.dataSource}
...@@ -225,6 +226,7 @@ ...@@ -225,6 +226,7 @@
1=1 1=1
<include refid="tEmployeeInsurancePre_where"/> <include refid="tEmployeeInsurancePre_where"/>
</where> </where>
order by a.create_time desc
</select> </select>
<!--tEmployeeInsurancePre不分页查询--> <!--tEmployeeInsurancePre不分页查询-->
...@@ -236,6 +238,7 @@ ...@@ -236,6 +238,7 @@
1=1 1=1
<include refid="tEmployeeInsurancePre_where"/> <include refid="tEmployeeInsurancePre_where"/>
</where> </where>
order by a.create_time desc
</select> </select>
<!--查询list,用来对比,记录日志--> <!--查询list,用来对比,记录日志-->
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
WHEN a.buy_type='3' THEN "批增" WHEN a.buy_type='3' THEN "批增"
WHEN a.buy_type ='4' THEN "替换" WHEN a.buy_type ='4' THEN "替换"
ELSE a.buy_type END as buy_type, ELSE a.buy_type END as buy_type,
if(a.is_address = '0','是','否') as is_address if(a.is_address = '0','是',if(a.is_address = '1','否','')) as is_address
FROM t_employee_insurance_pre a FROM t_employee_insurance_pre a
<where> <where>
1=1 1=1
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 离职原因税友自动化配置表
*
* @author hgw
* @date 2025-04-14 11:57:06
*/
@Data
@TableName("t_social_friend_reduce_set")
@Schema(description = "离职原因税友自动化配置表")
public class TSocialFriendReduceSet {
/**
* 减少原因ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("减少原因ID")
@Schema(description = "减少原因ID")
private String id;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因", maxLength = 32)
@Length(max = 32, message = "减少原因不能超过32个字符")
@ExcelProperty("减少原因")
@Schema(description = "减少原因")
private String reduceReasonName;
/**
* 中断原因
*/
@ExcelAttribute(name = "中断原因", maxLength = 32)
@Length(max = 32, message = "中断原因不能超过32个字符")
@ExcelProperty("中断原因")
@Schema(description = "中断原因")
private String tbyy;
/**
* 劳动用工备案解除/终止原因
*/
@ExcelAttribute(name = "劳动用工备案解除/终止原因", maxLength = 32)
@Length(max = 32, message = "劳动用工备案解除/终止原因不能超过32个字符")
@ExcelProperty("劳动用工备案解除/终止原因")
@Schema(description = "劳动用工备案解除/终止原因")
private String zzyy;
/**
* 备案解除二级原因
*/
@ExcelAttribute(name = "备案解除二级原因", maxLength = 32)
@Length(max = 32, message = "备案解除二级原因不能超过32个字符")
@ExcelProperty("备案解除二级原因")
@Schema(description = "备案解除二级原因")
private String bajcejyy;
}
...@@ -106,4 +106,7 @@ public class SociaFriendYgsAddVo implements Serializable { ...@@ -106,4 +106,7 @@ public class SociaFriendYgsAddVo implements Serializable {
@ExcelProperty("派单类型") @ExcelProperty("派单类型")
private String type; private String type;
@ExcelProperty("备案解除二级原因")
private String bajcejyy;
} }
...@@ -474,6 +474,7 @@ public class SocialFriendConfig { ...@@ -474,6 +474,7 @@ public class SocialFriendConfig {
// 办理项目 // 办理项目
blxmlbOne.put("blxm", blxm); blxmlbOne.put("blxm", blxm);
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪” // 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
// 2025-4-14 16:03:54 陈红提的:tbyy 、 zzyy 、 bajcejyy 改为按t_social_friend_reduce_set配置来
blxmlbOne.put("tbyy", vo.getTbyy()); blxmlbOne.put("tbyy", vo.getTbyy());
// 中断时间 yyyy-MM-dd 默认当前时间 // 中断时间 yyyy-MM-dd 默认当前时间
blxmlbOne.put("tbsj", DateUtil.getLastDay()); blxmlbOne.put("tbsj", DateUtil.getLastDay());
...@@ -484,6 +485,7 @@ public class SocialFriendConfig { ...@@ -484,6 +485,7 @@ public class SocialFriendConfig {
tszdxx = new JSONObject(); tszdxx = new JSONObject();
// 劳动用工备案解除/终止原因 数据字典文档 法律依据 [社保]必填; // 劳动用工备案解除/终止原因 数据字典文档 法律依据 [社保]必填;
tszdxx.put("zzyy", vo.getZzyy()); tszdxx.put("zzyy", vo.getZzyy());
tszdxx.put("bajcejyy", vo.getBajcejyy());
// 社保个人身份材料 无 // 社保个人身份材料 无
// tszdxx.put("shjycl", ) // tszdxx.put("shjycl", )
// 医保个人身份材料 无 // 医保个人身份材料 无
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 离职原因税友自动化配置表
*
* @author hgw
* @date 2025-04-14 11:57:06
*/
@Mapper
public interface TSocialFriendReduceSetMapper extends BaseMapper<TSocialFriendReduceSet> {
/**
* @Description: 获取全量信息
* @Author: hgw
* @Date: 2025/4/14 15:24
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet>
**/
List<TSocialFriendReduceSet> getTSocialFriendReduceSetList();
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet;
import java.util.Map;
/**
* 离职原因税友自动化配置表
*
* @author hgw
* @date 2025-04-14 11:57:06
*/
public interface TSocialFriendReduceSetService extends IService<TSocialFriendReduceSet> {
/**
* @Description: 查找List并组装Map
* @Author: hgw
* @Date: 2025/4/14 15:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet>
**/
Map<String, TSocialFriendReduceSet> getFriendReduceMap();
}
...@@ -3601,6 +3601,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3601,6 +3601,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) ||CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle()))
&& CommonConstants.ZERO_STRING.equals(autoFlag)) { && CommonConstants.ZERO_STRING.equals(autoFlag)) {
socialInfo.setYgsHandleStatus(CommonConstants.ONE_STRING); socialInfo.setYgsHandleStatus(CommonConstants.ONE_STRING);
} else {
socialInfo.setYgsHandleStatus(CommonConstants.ZERO_STRING);
} }
if ((CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle()) if ((CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
||CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle()) ||CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())
...@@ -3610,6 +3612,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3610,6 +3612,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) ||CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle()))
&& CommonConstants.ZERO_STRING.equals(autoFlag)) { && CommonConstants.ZERO_STRING.equals(autoFlag)) {
socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING); socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
} else {
socialInfo.setYsdHandleStatus(CommonConstants.ZERO_STRING);
} }
socialInfo.setYgsAddId(CommonConstants.CENTER_SPLIT_LINE_STRING); socialInfo.setYgsAddId(CommonConstants.CENTER_SPLIT_LINE_STRING);
socialInfo.setYgsRequestId(CommonConstants.CENTER_SPLIT_LINE_STRING); socialInfo.setYgsRequestId(CommonConstants.CENTER_SPLIT_LINE_STRING);
......
...@@ -312,7 +312,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -312,7 +312,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
} }
//查找入职日期的前一个工作日 //查找入职日期的前一个工作日
TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo();
newVo.setRegistDate(vo.getRegistDate()); newVo.setRegistDate(DateUtil.addDayByDate(vo.getRegistDate(), CommonConstants.ONE_INT_NEGATE));
newVo.setType(CommonConstants.ONE_STRING); newVo.setType(CommonConstants.ONE_STRING);
getWorkDay(holidayMap, newVo); getWorkDay(holidayMap, newVo);
...@@ -333,11 +333,11 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -333,11 +333,11 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
} else { } else {
// 如果当前时间在15:20之后 // 如果当前时间在15:20之后
TEmployeeInsuranceWorkDayVo afterVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo afterVo = new TEmployeeInsuranceWorkDayVo();
afterVo.setRegistDate(LocalDateTimeUtils.convertLDToDate(today)); afterVo.setRegistDate(DateUtil.addDayByDate(LocalDateTimeUtils.convertLDToDate(today), CommonConstants.ONE_INT));
afterVo.setType(CommonConstants.TWO_STRING); afterVo.setType(CommonConstants.TWO_STRING);
getWorkDay(holidayMap, afterVo); getWorkDay(holidayMap, afterVo);
vo.setPriDisDate(afterVo.getRegistDate()); vo.setPriDisDate(afterVo.getRegistDate());
vo.setRegistDate(DateUtil.addDayByDate(newVo.getRegistDate(), CommonConstants.ONE_INT)); vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT));
} }
} else { } else {
//如果前一个工作日日期大于今天 //如果前一个工作日日期大于今天
......
...@@ -66,6 +66,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -66,6 +66,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private final TSocialSoldierLogService tSocialSoldierLogService; private final TSocialSoldierLogService tSocialSoldierLogService;
private final TSocialFriendBackLogService tSocialFriendBackLogService; private final TSocialFriendBackLogService tSocialFriendBackLogService;
private final TSocialFreindSetService tSocialFreindSetService; private final TSocialFreindSetService tSocialFreindSetService;
private final TSocialFriendReduceSetService tSocialFriendReduceSetService;
private final TSocialInfoMapper socialMapper; private final TSocialInfoMapper socialMapper;
private final AtomicInteger atomicPushFriend = new AtomicInteger(0); private final AtomicInteger atomicPushFriend = new AtomicInteger(0);
...@@ -98,6 +99,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -98,6 +99,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFreindSet set = tSocialFreindSetService.getById("1"); TSocialFreindSet set = tSocialFreindSetService.getById("1");
if (set != null && Common.isNotNull(set.getType()) && 1 == set.getType()) { if (set != null && Common.isNotNull(set.getType()) && 1 == set.getType()) {
Map<String, TSocialFriendReduceSet> reduceMap = tSocialFriendReduceSetService.getFriendReduceMap();
// 获取时间限制配置(获取 当月启用 的配置) // 获取时间限制配置(获取 当月启用 的配置)
Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId(); Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId();
...@@ -105,23 +108,23 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -105,23 +108,23 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 养工失新增列表 // 养工失新增列表
List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList); List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) { if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1); this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1, reduceMap);
} }
// 养工失减少列表 // 养工失减少列表
List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList); List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) { if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2); this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2, reduceMap);
} }
// 医生大新增列表 // 医生大新增列表
List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList); List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) { if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3); this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3, reduceMap);
} }
// 医生大减少列表 // 医生大减少列表
List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList); List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) { if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4); this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4, reduceMap);
} }
if ((ygsAddlist == null || ygsAddlist.isEmpty()) if ((ygsAddlist == null || ygsAddlist.isEmpty())
&& (ygsReducelist == null || ygsReducelist.isEmpty()) && (ygsReducelist == null || ygsReducelist.isEmpty())
...@@ -148,7 +151,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -148,7 +151,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
* @return: void * @return: void
**/ **/
private void doPushSocialAndLogYgs(Map<String, TSocialDeadlineInfo> socialSetMap private void doPushSocialAndLogYgs(Map<String, TSocialDeadlineInfo> socialSetMap
, List<SociaFriendYgsAddVo> ygsAddlist, int type) { , List<SociaFriendYgsAddVo> ygsAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap) {
int canPushType; int canPushType;
TSocialInfo socialInfo; TSocialInfo socialInfo;
String typeStr = "提交"; String typeStr = "提交";
...@@ -170,8 +173,29 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -170,8 +173,29 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
boolean nextFlag = false; boolean nextFlag = false;
SociaFriendYgsAddVo vo; SociaFriendYgsAddVo vo;
int i=1; int i=1;
TSocialFriendReduceSet reduceSet;
for (int index = 0 ; index < ygsAddlist.size(); index++) { for (int index = 0 ; index < ygsAddlist.size(); index++) {
vo = ygsAddlist.get(index); vo = ygsAddlist.get(index);
// 派减离职原因转化:
if (type == 2 && Common.isNotNull(vo.getTbyy())) {
reduceSet = reduceMap.get(vo.getTbyy());
if (reduceSet != null) {
vo.setTbyy(reduceSet.getTbyy());
vo.setZzyy(reduceSet.getZzyy());
vo.setBajcejyy(reduceSet.getBajcejyy());
} else {
remark = "超出离职原因的配置,转人工!配置为:"+vo.getTbyy();
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYgsHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
socialLog = tSocialSoldierLogService.getFriendLog(vo, typeStr, dispatchItem, remark);
if (socialLog != null) {
logList.add(socialLog);
}
continue;
}
}
// 0:未到时间不动; 1:推送; 2:转人工 // 0:未到时间不动; 1:推送; 2:转人工
canPushType = this.getCanPushType(socialSetMap, vo); canPushType = this.getCanPushType(socialSetMap, vo);
if (1 == canPushType) { if (1 == canPushType) {
...@@ -261,7 +285,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -261,7 +285,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
* @return: void * @return: void
**/ **/
private void doPushSocialAndLogYsd(Map<String, TSocialDeadlineInfo> socialSetMap private void doPushSocialAndLogYsd(Map<String, TSocialDeadlineInfo> socialSetMap
, List<SociaFriendYgsAddVo> ysdAddlist, int type) { , List<SociaFriendYgsAddVo> ysdAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap) {
int canPushType; int canPushType;
TSocialInfo socialInfo; TSocialInfo socialInfo;
String typeStr = "提交"; String typeStr = "提交";
...@@ -284,10 +308,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -284,10 +308,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
boolean nextFlag = false; boolean nextFlag = false;
SociaFriendYgsAddVo vo; SociaFriendYgsAddVo vo;
int i=1; int i=1;
TSocialFriendReduceSet reduceSet;
for (int index = 0 ; index < ysdAddlist.size(); index++) { for (int index = 0 ; index < ysdAddlist.size(); index++) {
vo = ysdAddlist.get(index); vo = ysdAddlist.get(index);
// 0:未到时间不动; 1:推送; 2:转人工 // 0:未到时间不动; 1:推送; 2:转人工
if ("劳动者死亡".equals(vo.getTbyy())) { if ("16".equals(vo.getTbyy())) {
remark = "劳动者死亡,转人工!"; remark = "劳动者死亡,转人工!";
socialInfo = new TSocialInfo(); socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId()); socialInfo.setId(vo.getSocialId());
...@@ -298,6 +324,26 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -298,6 +324,26 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
logList.add(socialLog); logList.add(socialLog);
} }
} else { } else {
// 派减离职原因转化:
if (type == 2 && Common.isNotNull(vo.getTbyy())) {
reduceSet = reduceMap.get(vo.getTbyy());
if (reduceSet != null) {
vo.setTbyy(reduceSet.getTbyy());
vo.setZzyy(reduceSet.getZzyy());
vo.setBajcejyy(reduceSet.getBajcejyy());
} else {
remark = "超出医保离职原因的配置,转人工!配置为:"+vo.getTbyy();
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialInfo.setYgsHandleStatus(CommonConstants.FIVE_STRING);
renGongList.add(socialInfo);
socialLog = tSocialSoldierLogService.getFriendLog(vo, typeStr, dispatchItem, remark);
if (socialLog != null) {
logList.add(socialLog);
}
continue;
}
}
canPushType = this.getCanPushTypeYsd(socialSetMap, vo); canPushType = this.getCanPushTypeYsd(socialSetMap, vo);
if (1 == canPushType) { if (1 == canPushType) {
try { try {
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Maps;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFriendReduceSetMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendReduceSetService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 离职原因税友自动化配置表
*
* @author hgw
* @date 2025-04-14 11:57:06
*/
@Log4j2
@Service
public class TSocialFriendReduceSetServiceImpl extends ServiceImpl<TSocialFriendReduceSetMapper, TSocialFriendReduceSet> implements TSocialFriendReduceSetService {
@Override
public Map<String, TSocialFriendReduceSet> getFriendReduceMap() {
List<TSocialFriendReduceSet> list = baseMapper.getTSocialFriendReduceSetList();
// 将list转化为map
if (list != null && !list.isEmpty()) {
Map<String, TSocialFriendReduceSet> map = Maps.newHashMap();
for (TSocialFriendReduceSet reduceSet : list) {
map.put(reduceSet.getId(), reduceSet);
}
return map;
}
return null;
}
}
...@@ -74,18 +74,12 @@ ...@@ -74,18 +74,12 @@
when '2' then '无固定期限劳动合同' when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo, else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd, a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','其他原因中断缴费','在职人员主动解除劳动合同') tbyy, a.REDUCE_REASON tbyy,
case a.REDUCE_REASON a.REDUCE_REASON zzyy,
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)' s.SOCIAL_PROVINCE socialProvince,
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇' s.SOCIAL_CITY socialCity,
when '16' then '劳动者死亡,或者被人民法院宣告死亡或者宣告失踪' s.SOCIAL_TOWN socialTown,
when '1' then '劳动者提前30天书面通知解除或试用期提前3天通知解除合同' a.SCHOOL_NAME byyx
when '2' then '劳动者严重违反用人单位的规章制度'
else '法律、行政法规规定的其他情形' end zzyy,
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown,
a.SCHOOL_NAME byyx
</sql> </sql>
...@@ -222,14 +216,8 @@ ...@@ -222,14 +216,8 @@
when '2' then '无固定期限劳动合同' when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo, else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd, a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','劳动者死亡','在职人员解除/终止劳动合同') tbyy, a.REDUCE_REASON tbyy,
case a.REDUCE_REASON a.REDUCE_REASON zzyy,
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)'
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇'
when '16' then '劳动者死亡,或者被人民法院宣告死亡或者宣告失踪'
when '1' then '劳动者提前30天书面通知解除或试用期提前3天通知解除合同'
when '2' then '劳动者严重违反用人单位的规章制度'
else '法律、行政法规规定的其他情形' end zzyy,
s.SOCIAL_PROVINCE socialProvince, s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity, s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown, s.SOCIAL_TOWN socialTown,
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!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.social.mapper.TSocialFriendReduceSetMapper">
<resultMap id="tSocialFriendReduceSetMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFriendReduceSet">
<id property="id" column="ID"/>
<result property="reduceReasonName" column="REDUCE_REASON_NAME"/>
<result property="tbyy" column="TBYY"/>
<result property="zzyy" column="ZZYY"/>
<result property="bajcejyy" column="BAJCEJYY"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.TBYY,
a.ZZYY,
a.BAJCEJYY
</sql>
<!--tSocialFriendReduceSet简单分页查询-->
<select id="getTSocialFriendReduceSetList" resultMap="tSocialFriendReduceSetMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_friend_reduce_set a
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment