OA附件接口超时优化

This commit is contained in:
yuxueliang0813 2025-03-25 13:13:32 +08:00
parent dc3114d7fb
commit 18671c3ed6
1 changed files with 4 additions and 2 deletions

View File

@ -34,6 +34,8 @@ public class DobeContractAttachmentTask extends AbstractTask implements Plugin {
private static final String oa_menthod = "/seeyon/rest/ats/dlNas/";//OA接口方法
public static final String oaUrl = System.getProperty("oaurl");//(测试环境外网地址)http://140.206.96.138:9091
private static final int connectionTimeout = 5000;//5秒
private static final int readTimeout = 60000;//60秒
public static final String updatesql = "UPDATE t_recon_contractbill SET fk_qeug_nofj=0 WHERE fid=?;";
@Override
@ -79,8 +81,8 @@ public class DobeContractAttachmentTask extends AbstractTask implements Plugin {
requrl = oaUrl+oa_menthod+contractno+"?summaryId="+fj_oaid+"&subReference="+fj_zwid;
logger.info(contractno+" OA附件接口请求地址\n{}", requrl);
try {
// 发送get请求oa附件接口并获取响应
resultjson = HttpClientUtils.get(requrl, customerHeader,null);
// 发送get请求oa附件接口并获取响应目前有合同readTimeout 将此字段值修改大一点
resultjson = HttpClientUtils.get(requrl, customerHeader,null,connectionTimeout,readTimeout);
logger.info(contractno+" OA附件接口返回结果\n{}", resultjson);
resultjsonObject = JSONObject.parseObject(resultjson);
// 检查JSON对象是否为空