Commit bfd2d75a authored by fangxinjiang's avatar fangxinjiang

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

parents 77f7ace8 27b05f6e
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("feed_back_detail")
public class FeedBackDetail implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 反馈人
*/
@Schema(description ="反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@Schema(description ="反馈时间")
private Date feedbackTime;
/**
* 反馈原因
*/
@Schema(description ="反馈原因")
private String feedbackReason;
/**
* 反馈详情
*/
@Schema(description ="反馈详情")
private String feedbackDetail;
/**
* 续签代办表关联主键
*/
@Schema(description ="续签代办表关联主键")
private String contractAlertId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -269,6 +269,52 @@ public class TEmpContractAlert extends BaseEntity {
private String empPhone;
/**
* 是否反馈
*/
@ExcelAttribute(name = "是否反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否反馈")
@Schema(description = "是否反馈")
private Integer isFeedback;
/**
* 反馈原因
*/
@ExcelAttribute(name = "未续签原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("未续签原因")
@Schema(description = "未续签原因")
private String feedbackReason;
/**
* 详情
*/
@ExcelAttribute(name = "具体描述信息" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("具体描述信息")
@Schema(description = "具体描述信息")
private String feedbackDetail;
/**
* 反馈人
*/
@ExcelAttribute(name = "反馈人" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("反馈人")
@Schema(description = "反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@ExcelAttribute(name = "反馈时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("反馈时间")
@Schema(description = "反馈时间")
private Date feedbackTime;
/**
* 合同截止日期
*/
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
@Data
public class ChangeFeedBackAllVo {
private String [] ids;
/**
* 是否反馈
*/
private Integer isFeedback;
/**
* 反馈原因
*/
@Schema(description = "未续签原因")
private String feedbackReason;
/**
* 详情
*/
@Schema(description = "具体描述信息")
private String feedbackDetail;
/**
* 反馈人
*/
@Schema(description = "反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@Schema(description = "反馈时间")
private Date feedbackTime;
}
......@@ -161,4 +161,11 @@ public class EmpAddDispatchVo extends TEmployeeInfo {
@Schema(description = "是否删除 0否/1是")
private String deleteFlag;
/**
* 通信地址
*/
@Schema(description = "通信地址")
private String contactAddress;
}
......@@ -191,6 +191,18 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "审核状态")
private String auditStatus;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "不通过原因")
@Schema(description = "不通过原因")
@ExcelProperty("不通过原因")
private String noPassReason;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "审核说明")
@Schema(description = "审核说明")
@ExcelProperty("审核说明")
private String remark;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同状态")
@ExcelAttribute(name = "合同状态", readConverterExp = "0=可用,1=不可用")
......@@ -268,4 +280,5 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
}
......@@ -44,4 +44,8 @@ public class UpProjectSocialFundVo implements Serializable {
String fileTown;
// 档案地-手机号码
String mobile;
//是否同步终止合同、减项、减档 0 是 1 否
String changeContractAndEmployee;
String userName;
String userId;
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -55,6 +56,7 @@ public class TEmpContractAlertController {
private final TEmpContractAlertService tEmpContractAlertService;
private final MenuUtil menuUtil;
/**
* 分页查询
* @param page 分页对象
......@@ -171,4 +173,33 @@ public class TEmpContractAlertController {
public R taskCreateContractAlert() {
return tEmpContractAlertService.taskCreateContractAlert();
}
/**
* 批量反馈
*
* @author wzb
* @param changeFeedBackAllVo
* @return {@link R}
*/
@Operation(summary = "批量反馈", description = "批量反馈")
@PostMapping("/changeFeedbackAll")
public R<Boolean> changeFeedBackAll(@RequestBody ChangeFeedBackAllVo changeFeedBackAllVo) {
return R.ok(tEmpContractAlertService.changeFeedBackAll(changeFeedBackAllVo));
}
/**
* 获取反馈日志详情
*
* @author wzb
* @param id
* @return {@link R}
*/
@Operation(summary = "获取反馈日志详情", description = "获取反馈日志详情")
@GetMapping("/getFeedbackDetail/{id}" )
public R getFeedbackDetail(@PathVariable("id" ) String id) {
return R.ok(tEmpContractAlertService.getFeedbackDetail(id));
}
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface FeedBackDetailMapper extends BaseMapper<FeedBackDetail> {
List<FeedBackDetail> getDetail(@Param("id") String id);
}
......@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 员工合同续签待办
......@@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper;
public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
void truncate();
boolean changeFeedBackAll(@Param("changeFeedBackAllVo") ChangeFeedBackAllVo changeFeedBackAllVo);
}
......@@ -20,7 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -47,5 +49,12 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
* @Date 2022-07-4
**/
R<Boolean> taskCreateContractAlert();
boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo);
List<FeedBackDetail> getFeedbackDetail(String id);
}
......@@ -16,6 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
......@@ -27,15 +28,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
......@@ -62,6 +63,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private final TEmployeeProjectMapper projectMapper;
private final FeedBackDetailMapper feedbackDetailMapper;
@Override
public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
......@@ -246,6 +249,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if (Common.isNotNull(entity.getUnitNo())) {
wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo());
}
if (Common.isNotNull(entity.getIsFeedback())){
wrapper.eq(TEmpContractAlert::getIsFeedback,entity.getIsFeedback());
}
return wrapper;
}
/**
......@@ -303,6 +309,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
return R.ok();
}
private void initExistMap(Map<String, TEmpContractAlert> existMap) {
List<TEmpContractAlert> exists = baseMapper.selectList(Wrappers.<TEmpContractAlert>query());
if (Common.isNotNull(exists)){
......@@ -403,4 +411,27 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setHandleStatus(CommonConstants.ZERO_STRING);
alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert);
}
@Override
public boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo) {
YifuUser user = SecurityUtils.getUser();
for (int i = 0; i < changeFeedBackAllVo.getIds().length; i++) {
FeedBackDetail feedbackDetail = new FeedBackDetail();
feedbackDetail.setFeedbackPerson(user.getNickname());
feedbackDetail.setFeedbackTime(DateTime.now());
feedbackDetail.setContractAlertId(changeFeedBackAllVo.getIds()[i]);
feedbackDetail.setFeedbackReason(changeFeedBackAllVo.getFeedbackReason());
feedbackDetail.setFeedbackDetail(changeFeedBackAllVo.getFeedbackDetail());
feedbackDetailMapper.insert(feedbackDetail);
}
changeFeedBackAllVo.setFeedbackPerson(user.getNickname());
changeFeedBackAllVo.setFeedbackTime(DateTime.now());
return baseMapper.changeFeedBackAll(changeFeedBackAllVo);
}
@Override
public List<FeedBackDetail> getFeedbackDetail(String id) {
return feedbackDetailMapper.getDetail(id);
}
}
......@@ -771,10 +771,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(tEmployeeProject.getId());
tEmployeeProject.setContractStatus(CommonConstants.TWO_INT);
//如果该项目仍有社保、公积金的数据不同步减项,如正常减项,记录项目档案操作记录
if (tEmployeeProject.getSocialStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getSocialStatus() == CommonConstants.FOUR_INT
|| tEmployeeProject.getFundStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getFundStatus() == CommonConstants.FOUR_INT) {
if ((tEmployeeProject.getSocialStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getSocialStatus() == CommonConstants.FOUR_INT)
&& (tEmployeeProject.getFundStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getFundStatus() == CommonConstants.FOUR_INT)) {
tEmployeeProject.setProjectStatus(CommonConstants.ONE_INT);
tEmployeeProject.setLeaveRemark("终止合同联动减项");
tEmployeeProject.setLeaveTime(LocalDateTime.now());
......@@ -1404,6 +1404,19 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractInfo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmployeeContractExport(contractInfo);
if (Common.isNotNull(list)) {
for(EmployeeContractExportVO ll:list){
if(ll.getAuditStatus().contains("审核不通过")) {
if (null != ll.getRemark()) {
String[] a = ll.getRemark().split(":");
for(int t=0;t<a.length;t++){
if(t==1) {
ll.setNoPassReason(a[0]);
ll.setRemark(a[1]);
}
}
}
}
}
writeSheet = EasyExcel.writerSheet("员工合同" + index).build();
excelWriter.write(list, writeSheet);
index++;
......
......@@ -2368,6 +2368,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo = new TEmployeeInfo();
BeanUtil.copyProperties(empAdd, employeeInfo);
employeeInfo.setEmpCode(getCode());
employeeInfo.setContactAddress(employeeInfo.getContactAddress());
employeeInfo.setIsCollege(CommonConstants.ONE_INT);
employeeInfo.setHignEducation(employeeInfo.getHignEducation());
employeeInfo.setStatus(CommonConstants.ZERO_INT);
date = IdCardUtil.getBirthdate(employeeInfo.getEmpIdcard());
if (Common.isNotNull(date)) {
......
......@@ -37,10 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TBusinessEmployeeExtendInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.utils.DoJointTask;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
......@@ -108,6 +105,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Lazy
private DoJointTask doJointTask;
@Autowired
private TWorkHandlerInfoService workHandlerInfoService;
@Autowired
private TEmployeeContractAuditService tEmployeeContractAuditService;
@Override
public R addCheck(TEmployeeProject tEmployeeProject) {
......@@ -1382,47 +1385,143 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isEmpty(vo) || Common.isEmpty(vo.getEmpIdCard()) || Common.isEmpty(vo.getDepartNo())){
return false;
}
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(employee)){
if (Common.isNotNull(vo.getSocialStatus())){
employee.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())){
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
if (Common.isNotNull(vo.getFileProvince())){
employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (Common.isNotNull(vo.getChangeContractAndEmployee())) {
List<TEmployeeContractInfo> contractInfoList;
List<TEmployeeContractInfo> contractInfoListZt;
//同步任务处理清单执行详情
StringBuilder workInfo = new StringBuilder();
StringBuilder failueInfo = new StringBuilder();
workInfo.append("合同终止成功,");
//该项目下其他在用的合同统一更新成不在用
contractInfoList = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getDeptNo, vo.getDepartNo())
.eq(TEmployeeContractInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING);
contractInfoMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ZERO_STRING);
}
}
if (Common.isNotNull(vo.getFileCity())){
employee.setFileCity(Integer.parseInt(vo.getFileCity()));
if (Common.isNotNull(vo.getFileTown())){
employee.setFileTown(Integer.parseInt(vo.getFileTown()));
}else {
employee.setFileTown(null);
//在途的合同更新为审核不通过
contractInfoListZt = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeContractInfo::getDeptNo, vo.getDepartNo())
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
if (Common.isNotNull(contractInfoListZt)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoListZt) {
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
contractInfoMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ONE_STRING);
}
}
if (Common.isNotNull(vo.getMobile())){
employee.setEmpPhone(vo.getMobile());
//项目档案处理
TEmployeeProject tEmployeeProject = baseMapper.selectOne(Wrappers.<TEmployeeProject>query()
.lambda().eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo, vo.getDepartNo())
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.last(CommonConstants.LAST_ONE_SQL));
if (null != tEmployeeProject) {
TEmployeeProject tEmployeeProjectOld = baseMapper.selectById(tEmployeeProject.getId());
tEmployeeProject.setContractStatus(CommonConstants.TWO_INT);
//如果该项目仍有社保、公积金的数据不同步减项,如正常减项,记录项目档案操作记录
if ((tEmployeeProject.getSocialStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getSocialStatus() == CommonConstants.FOUR_INT) &&
(tEmployeeProject.getFundStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getFundStatus() == CommonConstants.FOUR_INT)) {
tEmployeeProject.setProjectStatus(CommonConstants.ONE_INT);
tEmployeeProject.setLeaveRemark("终止合同联动减项");
tEmployeeProject.setLeaveTime(LocalDateTime.now());
workInfo.append("减项成功,");
} else {
failueInfo.append("存在社保/公积金,无法减项");
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "",
tEmployeeProject.getId(), tEmployeeProjectOld, tEmployeeProject);
baseMapper.updateById(tEmployeeProject);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT) {
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (Common.isNotNull(tEmployeeInfo) && tEmployeeInfo.getProjectNum() == CommonConstants.ONE_INT) {
//减档
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfo.setLeaveRemark(tEmployeeProject.getLeaveRemark());
tEmployeeInfo.setLeaveTime(DateUtil.getCurrentDateTime());
tEmployeeInfo.setLeaveUser(vo.getUserId());
tEmployeeInfo.setLeaveUserName(vo.getUserName());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
workInfo.append("减档成功,");
tEmployeeInfoMapper.updateById(tEmployeeInfo);
} else {
failueInfo.append("存在其他项目,无法减档");
}
}
}
tEmployeeInfoMapper.updateSocialInfoById(employee);
}
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,vo.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(project)){
if (Common.isNotNull(vo.getSocialStatus())){
project.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
//增加任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(vo.getEmpIdCard());
handlerInfo.setEmpName(null == tEmployeeProject.getEmpName() ? "" : tEmployeeProject.getEmpName());
handlerInfo.setDepartName(null == tEmployeeProject.getDeptName() ? "" : tEmployeeProject.getDeptName());
handlerInfo.setDepartNo(vo.getDepartNo());
handlerInfo.setInfoFrom("合同终止");
handlerInfo.setOperInfo(workInfo.substring(0, workInfo.length() - 1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
handlerInfo.setOperUser(vo.getUserName());
handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo);
}else {
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(employee)) {
if (Common.isNotNull(vo.getSocialStatus())) {
employee.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
if (Common.isNotNull(vo.getFileProvince())) {
employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
}
if (Common.isNotNull(vo.getFileCity())) {
employee.setFileCity(Integer.parseInt(vo.getFileCity()));
if (Common.isNotNull(vo.getFileTown())) {
employee.setFileTown(Integer.parseInt(vo.getFileTown()));
} else {
employee.setFileTown(null);
}
}
if (Common.isNotNull(vo.getMobile())) {
employee.setEmpPhone(vo.getMobile());
}
tEmployeeInfoMapper.updateSocialInfoById(employee);
}
if (Common.isNotNull(vo.getFundStatus())){
project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, vo.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(project)) {
if (Common.isNotNull(vo.getSocialStatus())) {
project.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
baseMapper.updateSocialAndFundStatusById(project);
}
baseMapper.updateSocialAndFundStatusById(project);
}
return true;
}
......@@ -1725,4 +1824,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
public void updateContractStatus(String empId, int status) {
baseMapper.updateContractStatus(empId,status);
}
/**
* @param tEmployeeContractInfo
* @Description: 保存审核操作记录
* @Author: huyc
* @Date: 2023/6/16 10:16
* @return: void
**/
private void setAuditInfoNew(TEmployeeContractInfo tEmployeeContractInfo,String flag) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("合同审核");
audit.setAuditStatus(CommonConstants.ZERO_STRING.equals(flag) ? "审核通过" : "审核不通过");
audit.setRemark("终止合同联动");
audit.setLinkId(tEmployeeContractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
tEmployeeContractAuditService.save(audit);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.FeedBackDetailMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="FEEDBACK_PERSON" jdbcType="VARCHAR" property="feedbackPerson" />
<result column="FEEDBACK_TIME" jdbcType="TIMESTAMP" property="feedbackTime" />
<result column="FEEDBACK_REASON" jdbcType="VARCHAR" property="feedbackReason" />
<result column="FEEDBACK_DETAIL" jdbcType="VARCHAR" property="feedbackDetail" />
<result column="CONTRACT_ALERT_ID" jdbcType="VARCHAR" property="contractAlertId" />
</resultMap>
<sql id="Base_Column_List">
id, FEEDBACK_PERSON, FEEDBACK_TIME, FEEDBACK_REASON, FEEDBACK_DETAIL, CONTRACT_ALERT_ID
</sql>
<select id="getDetail" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
SELECT *
FROM feed_back_detail a
where a.CONTRACT_ALERT_ID=#{id}
order by FEEDBACK_TIME DESC
</select>
</mapper>
......@@ -24,36 +24,52 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper">
<resultMap id="tEmpContractAlertMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert">
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empId" column="EMP_ID"/>
<result property="project" column="PROJECT"/>
<result property="projectNo" column="PROJECT_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empCode" column="EMP_CODE"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="empType" column="EMP_TYPE"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="daysDue" column="DAYS_DUE"/>
<result property="dueFlag" column="DUE_FLAG"/>
<result property="daysOver" column="DAYS_OVER"/>
<result property="firstAlertTime" column="FIRST_ALERT_TIME"/>
<result property="alertPerson" column="ALERT_PERSON"/>
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empId" column="EMP_ID"/>
<result property="project" column="PROJECT"/>
<result property="projectNo" column="PROJECT_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empCode" column="EMP_CODE"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="empType" column="EMP_TYPE"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="daysDue" column="DAYS_DUE"/>
<result property="dueFlag" column="DUE_FLAG"/>
<result property="daysOver" column="DAYS_OVER"/>
<result property="firstAlertTime" column="FIRST_ALERT_TIME"/>
<result property="alertPerson" column="ALERT_PERSON"/>
<result property="handleStatus" column="HANDLE_STATUS"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="isFeedback" column="IS_FEEDBACK"/>
<result property="feedbackReason" column="FEEDBACK_REASON"/>
<result property="feedbackDetail" column="FEEDBACK_DATAIL"/>
<result property="contractId" column="CONTRACT_ID"/>
</resultMap>
<update id="truncate">
TRUNCATE t_emp_contract_alert
</update>
<update id="changeFeedBackAll" parameterType="com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo">
update t_emp_contract_alert a
set a.IS_FEEDBACK=#{changeFeedBackAllVo.isFeedback},a.FEEDBACK_REASON=#{changeFeedBackAllVo.feedbackReason},a.FEEDBACK_DETAIL=#{changeFeedBackAllVo.feedbackDetail},
a.FEEDBACK_PERSON=#{changeFeedBackAllVo.feedbackPerson},a.FEEDBACK_TIME=#{changeFeedBackAllVo.feedbackTime}
where a.ID in
<foreach item="idStr" index="index" collection="changeFeedBackAllVo.ids" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
</mapper>
......@@ -140,6 +140,7 @@
<result property="contractNo" column="CONTRACT_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
<result property="remark" column="REMARK"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -226,6 +227,7 @@
a.CONTRACT_PARTY,
a.SUBJECT_UNIT,
a.AUDIT_STATUS,
b.REMARK,
a.IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES,
a.IS_FILE,
......@@ -399,9 +401,7 @@
<if test="tEmployeeContractInfo.applyNo != null and tEmployeeContractInfo.applyNo.trim() != ''">
AND a.APPLY_NO = #{tEmployeeContractInfo.applyNo}
</if>
<if test="tEmployeeContractInfo.auditStatus != null">
AND a.AUDIT_STATUS = #{tEmployeeContractInfo.auditStatus}
</if>
<if test="tEmployeeContractInfo.empNatrue != null and tEmployeeContractInfo.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tEmployeeContractInfo.empNatrue}
</if>
......@@ -426,8 +426,10 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
......@@ -441,6 +443,9 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
......@@ -453,8 +458,10 @@
SELECT
count(1)
FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
......@@ -504,13 +511,16 @@
WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type",
b.REMARK,
a.CREATE_TIME
FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY
LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
......@@ -645,10 +655,17 @@
a.TYPE,
a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON
a.REDUCE_REASON,
b.AUDIT_STATUS,
b.REMARK
FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
......@@ -666,8 +683,10 @@
SELECT
count(1)
FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where>
a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
......
......@@ -571,4 +571,12 @@ public interface ErrorCodes {
* 社保办理:该数据已处理,请勿重复操作
*/
String SOCIAL_IMPORT_SAME_INFO = "social.import.same.info";
/**
* 派减异常: 存在正常的公积金,是否同步终止合同、减项、减档不能为是
*/
String EMP_DISPATCH_FUND_NOT_EMPTY_CHANGE = "emp.dispatch.fund.not.empty.change";
/**
* 派减异常: 单减公积金,是否同步终止合同、减项、减档不能为是
*/
String EMP_DISPATCH_FUND_NOT_EMPTY_SIGNLE = "emp.dispatch.fund.not.empty.signle";
}
......@@ -223,6 +223,9 @@ social_import_handle_not_empty=\u793E\u4FDD\u529E\u7406\u5931\u8D25\uFF0C\u5FC5\
social.import.handle.not.exits=\u65E0\u529E\u7406\u6743\u9650\u6216\u65E0\u53EF\u9700\u8981\u529E\u7406\u7684\u793E\u4FDD\u6570\u636E
social.import.same.info=\u8BE5\u6570\u636E\u5DF2\u5904\u7406\uFF0C\u8BF7\u52FF\u91CD\u590D\u64CD\u4F5C
emp.dispatch.fund.not.empty.change=\u5B58\u5728\u6B63\u5E38\u7684\u516C\u79EF\u91D1\uFF0C\u662F\u5426\u540C\u6B65\u7EC8\u6B62\u5408\u540C\u3001\u51CF\u9879\u3001\u51CF\u6863\u4E0D\u80FD\u4E3A\u662F
emp.dispatch.fund.not.empty.signle=\u5355\u51CF\u516C\u79EF\u91D1\uFF0C\u662F\u5426\u540C\u6B65\u7EC8\u6B62\u5408\u540C\u3001\u51CF\u9879\u3001\u51CF\u6863\u4E0D\u80FD\u4E3A\u662F
......
......@@ -455,6 +455,14 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("审核意见" )
private String auditRemark;
/**
* 0 是 1 否
*/
@Length(max = 1, message = "是否同步终止合同、减项、减档不能超过1个字符")
@ExcelAttribute(name = "是否同步终止合同、减项、减档", maxLength = 1)
@Schema(description = "是否同步终止合同、减项、减档", name = "changeContractAndEmployee")
private String changeContractAndEmployee;
/**
* 公积金办理备注
*/
......
......@@ -488,6 +488,16 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty("派单ID" )
private String dispatchId;
/**
* 通信地址
*/
@Schema(description = "通信地址" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址" )
private String contactAddress;
/**
* 订单ID
*/
......
......@@ -127,4 +127,12 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("重新派单的ID" )
private String isAgainId;
/**
* 0 是 1 否
*/
@Length(max = 1, message = "是否同步终止合同、减项、减档不能超过1个字符")
@ExcelAttribute(name = "是否同步终止合同、减项、减档", maxLength = 1,readConverterExp = "0=是,1=否")
@Schema(description = "是否同步终止合同、减项、减档", name = "changeContractAndEmployee")
private String changeContractAndEmployee;
}
......@@ -2048,6 +2048,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
emp.setCreateBy(user.getId());
emp.setCreateName(user.getNickname());
emp.setEmpIdcard(excel.getEmpIdcard());
emp.setContactAddress(excel.getContactAddress());
emp.setEmpName(excel.getEmpName());
emp.setEmpNational(excel.getEmpNational());
emp.setEmpNatrue(excel.getEmpType());
......@@ -2773,6 +2774,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_FUND_NOT_EMPTY)));
continue;
}
//单减社保,判断是否有正常的公积金
if (Common.isNotNull(excel.getSocialReduceDate()) && Common.isEmpty(excel.getFundReduceDate())
&& (CommonConstants.THREE_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.EIGHT_STRING.equals(socialFund.getFundStatus()))
&& CommonConstants.ZERO_STRING.equals(excel.getChangeContractAndEmployee())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_FUND_NOT_EMPTY_CHANGE)));
continue;
}
//单减公积金
if (Common.isNotNull(excel.getFundReduceDate()) && Common.isEmpty(excel.getSocialReduceDate())
&& CommonConstants.ZERO_STRING.equals(excel.getChangeContractAndEmployee())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_FUND_NOT_EMPTY_SIGNLE)));
continue;
}
// 自定义校验
if (validReduce(errorMessageList,excelVOTemp, socialFundMap,socialFund, excel)){
continue;
......@@ -2821,6 +2836,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setCreateName(user.getNickname());
dispatch.setOrganName(user.getDeptName());
}
dispatch.setChangeContractAndEmployee(excel.getChangeContractAndEmployee());
dispatch.setCreateTime(LocalDateTime.now());
dispatch.setEmpId(socialFund.getEmpId());
dispatch.setEmpName(socialFund.getEmpName());
......@@ -3910,6 +3926,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(vo.getSocialStatus()) || Common.isNotNull(vo.getFundStatus())){
vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode());
//派减审核通过才会处理合同档案状态
if (CommonConstants.ONE_INT == flag) {
vo.setChangeContractAndEmployee(dis.getChangeContractAndEmployee());
vo.setUserId(user.getId());
vo.setUserName(user.getNickname());
}
R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo);
if (Common.isEmpty(resUp) || !(CommonConstants.SUCCESS.intValue() == resUp.getCode()) || !resUp.getData().booleanValue()){
errorList.add(new ErrorMessage(-1, vo.getEmpIdCard()+DispatchConstants.DISPATCH_SYN_DOC_EXE,CommonConstants.RED,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