Commit 24b68e38 authored by fangxinjiang's avatar fangxinjiang

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

parents a2146a39 b37d8f4f
......@@ -551,6 +551,13 @@ public class TEmployeeContractInfo extends BaseEntity {
@TableField(exist = false)
private String preName;
/**
* 离职待办的用户名称
*/
@Schema(description = "离职待办的用户名称")
@TableField(exist = false)
private String leaveName;
/**
* 试用期(单位月)
*/
......
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
......@@ -252,4 +253,12 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelAttribute(name = "preName")
@ExcelProperty(value ="preName")
private String preName;
/**
* 离职待办的用户名称
*/
@Schema(description = "离职待办的用户名称")
@TableField(exist = false)
private String leaveName;
}
......@@ -200,7 +200,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
user = this.getNewYifuUser();
user = this.getNewYifuUser(tEmployeeContractInfo.getLeaveName());
}
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
......@@ -508,6 +508,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
initType(tEmployeeContractInfo);
if (Common.isEmpty(tEmployeeContractInfo.getId())) {
if (Common.isEmpty(tEmployeeContractInfo.getApplyNo())) {
String code = this.getCode(true);
tEmployeeContractInfo.setApplyNo(code);
}
// 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
if (Common.isNotNull(isCur)) {
......@@ -701,6 +705,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
audit.setCreateBy("1");
audit.setCreateTime(LocalDateTime.now());
}
if (Common.isNotNull(tEmployeeContractInfo.getLeaveName())) {
audit.setCreateName(tEmployeeContractInfo.getLeaveName());
audit.setCreateBy("1");
audit.setCreateTime(LocalDateTime.now());
}
tEmployeeContractAuditMapper.updateById(audit);
}
}
......@@ -957,6 +966,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//审核通过瓜子合同状态更新合同审核通过
updateGzOfferStatus(contractInfo,CommonConstants.THIRTEEN_STRING,CommonConstants.EIGHT_STRING,user.getId(),user.getNickname());
}
if (EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation())) {
// 合同终止,通知离职待办变更状态
this.sendLeave(contractInfo.getId(), CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, tEmployeeContractInfo.getAuditRemark(), user);
}
}
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[3]) {
if (!fascFlag) {
......@@ -970,6 +984,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPreMapper.updateById(contractPre);
}
}
if (EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation())) {
// 合同终止,通知离职待办变更状态
this.sendLeave(contractInfo.getId(), CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, tEmployeeContractInfo.getAuditRemark(), user);
}
}
tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setContractNo(contractInfo.getContractNo());
......@@ -1309,6 +1327,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
public BaseSearchListVO leaveToReduceContract(BaseSearchListVO paramVo) {
List<String> idList = new ArrayList<>();
List<BaseSearchVO> listParam = paramVo.getListParam();
String userName = paramVo.getUserName();
Map<String, BaseSearchVO> paramMap = new HashMap<>();
for (BaseSearchVO param : listParam) {
idList.add(param.getSearchKey());
......@@ -1327,6 +1346,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
for (EmployeeContractVO vo : excelVOList) {
i++;
vo.setRowIndex(i);
vo.setLeaveName(userName);
baseSearchVO = paramMap.get(vo.getContractId());
leaveId = null;
if (baseSearchVO != null) {
......@@ -2505,16 +2525,20 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
private YifuUser getNewYifuUser() {
private YifuUser getNewYifuUser(String leaveName) {
if (Common.isEmpty(leaveName)) {
leaveName = "自动化派单";
}
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
return new YifuUser("6", 1L, "", "自动化派单",
"自动化派单", "0", SecurityConstants.BCRYPT + "123456",
return new YifuUser("6", 1L, "", leaveName,
leaveName, "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null,null);
}
}
......@@ -129,6 +129,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Autowired
@Lazy
private EmployeeRegistrationPreService registrationPreService;
private StringBuilder errorTemp;
@Override
public TSalaryStandardSelectViewVo getUnProjectEmpList(List<TSalaryStandardUnprojectVo> voList) {
......@@ -766,10 +767,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessage.append(";");
errorMessage.append(leaveReason);
errorMessage.append(";");
if (Common.isEmpty(excel.getLeaveRemark())) {
errorMessage.append("");
errorMessage.append(";");
}
// 倩倩说优化一下,没有这个就不显示,且这段特殊逻辑代码不删除,以作历史记录(历史代码是wzb写的,应该是特殊要求
/*if Common.isEmpty(excel.getLeaveRemark(
errorMessage.append("")
errorMessage.append(";")
*/
if (Common.isNotNull(excel.getLeaveRemark())) {
errorMessage.append(excel.getLeaveRemark());
errorMessage.append(";");
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
......@@ -26,6 +27,7 @@ import lombok.Data;
* @date 2025-11-19 19:23:15
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationLeaveConfirmExportVo {
@ExcelProperty("项目名称")
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
......@@ -26,6 +27,7 @@ import lombok.Data;
* @date 2025-11-19 19:23:15
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationLeaveExportVo {
@ExcelProperty("项目名称")
......
......@@ -5030,6 +5030,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//被替换人
one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, vo.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()) {
byId = this.getById(one.getFromInsuranceDetailId());
......@@ -5049,6 +5051,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换人
fromOne = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getFromInsuranceDetailId, vo.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(fromOne).isPresent()) {
byId = this.getById(fromOne.getToInsuranceDetailId());
......
......@@ -71,10 +71,10 @@ public class TSocialFriendController {
return tSocialFriendService.testToSocialFriendGet();
}
@Operation(description = "测试线上税友接口返回值,慎用")
@GetMapping("/testToSocialFriendOnline")
@Operation(description = "测试线上税友接口返回值,慎用type : 空,查增,1 查减少")
@PostMapping("/testToSocialFriendOnline")
@SysLog("测试线上税友接口返回值,慎用")
public String testToSocialFriendOnline(@RequestParam List<String> requestIdList, @RequestParam(required = false) String type) {
public String testToSocialFriendOnline(@RequestBody List<String> requestIdList, @RequestParam(required = false) String type) {
return tSocialFriendService.testToSocialFriendOnline(requestIdList, type);
}
......
......@@ -3930,8 +3930,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatchInfoPre.setErrorBackInfo(null);
dispatchInfoPreMapper.updateById(dispatchInfoPre);
}
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.FIVE_STRING, CommonConstants.ONE_STRING, auditRemark, user);
// 审核不通过
} else if (CommonConstants.ONE_INT == flag) {
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据
......@@ -3955,8 +3954,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sendDisFalureMessageToWx(dispatchInfoPre,socialAutoLog.getId());
}
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, auditRemark, user);
}
providentFund.setAuditTime(now);
providentFund.setAuditUser(user.getId());
......@@ -3971,12 +3969,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setFundReduceStatus(CommonConstants.ONE_STRING);
sf.setFundStatus(CommonConstants.SIX_STRING);
}
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.FIVE_STRING, CommonConstants.ONE_STRING, auditRemark, user);
// 审核不通过
} else if (CommonConstants.ONE_INT == flag) {
// 作废更新:公积金状态、同步档案的公积金状态
sf.setFundReduceStatus(CommonConstants.ONE_STRING_NEGATE);
sf.setFundStatus(CommonConstants.THREE_STRING);
sf.setFundReduceDate(null);
// 派减审核或办理,更新离职待办
this.sendLeave(dis.getId(), CommonConstants.TWO_STRING, CommonConstants.TEN_STRING, CommonConstants.ZERO_STRING, auditRemark, user);
}
}
fundMapper.updateByIdOfAudit(providentFund);
......@@ -4729,13 +4731,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(ServiceUtil.ifNullToEmpty(handleRemark));
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 {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_REDUCE);
......@@ -4743,18 +4739,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
temp.append(ServiceUtil.ifNullToEmpty(handleRemark));
initAuditInfo(auditInfo, temp.toString(), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
}
auditInfo.setSocialId(dis.getId());
// 派减审核或办理,更新离职待办
// 7 派减部分办理失败
if (Common.isNotNull(socialInfo.getHandleStatus()) && CommonConstants.SEVEN_STRING.equals(socialInfo.getHandleStatus())) {
// 派减审核或办理,更新离职待办
if (Common.isNotNull(socialInfo.getHandleStatus())) {
if (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.NINE_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
} else if (CommonConstants.SIX_STRING.equals(socialInfo.getHandleStatus())) {
// 派减办理中 - 后续改造这里和离职待办的导出
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.FIVE_STRING, CommonConstants.ZERO_STRING, handleRemark, user);
} else if (CommonConstants.THREE_STRING.equals(socialInfo.getHandleStatus())) {
// 部分失败是0
this.sendLeave(dis.getId(), CommonConstants.ONE_STRING, CommonConstants.EIGHT_STRING, CommonConstants.ONE_STRING, handleRemark, user);
}
}
auditInfo.setSocialId(dis.getId());
} else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保数据:" + dis.getEmpName()));
......
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