diff --git a/main/java/shkd/repc/task/DobeContractAttachmentTask.java b/main/java/shkd/repc/task/DobeContractAttachmentTask.java index 0c49a77..b78457b 100644 --- a/main/java/shkd/repc/task/DobeContractAttachmentTask.java +++ b/main/java/shkd/repc/task/DobeContractAttachmentTask.java @@ -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对象是否为空