Commit ef69bb1e authored by fangxinjiang's avatar fangxinjiang

合同续签待办-fxj

parent 90de898a
......@@ -88,6 +88,13 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
@TableField(exist = false)
@Schema(description = "合同IDS")
private List<String> idList;
/**
* 确认信息IDS
*/
@TableField(exist = false)
@Schema(description = "确认信息IDS")
private List<String> preIdList;
@Schema(description = "处理状态数组")
@TableField(exist = false)
......
......@@ -731,6 +731,16 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
if (Common.isEmpty(contractPreList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
ContractAlertSearchVo searchVo = new ContractAlertSearchVo();
searchVo.setPreIdList(idList);
//获取返回信息
List<TEmployeeContractPreNewDetailVo> exitsList = baseMapper.getDetailList(searchVo);
Map<String, TEmployeeContractPreNewDetailVo> backInfoMap = new HashMap<>();
if (Common.isNotNull(exitsList)) {
for (TEmployeeContractPreNewDetailVo vo : exitsList) {
backInfoMap.put(vo.getId(), vo);
}
}
// 创建一个Map映射preId到TEmployeeContractPre对象
Map<String, TEmployeeContractPreNew> preContractMap = contractPreList.stream()
......@@ -807,8 +817,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), "系统自动撤销签署须走线下签!");
errorMessage.setData(contractVO);
ErrorMessage<TEmployeeContractPreNewDetailVo> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), "系统自动撤销签署须走线下签!");
errorMessage.setData(backInfoMap.get(contractVO.getPreNewId()));
errorMessageListAll.add(errorMessage);
continue;
}
......@@ -844,8 +854,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR_TWO);
errorMessage.setData(contractVO);
ErrorMessage<TEmployeeContractPreNewDetailVo> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), EmployeeConstants.DATA_CONTRACT_EXPECTED_SIGN_TIME_ERROR_TWO);
errorMessage.setData(backInfoMap.get(contractVO.getPreNewId()));
errorMessageListAll.add(errorMessage);
} else {
// 未超过一个月,先调用contractInfoService.importContract方法创建合同
......@@ -884,8 +894,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
contractAutoLogService.save(contractAutoLog);
}
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(contractVO);
ErrorMessage<TEmployeeContractPreNewDetailVo> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(backInfoMap.get(contractVO.getPreNewId()));
errorMessageListAll.add(errorMessage);
} else {
// 合同创建成功,继续调用FascService的submitContract方法
......@@ -942,8 +952,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
contractAutoLogService.save(contractAutoLog);
}
// 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(contractVO);
ErrorMessage<TEmployeeContractPreNewDetailVo> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
errorMessage.setData(backInfoMap.get(contractVO.getPreNewId()));
errorMessageListAll.add(errorMessage);
} else {
if (Common.isNotNull(contractPreTemp.getId()) && Common.isNotNull(result.getData())) {
......@@ -1056,7 +1066,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
.set(TEmployeeContractPreNew::getErrorInfo, errorMessage.getMessage())
.set(TEmployeeContractPreNew::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
// 执行更新操作
errorMessage.setData(contractVO);
errorMessage.setData(backInfoMap.get(contractVO.getPreNewId()));
this.update(updateWrapper);
//线下签发起失败 更新合同提醒为待处理
LambdaUpdateWrapper<TEmpContractAlert> updateWrapperAlert = new LambdaUpdateWrapper<>();
......
......@@ -811,6 +811,14 @@
#{id}
</foreach>
</if>
<if test="tEmpContractAlert.preIdList != null and tEmpContractAlert.preIdList.size > 0">
AND b.id in
<foreach item="preId" index="index" collection="tEmpContractAlert.preIdList" open="(" separator=","
close=")">
#{preId}
</foreach>
</if>
</if>
<include refid="tEmpContractAlert_where"/>
</where>
......
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