Commit a710ab4d authored by fangxinjiang's avatar fangxinjiang

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

parents b640fdd1 c5726395
...@@ -318,7 +318,7 @@ public class TEmployeeContractPreController { ...@@ -318,7 +318,7 @@ public class TEmployeeContractPreController {
/** /**
* 一键催办 * 一键催办
* @param idList 一键催办列表 * @param id 一键催办列表
**/ **/
@Operation(description = "一键催办") @Operation(description = "一键催办")
@PostMapping("/contractUrg") @PostMapping("/contractUrg")
......
...@@ -36,6 +36,7 @@ import javax.servlet.ServletOutputStream; ...@@ -36,6 +36,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -343,10 +344,13 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -343,10 +344,13 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
}); });
customerStats.setInitiatedCount(customerStats.getInitiatedCount() + 1); customerStats.setInitiatedCount(customerStats.getInitiatedCount() + 1);
LocalDate joinDate = LocalDateTimeUtils.convertDateToLDT(contractPre.getJoinLeaveDate()).toLocalDate(); LocalDate localDate = contractPre.getJoinLeaveDate().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
localDate = localDate.plusMonths(1)
.minusDays(1);
// 判断是否超过入职日期一个月 // 判断是否超过入职日期一个月
if (currentDate.isAfter(joinDate.plusMonths(1))) { if (currentDate.isAfter(localDate)) {
// 超过一个月,算电子签发起失败 // 超过一个月,算电子签发起失败
customerStats.setFailedCount(customerStats.getFailedCount() + 1); customerStats.setFailedCount(customerStats.getFailedCount() + 1);
customerStats.setElectronicSignFailedCount(customerStats.getElectronicSignFailedCount() + 1); customerStats.setElectronicSignFailedCount(customerStats.getElectronicSignFailedCount() + 1);
...@@ -356,6 +360,10 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -356,6 +360,10 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId()) updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING) .set(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPre::getErrorInfo, "电子签发起失败:已超过入职日期一个月") .set(TEmployeeContractPre::getErrorInfo, "电子签发起失败:已超过入职日期一个月")
.set(TEmployeeContractPre::getChangeTypeUser, type.equals("1") ? "自动化手动—" + contractPre.getCustomerUsername()
: "自动化自动—" + contractPre.getCustomerUsername() )
.set(TEmployeeContractPre::getChangeTypeReason, "已超过入职日期一个月,自动转线下签")
.set(TEmployeeContractPre::getChangeTypeTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()))
.set(TEmployeeContractPre::getSignType, CommonConstants.ONE_STRING) .set(TEmployeeContractPre::getSignType, CommonConstants.ONE_STRING)
.set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now())); .set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper); this.update(updateWrapper);
...@@ -1050,11 +1058,14 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -1050,11 +1058,14 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
for (TEmployeeContractPre contract : signingContracts) { for (TEmployeeContractPre contract : signingContracts) {
if (contract.getJoinLeaveDate() != null) { if (contract.getJoinLeaveDate() != null) {
// 计算入职一个月的最后一天 // 计算入职一个月的最后一天
LocalDate joinDate = LocalDateTimeUtils.convertDateToLDT(contract.getJoinLeaveDate()).toLocalDate(); LocalDate localDate = contract.getJoinLeaveDate().toInstant()
LocalDate lastDayOfMonth = joinDate.plusMonths(1); .atZone(ZoneId.systemDefault())
.toLocalDate();
localDate = localDate.plusMonths(1)
.minusDays(1);
// 计算往前3个工作日 // 计算往前3个工作日
List<LocalDate> reminderDates = calculateReminderWorkDays(lastDayOfMonth); List<LocalDate> reminderDates = calculateReminderWorkDays(localDate);
// 判断今天是否是提醒日期之一 // 判断今天是否是提醒日期之一
if (reminderDates.contains(today)) { if (reminderDates.contains(today)) {
......
...@@ -474,9 +474,10 @@ public class FascUtil { ...@@ -474,9 +474,10 @@ public class FascUtil {
} else { } else {
fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue()); fieldValue = this.getContractFieldValueByReflection(contract, fieldName, detail.getFieldType(), detail.getFieldValue());
} }
dfv.setFieldValue(fieldValue); if (Common.isNotNull(fieldValue)) {
dfv.setFieldValue(fieldValue);
docFieldValues.add(dfv); docFieldValues.add(dfv);
}
} }
} }
} }
......
...@@ -1355,11 +1355,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1355,11 +1355,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} else { } else {
dispatch.setContactAddress(excel.getContactAddress()); dispatch.setContactAddress(excel.getContactAddress());
} }
dispatch.setOrganName(null == user ? "自动化派单部门" : user.getDeptName()); String deptName = null;
if (Common.isNotNull(excel.getPreLoginName())) {
R<SysUser> res = upmsDaprUtils.getSimpleUserByLoginName(excel.getPreLoginName());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())) {
SysUser loginUser = res.getData();
deptName = loginUser.getDeptName();
}
}
dispatch.setOrganName(null == deptName ? user.getDeptName() : deptName);
if (Common.isNotNull(excel.getPreId())) { if (Common.isNotNull(excel.getPreId())) {
dispatch.setPreId(excel.getPreId()); dispatch.setPreId(excel.getPreId());
} }
dispatch.setCreateBy(null == user ? "1" : user.getId()); dispatch.setCreateBy(null == user ? "1" : user.getId());
//如果登录名不为空查询登录人所属部门
dispatch.setCreateName(Common.isNotNull(excel.getPreName()) ? excel.getPreName() : user.getNickname()); dispatch.setCreateName(Common.isNotNull(excel.getPreName()) ? excel.getPreName() : user.getNickname());
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
dispatch.setContractSubName(excel.getContractSubName()); dispatch.setContractSubName(excel.getContractSubName());
......
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