增加用友接口是否联通的测试代码

This commit is contained in:
yuxueliang0813 2024-11-30 18:58:04 +08:00
parent 0957ee72be
commit a3d3130d0b
1 changed files with 11 additions and 0 deletions

View File

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