Commit 9ac74363 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent f666aded
...@@ -214,7 +214,7 @@ public class FascController { ...@@ -214,7 +214,7 @@ public class FascController {
@Operation(description = "自动化待办续签获取附件") @Operation(description = "自动化待办续签获取附件")
@GetMapping("/getRenewFileByRequestId") @GetMapping("/getRenewFileByRequestId")
public R<String> getRenewFileByRequestId(@RequestParam String id) throws ApiException { public R<String> getRenewFileByRequestId(@RequestParam String id) throws ApiException {
fascService.getFileByRequestIdRenew(id); fascService.getFileByRequestIdRenew(id,null);
return R.ok(); return R.ok();
} }
......
...@@ -64,6 +64,6 @@ public interface FascService extends IService<FddContractInfo> { ...@@ -64,6 +64,6 @@ public interface FascService extends IService<FddContractInfo> {
boolean getFileByRequestId(String id) throws ApiException; boolean getFileByRequestId(String id) throws ApiException;
// 自动化续签待办:获取附件 // 自动化续签待办:获取附件
boolean getFileByRequestIdRenew(String id) throws ApiException; boolean getFileByRequestIdRenew(String id,String contractId) throws ApiException;
} }
...@@ -582,7 +582,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -582,7 +582,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company); return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company);
} }
@Override @Override
public boolean getFileByRequestIdRenew(String id) throws ApiException { public boolean getFileByRequestIdRenew(String id,String contractId) throws ApiException {
// templateName 签署任务模板名称 // templateName 签署任务模板名称
TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id); TEmployeeContractPreNew contract = tEmployeeContractPreNewMapper.selectById(id);
if (contract == null) { if (contract == null) {
...@@ -596,7 +596,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr ...@@ -596,7 +596,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (company == null) { if (company == null) {
return false; return false;
} }
return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company); return fascUtil.getFileByRequestId(contract, tFascPushLogService, tAttaInfoMapper, ossUtil, company, contractId);
} }
} }
...@@ -96,7 +96,7 @@ public class DoFascTask { ...@@ -96,7 +96,7 @@ public class DoFascTask {
this.saveAuditLogSuccess("签署成功",contractInfo.getId()); this.saveAuditLogSuccess("签署成功",contractInfo.getId());
// 尝试获取归档文件 // 尝试获取归档文件
boolean flag = fascService.getFileByRequestIdRenew(preNew.getId()); boolean flag = fascService.getFileByRequestIdRenew(preNew.getId(),contractInfo.getId());
contractInfo.setAuditStatus(CommonConstants.TWO_INT); contractInfo.setAuditStatus(CommonConstants.TWO_INT);
// 传了false,就不要审核日志 // 传了false,就不要审核日志
......
...@@ -1370,7 +1370,7 @@ public class FascUtil { ...@@ -1370,7 +1370,7 @@ public class FascUtil {
} }
// 自动化续签待办:获取附件 // 自动化续签待办:获取附件
public boolean getFileByRequestId(TEmployeeContractPreNew contract, TFascPushLogService tFascPushLogService public boolean getFileByRequestId(TEmployeeContractPreNew contract, TFascPushLogService tFascPushLogService
, TAttaInfoMapper tAttaInfoMapper, OSSUtil ossUtil, TFascCompany company) throws ApiException { , TAttaInfoMapper tAttaInfoMapper, OSSUtil ossUtil, TFascCompany company,String contractId) throws ApiException {
OpenApiClient openApiClient = new OpenApiClient(company.getAppId(), company.getAppSecret(), company.getAppUrl()); OpenApiClient openApiClient = new OpenApiClient(company.getAppId(), company.getAppSecret(), company.getAppUrl());
String accessToken = this.getFascToken(openApiClient, company); String accessToken = this.getFascToken(openApiClient, company);
...@@ -1387,7 +1387,7 @@ public class FascUtil { ...@@ -1387,7 +1387,7 @@ public class FascUtil {
String empIdCard = contract.getEmpIdcard(); String empIdCard = contract.getEmpIdcard();
pushLog.setTypeKey("获取附件,身份证:" + empIdCard); pushLog.setTypeKey("获取附件,身份证:" + empIdCard);
pushLog.setTypeName("获取附件"); pushLog.setTypeName("获取附件");
pushLog.setContractId(contract.getId()); pushLog.setContractId(contractId);
pushLog.setSignTaskId(contract.getRequestId()); pushLog.setSignTaskId(contract.getRequestId());
tFascPushLogService.save(pushLog); tFascPushLogService.save(pushLog);
...@@ -1402,7 +1402,7 @@ public class FascUtil { ...@@ -1402,7 +1402,7 @@ public class FascUtil {
if (Common.isNotNull(doc.getFddFileUrl())) { if (Common.isNotNull(doc.getFddFileUrl())) {
// 存储文档 // 存储文档
// 将法大大回传的url字符串转化为流,存储到阿里云 // 将法大大回传的url字符串转化为流,存储到阿里云
this.streamUpload(doc.getFddFileUrl(), ossUtil, tAttaInfoMapper, contract.getContractId(), doc.getDocName()); this.streamUpload(doc.getFddFileUrl(), ossUtil, tAttaInfoMapper, contractId, doc.getDocName());
} }
} }
} }
......
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