From a3d3130d0b27e71fc8258773606ae68366bc796d Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Sat, 30 Nov 2024 18:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E5=8F=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=98=AF=E5=90=A6=E8=81=94=E9=80=9A=E7=9A=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/java/shkd/repc/task/YongyouBIPTask.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main/java/shkd/repc/task/YongyouBIPTask.java b/main/java/shkd/repc/task/YongyouBIPTask.java index acbfa1c..2e3cf46 100644 --- a/main/java/shkd/repc/task/YongyouBIPTask.java +++ b/main/java/shkd/repc/task/YongyouBIPTask.java @@ -46,6 +46,17 @@ public class YongyouBIPTask extends AbstractTask implements Plugin { // currentinfo = docs.get(i); // } + //定时任务获取的参数是配置调度程序的时候设置,如果是测试接口联通性,则将token放入日志中 + if(map != null && "yes".equals(map.get("testjiekou"))){ + APICurUtils apiutil1 = new APICurUtils();//处理认证接口的工具类(用友提供的第三方工具),得到accesstoken + apiutil1.init(DobeDWUtils.yyip,DobeDWUtils.yyport,DobeDWUtils.bizcenter,DobeDWUtils.clientid,DobeDWUtils.clientsecret,DobeDWUtils.pubKey,DobeDWUtils.clientid,null); + try { + String tokenresult1 = apiutil1.getTokenByClient(); + DobeDWUtils.saveLog("testjiekou","测试用友token接口",null,tokenresult1,true,"定时任务"); + } catch (Exception e) { + throw new RuntimeException(e); + } + } //查找未审核的付款登记单,考虑费用登记和付款申请单如果是事后补单的话,此处是否需要过滤 QFilter statusFilter = new QFilter("billstatus","=","A"); QFilter statusB = new QFilter("billstatus","=","B");