Commit 88b2b9f5 authored by fangxinjiang's avatar fangxinjiang

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

parents b5b7c907 1e409a9c
......@@ -463,6 +463,9 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "作废、终止选择的合同id", name = "reason")
private String oldContractId;
@Schema(description = "签署方式1线下签0电子签")
private String signType;
/**
* 是否附件 0是/1否
*/
......
......@@ -207,6 +207,9 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelProperty("备注")
private String remark;
@Schema(description = "签署方式1线下签0电子签")
private String signType;
/**
* 0 是 1 否
*/
......
......@@ -1447,6 +1447,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// b = b.setScale(1, BigDecimal.ROUND_HALF_UP);
// insert.setContractTerm(String.valueOf(b));
}
// 处理signType字段
if (Common.isNotNull(excel.getSignType())) {
insert.setSignType(excel.getSignType());
}
// 核心保存
R<List<ErrorMessage>> info = this.setBaseInfo(insert, project);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getMsg()));
......
......@@ -352,7 +352,38 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
errorMessage.setData(contractVO);
errorMessageListAll.add(errorMessage);
} else {
// 未超过一个月,调用FascService的submitContract方法
// 未超过一个月,先调用contractInfoService.importContract方法创建合同
List<EmployeeContractVO> singleContractList = new ArrayList<>();
singleContractList.add(contractVO);
List<ErrorMessage> singleErrorMessageList = new ArrayList<>();
// 调用合同导入方法
contractInfoService.importContract(singleContractList, singleErrorMessageList);
// 检查合同创建是否成功
boolean contractCreateSuccess = singleErrorMessageList.stream()
.allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS));
if (!contractCreateSuccess) {
// 合同创建失败,统计错误并更新状态
customerStats.setFailedCount(customerStats.getFailedCount() + 1);
customerStats.setElectronicSignFailedCount(customerStats.getElectronicSignFailedCount() + 1);
String errorMsg = singleErrorMessageList.isEmpty() ? "合同创建失败" : singleErrorMessageList.get(0).getMessage();
// 更新processStatus为电子签发起失败
LambdaUpdateWrapper<TEmployeeContractPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPre::getId, contractPre.getId())
.set(TEmployeeContractPre::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPre::getErrorInfo, errorMsg)
.set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper);
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(contractVO);
errorMessageListAll.add(errorMessage);
} else {
// 合同创建成功,继续调用FascService的submitContract方法
R<String> result = null;
try {
result = fascService.submitContract(contractPre.getId());
......@@ -380,6 +411,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
}
}
}
}
// 处理线下签合同(走原逻辑)
if (!offlineSignList.isEmpty()) {
......
......@@ -144,6 +144,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private final TGzPushEntryService tGzPushEntryService;
private final TEmployeeContractPreMapper contractPreMapper;
@Autowired
private OSSUtil ossUtil;
......@@ -2624,6 +2626,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
//tEmployeeProjectService.updateContractStatus(c.getEmpId(), c.getSettleDomain(), CommonConstants.ONE_INT)
baseMapper.updateContractStatus(c.getEmpId(), CommonConstants.ONE_INT);
//更新合同状态为4线下签待归档
TEmployeeContractPre contractPre = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getContractId, c.getId())
.eq(TEmployeeContractPre::getProcessStatus, CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractPre)) {
contractPre.setProcessStatus(CommonConstants.FOUR_STRING);
contractPreMapper.updateById(contractPre);
}
//瓜子项目编码:皖A694302
if (CommonConstants.GZ_DEPT_NO.equals(c.getDeptNo())) {
//审核通过瓜子合同状态更新合同审核通过
......
......@@ -79,6 +79,7 @@
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/>
<result property="auditTimeLast" column="AUDIT_TIME_LAST"/>
<result property="signType" column="sign_type"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
......@@ -208,7 +209,7 @@
a.AUDIT_USER_NAME,
a.REDUCE_REASON,
a.type,
a.TRY_PERIOD
a.TRY_PERIOD,a.sign_type
</sql>
......
......@@ -242,6 +242,9 @@
<if test="tEmployeeContractPre.expectedCollectionTime != null">
AND a.expected_collection_time = #{tEmployeeContractPre.expectedCollectionTime}
</if>
<if test="tEmployeeContractPre.revokeReason != null and tEmployeeContractPre.revokeReason.trim() != ''">
AND a.revoke_reason = #{tEmployeeContractPre.revokeReason}
</if>
<if test="tEmployeeContractPre.expectedConfirmTime != null">
AND DATE_FORMAT(a.expected_confirm_time,"%Y-%m-%d") =
DATE_FORMAT(#{tEmployeeContractPre.expectedConfirmTime},"%Y-%m-%d")
......@@ -354,6 +357,7 @@
null leaveDate,
null reduceReason,
null remark,
a.sign_type signType,
null changeContractAndEmployee,
if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod,
a.id preId,
......
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