Commit d4ac2931 authored by huyuchen's avatar huyuchen

huych-社保自动化相关提价

parent b5d6e282
...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -2,6 +2,8 @@ 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.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo;
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 com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
...@@ -104,6 +106,9 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -104,6 +106,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "商险是否已购买 0 是 1 否") @Schema(description = "商险是否已购买 0 是 1 否")
private String insuranceIsBuy; private String insuranceIsBuy;
@Schema(description = "商险是否已购买 0 是 1 否")
private String socialIsBuy;
@Schema(description = "档案所在地-县编号") @Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode; private String townCode;
...@@ -134,6 +139,14 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -134,6 +139,14 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private List<TInsurancePreDetail> exitInsuranceInfoList; private List<TInsurancePreDetail> exitInsuranceInfoList;
@Schema(description = "社保待购买信息")
@TableField(exist = false)
private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "社保流程中信息集合")
@TableField(exist = false)
private List<TSocialPreDetailVo> exitSocialInfoList;
@Schema(description = "附件集合") @Schema(description = "附件集合")
@TableField(exist = false) @TableField(exist = false)
private List<TAttaInfo> attaList; private List<TAttaInfo> attaList;
......
...@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity { ...@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity {
/** /**
* 类型:1档案;2商险 * 类型:1档案;2商险
*/ */
@ExcelAttribute(name = "类型:1档案;2商险3合同", maxLength = 1) @ExcelAttribute(name = "类型:1档案;2商险3合同4社保", maxLength = 1)
@Length(max = 1, message = "类型:1档案;2商险3合同不能超过1个字符") @Length(max = 1, message = "类型:1档案;2商险3合同4社保不能超过1个字符")
@ExcelProperty("类型:1档案;2商险3合同") @ExcelProperty("类型:1档案;2商险3合同4社保")
@Schema(description = "类型:1档案;2商险 3合同") @Schema(description = "类型:1档案;2商险 3合同 4社保")
private String type; private String type;
/** /**
* 入职确认信息表ID * 入职确认信息表ID
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author huych
* @description 社保自动化自动化社保明细VO
* @date 2025-10-10 15:44:26
*/
@Data
@Schema(description = "社保自动化自动化社保明细VO")
public class EmployeePreSocialListVo implements Serializable {
private static final long serialVersionUID = 628032758008497542L;
@Schema(description = "社保待购买信息")
private TDispatchInfoPreVo dispatchInfoPreVo;
@Schema(description = "社保流程中信息集合")
private List<TSocialPreDetailVo> exitSocialInfoList;
}
...@@ -138,6 +138,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -138,6 +138,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "0社保1公积金") @Schema(description = "0社保1公积金")
@ExcelProperty("0社保1公积金") @ExcelProperty("0社保1公积金")
private String typeSub; private String typeSub;
/**
* 接收方式
*/
@Schema(description = "接收方式 0项目配置 1自定义")
private String receiveType;
/** /**
* 备案基数 * 备案基数
*/ */
...@@ -180,6 +185,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -180,6 +185,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "预计派单时间") @Schema(description = "预计派单时间")
@ExcelProperty("预计派单时间") @ExcelProperty("预计派单时间")
private Date expectedCollectionTime; private Date expectedCollectionTime;
/**
* 预计派单时间
*/
@Schema(description = "预计派单类型 入职日期当天 0 入职一个月 1 ...")
private String expectedCollectionType;
/** /**
* 派单确认时间 * 派单确认时间
*/ */
...@@ -208,6 +218,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -208,6 +218,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "配置名称") @Schema(description = "配置名称")
@ExcelProperty("配置名称") @ExcelProperty("配置名称")
private String configName; private String configName;
/**
* 配置id
*/
@ExcelAttribute(name = "配置id")
@Schema(description = "配置id")
@ExcelProperty("配置id")
private String configId;
/** /**
* 入职确认信息主表id * 入职确认信息主表id
*/ */
...@@ -215,6 +232,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -215,6 +232,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "入职确认信息主表id") @Schema(description = "入职确认信息主表id")
@ExcelProperty("入职确认信息主表id") @ExcelProperty("入职确认信息主表id")
private String registerId; private String registerId;
/**
* 起缴日期
*/
@ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期")
@ExcelProperty("起缴日期")
private Date socialStartDate;
/** /**
* 养老起缴日期 * 养老起缴日期
*/ */
......
...@@ -26,10 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil; ...@@ -26,10 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
...@@ -74,6 +71,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -74,6 +71,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired @Autowired
private CspDaprUtils cspDaprUtils; private CspDaprUtils cspDaprUtils;
@Autowired
private SocialDaprUtils socialDaprUtils;
@Autowired @Autowired
private OSSUtil ossUtil; private OSSUtil ossUtil;
...@@ -762,6 +762,41 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -762,6 +762,41 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
//1.9.16社保自动化校验逻辑
if (employeeRegistrationPre.getServerItem().contains("社保购买")) {
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard());
R<Boolean> socialFlag = socialDaprUtils.selectExitEmpSocial(cardVo);
//是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeRegistrationPre.getSocialIsBuy()) &&
(Common.isEmpty(socialFlag) || Boolean.TRUE.equals(!socialFlag.getData()))) {
return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的社保信息!");
}
//是否已签署为否需要判断是否在用或者流程中的合同
if (CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getSocialIsBuy()) &&
Common.isNotNull(socialFlag) && Boolean.TRUE.equals(socialFlag.getData()) &&
null != employeeRegistrationPre.getDispatchInfoPreVo() &&
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) {
return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”");
}
//流程中的社保数据不能修改
//查已购买社保明细
if (null != employeeRegistrationPre.getDispatchInfoPreVo() &&
Common.isEmpty(employeeRegistrationPre.getDispatchInfoPreVo().getId())) {
R<EmployeePreSocialListVo> socialSdr = socialDaprUtils.getSocialPreInfoStatus(id);
if (socialSdr != null && socialSdr.getData() != null
&& null != socialSdr.getData().getDispatchInfoPreVo()
&& (socialSdr.getData().getDispatchInfoPreVo().getProcessStatus().equals(CommonConstants.THREE_STRING) ||
socialSdr.getData().getDispatchInfoPreVo().getProcessStatus().equals(CommonConstants.FIVE_STRING) ||
socialSdr.getData().getDispatchInfoPreVo().getProcessStatus().equals(CommonConstants.SIX_STRING)||
socialSdr.getData().getDispatchInfoPreVo().getProcessStatus().equals(CommonConstants.SEVEN_STRING) ||
socialSdr.getData().getDispatchInfoPreVo().getProcessStatus().equals(CommonConstants.NINE_STRING))) {
return R.failed("流程中的社保待购买数据不可修改!");
}
}
}
//操作记录中字典值的转化 //操作记录中字典值的转化
String natureItemBefore = null; String natureItemBefore = null;
String natureItemAfter = null; String natureItemAfter = null;
...@@ -1487,6 +1522,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1487,6 +1522,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
pre.setAttaList(attaInfo); pre.setAttaList(attaInfo);
} }
// 查已购买社保明细
R<EmployeePreSocialListVo> socialSdr = socialDaprUtils.getSocialPreInfoList(id);
if (socialSdr != null && socialSdr.getData() != null) {
if (null != socialSdr.getData().getExitSocialInfoList()) {
pre.setExitSocialInfoList(socialSdr.getData().getExitSocialInfoList());
} else if (null != socialSdr.getData().getDispatchInfoPreVo()) {
pre.setDispatchInfoPreVo(socialSdr.getData().getDispatchInfoPreVo());
}
}
} }
return pre; return pre;
} }
......
...@@ -577,6 +577,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -577,6 +577,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
baseMapper.updateById(tEmployeeContractInfo); baseMapper.updateById(tEmployeeContractInfo);
} }
// 不是待提交,记录审核记录 // 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
......
...@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil; ...@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -75,6 +76,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -75,6 +76,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Autowired @Autowired
private CspDaprUtils cspDaprUtils; private CspDaprUtils cspDaprUtils;
@Autowired
private SocialDaprUtils socialDaprUtils;
@Autowired @Autowired
private InsuranceDaprUtil insuranceDaprUtil; private InsuranceDaprUtil insuranceDaprUtil;
...@@ -593,6 +597,8 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -593,6 +597,8 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
.set(TEmployeeContractPre::getCustomerUsername, vo.getName()) .set(TEmployeeContractPre::getCustomerUsername, vo.getName())
.set(TEmployeeContractPre::getCustomerUserLoginname, vo.getLoginName()); .set(TEmployeeContractPre::getCustomerUserLoginname, vo.getLoginName());
employeeContractPreService.update(updateContractWrapper); employeeContractPreService.update(updateContractWrapper);
//更新社保待购买的前端客服
socialDaprUtils.updateSocialPreCustomerName(updateVo);
} }
} }
}catch (Exception e){ }catch (Exception e){
......
...@@ -8,7 +8,6 @@ spring: ...@@ -8,7 +8,6 @@ spring:
redis: redis:
host: 127.0.0.1 host: 127.0.0.1
port: 6379 port: 6379
password: '@yf_2017'
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="customerUsernameNew" column="customer_username_new"/> <result property="customerUsernameNew" column="customer_username_new"/>
<result property="insuranceIsBuy" column="insurance_is_buy"/> <result property="insuranceIsBuy" column="insurance_is_buy"/>
<result property="socialIsBuy" column="social_is_buy"/>
</resultMap> </resultMap>
<resultMap id="employeeRegistrationPreExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo"> <resultMap id="employeeRegistrationPreExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo">
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util; package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistCheckVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistCheckVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -10,7 +12,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; ...@@ -10,7 +12,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*; import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo; import com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo;
...@@ -226,7 +227,6 @@ public class SocialDaprUtils { ...@@ -226,7 +227,6 @@ public class SocialDaprUtils {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialfundinfo/selectExitEmpSocial", JSON.toJSONString(cardVo), Boolean.class, SecurityConstants.FROM_IN); return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialfundinfo/selectExitEmpSocial", JSON.toJSONString(cardVo), Boolean.class, SecurityConstants.FROM_IN);
} }
/** /**
* @Author huyc * @Author huyc
* @Description 新增社保待购买信息 * @Description 新增社保待购买信息
...@@ -253,4 +253,56 @@ public class SocialDaprUtils { ...@@ -253,4 +253,56 @@ public class SocialDaprUtils {
} }
return res; return res;
} }
/**
* @Author huych
* @Description 更新社保待购买的前端客服姓名
* @Date 2025-10-10 11:01:12
* @Param
* @return
**/
public void updateSocialPreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo){
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/updateSocialPreCustomerName" , updateVo
, Object.class, SecurityConstants.FROM_IN);
}
/**
* @Author huych
* @Description 获取社保待购买和已购买的信息
* @Date 2025-10-10 15:48:08
* @Param
* @return
**/
public R<EmployeePreSocialListVo> getSocialPreInfoList(String id){
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/getSocialPreInfoList" , id
, EmployeePreSocialListVo.class, SecurityConstants.FROM_IN);
}
/**
* @Author huych
* @Description 获取社保已购买的信息
* @Date 2025-10-10 15:48:08
* @Param
* @return
**/
public R<EmployeePreSocialListVo> getSocialPreInfoStatus(String id){
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/getSocialPreInfoStatus" , id
, EmployeePreSocialListVo.class, SecurityConstants.FROM_IN);
}
/**
* @Author huych
* @Description 删除社保已购买非流程中的数据
* @Date 2025-10-10 15:51:36
* @Param
* @return
**/
public void deleteUnProcessSocialPreInfo(String id){
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id
, Object.class, SecurityConstants.FROM_IN);
}
} }
...@@ -635,7 +635,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -635,7 +635,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
//1.9.16社保自动化校验逻辑 //1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保购买") && null != preVo.getEmployeeContractPreVos()) { if (preVo.getServerItem().contains("社保购买")) {
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo(); TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard()); cardVo.setEmpIdcard(registration.getEmpIdcard());
...@@ -904,7 +904,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -904,7 +904,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>(); List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>();
R<TEmployeeInsuranceWorkDayVo> dataR; R<TEmployeeInsuranceWorkDayVo> dataR;
R<Boolean> flag; R<Boolean> flag;
TEmployeeAutoRegistCheckVo exitCheckVo;
for (EmployeeRegistration registration:registrationList) { for (EmployeeRegistration registration:registrationList) {
exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
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());
...@@ -935,11 +941,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -935,11 +941,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0) compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)
|| (DateUtil.dateToString(insurancePreVo.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT). || (DateUtil.dateToString(insurancePreVo.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT).
compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)) { compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)) {
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("商险"); exitCheckVo.setType("商险");
exitCheckVo.setErrorMsg("入职日期需要小于等于保单截止日期/保单开始日期需小于等于保单截止日期"); exitCheckVo.setErrorMsg("入职日期需要小于等于保单截止日期/保单开始日期需小于等于保单截止日期");
errorList.add(exitCheckVo); errorList.add(exitCheckVo);
...@@ -965,17 +966,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -965,17 +966,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
flag = archivesDaprUtil.selectExitEmpCopntract(cardVo); flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
//是否已签署为否需要判断是否在用或者流程中的合同 //是否已签署为否需要判断是否在用或者流程中的合同
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) { if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
TEmployeeAutoRegistCheckVo exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
exitCheckVo.setType("合同"); exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg("该项目下存在在途/有效的合同数据"); exitCheckVo.setErrorMsg("该项目下存在在途/有效的合同数据");
errorList.add(exitCheckVo); errorList.add(exitCheckVo);
continue; continue;
} }
} }
//1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保购买") && null != preVo.getDispatchInfoPreVo()) {
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
flag = socialDaprUtils.selectExitEmpSocial(cardVo);
//是否已签署为否需要判断是否在用或者流程中的合同
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
exitCheckVo.setType("社保");
exitCheckVo.setErrorMsg("该人员存在在途/有效的社保数据");
errorList.add(exitCheckVo);
continue;
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项, //点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项 //状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
...@@ -1017,6 +1029,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1017,6 +1029,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成合同待购买数据 //生成合同待购买数据
initContractPreInfo(registration, employeeContractPreVo, user, domainR.getData()); initContractPreInfo(registration, employeeContractPreVo, user, domainR.getData());
} }
//服务类型包含社保购买时
if (preVo.getServerItem().contains("社保购买") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
//生成社保待购买或者已购买数据
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData());
socialDaprUtils.saveSocialPreInfo(preVo);
}
} }
}catch (Exception e) { }catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
...@@ -1170,6 +1189,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1170,6 +1189,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成合同待购买数据 //生成合同待购买数据
initContractPreInfo(registrationNow, employeeContractPreVo, user, domainR.getData()); initContractPreInfo(registrationNow, employeeContractPreVo, user, domainR.getData());
} }
//服务类型包含社保购买时
if (preVo.getServerItem().contains("社保购买") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
//生成社保待购买或者已购买数据
initSocialPreInfo(registrationNow, preVo.getDispatchInfoPreVo(), user, domainR.getData());
socialDaprUtils.saveSocialPreInfo(preVo);
}
} }
}catch (Exception e) { }catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
...@@ -1677,10 +1703,32 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1677,10 +1703,32 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setUpdateBy(user.getId()); preVo.setUpdateBy(user.getId());
preVo.setTypeSub(CommonConstants.ZERO_STRING); preVo.setTypeSub(CommonConstants.ZERO_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING); preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString( //如果自动触发派增为是,计算派单发起时间和派单确认时间
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE)); if (Common.isNotNull(preVo.getIsAutoDis()) && CommonConstants.ZERO_STRING.equals(preVo.getIsAutoDis())
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString( && Common.isNotNull(preVo.getExpectedCollectionType())) {
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE)); TEmployeeContractDateVo vo = new TEmployeeContractDateVo();
vo.setMonthAfter(Integer.parseInt(preVo.getExpectedCollectionType()));
vo.setYearAfter(0);
vo.setRegistDate(preVo.getJoinLeaveDate());
Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getPriDisDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getPriDisDate());
preVo.setExpectedConfirmTime(dataR.getData().getPriDisDate());
} else {
preVo.setExpectedCollectionTime(date);
preVo.setExpectedConfirmTime(date);
}
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
}
} }
//商险状态是否正常判断 //商险状态是否正常判断
......
...@@ -287,4 +287,31 @@ public class SocialTask { ...@@ -287,4 +287,31 @@ public class SocialTask {
"/tsocialfriend/inner/doChangeHandleStatusToEnd","", Object.class, SecurityConstants.FROM_IN); "/tsocialfriend/inner/doChangeHandleStatusToEnd","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时任务每月1日3点定时更新跨月的继续办理的数据为终止办理-定时任务结束------------"); log.info("------------定时任务每月1日3点定时更新跨月的继续办理的数据为终止办理-定时任务结束------------");
} }
/**
* 每天九点推送社保待确认信息
* @author huych
* @param
* @return void
*/
public void pushWxConfrimMessage() {
log.info("-------------每天九点推送社保待确认信息------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(), daprProperties.getAppId(),
"/tdispatchinfopre/inner/pushWxConfrimMessage","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天九点推送社保待确认信息-定时任务开始------------");
}
/**
* 每天刷新商险到期提醒信息
* @author huych
* @param
* @return void
*/
public void pushDisConfrimSocial() {
log.info("-------------每天三点二十批量派单社保------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(), daprProperties.getAppId(),
"/tdispatchinfopre/inner/pushDisConfrimSocial","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天三点二十批量派单社保-定时任务开始------------");
}
} }
...@@ -897,4 +897,8 @@ public class TDispatchInfo extends BaseEntity { ...@@ -897,4 +897,8 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("医保仅补缴生成材料") @ExcelProperty("医保仅补缴生成材料")
private String dataFlagYsd; private String dataFlagYsd;
@Schema(description ="社保待购买id")
@TableField(exist = false)
private String preId;
} }
package com.yifu.cloud.plus.v1.yifu.social.entity; package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; 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.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
...@@ -228,6 +226,13 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -228,6 +226,13 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("起缴日期是否一致 0 是 1否") @ExcelProperty("起缴日期是否一致 0 是 1否")
@Schema(description = "起缴日期是否一致 0 是 1否") @Schema(description = "起缴日期是否一致 0 是 1否")
private String isCreateDate; private String isCreateDate;
/**
* 起缴日期
*/
@ExcelAttribute(name = "起缴日期", isDate = true)
@Schema(description = "起缴日期")
@ExcelProperty("起缴日期")
private Date socialStartDate;
/** /**
* 配置名称 * 配置名称
*/ */
...@@ -236,6 +241,18 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -236,6 +241,18 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("配置名称") @ExcelProperty("配置名称")
@Schema(description = "配置名称") @Schema(description = "配置名称")
private String configName; private String configName;
/**
* 配置id
*/
@ExcelAttribute(name = "配置id")
@Schema(description = "配置id")
@ExcelProperty("配置id")
private String configId;
/**
* 接收方式
*/
@Schema(description = "接收方式 0项目配置 1自定义")
private String receiveType;
/** /**
* 入职确认信息主表id * 入职确认信息主表id
*/ */
...@@ -355,11 +372,29 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -355,11 +372,29 @@ public class TDispatchInfoPre extends BaseEntity {
/** /**
* 合同id * 合同id
*/ */
@ExcelAttribute(name = "合同id", maxLength = 32) @ExcelAttribute(name = "合同id")
@Length(max = 32, message = "合同id不能超过32个字符")
@ExcelProperty("合同id") @ExcelProperty("合同id")
@Schema(description = "合同id") @Schema(description = "合同id")
private String contractId; private String contractId;
/**
* 派单id
*/
@ExcelAttribute(name = "派单id")
@ExcelProperty("派单id")
@Schema(description = "派单id")
private String disPatcherId;
@Schema(description = "发起失败原因")
private String errorInfo;
@Schema(description = "发起失败时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Date errorTime;
@Schema(description = "派单审核/办理不通过原因")
private String errorBackInfo;
/** /**
* 0未删除1删除 * 0未删除1删除
*/ */
......
...@@ -557,6 +557,17 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -557,6 +557,17 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty("派单ID" ) @ExcelProperty("派单ID" )
private String dispatchId; private String dispatchId;
@ExcelAttribute(name = "preId")
@ExcelProperty(value ="preId")
private String preId;
@ExcelAttribute(name = "preName")
@ExcelProperty(value ="preName")
private String preName;
@ExcelAttribute(name = "preLoginName")
@ExcelProperty(value ="preLoginName")
private String preLoginName;
/** /**
* 订单ID * 订单ID
......
...@@ -53,4 +53,8 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre { ...@@ -53,4 +53,8 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre {
@TableField(exist = false) @TableField(exist = false)
private String dispatcherTimeEnd; private String dispatcherTimeEnd;
@Schema(description = "失败标签 1查询失败数据")
@TableField(exist = false)
private String failType;
} }
...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -2,6 +2,8 @@ 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.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
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.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -130,6 +132,16 @@ public class TDispatchInfoPreController { ...@@ -130,6 +132,16 @@ public class TDispatchInfoPreController {
return tDispatchInfoPreService.confirm(idList); return tDispatchInfoPreService.confirm(idList);
} }
/**
* 社保待购买信息单个/批量发起购买任务
* @param idList id数组
**/
@Operation(description = "合社保待购买信息单个/批量发起购买任务")
@PostMapping("/dispatcherContract")
public R dispatcherContract(@RequestBody List<String> idList) {
return tDispatchInfoPreService.dispatcherSocial(idList,"1");
}
/** /**
* 社保待购买数量查询 * 社保待购买数量查询
* @param searchVo 社保待购买任务表 * @param searchVo 社保待购买任务表
...@@ -154,4 +166,79 @@ public class TDispatchInfoPreController { ...@@ -154,4 +166,79 @@ public class TDispatchInfoPreController {
public Boolean saveSocialPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) { public Boolean saveSocialPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) {
return tDispatchInfoPreService.saveSocialPreInfo(preVo); return tDispatchInfoPreService.saveSocialPreInfo(preVo);
} }
/**
* 更新社保待购买的前端客服姓名
* @author huych
* @date 2025-10-10 11:02:35
**/
@Operation(description = "更新社保待购买的前端客服姓名")
@Inner
@PostMapping("/updateSocialPreCustomerName")
public void updateSocialPreCustomerName(@RequestBody EmployeeRegistrationCustomerUserUpdateVo updateVo) {
tDispatchInfoPreService.updateSocialPreCustomerName(updateVo);
}
/**
* 入职确认信息详情中的社保明细信息
* @author huych
* @date 2025-10-10 15:51:18
**/
@Operation(description = "入职确认信息详情中的社保明细信息")
@Inner
@PostMapping("/getSocialPreInfoList")
public EmployeePreSocialListVo getSocialPreInfoList(@RequestBody String id) {
return tDispatchInfoPreService.getSocialPreInfoList(id);
}
/**
* 查询社保待购买的状态
* @author huych
* @date 2025-10-11 14:45:26
**/
@Operation(description = "查询社保待购买的状态")
@Inner
@PostMapping("/getSocialPreInfoStatus")
public EmployeePreSocialListVo getSocialPreInfoStatus(@RequestBody String id) {
return tDispatchInfoPreService.getSocialPreInfoStatus(id);
}
/**
* 删除非流程中的社保待购买数据
* @author huych
* @date 2025-10-11 15:30:02
**/
@Operation(description = "删除非流程中的社保待购买数据")
@Inner
@PostMapping("/deleteUnProcessSocialPreInfo")
public void deleteUnProcessSocialPreInfo(@RequestBody String id) {
tDispatchInfoPreService.deleteUnProcessSocialPreInfo(id);
}
/**
* 派单当日9点统一推送确认信息
* @author huych
* @date 2025-10-11 18:50:16
* @return void
*/
@SysLog("派单当日9点统一推送确认信息")
@Inner
@PostMapping("/inner/pushWxConfrimMessage")
public void pushWxConfrimMessage() {
tDispatchInfoPreService.pushWxConfrimMessage();
}
/**
* 每天下午三点二十推送待购买数据
* @author huych
* @date 2025-10-11 18:51:58
* @return void
*/
@SysLog("每天下午三点二十推送待购买数据")
@Inner
@PostMapping("/inner/pushDisConfrimSocial")
public void pushDisConfrimSocial() {
tDispatchInfoPreService.pushDisConfrimSocial();
}
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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.social.entity.TDispatchInfoPre; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -32,5 +33,10 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> { ...@@ -32,5 +33,10 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
List<TDispatchInfoPreExportVo> selectExportList(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo); List<TDispatchInfoPreExportVo> selectExportList(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
List<TDispatchImportVo> getDisPatcherSocialList(@Param("idList") List<String> idList, @Param("statusList") List<String> statusList, @Param("type") String type);
List<TDispatchInfoPre> getAllUnDisData();
List<String> getAllUnDisDataIdList();
} }
...@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service; ...@@ -3,6 +3,8 @@ 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.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
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.TDispatchInfoPre; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
...@@ -54,4 +56,29 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> { ...@@ -54,4 +56,29 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
* @return * @return
*/ */
Boolean saveSocialPreInfo(EmployeeRegistrationPreVo preVo); Boolean saveSocialPreInfo(EmployeeRegistrationPreVo preVo);
/**
* 更新社保待购买前端客服信息
* @param updateVo
* @return
*/
void updateSocialPreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo);
EmployeePreSocialListVo getSocialPreInfoList(String id);
EmployeePreSocialListVo getSocialPreInfoStatus(String id);
void deleteUnProcessSocialPreInfo(String id);
/**
* 社保待购买信息单个/批量发起签署任务
* @param idList id集合
* @param type 1 手动 2 自动
* @return
*/
R dispatcherSocial(List<String> idList,String type);
void pushWxConfrimMessage();
void pushDisConfrimSocial();
} }
...@@ -130,6 +130,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -130,6 +130,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private final TAuditInfoMapper auditInfoMapper; private final TAuditInfoMapper auditInfoMapper;
private final TDispatchInfoPreMapper dispatchInfoPreMapper;
@Autowired @Autowired
private CacheManager cacheManager; private CacheManager cacheManager;
...@@ -777,7 +779,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -777,7 +779,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialFund) && Common.isNotNull(dispatch)) { if (Common.isNotNull(socialFund) && Common.isNotNull(dispatch)) {
socialFund.setDispatchId(dispatch.getId()); socialFund.setDispatchId(dispatch.getId());
} }
initSocialFundAndInsert(emp, social, fund, socialFund, project, dispatchPart, injury); initSocialFundAndInsert(emp, social, fund, socialFund, project, dispatchPart, injury,dispatch.getPreId());
} }
// 生成预付数据 // 生成预付数据
if (Common.isNotNull(socialFund) && Common.isNotNull(socialFund.getId())) { if (Common.isNotNull(socialFund) && Common.isNotNull(socialFund.getId())) {
...@@ -957,7 +959,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -957,7 +959,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TProvidentFund fund, TProvidentFund fund,
TSocialFundInfo socialFund, TSocialFundInfo socialFund,
EmpProjectDispatchVo project, EmpProjectDispatchVo project,
boolean dispatchPart, boolean injury) { boolean dispatchPart, boolean injury,String preId) {
if (Common.isNotNull(socialFund)) { if (Common.isNotNull(socialFund)) {
if (Common.isNotNull(project)) { if (Common.isNotNull(project)) {
socialFund.setEmpNo(project.getEmpCode()); socialFund.setEmpNo(project.getEmpCode());
...@@ -1132,6 +1134,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1132,6 +1134,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} else { } else {
socialFundMapper.insert(socialFund); socialFundMapper.insert(socialFund);
} }
//派单完成更新社保待购买表的状态
if (Common.isNotNull(preId)) {
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectById(preId);
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.THREE_STRING);
dispatchInfoPre.setDisPatcherId(socialFund.getId());
dispatchInfoPre.setErrorInfo(null);
dispatchInfoPre.setErrorTime(null);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
}
} }
} }
...@@ -1333,7 +1346,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1333,7 +1346,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setContactAddress(excel.getContactAddress()); dispatch.setContactAddress(excel.getContactAddress());
} }
dispatch.setOrganName(user.getDeptName()); dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId()); if (Common.isNotNull(excel.getPreId())) {
dispatch.setPreId(excel.getPreId());
}
dispatch.setCreateBy(null == user ? "1" : user.getId());
dispatch.setCreateName(null == excel.getPreName() ? user.getNickname() : excel.getPreName());
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
dispatch.setContractSubName(excel.getContractSubName()); dispatch.setContractSubName(excel.getContractSubName());
dispatch.setContractName(excel.getContractName()); dispatch.setContractName(excel.getContractName());
...@@ -3669,6 +3686,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3669,6 +3686,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
}*/ }*/
if (null != socialInfo) { if (null != socialInfo) {
//派单审核通过更新社保待购买表的状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getDisPatcherId, sf.getId())
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.THREE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// 派增审核 // 派增审核
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) { if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) {
//派增审核通过 //派增审核通过
...@@ -3679,6 +3701,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3679,6 +3701,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialAddStatus(CommonConstants.ONE_STRING); sf.setSocialAddStatus(CommonConstants.ONE_STRING);
sf.setSocialStatus(CommonConstants.ONE_STRING); sf.setSocialStatus(CommonConstants.ONE_STRING);
} }
//审核通过更新状态
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.FIVE_STRING);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
//派增审核不通过 需要处理预估数据 //派增审核不通过 需要处理预估数据
} else if (CommonConstants.ONE_INT == flag) { } else if (CommonConstants.ONE_INT == flag) {
socialInfo.setDeleteFlag(CommonConstants.ONE_STRING); socialInfo.setDeleteFlag(CommonConstants.ONE_STRING);
...@@ -3691,7 +3718,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3691,7 +3718,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (null != sf.getSocialIdSuccess()){ if (null != sf.getSocialIdSuccess()){
sf.setSocialId(sf.getSocialIdSuccess()); sf.setSocialId(sf.getSocialIdSuccess());
} }
//审核不通过更新状态
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.FOUR_STRING);
dispatchInfoPre.setErrorBackInfo(auditRemark);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
} }
socialInfo.setAuditTime(now); socialInfo.setAuditTime(now);
socialInfo.setAuditUser(user.getId()); socialInfo.setAuditUser(user.getId());
...@@ -4388,6 +4420,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4388,6 +4420,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
auditInfo.setSocialId(dis.getId()); auditInfo.setSocialId(dis.getId());
} }
//针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getDisPatcherId, sf.getId())
.eq(TDispatchInfoPre::getProcessStatus, CommonConstants.FIVE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(dispatchInfoPre)) {
//此处状态可能会更新为 办理成功 办理中 部分办理失败和办理失败
if (sf.getSocialStatus().equals(CommonConstants.TWO_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.SIX_STRING);
}
if (sf.getSocialStatus().equals(CommonConstants.FOUR_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.NINE_STRING);
dispatchInfoPre.setErrorBackInfo(handleRemark);
}
if (sf.getSocialStatus().equals(CommonConstants.FIVE_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.EIGHT_STRING);
dispatchInfoPre.setErrorBackInfo(handleRemark);
}
if (sf.getSocialStatus().equals(CommonConstants.THREE_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.SEVEN_STRING);
}
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
} else { } else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保派增派单数据:" + dis.getEmpName())); errorList.add(new ErrorMessage(-1, "找不到对应员工社保派增派单数据:" + dis.getEmpName()));
return true; return true;
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
<result property="isAutoDis" column="IS_AUTO_DIS"/> <result property="isAutoDis" column="IS_AUTO_DIS"/>
<result property="isCreateDate" column="IS_CREATE_DATE"/> <result property="isCreateDate" column="IS_CREATE_DATE"/>
<result property="configName" column="CONFIG_NAME"/> <result property="configName" column="CONFIG_NAME"/>
<result property="configId" column="CONFIG_ID"/>
<result property="receiveType" column="RECEIVE_TYPE"/>
<result property="registerId" column="REGISTER_ID"/> <result property="registerId" column="REGISTER_ID"/>
<result property="pensionStart" column="PENSION_START"/> <result property="pensionStart" column="PENSION_START"/>
<result property="medicalStart" column="MEDICAL_START"/> <result property="medicalStart" column="MEDICAL_START"/>
...@@ -39,6 +41,7 @@ ...@@ -39,6 +41,7 @@
<result property="workInjuryStart" column="WORK_INJURY_START"/> <result property="workInjuryStart" column="WORK_INJURY_START"/>
<result property="birthStart" column="BIRTH_START"/> <result property="birthStart" column="BIRTH_START"/>
<result property="bigailmentStart" column="BIGAILMENT_START"/> <result property="bigailmentStart" column="BIGAILMENT_START"/>
<result property="socialStartDate" column="SOCIAL_START_DATE"/>
<result property="trustRemark" column="TRUST_REMARK"/> <result property="trustRemark" column="TRUST_REMARK"/>
<result property="pensionCardinal" column="PENSION_CARDINAL"/> <result property="pensionCardinal" column="PENSION_CARDINAL"/>
<result property="medicalCardinal" column="MEDICAL_CARDINAL"/> <result property="medicalCardinal" column="MEDICAL_CARDINAL"/>
...@@ -49,12 +52,16 @@ ...@@ -49,12 +52,16 @@
<result property="paymentType" column="PAYMENT_TYPE"/> <result property="paymentType" column="PAYMENT_TYPE"/>
<result property="contractStatus" column="CONTRACT_STATUS"/> <result property="contractStatus" column="CONTRACT_STATUS"/>
<result property="contractId" column="CONTRACT_ID"/> <result property="contractId" column="CONTRACT_ID"/>
<result property="disPatcherId" column="DISPATCHER_ID"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="deleteFlag" column="DELETE_FLAG"/> <result property="deleteFlag" column="DELETE_FLAG"/>
<result property="errorInfo" column="error_info"/>
<result property="errorBackInfo" column="error_back_info"/>
<result property="errorTime" column="error_time"/>
</resultMap> </resultMap>
<resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo"> <resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo">
...@@ -88,6 +95,7 @@ ...@@ -88,6 +95,7 @@
a.PROVIDENT_HOUSEHOLD_NAME, a.PROVIDENT_HOUSEHOLD_NAME,
a.SOCIAL_HOUSEHOLD_NAME, a.SOCIAL_HOUSEHOLD_NAME,
a.TYPE_SUB, a.TYPE_SUB,
a.RECEIVE_TYPE,
a.RECORD_BASE, a.RECORD_BASE,
a.RECORD_BASE_TYPE, a.RECORD_BASE_TYPE,
a.JOIN_LEAVE_DATE, a.JOIN_LEAVE_DATE,
...@@ -98,10 +106,12 @@ ...@@ -98,10 +106,12 @@
a.IS_AUTO_DIS, a.IS_AUTO_DIS,
a.IS_CREATE_DATE, a.IS_CREATE_DATE,
a.CONFIG_NAME, a.CONFIG_NAME,
a.CONFIG_ID,
a.REGISTER_ID, a.REGISTER_ID,
a.PENSION_START, a.PENSION_START,
a.MEDICAL_START, a.MEDICAL_START,
a.UNEMPLOY_START, a.UNEMPLOY_START,
a.SOCIAL_START_DATE,
a.WORK_INJURY_START, a.WORK_INJURY_START,
a.BIRTH_START, a.BIRTH_START,
a.BIGAILMENT_START, a.BIGAILMENT_START,
...@@ -120,7 +130,7 @@ ...@@ -120,7 +130,7 @@
a.CREATE_NAME, a.CREATE_NAME,
a.UPDATE_TIME, a.UPDATE_TIME,
a.CREATE_TIME, a.CREATE_TIME,
a.DELETE_FLAG a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info
</sql> </sql>
<sql id="tDispatchInfoPre_where"> <sql id="tDispatchInfoPre_where">
<if test="tDispatchInfoPre != null"> <if test="tDispatchInfoPre != null">
...@@ -188,6 +198,9 @@ ...@@ -188,6 +198,9 @@
<if test="tDispatchInfoPre.customerUsername != null and tDispatchInfoPre.customerUsername.trim() != ''"> <if test="tDispatchInfoPre.customerUsername != null and tDispatchInfoPre.customerUsername.trim() != ''">
AND a.CUSTOMER_USERNAME = #{tDispatchInfoPre.customerUsername} AND a.CUSTOMER_USERNAME = #{tDispatchInfoPre.customerUsername}
</if> </if>
<if test="tDispatchInfoPre.customerUserLoginName != null and tDispatchInfoPre.customerUserLoginName.trim() != ''">
AND a.CUSTOMER_USER_LOGIN_NAME = #{tDispatchInfoPre.customerUsername.customerUserLoginName}
</if>
<if test="tDispatchInfoPre.expectedCollectionTime != null"> <if test="tDispatchInfoPre.expectedCollectionTime != null">
AND DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') = CURDATE() AND DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') = CURDATE()
</if> </if>
...@@ -209,6 +222,9 @@ ...@@ -209,6 +222,9 @@
<if test="tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''"> <if test="tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''">
AND a.CONTRACT_STATUS = #{tDispatchInfoPre.contractStatus} AND a.CONTRACT_STATUS = #{tDispatchInfoPre.contractStatus}
</if> </if>
<if test="tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''">
AND a.error_info is not null
</if>
<if test="tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''"> <if test="tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''">
${tDispatchInfoPre.authSql} ${tDispatchInfoPre.authSql}
</if> </if>
...@@ -289,4 +305,64 @@ ...@@ -289,4 +305,64 @@
order by a.create_time desc order by a.create_time desc
limit 0,2000 limit 0,2000
</select> </select>
<!--tDispatchInfoPre社保待派单数据查询-->
<select id="getDisPatcherSocialList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo">
SELECT
(@i :=@i+1) as rowIndex,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
a.dept_no deptNo,
a.RECORD_BASE recordBase,
a.SOCIAL_HOUSEHOLD_NAME socialHousehold,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.PENSION_START) as pensionStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.MEDICAL_START) as medicalStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.WORK_INJURY_START) as workInjuryStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.UNEMPLOY_START) as unemployStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.BIRTH_START) as birthStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.BIGAILMENT_START) as bigailmentStart,
a.PAYMENT_TYPE as paymentType,
if(a.PAYMENT_TYPE = '1',PENSION_CARDINAL,null) as pensionCardinal,
if(a.PAYMENT_TYPE = '1',MEDICAL_CARDINAL,null) as medicalCardinal,
if(a.PAYMENT_TYPE = '1',UNEMPLOYMENT_CARDINAL,null) as unemploymentCardinal,
if(a.PAYMENT_TYPE = '1',WORK_INJURY_CARDINAL,null) as workInjuryCardinal,
if(a.PAYMENT_TYPE = '1',BIRTH_CARDINAL,null) as birthCardinal,
if(a.PAYMENT_TYPE = '1',BIGAILMENT_CARDINAL,null) as bigailmentCardinal,
a.id preId,
a.CUSTOMER_USER_LOGIN_NAME as preLoginName,
if(#{type} = '1',concat('手动派单-',a.customer_username),concat('自动化派单-',a.customer_username)) preName
FROM t_dispatch_info_pre a,(select @i:=0) as itable
<where>
1=1
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
AND a.process_status in
<foreach item="status" index="index" collection="statusList" open="(" separator="," close=")">
#{status}
</foreach>
</where>
</select>
<select id="getAllUnDisData" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status = '0'
group by a.customer_user_login_name
</select>
<select id="getAllUnDisDataIdList" resultType="java.lang.String">
SELECT
id
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") <![CDATA[ <= ]]> CURDATE()
and a.process_status in ('1','2','4','8','9')
</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