From b7ef4bb09e69ba27c29ea06a7f348f753c530a44 Mon Sep 17 00:00:00 2001 From: xinyb <574600396@qq.com> Date: 星期二, 24 九月 2024 17:54:27 +0800 Subject: [PATCH] CRM邮箱配置调整 --- src/com/yc/open/baiwang/schedule/QueryThread.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/com/yc/open/baiwang/schedule/QueryThread.java b/src/com/yc/open/baiwang/schedule/QueryThread.java index 0d682a0..c5b0be8 100644 --- a/src/com/yc/open/baiwang/schedule/QueryThread.java +++ b/src/com/yc/open/baiwang/schedule/QueryThread.java @@ -9,6 +9,7 @@ import com.yc.open.baiwang.controller.BaiwangController; import com.yc.open.baiwang.service.BaiwangIfc; import com.yc.open.mutual.schedule.GateEntity; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,7 +47,9 @@ messageInfo.setUserFromType(session.getAttribute(SessionKey.USER_LOGIN_TYPE) + ""); messageInfo.setUserCode(session.getAttribute(SessionKey.USERCODE) + ""); messageInfo.setSessionId(session.getId());*/ + int times=5;//閲嶈瘯5娆� try { + while (times-- > 0) { Thread.sleep(5000);//鏆傚仠5绉� //2---閫氳繃鏌ヨ鎺ュ彛涓嬭浇鐢靛瓙鍙戠エ SpObserver.setDBtoInstance("_" + entity.getDbid());//鍒囨崲鏁版嵁婧� @@ -58,6 +61,10 @@ OutputFormatQueryQdInvoiceResponse outputFormatQueryQdInvoiceResponse = client.outputFormat().queryQdInvoice(query, token); log.info("msg:" + JSON.toJSONString(outputFormatQueryQdInvoiceResponse)); + if(StringUtils.isBlank(outputFormatQueryQdInvoiceResponse.getResponse().getPdfUrl())){ + //鏌ヨ涓嶅埌pdf锛岄渶瑕侀噸璇� + continue; + } if (!outputFormatQueryQdInvoiceResponse.isSuccess()) { //澶辫触 log.info(outputFormatQueryQdInvoiceResponse.getErrorResponse().getSubMessage()); @@ -65,7 +72,9 @@ String fielid = "InvoiceFile";//闄勪欢瀛楁 String unid = baiwangController.saveAttachment(outputFormatQueryQdInvoiceResponse, entity, fielid); //--鏇存柊鐘舵�� - baiwangIfc.updateByAttachment(entity, unid, fielid); + baiwangIfc.updateByAttachment(entity, unid, fielid,outputFormatQueryQdInvoiceResponse,invoiceNo); + times=0; + } }catch (Exception ex) { ex.printStackTrace(); }finally { -- Gitblit v1.8.0