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");