Commit 35bb0d1e by 赵庆

lwb

parent 97229de7
var system = require("../../../system");
const apiBase = require("../../api.base");
class XbgApi extends apiBase {
constructor() {
super();
this.restClient = system.getObject("util.restClient");
this.url = "http://192.168.193.136:3000/api/xbgApi/";
}
async test(pobj, query) {
return system.getResultSuccess({
hello: "ok"
});
}
//合同模板
async etemplateList(qobj) {
var params = qobj || {};
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"etemplateList");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
//已签合同
async acontractList(qobj) {
var params = qobj || {};
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"acontractList");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
//纳税人人员
async ratepayingListToPe(qobj) {
var params = qobj || {};git
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"ratepayingListToPe");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
//纳税人按月
async ratepayingListToMonth(qobj) {
var params = qobj || {};
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"ratepayingListToMonth");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
//纳税人个人详情
async ratepayingListToOne(qobj) {
var params = qobj || {};
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"ratepayingListToOne");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
//数据概览
async dataOverview(qobj) {
var params = qobj || {};
if (!params.ecompany_id) {
return system.getResult("参数ecompany_id为空")
}
try {
var rs = await this.restClient.execPost(params, this.url+"dataOverview");
return JSON.parse(rs.stdout);
} catch (e) {
console.log(e);
return system.getResult("接口异常");
}
}
exam() {
return "xxx";
}
classDesc() {
return {
groupName: "auth",
groupDesc: "认证相关的包",
name: "AccessAuthAPI",
desc: "关于认证的类",
exam: "",
};
}
methodDescs() {
return [{
methodDesc: "生成访问token",
methodName: "getAccessKey",
paramdescs: [{
paramDesc: "访问appkey",
paramName: "appkey",
paramType: "string",
defaultValue: "x",
},
{
paramDesc: "访问secret",
paramName: "secret",
paramType: "string",
defaultValue: null,
}
],
rtnTypeDesc: "xxxx",
rtnType: "xxx"
}];
}
}
module.exports = XbgApi;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment