Commit cd28338d authored by fangxinjiang's avatar fangxinjiang

合同续签待办-fxj

parent eca3539d
......@@ -16,7 +16,6 @@
*/
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;
......@@ -54,7 +53,6 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
import javax.servlet.ServletOutputStream;
......@@ -63,7 +61,6 @@ import java.io.IOException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
......@@ -279,7 +276,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
//判断两个合同时间是否重合
if (LocalDateUtil.hasOverlap(contract.getContractStart(),contract.getContractEnd(),preVo.getContractStart(),preVo.getContractEnd())){
return R.failed(EmployeeConstants.DATA_CONTRACT_OVERLAP);
return R.failed("发起时间距离合同开始日期已超过一个月,禁止使用电子签,请切换为线下签");
}
TEmpContractAlert alert = empContractAlertMapper.selectOne(Wrappers.<TEmpContractAlert>query().lambda()
.eq(TEmpContractAlert::getContractId,preVo.getContractId())
......@@ -1291,13 +1288,20 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
.set(TEmployeeContractPreNew::getChangeTypeUser, "超管")
.set(TEmployeeContractPreNew::getChangeTypeTime, DateUtil.getCurrentDateTime());
this.update(updateWrapper);
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("续签-撤销签署");
audit.setCreateName("系统自动撤销");
audit.setLinkId(preNew.getContractId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark("电子合同签署超过1个月未完成签署系统,自动撤销");
tEmployeeContractAuditService.save(audit);
TEmployeeContractInfo contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId, preNew.getId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (null != contractInfo){
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("续签-撤销签署");
audit.setCreateName("系统自动撤销");
audit.setLinkId(contractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark("电子合同签署超过1个月未完成签署系统,自动撤销");
tEmployeeContractAuditService.save(audit);
}
//更新合同续签待办提醒的办理状态为待办理
updateEmpContractAlertHandleStatus(preNew.getContractId(), CommonConstants.ZERO_STRING);
......
......@@ -30,6 +30,7 @@ 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.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreNewMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreService;
......@@ -90,6 +91,10 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Lazy
private TEmployeeContractPreService employeeContractPreService;
@Autowired
@Lazy
private TEmployeeContractPreNewMapper employeeContractPreNewMapper;
@Autowired
@Lazy
private EmployeeRegistrationPreService registrationPreService;
......@@ -606,6 +611,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
.set(TEmployeeContractPre::getCustomerUsername, vo.getName())
.set(TEmployeeContractPre::getCustomerUserLoginname, vo.getLoginName());
employeeContractPreService.update(updateContractWrapper);
//更新合同待续签的前端客服
LambdaUpdateWrapper<TEmployeeContractPreNew> updateContractNewWrapper = new LambdaUpdateWrapper<>();
updateContractNewWrapper.eq(TEmployeeContractPreNew::getDeptNo,vo.getDepartNo())
.set(TEmployeeContractPreNew::getCustomerUsername, vo.getName())
.set(TEmployeeContractPreNew::getCustomerUserLoginname, vo.getLoginName());
employeeContractPreNewMapper.update(null,updateContractNewWrapper);
//更新社保待购买的前端客服
socialDaprUtils.updateSocialPreCustomerName(updateVo);
......
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