Commit 8a915caf authored by hongguangwu's avatar hongguangwu

MVP1.7.16-法大大字段

parent f285c0dc
...@@ -188,6 +188,12 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -188,6 +188,12 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (Common.isEmpty(contract.getContractId())) { if (Common.isEmpty(contract.getContractId())) {
return R.failed("未生成合同,请联系管理员"); return R.failed("未生成合同,请联系管理员");
} }
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectById(contract.getContractId());
if (empContract == null) {
return R.failed(FASC_NO_EMP_CONTRACT);
}
if (Common.isEmpty(contract.getFadadaTemplateId())) { if (Common.isEmpty(contract.getFadadaTemplateId())) {
return R.failed("未找到合同模板ID,请联系管理员"); return R.failed("未找到合同模板ID,请联系管理员");
} }
...@@ -206,10 +212,6 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -206,10 +212,6 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (Common.isNotNull(contract.getRequestId())) { if (Common.isNotNull(contract.getRequestId())) {
return R.failed("合同已发起,请勿重复发起!"); return R.failed("合同已发起,请勿重复发起!");
} }
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectById(contract.getContractId());
if (empContract == null) {
return R.failed(FASC_NO_EMP_CONTRACT);
}
TFascTemplate tFascTemplate = tFascTemplateService.getById(contract.getFadadaTemplateId()); TFascTemplate tFascTemplate = tFascTemplateService.getById(contract.getFadadaTemplateId());
if (tFascTemplate == null) { if (tFascTemplate == null) {
return R.failed(FASC_NO_TEMPLATE); return R.failed(FASC_NO_TEMPLATE);
...@@ -222,11 +224,6 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -222,11 +224,6 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
// - 判断是否入职超过1个月——接口入口做了 // - 判断是否入职超过1个月——接口入口做了
R<String> requestInfo = fascUtil.submitContract(contract, tFascPushLogService, tEmployeeContractPreMapper, tFascTemplate, detailList); R<String> requestInfo = fascUtil.submitContract(contract, tFascPushLogService, tEmployeeContractPreMapper, tFascTemplate, detailList);
if (!R.isSuccess(requestInfo)) {
contract.setRequestId(requestInfo.getData());
contract.setProcessStatus(CommonConstants.dingleDigitStrArray[2]);
tEmployeeContractPreMapper.updateById(contract);
}
return requestInfo; return requestInfo;
} }
......
...@@ -388,6 +388,12 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -388,6 +388,12 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
try { try {
result = fascService.submitContract(contractPre.getId()); result = fascService.submitContract(contractPre.getId());
} catch (Exception e) { } catch (Exception e) {
// 更新合同:
if (Common.isNotNull(contractPre.getContractId())) {
TEmployeeContractInfo empContract = contractInfoService.getById(contractPre.getContractId());
empContract.setDeleteFlag(CommonConstants.ONE_INT);
contractInfoService.updateById(empContract);
}
log.error("法大大推送执行异常", e); log.error("法大大推送执行异常", e);
} }
if (result == null || result.getCode() != CommonConstants.SUCCESS) { if (result == null || result.getCode() != CommonConstants.SUCCESS) {
...@@ -401,6 +407,12 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -401,6 +407,12 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
.set(TEmployeeContractPre::getErrorInfo, errorMsg) .set(TEmployeeContractPre::getErrorInfo, errorMsg)
.set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now())); .set(TEmployeeContractPre::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper); this.update(updateWrapper);
// 更新合同:
if (Common.isNotNull(contractPre.getContractId())) {
TEmployeeContractInfo empContract = contractInfoService.getById(contractPre.getContractId());
empContract.setDeleteFlag(CommonConstants.ONE_INT);
contractInfoService.updateById(empContract);
}
// 添加错误信息 // 添加错误信息
ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg); ErrorMessage<EmployeeContractVO> errorMessage = new ErrorMessage<>(contractVO.getRowIndex(), errorMsg);
......
...@@ -359,7 +359,7 @@ public class FascUtil { ...@@ -359,7 +359,7 @@ public class FascUtil {
tFascPushLogService.updateById(pushLog); tFascPushLogService.updateById(pushLog);
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
// 第二步:填写控件 // 第二步:填写控件
R<String> sendValue = buildDocFieldValue(contract, requestId, openApiClient, accessToken, tFascTemplate, detailList); R<String> sendValue = buildDocFieldValue(contract, requestId, openApiClient, accessToken, detailList);
if (R.isSuccess(sendValue)) { if (R.isSuccess(sendValue)) {
// 第三步:提交任务 // 第三步:提交任务
sendValue = submitTask(requestId, openApiClient, accessToken); sendValue = submitTask(requestId, openApiClient, accessToken);
...@@ -401,7 +401,7 @@ public class FascUtil { ...@@ -401,7 +401,7 @@ public class FascUtil {
// 第二步:填写控件 // 第二步:填写控件
private R<String> buildDocFieldValue(TEmployeeContractPre contract, String requestId private R<String> buildDocFieldValue(TEmployeeContractPre contract, String requestId
, OpenApiClient openApiClient, String accessToken , OpenApiClient openApiClient, String accessToken
, TFascTemplate tFascTemplate, List<TFascTemplateDetail> detailList) throws ApiException { , List<TFascTemplateDetail> detailList) throws ApiException {
SignTaskClient signTaskClient = new SignTaskClient(openApiClient); SignTaskClient signTaskClient = new SignTaskClient(openApiClient);
FillFieldValuesReq fillFieldValuesReq = new FillFieldValuesReq(); FillFieldValuesReq fillFieldValuesReq = new FillFieldValuesReq();
fillFieldValuesReq.setSignTaskId(requestId); fillFieldValuesReq.setSignTaskId(requestId);
......
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