Commit b2d5b985 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-离职待办-优化代码

parent 74636878
...@@ -551,6 +551,13 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -551,6 +551,13 @@ public class TEmployeeContractInfo extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String preName; private String preName;
/**
* 离职待办的用户名称
*/
@Schema(description = "离职待办的用户名称")
@TableField(exist = false)
private String leaveName;
/** /**
* 试用期(单位月) * 试用期(单位月)
*/ */
......
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; 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.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
...@@ -252,4 +253,12 @@ public class EmployeeContractVO extends RowIndex implements Serializable { ...@@ -252,4 +253,12 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelAttribute(name = "preName") @ExcelAttribute(name = "preName")
@ExcelProperty(value ="preName") @ExcelProperty(value ="preName")
private String preName; private String preName;
/**
* 离职待办的用户名称
*/
@Schema(description = "离职待办的用户名称")
@TableField(exist = false)
private String leaveName;
} }
...@@ -701,6 +701,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -701,6 +701,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
audit.setCreateBy("1"); audit.setCreateBy("1");
audit.setCreateTime(LocalDateTime.now()); audit.setCreateTime(LocalDateTime.now());
} }
if (Common.isNotNull(tEmployeeContractInfo.getLeaveName())) {
audit.setCreateName(tEmployeeContractInfo.getLeaveName());
audit.setCreateBy("1");
audit.setCreateTime(LocalDateTime.now());
}
tEmployeeContractAuditMapper.updateById(audit); tEmployeeContractAuditMapper.updateById(audit);
} }
} }
...@@ -957,6 +962,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -957,6 +962,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//审核通过瓜子合同状态更新合同审核通过 //审核通过瓜子合同状态更新合同审核通过
updateGzOfferStatus(contractInfo,CommonConstants.THIRTEEN_STRING,CommonConstants.EIGHT_STRING,user.getId(),user.getNickname()); 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 (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[3]) {
if (!fascFlag) { if (!fascFlag) {
...@@ -970,6 +980,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -970,6 +980,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractPreMapper.updateById(contractPre); 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.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setContractNo(contractInfo.getContractNo()); tEmployeeContractInfo.setContractNo(contractInfo.getContractNo());
...@@ -1309,6 +1323,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1309,6 +1323,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
public BaseSearchListVO leaveToReduceContract(BaseSearchListVO paramVo) { public BaseSearchListVO leaveToReduceContract(BaseSearchListVO paramVo) {
List<String> idList = new ArrayList<>(); List<String> idList = new ArrayList<>();
List<BaseSearchVO> listParam = paramVo.getListParam(); List<BaseSearchVO> listParam = paramVo.getListParam();
String userName = paramVo.getUserName();
Map<String, BaseSearchVO> paramMap = new HashMap<>(); Map<String, BaseSearchVO> paramMap = new HashMap<>();
for (BaseSearchVO param : listParam) { for (BaseSearchVO param : listParam) {
idList.add(param.getSearchKey()); idList.add(param.getSearchKey());
...@@ -1327,6 +1342,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1327,6 +1342,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
for (EmployeeContractVO vo : excelVOList) { for (EmployeeContractVO vo : excelVOList) {
i++; i++;
vo.setRowIndex(i); vo.setRowIndex(i);
vo.setLeaveName(userName);
baseSearchVO = paramMap.get(vo.getContractId()); baseSearchVO = paramMap.get(vo.getContractId());
leaveId = null; leaveId = null;
if (baseSearchVO != null) { if (baseSearchVO != null) {
...@@ -2517,4 +2533,5 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -2517,4 +2533,5 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
null, null, null, null,
null,null); null,null);
} }
} }
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