Commit 7af29fe5 authored by huyuchen's avatar huyuchen

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

parents eaa6b88a cdb5f4c2
...@@ -114,7 +114,7 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac ...@@ -114,7 +114,7 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo); void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId); String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
String getContractByEmpIdCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptId") String deptNo); String getContractByEmpIdCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
String getMinDateByCardAndDeptId(@Param("vo") IdNameNoVo vo); String getMinDateByCardAndDeptId(@Param("vo") IdNameNoVo vo);
......
...@@ -45,8 +45,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; ...@@ -45,8 +45,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseServiceParamListVO;
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.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
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.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
...@@ -118,6 +120,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -118,6 +120,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private final TGzEmpInfoMapper tGzEmpInfoMapper; private final TGzEmpInfoMapper tGzEmpInfoMapper;
private final CspDaprUtils cspDaprUtil;
/** /**
* 员工合同信息表简单分页查询 * 员工合同信息表简单分页查询
* *
...@@ -1321,7 +1325,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1321,7 +1325,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
String leaveDate; String leaveDate;
String leaveReason; String leaveReason;
for (EmployeeContractVO vo : excelVOList) { for (EmployeeContractVO vo : excelVOList) {
vo.setRowIndex(i++); i++;
vo.setRowIndex(i);
baseSearchVO = paramMap.get(vo.getContractId()); baseSearchVO = paramMap.get(vo.getContractId());
leaveId = null; leaveId = null;
if (baseSearchVO != null) { if (baseSearchVO != null) {
...@@ -1330,6 +1335,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1330,6 +1335,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
leaveReason = baseSearchVO.getResultIdThree(); leaveReason = baseSearchVO.getResultIdThree();
vo.setLeaveDate(leaveDate); vo.setLeaveDate(leaveDate);
vo.setReduceReason(leaveReason); vo.setReduceReason(leaveReason);
vo.setChangeContractAndEmployee(CommonConstants.ONE_STRING);
} }
if (Common.isNotNull(leaveId)) { if (Common.isNotNull(leaveId)) {
rowLeaveMap.put(i, leaveId); rowLeaveMap.put(i, leaveId);
...@@ -1818,6 +1824,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1818,6 +1824,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return baseMapper.noPageCountDiy(searchVo); return baseMapper.noPageCountDiy(searchVo);
} }
// 审核或办理,更新离职待办
// isSuccess 0:失败;1:成功
private void sendLeave(String id, String doStatus, String isSuccess, String failRemark, YifuUser user) {
BaseServiceParamListVO updateVo = new BaseServiceParamListVO();
List<String> idList = new ArrayList<>();
idList.add(id);
updateVo.setListParam(idList);
updateVo.setDoType(CommonConstants.FOUR_STRING);
updateVo.setDoStatus(doStatus);
updateVo.setIsSuccess(isSuccess);
if (Common.isNotNull(isSuccess) && CommonConstants.ZERO_STRING.equals(isSuccess)) {
updateVo.setRemark(failRemark);
if (user != null && Common.isNotNull(user.getNickname())) {
updateVo.setUserName(user.getNickname());
}
}
cspDaprUtil.reduceHandleToLeave(updateVo);
}
/** /**
* @Author fxj * @Author fxj
* @Description 批量审核合同 * @Description 批量审核合同
...@@ -1846,6 +1871,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1846,6 +1871,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get( Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get(
CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "personnel_type"); CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "personnel_type");
String auditRemark = contractAuditVo.getAuditRemark();
for (TEmployeeContractInfo contract : contractInfos) { for (TEmployeeContractInfo contract : contractInfos) {
i++; i++;
if (contract.getAuditStatus() != CommonConstants.ONE_INT) { if (contract.getAuditStatus() != CommonConstants.ONE_INT) {
...@@ -2113,6 +2139,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2113,6 +2139,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//审核通过瓜子合同状态更新成合同审核通过 //审核通过瓜子合同状态更新成合同审核通过
updateGzOfferStatus(contract,CommonConstants.THIRTEEN_STRING,CommonConstants.EIGHT_STRING,user.getId(),user.getNickname()); updateGzOfferStatus(contract,CommonConstants.THIRTEEN_STRING,CommonConstants.EIGHT_STRING,user.getId(),user.getNickname());
} }
if (EmployeeConstants.SITUATION_SEVEN.equals(contract.getSituation())) {
this.sendLeave(contract.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, auditRemark, user);
}
} }
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[3]) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[3]) {
//更新合同状态为3线下签审核不通过 //更新合同状态为3线下签审核不通过
...@@ -2124,6 +2154,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2124,6 +2154,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPre.setProcessStatus(CommonConstants.THREE_STRING); contractPre.setProcessStatus(CommonConstants.THREE_STRING);
contractPreMapper.updateById(contractPre); contractPreMapper.updateById(contractPre);
} }
if (EmployeeConstants.SITUATION_SEVEN.equals(contract.getSituation())) {
this.sendLeave(contract.getId(), CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, auditRemark, user);
}
} }
// 不是待提交,记录审核记录 // 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
......
...@@ -68,6 +68,8 @@ import org.springframework.cache.Cache; ...@@ -68,6 +68,8 @@ import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -671,22 +673,35 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -671,22 +673,35 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
private YifuUser getNewYifuUser(String userId, String userName) {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
return new YifuUser(userId, 1L, "", userName,
userName, "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null, null);
}
// 离职待办减少项目档案 // 离职待办减少项目档案
@Override @Override
public BaseSearchListVO leaveToReduceEmp(BaseSearchListVO paramVo) { public BaseSearchListVO leaveToReduceEmp(BaseSearchListVO paramVo) {
List<BaseSearchVO> listParam = paramVo.getListParam(); List<BaseSearchVO> listParam = paramVo.getListParam();
YifuUser newUser = paramVo.getNewUser(); YifuUser newUser = getNewYifuUser(paramVo.getUserId(), paramVo.getUserName());
// 合同ID,离职待办ID // 合同ID,离职待办ID
BaseSearchListVO baseSearchListVO = new BaseSearchListVO(); BaseSearchListVO baseSearchListVO = new BaseSearchListVO();
if (listParam != null && !listParam.isEmpty()) { if (listParam != null && !listParam.isEmpty()) {
List<EmployeeLeaveVO> cachedDataList = new ArrayList<>(); List<EmployeeLeaveVO> cachedDataList = new ArrayList<>();
EmployeeLeaveVO vo; EmployeeLeaveVO vo;
Map<Integer, String> rowLeaveMap = new HashMap<>(); Map<Integer, String> rowLeaveMap = new HashMap<>();
int i=0; int i=1;// 内部是i+2
for (BaseSearchVO param : listParam) { for (BaseSearchVO param : listParam) {
i++;
vo = new EmployeeLeaveVO(); vo = new EmployeeLeaveVO();
vo.setRowIndex(i++); vo.setRowIndex(i);
vo.setEmpName(param.getEmpName()); vo.setEmpName(param.getEmpName());
vo.setEmpIdcard(param.getEmpIdCard()); vo.setEmpIdcard(param.getEmpIdCard());
vo.setLeaveReason(param.getResultIdThree()); vo.setLeaveReason(param.getResultIdThree());
......
...@@ -240,6 +240,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -240,6 +240,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
SOCIAL_IGNORE_FIELD.add("expectedCollectionType"); SOCIAL_IGNORE_FIELD.add("expectedCollectionType");
SOCIAL_IGNORE_FIELD.add("upperLimit"); SOCIAL_IGNORE_FIELD.add("upperLimit");
SOCIAL_IGNORE_FIELD.add("lowerLimit"); SOCIAL_IGNORE_FIELD.add("lowerLimit");
SOCIAL_IGNORE_FIELD.add("fundUpdateFlag");
} }
@Override @Override
......
...@@ -63,6 +63,8 @@ import lombok.extern.log4j.Log4j2; ...@@ -63,6 +63,8 @@ import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -605,11 +607,24 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -605,11 +607,24 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
private YifuUser getNewYifuUser(String userId, String userName) {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
return new YifuUser(userId, 1L, "", userName,
userName, "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null, null);
}
// 离职待办减少项目档案 // 离职待办减少项目档案
@Override @Override
public BaseSearchListVO leaveToReduceProject(BaseSearchListVO paramVo) { public BaseSearchListVO leaveToReduceProject(BaseSearchListVO paramVo) {
List<BaseSearchVO> listParam = paramVo.getListParam(); List<BaseSearchVO> listParam = paramVo.getListParam();
YifuUser newUser = paramVo.getNewUser(); YifuUser newUser = getNewYifuUser(paramVo.getUserId(), paramVo.getUserName());
// 合同ID,离职待办ID // 合同ID,离职待办ID
BaseSearchListVO baseSearchListVO = new BaseSearchListVO(); BaseSearchListVO baseSearchListVO = new BaseSearchListVO();
if (listParam != null && !listParam.isEmpty()) { if (listParam != null && !listParam.isEmpty()) {
...@@ -618,8 +633,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -618,8 +633,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
Map<Integer, String> rowLeaveMap = new HashMap<>(); Map<Integer, String> rowLeaveMap = new HashMap<>();
int i=0; int i=0;
for (BaseSearchVO param : listParam) { for (BaseSearchVO param : listParam) {
i++;
vo = new EmployeeXProjectVO(); vo = new EmployeeXProjectVO();
vo.setRowIndex(i++); vo.setRowIndex(i);
vo.setEmpName(param.getEmpName()); vo.setEmpName(param.getEmpName());
vo.setEmpIdcard(param.getEmpIdCard()); vo.setEmpIdcard(param.getEmpIdCard());
vo.setDeptNo(param.getDeptNo()); vo.setDeptNo(param.getDeptNo());
......
...@@ -1533,7 +1533,7 @@ ...@@ -1533,7 +1533,7 @@
select select
a.id a.id
from t_employee_info a from t_employee_info a
where a.DELETE_FLAG = '0' and a.file_Status = 0 and a.EMP_IDCARD = {empIdCard} where a.DELETE_FLAG = '0' and a.file_Status = 0 and a.EMP_IDCARD = #{empIdCard}
limit 1 limit 1
</select> </select>
......
...@@ -37,6 +37,10 @@ public class ErrorMessage<T> implements Serializable { ...@@ -37,6 +37,10 @@ public class ErrorMessage<T> implements Serializable {
*/ */
private T data; private T data;
// 添加默认构造函数
public ErrorMessage() {
}
public ErrorMessage(Integer lineNum, String message) { public ErrorMessage(Integer lineNum, String message) {
this.lineNum = lineNum; this.lineNum = lineNum;
this.color = "red"; this.color = "red";
......
...@@ -36,7 +36,8 @@ public class BaseSearchListVO implements Serializable { ...@@ -36,7 +36,8 @@ public class BaseSearchListVO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private YifuUser newUser; private String userId;
private String userName;
// 商险使用 // 商险使用
private List<String> listStringParam = new ArrayList<>(); private List<String> listStringParam = new ArrayList<>();
......
...@@ -49,9 +49,11 @@ public class BaseServiceParamListVO implements Serializable { ...@@ -49,9 +49,11 @@ public class BaseServiceParamListVO implements Serializable {
// @Schema(description = "减档:0空1无需处理2待减档8减档成功9减档失败") // @Schema(description = "减档:0空1无需处理2待减档8减档成功9减档失败")
private String doStatus; private String doStatus;
// 0:未最终成功;1:最终成功 // 0:失败;1:成功
private String isSuccess; private String isSuccess;
// 备注 // 备注
private String remark; private String remark;
// 操作人
private String userName;
} }
...@@ -709,7 +709,7 @@ public class ArchivesDaprUtil { ...@@ -709,7 +709,7 @@ public class ArchivesDaprUtil {
**/ **/
public R<BaseSearchListVO> leaveToReduceContract(BaseSearchListVO paramVo) { public R<BaseSearchListVO> leaveToReduceContract(BaseSearchListVO paramVo) {
R<BaseSearchListVO> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId() R<BaseSearchListVO> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/leaveToReduceContract", paramVo, BaseSearchListVO.class, SecurityConstants.FROM_IN); ,"/temployeecontractinfo/inner/leaveToReduceContract", paramVo, BaseSearchListVO.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("离职待办调用的批量派减合同失败!"); return R.failed("离职待办调用的批量派减合同失败!");
} }
......
...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo; ...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
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.BaseServiceParamListVO;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCspProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCspProperties;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -45,4 +46,16 @@ public class CspDaprUtils { ...@@ -45,4 +46,16 @@ public class CspDaprUtils {
public R<Boolean> updateRegistCustomerUserInfo(EmployeeRegistrationCustomerUserUpdateVo updateVo) { public R<Boolean> updateRegistCustomerUserInfo(EmployeeRegistrationCustomerUserUpdateVo updateVo) {
return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/updateRegistCustomerUserInfo", JSON.toJSONString(updateVo), Boolean.class, SecurityConstants.FROM_IN); return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/updateRegistCustomerUserInfo", JSON.toJSONString(updateVo), Boolean.class, SecurityConstants.FROM_IN);
} }
/**
* @Description: 社保、公积金、商险、合同办理成功或失败,更新离职待办
* @Author: hgw
* @Date: 2025/11/24 16:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
public R<String> reduceHandleToLeave(BaseServiceParamListVO vo) {
return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId()
,"/employeeregistrationleave/inner/reduceHandleToLeave"
, vo, String.class, SecurityConstants.FROM_IN);
}
} }
...@@ -425,7 +425,7 @@ public class SocialDaprUtils { ...@@ -425,7 +425,7 @@ public class SocialDaprUtils {
**/ **/
public R<BaseSearchListVO> leaveToReduceSocialAndFund(TDispatchReduceListVo paramVo) { public R<BaseSearchListVO> leaveToReduceSocialAndFund(TDispatchReduceListVo paramVo) {
R<BaseSearchListVO> res = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId() R<BaseSearchListVO> res = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId()
,"/tsocialfundinfo/inner/leaveToReduceSocialAndFund", paramVo, BaseSearchListVO.class, SecurityConstants.FROM_IN); ,"/tdispatchinfo/inner/leaveToReduceSocialAndFund", paramVo, BaseSearchListVO.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("离职待办调用的批量派减社保、公积金失败!"); return R.failed("离职待办调用的批量派减社保、公积金失败!");
} }
......
...@@ -3,6 +3,11 @@ spring.ldap.username=cn=admin,dc=worfu,dc=com ...@@ -3,6 +3,11 @@ spring.ldap.username=cn=admin,dc=worfu,dc=com
spring.ldap.password=Yifu123ABC! spring.ldap.password=Yifu123ABC!
spring.ldap.base=dc=worfu,dc=com spring.ldap.base=dc=worfu,dc=com
#spring.ldap.urls=ldap://192.168.1.65:389
#spring.ldap.username=cn=admin,dc=worfu,dc=com
#spring.ldap.password=yifu123456!
#spring.ldap.base=dc=worfu,dc=com
#ldap\u6D4B\u8BD5\u73AF\u5883\u914D\u7F6E-hgw-2025-04-23 #ldap\u6D4B\u8BD5\u73AF\u5883\u914D\u7F6E-hgw-2025-04-23
#spring.ldap.urls=ldap://192.168.1.65:389 #spring.ldap.urls=ldap://192.168.1.65:389
#spring.ldap.password=yifu123456! #spring.ldap.password=yifu123456!
\ No newline at end of file
...@@ -67,22 +67,6 @@ public class EmployeeRegistrationLeave extends BaseEntity { ...@@ -67,22 +67,6 @@ public class EmployeeRegistrationLeave extends BaseEntity {
@ExcelProperty("执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理") @ExcelProperty("执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理")
@Schema(description = "执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理") @Schema(description = "执行结果0空1未执行2执行中3部分成功4全部失败5全部成功6无需处理")
private String doStatus; private String doStatus;
/**
* 执行详情
*/
@ExcelAttribute(name = "执行详情", maxLength = 100)
@Length(max = 100, message = "执行详情不能超过100个字符")
@ExcelProperty("执行详情")
@Schema(description = "执行详情")
private String doDetail;
/**
* 原因
*/
@ExcelAttribute(name = "原因", maxLength = 100)
@Length(max = 100, message = "原因不能超过100个字符")
@ExcelProperty("原因")
@Schema(description = "原因")
private String doRemark;
/** /**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过 * 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
......
...@@ -60,10 +60,6 @@ public class EmployeeRegistrationLeaveConfirmExportVo { ...@@ -60,10 +60,6 @@ public class EmployeeRegistrationLeaveConfirmExportVo {
*/ */
@ExcelProperty("执行结果") @ExcelProperty("执行结果")
private String doStatus; private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/** /**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过 * 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
......
...@@ -50,10 +50,6 @@ public class EmployeeRegistrationLeaveExportVo { ...@@ -50,10 +50,6 @@ public class EmployeeRegistrationLeaveExportVo {
*/ */
@ExcelProperty("执行结果") @ExcelProperty("执行结果")
private String doStatus; private String doStatus;
@ExcelProperty("执行详情")
private String doDetail;
@ExcelProperty("原因")
private String doRemark;
/** /**
* 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过 * 合同终止:0空1无需处理2待发起3发起失败4待审核8审核通过10审核不通过
......
...@@ -62,6 +62,10 @@ public class EmployeeRegistrationLeaveSearchVo extends EmployeeRegistrationLeave ...@@ -62,6 +62,10 @@ public class EmployeeRegistrationLeaveSearchVo extends EmployeeRegistrationLeave
private List<String> idList; private List<String> idList;
@Schema(description = "状态多个")
@TableField(exist = false)
private String[] processStatusArray;
/** /**
* @Author fxj * @Author fxj
* 查询数据起 * 查询数据起
......
...@@ -225,7 +225,7 @@ public class EmployeeRegistrationLeaveController { ...@@ -225,7 +225,7 @@ public class EmployeeRegistrationLeaveController {
**/ **/
@Operation(description = "离职待办单个/批量派单") @Operation(description = "离职待办单个/批量派单")
@PostMapping("/batchDoLeave") @PostMapping("/batchDoLeave")
public R<ErrorInfoVo> batchDoLeave(@RequestBody List<String> idList, @RequestParam String isExit public R<List<EmployeeRegistrationLeave>> batchDoLeave(@RequestBody List<String> idList, @RequestParam String isExit
, @RequestParam(required = false) String doType) { , @RequestParam(required = false) String doType) {
return employeeRegistrationLeaveService.batchDoLeave(idList, isExit, doType); return employeeRegistrationLeaveService.batchDoLeave(idList, isExit, doType);
} }
......
...@@ -80,7 +80,7 @@ public interface EmployeeRegistrationLeaveService extends IService<EmployeeRegis ...@@ -80,7 +80,7 @@ public interface EmployeeRegistrationLeaveService extends IService<EmployeeRegis
// 批量派单 // 批量派单
// @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量) // @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量)
// @param doType: 需处理项:1社保2公积金3商险4合同5项目档案6人员档案 // @param doType: 需处理项:1社保2公积金3商险4合同5项目档案6人员档案
R<ErrorInfoVo> batchDoLeave(List<String> idList, String isExit, String doType); R<List<EmployeeRegistrationLeave>> batchDoLeave(List<String> idList, String isExit, String doType);
void reduceHandleToLeave(BaseServiceParamListVO vo); void reduceHandleToLeave(BaseServiceParamListVO vo);
......
...@@ -1457,6 +1457,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1457,6 +1457,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
//服务类型包含公积金购买时
if (preVo.getServerItem().contains("公积金") && (null != preVo.getExitFundInfoList()
|| null != preVo.getDispatchInfoFundPreVo())) {
if (null != preVo.getExitFundInfoList() && !preVo.getExitFundInfoList().isEmpty()) {
preVo.getExitFundInfoList().forEach(fundPreDetailVo -> fundPreDetailVo.setRegisterId(domainR.getData()));
}
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoFundPreVo()) {
initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData());
}
socialDaprUtils.saveFundPreInfo(preVo);
}
} }
}catch (Exception e) { }catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
a.insurance_id a.insurance_id
FROM employee_registration_leave_insurance a FROM employee_registration_leave_insurance a
<where> <where>
do_status_insurance in ('2','3','9') do_status_insurance in ('0','2','3','9')
<if test="idList != null"> <if test="idList != null">
AND a.insurance_id in AND a.insurance_id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")"> <foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<set> <set>
do_status_insurance = #{status} do_status_insurance = #{status}
</set> </set>
where do_status_insurance in ('2','3','9') and insurance_id in where do_status_insurance in ('0','2','3','9') and insurance_id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")"> <foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
<id property="id" column="id"/> <id property="id" column="id"/>
<result property="leaveStatus" column="leave_status"/> <result property="leaveStatus" column="leave_status"/>
<result property="doStatus" column="do_status"/> <result property="doStatus" column="do_status"/>
<result property="doDetail" column="do_detail"/>
<result property="doRemark" column="do_remark"/>
<result property="doStatusContract" column="do_status_contract"/> <result property="doStatusContract" column="do_status_contract"/>
<result property="doStatusSocial" column="do_status_social"/> <result property="doStatusSocial" column="do_status_social"/>
<result property="doStatusFund" column="do_status_fund"/> <result property="doStatusFund" column="do_status_fund"/>
...@@ -77,8 +75,6 @@ ...@@ -77,8 +75,6 @@
<id property="id" column="id"/> <id property="id" column="id"/>
<result property="leaveStatus" column="leave_status"/> <result property="leaveStatus" column="leave_status"/>
<result property="doStatus" column="do_status"/> <result property="doStatus" column="do_status"/>
<result property="doDetail" column="do_detail"/>
<result property="doRemark" column="do_remark"/>
<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"/>
...@@ -162,8 +158,6 @@ ...@@ -162,8 +158,6 @@
a.id, a.id,
a.leave_status, a.leave_status,
a.do_status, a.do_status,
a.do_detail,
a.do_remark,
a.create_by, a.create_by,
a.create_name, a.create_name,
a.create_time, a.create_time,
...@@ -232,8 +226,7 @@ ...@@ -232,8 +226,7 @@
a.close_remark_emp, a.close_remark_emp,
a.close_remark_emp_project, a.close_remark_emp_project,
a.leave_reason_name, a.leave_reason_name,
a.leave_reason_id, a.leave_reason_id
a.customer_username_new
</sql> </sql>
...@@ -286,12 +279,6 @@ ...@@ -286,12 +279,6 @@
<if test="employeeRegistrationLeave.doStatus != null and employeeRegistrationLeave.doStatus.trim() != ''"> <if test="employeeRegistrationLeave.doStatus != null and employeeRegistrationLeave.doStatus.trim() != ''">
AND a.do_status = #{employeeRegistrationLeave.doStatus} AND a.do_status = #{employeeRegistrationLeave.doStatus}
</if> </if>
<if test="employeeRegistrationLeave.doDetail != null and employeeRegistrationLeave.doDetail.trim() != ''">
AND a.do_detail = #{employeeRegistrationLeave.doDetail}
</if>
<if test="employeeRegistrationLeave.doRemark != null and employeeRegistrationLeave.doRemark.trim() != ''">
AND a.do_remark = #{employeeRegistrationLeave.doRemark}
</if>
<if test="employeeRegistrationLeave.createBy != null and employeeRegistrationLeave.createBy.trim() != ''"> <if test="employeeRegistrationLeave.createBy != null and employeeRegistrationLeave.createBy.trim() != ''">
AND a.create_by = #{employeeRegistrationLeave.createBy} AND a.create_by = #{employeeRegistrationLeave.createBy}
</if> </if>
...@@ -404,8 +391,6 @@ ...@@ -404,8 +391,6 @@
<sql id="Base_Export_List"> <sql id="Base_Export_List">
case a.leave_status when '0' then '待确认' when '1' then '待处理' when '2' then '处理中' when '3' then '已处理' else '--' end leave_status, case a.leave_status when '0' then '待确认' when '1' then '待处理' when '2' then '处理中' when '3' then '已处理' else '--' end leave_status,
case a.do_status when '0' then '--' when '1' then '未执行' when '2' then '执行中' when '3' then '部分成功' when '4' then '全部失败' when '5' then '全部成功' when '6' then '无需处理' else '--' end do_status, case a.do_status when '0' then '--' when '1' then '未执行' when '2' then '执行中' when '3' then '部分成功' when '4' then '全部失败' when '5' then '全部成功' when '6' then '无需处理' else '--' end do_status,
a.do_detail,
a.do_remark,
case a.do_status_contract when '0' then '--' when '1' then '无需处理' when '2' then '待发起' when '3' then '发起失败' case a.do_status_contract when '0' then '--' when '1' then '无需处理' when '2' then '待发起' when '3' then '发起失败'
when '4' then '待审核' when '8' then '审核通过' when '10' then '审核不通过' else '--' end do_status_contract, when '4' then '待审核' when '8' then '审核通过' when '10' then '审核不通过' else '--' end do_status_contract,
case a.do_status_social when '0' then '--' when '1' then '无需处理' when '2' then '待派单' when '3' then '发起失败' case a.do_status_social when '0' then '--' when '1' then '无需处理' when '2' then '待派单' when '3' then '发起失败'
...@@ -465,7 +450,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -465,7 +450,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
1=1 1=1
<include refid="employeeRegistrationLeave_where"/> <include refid="employeeRegistrationLeave_where"/>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.create_time desc,b.id asc
</select> </select>
<!-- 离职待办列表2000条--> <!-- 离职待办列表2000条-->
...@@ -477,8 +462,17 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -477,8 +462,17 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
<where> <where>
1=1 1=1
<include refid="employeeRegistrationLeave_where"/> <include refid="employeeRegistrationLeave_where"/>
<if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.processStatusArray != null and employeeRegistrationLeave.processStatusArray.length > 0">
AND a.leave_status in
<foreach item="statusStr" index="index" collection="employeeRegistrationLeave.processStatusArray" open="("
separator="," close=")">
#{statusStr}
</foreach>
</if>
</if>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.create_time desc,b.id asc
limit 2000 limit 2000
</select> </select>
<!--离职确认列表--> <!--离职确认列表-->
...@@ -491,7 +485,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -491,7 +485,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
a.confirm_user is not null a.confirm_user is not null
<include refid="employeeRegistrationLeave_where"/> <include refid="employeeRegistrationLeave_where"/>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.create_time desc,b.id asc
</select> </select>
<!-- 离职待办导出--> <!-- 离职待办导出-->
...@@ -504,7 +498,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -504,7 +498,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
1=1 1=1
<include refid="employeeRegistrationLeave_where"/> <include refid="employeeRegistrationLeave_where"/>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.create_time desc,b.id asc
<if test="employeeRegistrationLeave != null"> <if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.limitStart != null"> <if test="employeeRegistrationLeave.limitStart != null">
limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd} limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd}
...@@ -521,7 +515,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -521,7 +515,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
a.confirm_user is not null a.confirm_user is not null
<include refid="employeeRegistrationLeave_where"/> <include refid="employeeRegistrationLeave_where"/>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.create_time desc,b.id asc
<if test="employeeRegistrationLeave != null"> <if test="employeeRegistrationLeave != null">
<if test="employeeRegistrationLeave.limitStart != null"> <if test="employeeRegistrationLeave.limitStart != null">
limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd} limit #{employeeRegistrationLeave.limitStart},#{employeeRegistrationLeave.limitEnd}
...@@ -554,8 +548,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -554,8 +548,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
<select id="selectLeaveListBySure" resultMap="employeeRegistrationLeaveMap" > <select id="selectLeaveListBySure" resultMap="employeeRegistrationLeaveMap" >
SELECT SELECT
a.ID, <include refid="Base_Column_List"/>
a.leave_status
FROM employee_registration_leave a FROM employee_registration_leave a
where a.leave_status = '0' where a.leave_status = '0'
<if test="idList != null"> <if test="idList != null">
...@@ -599,7 +592,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -599,7 +592,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
</foreach> </foreach>
</if> </if>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.customer_username_new asc,b.id asc
</select> </select>
<!-- 查询需要办理的数据 --> <!-- 查询需要办理的数据 -->
...@@ -610,19 +603,19 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -610,19 +603,19 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
<where> 1=1 <where> 1=1
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">
<if test="doType != null and doType.trim() != ''"> <if test="doType != null and doType.trim() != ''">
<if test="doType == '1'"> <if test='doType == "1" '>
and a.social_id in and a.social_id in
</if> </if>
<if test="doType == '2'"> <if test='doType == "2" '>
and a.fund_id in and a.fund_id in
</if> </if>
<if test="doType == '4'"> <if test='doType == "4" '>
and a.contract_id in and a.contract_id in
</if> </if>
<if test="doType == '5'"> <if test='doType == "5" '>
and a.emp_project_id in and a.emp_project_id in
</if> </if>
<if test="doType == '6'"> <if test='doType == "6" '>
and a.emp_id in and a.emp_id in
</if> </if>
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=","> <foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
......
...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*; ...@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator; import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseServiceParamListVO;
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.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
...@@ -61,6 +62,8 @@ import org.apache.commons.lang3.StringUtils; ...@@ -61,6 +62,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
...@@ -164,6 +167,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -164,6 +167,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Autowired @Autowired
private WxConfig wxConfig; private WxConfig wxConfig;
@Autowired
private CspDaprUtils cspDaprUtil;
/***********************商险办理********************************/ /***********************商险办理********************************/
/** /**
* 每日定时刷新商险到期数据 * 每日定时刷新商险到期数据
...@@ -4835,17 +4841,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4835,17 +4841,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list; return list;
} }
private YifuUser getNewYifuUser(String userId, String userName) {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
return new YifuUser(userId, 1L, "", userName,
userName, "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null, null);
}
// 离职导致的减员 // 离职导致的减员
@Override @Override
public BaseSearchListVO leaveToReduceInsurance(BaseSearchListVO paramVo) { public BaseSearchListVO leaveToReduceInsurance(BaseSearchListVO paramVo) {
List<String> insuranceList = paramVo.getListStringParam(); List<String> insuranceList = paramVo.getListStringParam();
YifuUser newUser = paramVo.getNewUser(); YifuUser newUser = getNewYifuUser(paramVo.getUserId(), paramVo.getUserName());
List<InsuranceExportListVO> oldList = baseMapper.getInsuranceExportListBySelect(insuranceList); List<InsuranceExportListVO> oldList = baseMapper.getInsuranceExportListBySelect(insuranceList);
List<InsuranceRefundCheck> insuranceRefundCheckList = new ArrayList<>(); List<InsuranceRefundCheck> insuranceRefundCheckList = new ArrayList<>();
InsuranceRefundCheck refund; InsuranceRefundCheck refund;
if (oldList != null && !oldList.isEmpty()) { if (oldList != null && !oldList.isEmpty()) {
for (InsuranceExportListVO vo : oldList) { for (InsuranceExportListVO vo : oldList) {
refund = new InsuranceRefundCheck(); refund = new InsuranceRefundCheck();
refund.setId(vo.getId());
refund.setEmpName(vo.getEmpName()); refund.setEmpName(vo.getEmpName());
// 员工姓名 员工身份证号码 保险公司名称 险种名称 购买标准(元) 保单开始日期 保单结束日期 // 员工姓名 员工身份证号码 保险公司名称 险种名称 购买标准(元) 保单开始日期 保单结束日期
refund.setEmpIdcardNo(vo.getEmpIdcardNo()); refund.setEmpIdcardNo(vo.getEmpIdcardNo());
...@@ -5347,11 +5367,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5347,11 +5367,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//批量更新 //批量更新
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
List<String> idList = new ArrayList<>();
for (TInsuranceDetail s : detailList) { for (TInsuranceDetail s : detailList) {
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getId,s.getId()).set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT); updateWrapper.eq(TInsuranceDetail :: getId,s.getId()).set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT);
update(updateWrapper); update(updateWrapper);
idList.add(s.getId());
} }
// 商险办理,更新离职待办
this.sendLeave(idList, CommonConstants.SIX_STRING, CommonConstants.ONE_STRING, null, user);
} }
//批量更新 //批量更新
if (CollectionUtils.isNotEmpty(refundList)){ if (CollectionUtils.isNotEmpty(refundList)){
...@@ -5416,8 +5440,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5416,8 +5440,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail.setIsOverdue(null); tInsuranceDetail.setIsOverdue(null);
tInsuranceDetail.setIsEffect(null); tInsuranceDetail.setIsEffect(null);
tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT); tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT);
// 已减员
this.sendLeaveById(tInsuranceDetail.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, remark, user);
}else { }else {
tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT); tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT);
// 9减员退回
this.sendLeaveById(tInsuranceDetail.getId(), CommonConstants.NINE_STRING, CommonConstants.ZERO_STRING, remark, user);
} }
tInsuranceDetail.setUpdateBy(user.getId()); tInsuranceDetail.setUpdateBy(user.getId());
tInsuranceDetail.setUpdateTime(LocalDateTime.now()); tInsuranceDetail.setUpdateTime(LocalDateTime.now());
...@@ -5510,13 +5540,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5510,13 +5540,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate.setCreateBy(user.getId()); operate.setCreateBy(user.getId());
if(InsurancesConstants.SUCCESS.equals(param.getHandType())){ if(InsurancesConstants.SUCCESS.equals(param.getHandType())){
operate.setOperateDesc(InsurancesConstants.INSURANCE_REFUND_SUCCESS); operate.setOperateDesc(InsurancesConstants.INSURANCE_REFUND_SUCCESS);
// 商险办理,更新离职待办
this.sendLeaveById(param.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, param.getRemark(), user);
}else{ }else{
operate.setOperateDesc(InsurancesConstants.INSURANCE_REFUND_FAILED); operate.setOperateDesc(InsurancesConstants.INSURANCE_REFUND_FAILED);
// 商险办理,更新离职待办
this.sendLeaveById(param.getId(), CommonConstants.NINE_STRING, CommonConstants.ONE_STRING, param.getRemark(), user);
} }
operateList.add(operate); operateList.add(operate);
sourceIdCardList.add(detail.getEmpIdcardNo()); sourceIdCardList.add(detail.getEmpIdcardNo());
replaceIdList.add(detail.getId()); replaceIdList.add(detail.getId());
} }
} }
tInsuranceOperateService.saveBatch(operateList); tInsuranceOperateService.saveBatch(operateList);
// 减员失效 // 减员失效
...@@ -9155,4 +9194,43 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9155,4 +9194,43 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
return returnVo; return returnVo;
} }
// 审核或办理,更新离职待办
// isSuccess 0:失败;1:成功
private void sendLeave(List<String> idList, String doStatus, String isSuccess, String failRemark, YifuUser user) {
BaseServiceParamListVO updateVo = new BaseServiceParamListVO();
updateVo.setListParam(idList);
updateVo.setDoType(CommonConstants.THREE_STRING);
updateVo.setDoStatus(doStatus);
updateVo.setIsSuccess(isSuccess);
if (Common.isNotNull(isSuccess) && CommonConstants.ZERO_STRING.equals(isSuccess)) {
updateVo.setRemark(failRemark);
if (user != null && Common.isNotNull(user.getNickname())) {
updateVo.setUserName(user.getNickname());
}
}
cspDaprUtil.reduceHandleToLeave(updateVo);
}
// 审核或办理,更新离职待办
// isSuccess 0:失败;1:成功
private void sendLeaveById(String id, String doStatus, String isSuccess, String failRemark, YifuUser user) {
BaseServiceParamListVO updateVo = new BaseServiceParamListVO();
List<String> idList = new ArrayList<>();
idList.add(id);
updateVo.setListParam(idList);
updateVo.setDoType(CommonConstants.THREE_STRING);
updateVo.setDoStatus(doStatus);
updateVo.setIsSuccess(isSuccess);
if (Common.isNotNull(isSuccess) && CommonConstants.ZERO_STRING.equals(isSuccess)) {
updateVo.setRemark(failRemark);
if (user != null && Common.isNotNull(user.getNickname())) {
updateVo.setUserName(user.getNickname());
}
}
cspDaprUtil.reduceHandleToLeave(updateVo);
}
} }
...@@ -265,6 +265,11 @@ ...@@ -265,6 +265,11 @@
a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0 a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<include refid="tInsuranceAlert_where"/> <include refid="tInsuranceAlert_where"/>
<if test="tInsuranceAlert != null"> <if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.isBefore != null and tInsuranceAlert.isBefore.trim() != ''">
<if test='tInsuranceAlert.isBefore.trim() == "1"'>
AND DATE_FORMAT(now(),'%Y-%m-%d') >= DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d')
</if>
</if>
<if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0"> <if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0">
AND b.PROCESS_STATUS in AND b.PROCESS_STATUS in
<foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="(" <foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="("
...@@ -288,7 +293,7 @@ ...@@ -288,7 +293,7 @@
<include refid="tInsuranceAlert_where"/> <include refid="tInsuranceAlert_where"/>
<if test="tInsuranceAlert != null"> <if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.isBefore != null and tInsuranceAlert.isBefore.trim() != ''"> <if test="tInsuranceAlert.isBefore != null and tInsuranceAlert.isBefore.trim() != ''">
<if test="tInsuranceAlert.isBefore.trim() == '1'"> <if test='tInsuranceAlert.isBefore.trim() == "1"'>
AND DATE_FORMAT(now(),'%Y-%m-%d') >= DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d') AND DATE_FORMAT(now(),'%Y-%m-%d') >= DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d')
</if> </if>
</if> </if>
...@@ -315,6 +320,11 @@ ...@@ -315,6 +320,11 @@
a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0 a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<include refid="tInsuranceAlert_where"/> <include refid="tInsuranceAlert_where"/>
<if test="tInsuranceAlert != null"> <if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.isBefore != null and tInsuranceAlert.isBefore.trim() != ''">
<if test='tInsuranceAlert.isBefore.trim() == "1"'>
AND DATE_FORMAT(now(),'%Y-%m-%d') >= DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d')
</if>
</if>
<if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0"> <if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0">
AND b.PROCESS_STATUS in AND b.PROCESS_STATUS in
<foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="(" <foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="("
...@@ -342,6 +352,11 @@ ...@@ -342,6 +352,11 @@
a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0 a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<include refid="tInsuranceAlert_where"/> <include refid="tInsuranceAlert_where"/>
<if test="tInsuranceAlert != null"> <if test="tInsuranceAlert != null">
<if test="tInsuranceAlert.isBefore != null and tInsuranceAlert.isBefore.trim() != ''">
<if test='tInsuranceAlert.isBefore.trim() == "1"'>
AND DATE_FORMAT(now(),'%Y-%m-%d') >= DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d')
</if>
</if>
<if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0"> <if test="tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0">
AND b.PROCESS_STATUS in AND b.PROCESS_STATUS in
<foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="(" <foreach item="statusStr" index="index" collection="tInsuranceAlert.processStatusArray" open="("
......
...@@ -33,8 +33,11 @@ import java.util.List; ...@@ -33,8 +33,11 @@ import java.util.List;
@Data @Data
public class TDispatchReduceListVo implements Serializable { public class TDispatchReduceListVo implements Serializable {
private YifuUser newUser; private static final long serialVersionUID = 1L;
List<TDispatchReduceVo> listParam; private String userId;
private String userName;
private List<TDispatchReduceVo> listParam;
} }
...@@ -508,8 +508,8 @@ public class TDispatchInfoController { ...@@ -508,8 +508,8 @@ public class TDispatchInfoController {
@SysLog("离职调用的派减社保或公积金") @SysLog("离职调用的派减社保或公积金")
@PostMapping("/inner/leaveToReduceSocialAndFund") @PostMapping("/inner/leaveToReduceSocialAndFund")
@Inner @Inner
public R<BaseSearchListVO> leaveToReduceSocialAndFund(@RequestBody TDispatchReduceListVo paramVo) { public BaseSearchListVO leaveToReduceSocialAndFund(@RequestBody TDispatchReduceListVo paramVo) {
return new R<>(tDispatchInfoService.leaveToReduceSocialAndFund(paramVo)); return tDispatchInfoService.leaveToReduceSocialAndFund(paramVo);
} }
/** /**
......
...@@ -53,11 +53,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock; ...@@ -53,11 +53,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseServiceParamListVO;
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.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
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 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.social.config.*; import com.yifu.cloud.plus.v1.yifu.social.config.*;
...@@ -125,6 +123,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -125,6 +123,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private final ArchivesDaprUtil archivesDaprUtil; private final ArchivesDaprUtil archivesDaprUtil;
private final CspDaprUtils cspDaprUtil;
private final TSocialFundInfoMapper socialFundMapper; private final TSocialFundInfoMapper socialFundMapper;
private final SysBaseSetInfoMapper baseSetMapper; private final SysBaseSetInfoMapper baseSetMapper;
...@@ -3133,6 +3133,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3133,6 +3133,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return this.judgeAllMessage(errorMessageList); return this.judgeAllMessage(errorMessageList);
} }
private YifuUser getNewYifuUser(String userId, String userName) {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
return new YifuUser(userId, 1L, "", userName,
userName, "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null, null);
}
// 离职待办调用的批量派减社保、公积金 // 离职待办调用的批量派减社保、公积金
@Override @Override
public BaseSearchListVO leaveToReduceSocialAndFund(TDispatchReduceListVo paramVo) { public BaseSearchListVO leaveToReduceSocialAndFund(TDispatchReduceListVo paramVo) {
...@@ -3153,8 +3166,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3153,8 +3166,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
rowLeaveMap.put(i, leaveId); rowLeaveMap.put(i, leaveId);
} }
cachedDataList.add(vo); cachedDataList.add(vo);
if (cachedDataList.size() >= batchCount) { if (cachedDataList.size() >= batchCount || i==excelVOList.size()) {
batchReduceDispatch(cachedDataList, errorMessageList, paramVo.getNewUser(), null, null); batchReduceDispatch(cachedDataList, errorMessageList, getNewYifuUser(paramVo.getUserId(), paramVo.getUserName()), null, null);
// 存储完成清理 list // 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(batchCount); cachedDataList = ListUtils.newArrayListWithExpectedSize(batchCount);
} }
...@@ -3814,6 +3827,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3814,6 +3827,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 各个明细项的可派减项为待办理 // 各个明细项的可派减项为待办理
initReduceStatus(sf, socialInfo); initReduceStatus(sf, socialInfo);
} }
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.FIVE_STRING, CommonConstants.ONE_STRING, auditRemark, user);
//派减审核不通过 需要处理预估数据 //派减审核不通过 需要处理预估数据
} else if (CommonConstants.ONE_INT == flag) { } else if (CommonConstants.ONE_INT == flag) {
// 作废更新:社保状态、同步预估数据 8 审核不通过直接作废 // 作废更新:社保状态、同步预估数据 8 审核不通过直接作废
...@@ -3830,6 +3846,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3830,6 +3846,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.THREE_STRING); sf.setSocialStatus(CommonConstants.THREE_STRING);
} }
sf.setSocialReduceDate(null); sf.setSocialReduceDate(null);
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, auditRemark, user);
} }
} }
//自动化处理,如果未配置还是人工处理 //自动化处理,如果未配置还是人工处理
...@@ -3911,6 +3930,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3911,6 +3930,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatchInfoPre.setErrorBackInfo(null); dispatchInfoPre.setErrorBackInfo(null);
dispatchInfoPreMapper.updateById(dispatchInfoPre); dispatchInfoPreMapper.updateById(dispatchInfoPre);
} }
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.FIVE_STRING, CommonConstants.ONE_STRING, auditRemark, user);
// 审核不通过 // 审核不通过
} else if (CommonConstants.ONE_INT == flag) { } else if (CommonConstants.ONE_INT == flag) {
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据 // 作废更新:公积金状态、同步档案的公积金状态、同步预估数据
...@@ -3934,6 +3955,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3934,6 +3955,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sendDisFalureMessageToWx(dispatchInfoPre,socialAutoLog.getId()); sendDisFalureMessageToWx(dispatchInfoPre,socialAutoLog.getId());
} }
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, auditRemark, user);
} }
providentFund.setAuditTime(now); providentFund.setAuditTime(now);
providentFund.setAuditUser(user.getId()); providentFund.setAuditUser(user.getId());
...@@ -4705,6 +4728,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4705,6 +4728,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS); temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
temp.append(ServiceUtil.ifNullToEmpty(handleRemark)); temp.append(ServiceUtil.ifNullToEmpty(handleRemark));
initAuditInfo(auditInfo, temp.toString(), CommonConstants.THREE_STRING, user, temp.toString(), remark); initAuditInfo(auditInfo, temp.toString(), CommonConstants.THREE_STRING, user, temp.toString(), remark);
// 派减审核或办理,更新离职待办
if (Common.isNotNull(socialInfo.getHandleStatus()) && CommonConstants.SEVEN_STRING.equals(socialInfo.getHandleStatus())) {
// 部分失败是0
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.SIX_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
} else {
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, handleRemark, user);
}
} else { } else {
temp.setLength(CommonConstants.ZERO_INT); temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_REDUCE); temp.append(DispatchConstants.DISPATCH_SOCIAL_REDUCE);
...@@ -4712,8 +4743,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4712,8 +4743,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL); temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
temp.append(ServiceUtil.ifNullToEmpty(handleRemark)); temp.append(ServiceUtil.ifNullToEmpty(handleRemark));
initAuditInfo(auditInfo, temp.toString(), CommonConstants.FOUR_STRING, user, temp.toString(), remark); initAuditInfo(auditInfo, temp.toString(), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
// 派减审核或办理,更新离职待办
// 7 派减部分办理失败
if (Common.isNotNull(socialInfo.getHandleStatus()) && CommonConstants.SEVEN_STRING.equals(socialInfo.getHandleStatus())) {
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.SIX_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
} else {
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.NINE_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
}
} }
auditInfo.setSocialId(dis.getId()); auditInfo.setSocialId(dis.getId());
} else { } else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保数据:" + dis.getEmpName())); errorList.add(new ErrorMessage(-1, "找不到对应员工社保数据:" + dis.getEmpName()));
return true; return true;
...@@ -4750,9 +4792,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4750,9 +4792,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ZERO_INT == flag) { if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark);
dis.setFundHandleStatus(CommonConstants.ONE_STRING); dis.setFundHandleStatus(CommonConstants.ONE_STRING);
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, handleRemark, user);
} else { } else {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark);
dis.setFundHandleStatus(CommonConstants.TWO_STRING); dis.setFundHandleStatus(CommonConstants.TWO_STRING);
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.NINE_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
} }
auditInfo.setProvidentId(dis.getId()); auditInfo.setProvidentId(dis.getId());
} else { } else {
...@@ -4923,6 +4970,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4923,6 +4970,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return false; return false;
} }
// 审核或办理,更新离职待办
// isSuccess 0:失败;1:成功
private void sendLeave(String id, String doType, String doStatus, String isSuccess, String failRemark, YifuUser user) {
BaseServiceParamListVO updateVo = new BaseServiceParamListVO();
List<String> idList = new ArrayList<>();
idList.add(id);
updateVo.setListParam(idList);
updateVo.setDoType(doType);
updateVo.setDoStatus(doStatus);
updateVo.setIsSuccess(isSuccess);
if (Common.isNotNull(isSuccess) && CommonConstants.ZERO_STRING.equals(isSuccess)) {
updateVo.setRemark(failRemark);
if (user != null && Common.isNotNull(user.getNickname())) {
updateVo.setUserName(user.getNickname());
}
}
cspDaprUtil.reduceHandleToLeave(updateVo);
}
/** /**
* @param dis * @param dis
* @Description: 获取办理/审核时,要变更的预估库的种类 * @Description: 获取办理/审核时,要变更的预估库的种类
...@@ -7065,6 +7134,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7065,6 +7134,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/ **/
@Override @Override
public boolean haveRole(YifuUser user, long roleId) { public boolean haveRole(YifuUser user, long roleId) {
if (user.getClientRoleMap() == null) {
return false;
}
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP); List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) { for (Long role : roleList) {
if (role == roleId) { if (role == roleId) {
......
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