Commit 28ba7cd8 by 王昆

gsb

parent 63e7e9e1
...@@ -10,7 +10,7 @@ class DocBase{ ...@@ -10,7 +10,7 @@ class DocBase{
exam:"概要示例", exam:"概要示例",
methods:[] methods:[]
}; };
this.initClassDoc(); //this.initClassDoc();
} }
initClassDoc(){ initClassDoc(){
this.descClass(); this.descClass();
......
var APIBase = require("../../api.base");
var system = require("../../../system");
class TaxApi extends APIBase {
constructor() {
super();
this.tcompanytaxocrSve = system.getObject("service.tax.tcompanytaxocrSve");
this.tcompanytaxitemSve = system.getObject("service.tax.tcompanytaxitemSve");
}
async test(pobj, query, req) {
return system.getResultSuccess(1);
}
async taxocrSend(pobj, query, req) {
await this.tcompanytaxocrSve.sendImg(pobj.limit || 100);
return system.getResultSuccess();
}
async taxocrallback(pobj, query, req) {
try {
return await this.tcompanytaxitemSve.saveOcrItems(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, "api异常");
}
}
}
module.exports = TaxApi;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
const md5 = require("MD5");
const uuidv4 = require('uuid/v4');
const crypto = require('crypto');
var cacheBaseComp = null;
class TcompanytaxCtl extends CtlBase {
constructor() {
super("tax", CtlBase.getServiceName(TcompanytaxCtl));
this.redisClient = system.getObject("util.redisClient");
}
async taxPage(pobj, pobj2, req, res) {
let loginInfo = req.loginUser || {};
let month = this.trim(pobj.month);
if(month) {
month = Number(month.replace("-", ""));
}
let condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
month: month || 0,
companyId: loginInfo.user.companyId,
}
try {
var page = await this.service.pageByCondition(condition);
return system.getResultSuccess(page);
} catch (error) {
console.log(error);
return system.getResult(-1, `服务异常`);
}
}
}
module.exports = TcompanytaxCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
const md5 = require("MD5");
const uuidv4 = require('uuid/v4');
const crypto = require('crypto');
var cacheBaseComp = null;
class TcompanytaxitemCtl extends CtlBase {
constructor() {
super("tax", CtlBase.getServiceName(TcompanytaxitemCtl));
this.redisClient = system.getObject("util.redisClient");
}
async taxPage(pobj, pobj2, req, res) {
let loginInfo = req.loginUser || {};
let month = this.trim(pobj.month);
if (month) {
month = Number(month.replace("-", ""));
}
let condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
month: month || 0,
companyId: loginInfo.user.companyId,
idName: pobj.idName,
idNo: pobj.idNo,
}
try {
var page = await this.service.pageByCondition(condition);
return system.getResultSuccess(page);
} catch (error) {
console.log(error);
return system.getResult(-1, `服务异常`);
}
}
async taxUrl(pobj, pobj2, req, res) {
let id = pobj.id;
try {
let item = await this.service.findById(id);
if(!item) {
return system.getResult(null, "税务信息不存在");
}
// TODO 请求张云飞
item.last_at = new Date();
item.save();
return system.getResultSuccess({
taxUrl: "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_7511582721898214202026205818214tfb_month_12.pdf"
});
} catch (error) {
console.log(error);
return system.getResult(-1, `服务异常`);
}
}
}
module.exports = TcompanytaxitemCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
const md5 = require("MD5");
const uuidv4 = require('uuid/v4');
const crypto = require('crypto');
var cacheBaseComp = null;
class TuserCtl extends CtlBase {
constructor() {
super("tax", CtlBase.getServiceName(TuserCtl));
this.redisClient = system.getObject("util.redisClient");
}
async smartLogin(pobj, pobj2, req, res) {
let data = pobj.data || "";
if (!data) {
return system.getResult(-1, `参数错误`);
}
data = this.decryption(data);
try {
data = JSON.parse(data);
if (!data.userName) {
return system.getResult(-1, `登录名称为空`);
}
if (!data.companyName) {
return system.getResult(-1, `商户名称为空`);
}
if (!data.mchtId) {
return system.getResult(-1, `商户号为空`);
}
var loginInfo = await this.service.smartLogin(data);
loginInfo = loginInfo.data;
let key = await this.setLogin(loginInfo);
return system.getResultSuccess({
login: key
});
} catch (error) {
console.log(error);
return system.getResult(-1, `${data}解析错误`);
}
}
async setLogin(user) {
var xggadminsid = "bt_" + uuidv4();
if(settings.env == "dev") {
xggadminsid = "bt_3cb49932-fa02-44f0-90db-9f06fe02e5c7";
}
await this.redisClient.setWithEx(xggadminsid, JSON.stringify(user), 60 * 60);
return xggadminsid;
}
encryption(data) {
if (!data) {
return "";
}
let AES_conf = settings.apiconfig.AES;
let key = AES_conf.key;
let iv = AES_conf.iv;
// let padding = AES_conf.padding;
var cipherChunks = [];
var cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
cipher.setAutoPadding(true);
cipherChunks.push(cipher.update(data, 'utf8', 'base64'));
cipherChunks.push(cipher.final('base64'));
return cipherChunks.join('');
}
decryption(data) {
if (!data) {
return "";
}
let AES_conf = settings.apiconfig.AES;
let key = AES_conf.key;
let iv = AES_conf.iv;
// let padding = AES_conf.padding;
var cipherChunks = [];
var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv);
decipher.setAutoPadding(true);
cipherChunks.push(decipher.update(data, 'base64', 'utf8'));
cipherChunks.push(decipher.final('utf8'));
return cipherChunks.join('');
}
}
module.exports = TuserCtl;
\ No newline at end of file
...@@ -9,7 +9,7 @@ class Dao { ...@@ -9,7 +9,7 @@ class Dao {
this.model = db.models[this.modelName]; this.model = db.models[this.modelName];
} }
async preCreate(u) { async preCreate(u) {
u.id = await this.redisClient.genrateId(this.modelName); // u.id = await this.redisClient.genrateId(this.modelName);
return u; return u;
} }
async create(u, t) { async create(u, t) {
...@@ -24,6 +24,18 @@ class Dao { ...@@ -24,6 +24,18 @@ class Dao {
}); });
} }
} }
//批量插入
async bulkCreate(objs, t) {
if (!objs || objs.length == 0) {
return;
}
if (t) {
return await this.model.bulkCreate(objs, { transaction: t });
} else {
return await this.model.bulkCreate(objs);
}
}
static getModelName(ClassObj) { static getModelName(ClassObj) {
return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Dao")).toLowerCase(); return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Dao")).toLowerCase();
} }
......
const system = require("../../../system");
const Dao = require("../../dao.base");
class TCompanyDao extends Dao {
constructor() {
super(Dao.getModelName(TCompanyDao));
}
async findMapByIds(ids) {
var result = {};
var sql = "SELECT * FROM `t_company` WHERE id IN (:ids)";
var list = await this.customQuery(sql, {
ids: ids
});
if (!list || list.length == 0) {
return result;
}
for (var item of list) {
result[item.id] = item;
}
return result;
}
}
module.exports = TCompanyDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class TCompanytaxDao extends Dao {
constructor() {
super(Dao.getModelName(TCompanytaxDao));
}
async countByCondition(condition) {
var sql = [];
sql.push("SELECT COUNT(1) AS num FROM `t_company_tax` WHERE 1 = 1");
this.setCondition(sql, condition);
let rs = await this.customQuery(sql.join(" "), condition);
if (!rs || rs.length == 0) {
return 0;
}
return rs[0].num || 0;
}
async pageByCondition(condition) {
var sql = [];
sql.push("SELECT");
sql.push("* ");
sql.push("FROM `t_company_tax`");
sql.push("WHERE 1 = 1");
this.setCondition(sql, condition);
sql.push("GROUP BY id DESC");
sql.push("LIMIT :startRow, :pageSize");
return await this.customQuery(sql.join(" "), condition);
}
setCondition(sql, params) {
if (params.month) {
sql.push("AND month = :month");
}
if (params.companyId) {
sql.push("AND companyId = :companyId");
}
}
async findMapByIds(ids) {
var result = {};
var sql = "SELECT * FROM `t_company_tax` WHERE id IN (:ids)";
var list = await this.customQuery(sql, {
ids: ids
});
if (!list || list.length == 0) {
return result;
}
for (var item of list) {
result[item.id] = item;
}
return result;
}
}
module.exports = TCompanytaxDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class TCompanytaxitemDao extends Dao{
constructor(){
super(Dao.getModelName(TCompanytaxitemDao));
}
async countByCondition(condition) {
var sql = [];
sql.push("SELECT COUNT(1) AS num FROM `t_company_tax_item` WHERE 1 = 1");
this.setCondition(sql, condition);
let rs = await this.customQuery(sql.join(" "), condition);
if (!rs || rs.length == 0) {
return 0;
}
return rs[0].num || 0;
}
async pageByCondition(condition) {
var sql = [];
sql.push("SELECT");
sql.push("* ");
sql.push("FROM `t_company_tax_item`");
sql.push("WHERE 1 = 1");
this.setCondition(sql, condition);
sql.push("GROUP BY id DESC");
sql.push("LIMIT :startRow, :pageSize");
return await this.customQuery(sql.join(" "), condition);
}
setCondition(sql, params) {
if (params.month) {
sql.push("AND month = :month");
}
if (params.companyId) {
sql.push("AND companyId = :companyId");
}
if (params.idName) {
params.idNameLike = "%" + params.idName + "%"
sql.push("AND idName LIKE :idNameLike");
}
if (params.idNo) {
sql.push("AND idNo = :idNo");
}
}
}
module.exports=TCompanytaxitemDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class TCompanytaxocrDao extends Dao{
constructor() {
super(Dao.getModelName(TCompanytaxocrDao));
}
async findUnSendIds(limit) {
let sql = "SELECT id from t_company_taxocr WHERE isSend = 0 LIMIT :limit";
return await this.customQuery(sql, {limit: limit});
}
async findMapByIds(ids) {
var result = {};
var sql = "SELECT * FROM `t_company_taxocr` WHERE id IN (:ids)";
var list = await this.customQuery(sql, {
ids: ids
});
if (!list || list.length == 0) {
return result;
}
for (var item of list) {
result[item.id] = item;
}
return result;
}
}
module.exports=TCompanytaxocrDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class TUserDao extends Dao{
constructor(){
super(Dao.getModelName(TUserDao));
}
}
module.exports=TUserDao;
...@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => { ...@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => {
updatedAt: false, updatedAt: false,
//freezeTableName: true, //freezeTableName: true,
// define the table's name // define the table's name
tableName: 'xgg_op_log', tableName: 'op_log',
validate: { validate: {
}, },
......
const system=require("../../../system");
const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tcompany", {
name: DataTypes.STRING,
mchtId: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
// freezeTableName: true,
// define the table's name
tableName: 't_company',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system=require("../../../system");
const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tcompanytax", {
companyId: DataTypes.INTEGER,
month: DataTypes.INTEGER,
month_date: DataTypes.DATE,
tax_url: DataTypes.STRING,
tax_amt: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
// freezeTableName: true,
// define the table's name
tableName: 't_company_tax',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system=require("../../../system");
const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tcompanytaxitem", {
taxId: DataTypes.INTEGER,
taxOcrId: DataTypes.INTEGER,
companyId: DataTypes.INTEGER,
month: DataTypes.INTEGER,
month_date: DataTypes.DATE,
idName: DataTypes.STRING,
idNo: DataTypes.STRING,
incomeTax: DataTypes.STRING,
actualAmt: DataTypes.STRING,
grant_time: DataTypes.STRING,
param: DataTypes.STRING,
last_at: DataTypes.DATE,
tax_url: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
// freezeTableName: true,
// define the table's name
tableName: 't_company_tax_item',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system=require("../../../system");
const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tcompanytaxocr", {
taxId: DataTypes.INTEGER,
companyId: DataTypes.INTEGER,
month: DataTypes.INTEGER,
month_date: DataTypes.DATE,
tax_img: DataTypes.STRING,
isSend: {
type:DataTypes.BOOLEAN,
allowNull:false,
defaultValue:false
},
send_time: DataTypes.DATE,
isOCR: {
type:DataTypes.BOOLEAN,
allowNull:false,
defaultValue:false
},
ocr_time: DataTypes.DATE,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
// freezeTableName: true,
// define the table's name
tableName: 't_company_taxocr',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system=require("../../../system");
const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tuser", {
ucname: DataTypes.STRING,
password: DataTypes.STRING,
companyId: DataTypes.INTEGER,
mchtId: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
// freezeTableName: true,
// define the table's name
tableName: 't_user',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class TCompanyService extends ServiceBase {
constructor() {
super("tax", ServiceBase.getDaoName(TCompanyService));
}
}
module.exports = TCompanyService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class TcompanytaxService extends ServiceBase {
constructor() {
super("tax", ServiceBase.getDaoName(TcompanytaxService));
this.tcompanyDao = system.getObject("db.tax.tcompanyDao");
}
async pageByCondition(condition) {
condition.currentPage = Number(condition.currentPage || 1);
condition.pageSize = Number(condition.pageSize || 10);
condition.startRow = Number((condition.currentPage - 1) * condition.pageSize);
let total = await this.dao.countByCondition(condition);
if (total == 0) {
return {count: 0, rows: []};
}
let list = await this.dao.pageByCondition(condition);
if (list) {
for (var item of list) {
this.handleDate(item, ['updated_at', 'created_at'], 'YYYY-MM-DD HH:mm:ss');
this.handleDate(item, ['month_date'], 'YYYY-MM');
}
await this.setCompanyName(list);
}
return {count: total, rows: list};
}
async setCompanyName(rows) {
if (!rows || rows.length == 0) {
return;
}
var copmanyIds = [];
for (var row of rows) {
copmanyIds.push(row.companyId);
}
var map = await this.tcompanyDao.findMapByIds(copmanyIds);
for (var row of rows) {
let company = map[row.companyId] || {};
row.companyName = company.name || "";
row.mchtId = company.mchtId;
}
}
}
module.exports = TcompanytaxService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class TcompanytaxitemService extends ServiceBase {
constructor() {
super("tax", ServiceBase.getDaoName(TcompanytaxitemService));
this.tcompanytaxocrDao = system.getObject("db.tax.tcompanytaxocrDao");
}
async pageByCondition(condition) {
condition.currentPage = Number(condition.currentPage || 1);
condition.pageSize = Number(condition.pageSize || 10);
condition.startRow = Number((condition.currentPage - 1) * condition.pageSize);
let total = await this.dao.countByCondition(condition);
if (total == 0) {
return { count: 0, rows: [] };
}
let list = await this.dao.pageByCondition(condition);
if (list) {
for (var item of list) {
this.handleDate(item, ['updated_at', 'created_at'], 'YYYY-MM-DD HH:mm:ss');
this.handleDate(item, ['month_date'], 'YYYY-MM');
}
}
return { count: total, rows: list };
}
async saveOcrItems(data) {
let taxOcrId = Number(data.taxOcrId || 0);
let itemList = data.itemList || [];
if(!taxOcrId) {
return system.getResult(null, "taxOcrId为空");
}
if(itemList.length == 0) {
return system.getResult(null, "itemList为空");
}
let ocr = await this.tcompanytaxocrDao.findById(taxOcrId);
if(!ocr) {
return system.getResult(null, "taxOcrId错误");
}
let items = [];
for(let obj of itemList) {
if(!obj.idNo) {
continue;
}
items.push({
companyId: ocr.companyId,
taxId: ocr.taxId,
taxOcrId: taxOcrId,
month: ocr.month,
month_date: ocr.month_date,
idName: obj.idName,
idNo: obj.idNo,
incomeTax: obj.incomeTax,
actualAmt: obj.actualAmt,
grant_time: obj.grant_time,
param: obj.param,
});
}
await this.dao.bulkCreate(items);
ocr.isOCR = true;
ocr.ocr_time = new Date();
await ocr.save();
return system.getResultSuccess();
}
}
module.exports = TcompanytaxitemService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class TcompanytaxocrService extends ServiceBase {
constructor() {
super("tax", ServiceBase.getDaoName(TcompanytaxocrService));
}
async sendImg(limit) {
let items = await this.dao.findUnSendIds(limit);
if(!items || items.length == 0) {
return;
}
for(let item of items) {
let ocr = await this.dao.findById(item.id);
try {
// TODO 张云飞接口
ocr.isSend = true;
ocr.send_time = new Date();
await ocr.save();
} catch (error) {
console.log(error);
}
}
}
}
module.exports = TcompanytaxocrService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class TUserService extends ServiceBase {
constructor() {
super("tax", ServiceBase.getDaoName(TUserService));
this.tcompanyDao = system.getObject("db.tax.tcompanyDao");
}
async smartLogin(params) {
let userName = this.trim(params.userName);
let mchtId = this.trim(params.mchtId);
let companyName = this.trim(params.companyName);
let user;
let company;
let password = "";
if(userName.length > 6) {
password = await this.getEncryptStr(userName.substring(userName.trim().length - 6));
} else {
password = await this.getEncryptStr(userName);
}
user = await this.dao.findOne({mchtId: mchtId});
if (!user) {
user = await this.dao.model.create({
ucname: userName,
password: password,
companyId: 0,
mchtId: mchtId,
});
}
if(user.companyId) {
company = await this.tcompanyDao.findById(user.companyId);
if(!company) {
company = await this.tcompanyDao.model.create({
name: companyName,
mchtId: mchtId,
});
}
} else {
company = await this.tcompanyDao.findOne({mchtId: mchtId});
if(!company) {
company = await this.tcompanyDao.model.create({
name: companyName,
mchtId: mchtId,
});
}
}
if(!user.companyId) {
user.companyId = company.id;
await user.save();
}
return system.getResultSuccess({
user: user,
company: company,
});
}
}
module.exports = TUserService;
...@@ -276,5 +276,13 @@ class ServiceBase { ...@@ -276,5 +276,13 @@ class ServiceBase {
return u; return u;
} }
async getEncryptStr(str) {
str = this.trim(str);
if (!str) {
return "";
}
var pwd = md5(str + "_" + settings.salt);
return pwd.toString().toLowerCase();
}
} }
module.exports = ServiceBase; module.exports = ServiceBase;
\ No newline at end of file
...@@ -6,7 +6,7 @@ var settings={ ...@@ -6,7 +6,7 @@ var settings={
db:10, db:10,
}, },
database:{ database:{
dbname : "bpo-tax", dbname : "bpo_tax",
user: "write", user: "write",
password: "write", password: "write",
config: { config: {
......
...@@ -6,7 +6,6 @@ const redisClient = system.getObject("util.redisClient"); ...@@ -6,7 +6,6 @@ const redisClient = system.getObject("util.redisClient");
module.exports = function (app) { module.exports = function (app) {
app.all("/web/*", async function (req, res, next) { app.all("/web/*", async function (req, res, next) {
var xggadminsid; var xggadminsid;
var jsonUser = req.session.user; var jsonUser = req.session.user;
// var jsonUser = null; // var jsonUser = null;
...@@ -19,12 +18,7 @@ module.exports = function (app) { ...@@ -19,12 +18,7 @@ module.exports = function (app) {
} }
console.log(req.url, "----------- request url "); console.log(req.url, "----------- request url ");
if (req.url.indexOf("auth/userCtl/login") > 0 || if (req.url.indexOf("tax/tuserCtl/smartLogin") > 0 ||
req.url.indexOf("uc/userCtl/login") > 0 ||
req.url.indexOf("auth/userCtl/smsCode") > 0 ||
req.url.indexOf("common/metaCtl/getApiDoc") > 0 ||
req.url.indexOf("common/captchaCtl/captcha") > 0 ||
req.url.indexOf("getRsConfig") > 0) { req.url.indexOf("getRsConfig") > 0) {
if (jsonUser) { if (jsonUser) {
req.loginUser = jsonUser; req.loginUser = jsonUser;
......
...@@ -50,6 +50,11 @@ var settings = { ...@@ -50,6 +50,11 @@ var settings = {
opLogEsIsAdd: function () { opLogEsIsAdd: function () {
return 1; return 1;
}, },
AES: {
key: "qUPsMflPfgpPP1Ua", //密钥
iv: '1012133205963708', //偏移向量
padding: 'PKCS7Padding' //补全值
},
}, },
indexPage: function () { indexPage: function () {
if (this.env == "dev") { if (this.env == "dev") {
...@@ -83,6 +88,7 @@ var settings = { ...@@ -83,6 +88,7 @@ var settings = {
return "https://open.gongsibao.com/web/common/metaCtl/getApiDoc"; return "https://open.gongsibao.com/web/common/metaCtl/getApiDoc";
} }
}, },
ntapi: function () { ntapi: function () {
let domain = ""; let domain = "";
if (this.env == "dev") { if (this.env == "dev") {
......
<a name="menu">目录</a>
1. [经营范围列表](#list)
1. [经营范围查询](#info)
1. [经营范围添加/修改](#save)
1. [经营范围删除](#del)
1. [按注册地查询](#byDomicile)
## **<a name="list"> 经营范围列表</a>**
[返回到目录](#menu)
##### URL
[/web/common/businessscopeCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": "1",
"pageSize": "3",
"domicileId": "" // 注册地id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 10,
"rows": [
{
"id": "12218127593000590", // 经营范围id
"domicile_id": "12706646858000580", // 注册地id
"businessType": "经营范围3", // 经营范围
"businessscope": "经营范围详情", // 经营范围详情
"isEnabled": 0, // 是否启用 0否 1是
"created_at": "2019-10-03 06:51:01", // 创建时间
"domicile": { // 注册地信息
"name": "杨庆菊1", // 注册地姓名
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-02 10:08:04"
}
},
]
},
"requestid": "f2bc255412d64cffb46d35b5c2f21ffe"
}
```
## **<a name="info"> 经营范围查询</a>**
[返回到目录](#menu)
##### URL
[/web/common/businessscopeCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "" // 经营范围id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "12218127593000590", // 经营范围id
"domicile_id": "12706646858000580", // 注册地id
"businessType": "经营范围3", // 经营范围
"businessscope": "经营范围详情", // 经营范围详情
"isEnabled": 0, // 是否启用 0否 1是
"created_at": "2019-10-03 06:51:01", // 创建时间
"domicile": { // 注册地信息
"name": "杨庆菊1", // 注册地姓名
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-02 10:08:04"
}
},
"requestid": "436b027db2154f668c5f436040a28b9a"
}
```
## **<a name="save"> 经营范围添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/common/businessscopeCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id": "", // id
"domicileId": "12706710830001318", // 注册地id
"businesssType": "经营范围1", // 经营范围
"businessscope": "经营范围详情1", // 经营范围详情
"isEnabled": 0
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="del"> 经营范围删除</a>**
[返回到目录](#menu)
##### URL
[//web/common/businessscopeCtl/del]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"ids": ["12218127593000590","12218127593000592"...] // 经营范围id数组
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": "",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="byDomicile"> 按注册地查询</a>**
[返回到目录](#menu)
##### URL
[//web/common/businessscopeCtl/byDomicile]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"domicileId": "12218127593000590" // 注册地id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": "12218127593000590", // 经营范围id
"domicile_id": "12706646858000580", // 注册地id
"businessType": "经营范围3", // 经营范围
"businessscope": "经营范围详情", // 经营范围详情
"isEnabled": 0, // 是否启用 0否 1是
"created_at": "2019-10-03 06:51:01", // 创建时间
"domicile": { // 注册地信息
"name": "杨庆菊1", // 注册地姓名
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-02 10:08:04"
}
},
],
"requestid": "f2bc255412d64cffb46d35b5c2f21ffe"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [图片验证码](#captcha)
1. [OSS配置获取](#ossConfig)
## **<a name="captcha"> 图片验证码</a>**
[返回到目录](#menu)
##### URL
[/web/common/captchaCtl/captcha]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
| 参数 | 必选 | 类型 | 说明|
| -------- | -------- | ------------|---------|
| **width** | 否 | int | 图片验证码宽度 默认120px|
| **height** | 否 | int | 图片验证码高度 默认32px |
| **background** | 否 | String | 背景色颜色值,默认#E8E8E8 |
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"key": "381c1fc567c746d0a4aa33892239cef0", // 图片验证码key
"captcha": "...." // 图片
}
}
```
## **<a name="ossConfig"> OSS配置获取</a>**
[返回到目录](#menu)
##### URL
[/web/common/metaCtl/getOssConfig]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"key": "381c1fc567c746d0a4aa33892239cef0", // 图片验证码key
"captcha": "...." // 图片
}
}
```
<a name="menu">目录</a>
1. [](#provinceList)
1. [全部交付商](#all)
1. [交付商列表](#list)
1. [交付商查询](#info)
1. [交付商添加/修改](#save)
1. [交付商删除](#del)
1. [启用/禁用](#enabled)
1. [修改密码](#resetPassword)
## **<a name="provinceList"> 省</a>**
[返回到目录](#menu)
##### URL
[/web/common/deliverCtl/provinceList]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": "1", // 省id
"name": "北京", // 交付商
},
],
"requestid": "5026518c1b354582932e5222bab4a785"
}
```
## **<a name="all"> 全部交付商</a>**
[返回到目录](#menu)
##### URL
[/web/common/deliverCtl/all]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": "13120681466000118", // 交付商编码
"name": "杨庆菊交付商", // 交付商名号曾
"businessmenDivide": 50, // 个体户分成比例
"invoiceDivide": 22.21, // 发票分成比例
"remark": "备注" // 备注
},
],
"requestid": "5026518c1b354582932e5222bab4a785"
}
```
## **<a name="list"> 交付商列表页</a>**
[返回到目录](#menu)
##### URL
[/web/common/deliverCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": "1",
"pageSize": "10"
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 12,
"rows": [
{
"id": "13120681635001335", // 交付商编码
"name": "杨庆菊交付商14", // 交付商名称
"businessmenDivide": 30.25, // 个体户分成比例
"invoiceDivide": 22.21, // 发票分成比例
"isEnabled": 0, // 是否可用 0否 1是
"real_name": "杨庆菊333", // 管理员姓名
"ucname": "kf_admin", // 帐号名
"admin_id": "1631497435000614", // 管理员帐号id, 修改密码时使用
"remark": "备注" // 备注
"created_at": "2019-10-03 10:12:14" // 创建时间
"user": {
"id": "1631497435000614",
"real_name": "杨庆菊333",
"ucname": "kf_admin",
"deliver_id": "13130003843000925",
"isAdmin": 1,
"saas_id": "",
"created_at": "2020-01-19T07:42:35.000Z",
"updated_at": "2020-01-19T07:42:35.000Z",
"deleted_at": null,
"version": 0
}
},
]
},
"requestid": "1e18fd911db84525a964e9a17d8c83d1"
}
```
## **<a name="info"> 交付商查询</a>**
[返回到目录](#menu)
##### URL
[/web/common/deliverCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "" // 交付商id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "13120681635001335", // 交付商编码
"name": "杨庆菊交付商14", // 交付商名称
"businessmenDivide": 30.25, // 个体户分成比例
"invoiceDivide": 22.21, // 发票分成比例
"isEnabled": 0, // 是否可用 0否 1是
"real_name": "杨庆菊333", // 管理员姓名
"ucname": "kf_admin", // 帐号名
"admin_id": "1631497435000614", // 管理员帐号id, 修改密码时使用
"remark": "备注" // 备注
"created_at": "2019-10-03 10:12:14" // 创建时间
"user": {
"id": "1631497435000614",
"real_name": "杨庆菊333",
"ucname": "kf_admin",
"deliver_id": "13130003843000925",
"isAdmin": 1,
"saas_id": "",
"version": 0
}
},
"requestid": "7d6c9dd96aed4e00917bdb934d62bfaf"
}
```
## **<a name="save"> 交付商添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/common/deliverCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id": "", // id
"name": "杨庆菊交付商14", // 交付商名称
"real_name" : "杨庆菊333", // 管理员
"ucname" : "kf_admin", // 账号
"password" : "123123", // 密码
"isEnabled": 0
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="del"> 交付商删除</a>**
[返回到目录](#menu)
##### URL
[//web/common/deliverCtl/del]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"ids": ["12218127593000590","12218127593000592"...] // 交付商id数组
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": "",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="enabled"> 启用/禁用</a>**
[返回到目录](#menu)
##### URL
[//web/common/deliverCtl/enabled]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id" : "13130003843000925", // 列表id
"isEnabled" : "1" // 0禁用 1启用
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": "",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="resetPassword"> 修改密码</a>**
[返回到目录](#menu)
##### URL
[//web/common/deliverCtl/resetPassword]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"admin_id": "1631497435000614", // 列表admin_id字段
"password": "1" // 密码
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": "",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
<a name="menu">目录</a>
1. [注册地全部](#allList)
1. [注册地名称列表](#nameList)
1. [注册地列表](#list)
1. [注册地查询](#info)
1. [注册地添加/修改](#save)
1. [注册地删除](#del)
## **<a name="allList"> 注册地全部</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/all]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": "12706710844001762", // id
"name": "杨庆菊12", // 注册地名称
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-03 03:54", // 创建时间
"businessscopeList": [ // 经营范围列表
{
"id": "12218127540000210", // 经营范围id
"domicile_id": "12706646858000580", // 注册地id
"businessType": "经营范围", // 经营范围
"businessscope": "经营范围详情", // 经营范围详情
"isEnabled": 0, // 是否启用 0否 1是
"created_at": "2019-10-03 06:50:08" // 创建时间
},
]
}
],
"requestid": "51161e8d79614cb58de8edaa61a85766"
}
```
## **<a name="nameList"> 注册地名称列表</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/nameList]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": "12706646858000580", // 注册地id
"name": "杨庆菊1" // 注册地名称
},
{
"id": "12706647287000653",
"name": "杨庆菊2"
},
...
],
"requestid": "02da57850743496181fcd4705c09749e"
}
```
## **<a name="list"> 注册地列表</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"currentPage": "1",
"pageSize": "3",
"id": "" // 注册地id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 1,
"rows": [
{
"id": "12706710844001762", // id
"name": "杨庆菊12", // 注册地名称
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-03 03:54", // 创建时间
"businessscopeList": [ // 经营范围列表
{
"id": "12218127540000210", // 经营范围id
"domicile_id": "12706646858000580", // 注册地id
"businessType": "经营范围", // 经营范围
"businessscope": "经营范围详情", // 经营范围详情
"isEnabled": 0, // 是否启用 0否 1是
"created_at": "2019-10-03 06:50:08" // 创建时间
},
]
}
]
},
"requestid": "51161e8d79614cb58de8edaa61a85766"
}
```
## **<a name="info"> 注册地查询</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id": "" // 注册地id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "12706710844001762", // id
"name": "杨庆菊12", // 注册地名称
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-03 03:54", // 创建时间
"businessscopeList": []
},
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="save"> 注册地添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id": "", // id 空的时候添加,有具体id时修改
"name": "杨庆菊12", // 注册地名称
"isEnabled" : 1 // 是否启用 0否 1是
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "12706710844001762", // id
"name": "杨庆菊12", // 注册地名称
"isEnabled": 1, // 是否启用 0否 1是
"created_at": "2019-10-03 03:54", // 创建时间
"businessscopeList": []
},
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
## **<a name="del"> 注册地删除</a>**
[返回到目录](#menu)
##### URL
[/web/common/domicileCtl/del]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"ids": ["12218127593000590","12218127593000592"...] // 注册地id数组
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": "",
"requestid": "3f4426683fb44c2d80e55b88faabafc9"
}
```
<a name="menu">目录</a>
1. [发票内容列表](#list)
1. [发票内容明细](#info)
1. [发票内容添加/修改](#save)
1. [发票内容删除](#del)
## **<a name="list"> 发票内容列表</a>**
[返回到目录](#menu)
##### URL
[/web/common/invoicecontentCtl/list]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": "1",//非必传
"pageSize": "10",//非必传
"id":"xxx", //非必传
"name":"xxx"//非必传
}
```
#### 返回结果
```javascript
{
"count":2,
"rows":[
{
"id":"11444116222000933",
"name":"总统孙",
"isEnabled":1,
"created_at":"2019-10-10T10:05:06.000Z",
"updated_at":"2019-10-10T10:05:06.000Z",
"deleted_at":null
},
{
"id":"11444116214000855",
"name":"孙总统",
"isEnabled":1,
"created_at":"2019-10-10T10:04:58.000Z",
"updated_at":"2019-10-10T10:04:58.000Z",
"deleted_at":null
}
],
"requestid":"dc575fe96a314a0e91160b7f93966c1a"
}
```
## **<a name="info"> 发票内容商明细</a>**
[返回到目录](#menu)
##### URL
[/web/common/invoicecontentCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "" // 交付商id
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":{
"id":"11444116222000933",
"name":"总统孙",
"isEnabled":true,
"created_at":"2019-10-10T10:05:06.000Z",
"updated_at":"2019-10-10T10:05:06.000Z",
"deleted_at":null,
"version":0
},
"requestid":"ff2e786cb8d6488ca1423c2c4a8677bc"
}
```
## **<a name="save"> 发票内容添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/common/invoicecontentCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```javascript
{
"id": "", // id
"name": "xxx", // 发票内容名称
"isEnabled": , // 是否可用
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":{
"version":0,
"name":"叫我总统孙",
"isEnabled":true,
"id":"11444191661001080",
"updated_at":"2019-10-11T07:02:25.402Z",
"created_at":"2019-10-11T07:02:25.402Z"
},
"requestid":"7c033606653546d4bdde0072a8aab90e"
}
```
## **<a name="del"> 发票内容删除</a>**     
[返回到目录](#menu)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** '/web/common/invoicecontentCtl/del'
**参数验证**
**参数**
| 参数名|数据类型|必须|默认| 说明 |
|---|:---:|:---:|:---:|---|
| ids | Array| 是 |  | 删除发票内容id |
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
| requestid | String | 请求id |
**示例**
```
{
"status":0,
"msg":"success",
"data":1,
"requestid":"29065294b509477f90691725f6faebb5"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [交易数据](#transdata)
1. [业务办理数据](#businessData)
1. [业务概览](#businessOverview)
## **<a name="transdata"> 本月交易数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/transData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
type: 1, // 筛选状态 1本月 2上月 3总计
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"invoiceCount": 19, // 业务订单量
"serviceChange": 43600, // 订单交易额
"days": [ // echart日期
"2019-01",
"2019-02",
"2019-03",
],
"dayCounts": [ // echart交易量
1,
0,
0,
],
"priceCounts": [ // echart交易额
3000,
0,
0,
]
},
"requestid": "536712febd5b440f8abe7e5df7480aba"
}
```
## **<a name="businessData"> 业务办理数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/businessData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
type: 1, // 筛选状态 1本月 2上月 3总计
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"completeCount": 0, // 已开具
"toApplyCount": 10, // 待申请审核
"toAuditCount": 1, // 待交付审核
"handlingCount": 5 // 交付商办理中
},
"requestid": "776c869048b440d4bf16f9e2f7b42fb8"
}
```
## **<a name="businessOverview"> 业务概览</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/deliverData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
currentPage: 1,
pageSize: 10,
type: 1, // 筛选状态 1本月 2上月 3总计
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 3,
"rows": [
{
"deliverName": "某某交付商222", // 交付商
"servicePrice": "4492976", // 服务费
"completeCount": 0, // 完成订单量
"handlingCount": 17 // 办理中订单量
},
{
"id": "11330348689004287", //交易记录id
"deliverer_id": "11330348689004287", //交付商id
"deliverer_name": "111", //交付商名称
"totalAmount": 519.99, //服务费
"completeCount": 0, //完成的订单
"handlingCount": 0 //办理中订单
},
]
},
"requestid": "6ef971357a2745e4b2996a97149c0055"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [交易数据](#delTransData)
1. [业务办理数据](#delBusinessData)
## **<a name="delTransData"> 本月交易数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/delTransData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
type: 1, // 筛选状态 1本月 2上月 3总计
delivererId:"xxx" //交付商ID
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"invoiceCount": 19, // 业务订单量
"delivererAmount": 43600, //服务费
"days": [ // echart日期
"2019-01",
"2019-02",
"2019-03",
],
"dayCounts": [ // echart交易量
1,
0,
0,
],
"priceCounts": [ // echart交易额
3000,
0,
0,
]
},
"requestid": "536712febd5b440f8abe7e5df7480aba"
}
```
## **<a name="delBusinessData"> 业务办理数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/delBusinessData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
type: 1, // 筛选状态 1本月 2上月 3总计
delivererId:"xxx" //交付商ID
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"completeCount": 0, // 已开具
"handlingCount": 5 // 交付商办理中
},
"requestid": "776c869048b440d4bf16f9e2f7b42fb8"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [数据简报](#statTransData)
1. [办理事项](#needToBeDealtWith)
1. [交付统计](#statDeliverData)
## **<a name="statTransData"> 本月交易数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/statTransData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"current_date":"2020-01" //当前月份
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"orderCount": 8,
"orderPrice": 0,
"days": [
"2020-01-01",
"2020-01-02",
"2020-01-03",
"2020-01-04",
"2020-01-05",
"2020-01-06",
"2020-01-07",
"2020-01-08",
"2020-01-09",
"2020-01-10",
"2020-01-11",
"2020-01-12",
"2020-01-13",
"2020-01-14",
"2020-01-15",
"2020-01-16",
"2020-01-17",
"2020-01-18",
"2020-01-19",
"2020-01-20",
"2020-01-21",
"2020-01-22",
"2020-01-23",
"2020-01-24",
"2020-01-25",
"2020-01-26",
"2020-01-27",
"2020-01-28",
"2020-01-29",
"2020-01-30",
"2020-01-31"
],
"dayCounts": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
8,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"priceCounts": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
"bizmsg": "empty",
"requestid": "0f79617571a34e65b934a84c21eec321"
}
```
## **<a name="needToBeDealtWith"> 办理事项</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/needToBeDealtWith]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"current_date":"2020-01" //当前月份
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"orderComplete": 0, //完成订单
"orderUnassignment": 4, //为分配订单
"orderUnexamine": 0, //未审核订单
"orderHandling": 2 //中在处理中订单
},
"bizmsg": "empty",
"requestid": "a4cd0083955d4ed9b1ddb248344defbe"
}
```
## **<a name="statDeliverData"> 交付统计</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/statDeliverData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"current_date":"2020-01" //当前月份
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": [
{
"serivce_price": "300",
"deliver_name": "21111",
"deliver_id": "12222222",
"order_complete_count": 1,
"order_handing_count": 1
},
{
"serivce_price": "300000", //服务费用
"deliver_name": "开封薪企云服人力资源有限公司", //交付商名称
"deliver_id": "13129998281000176", //交付商ID
"order_handing_count": 1 //办理中的订单数量
}
],
"bizmsg": "empty",
"requestid": "8e31229ac8d4438fa70e828382edbd0e"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [发票信息列表](#delivererInvoices)
1. [上传完税](#txPayment)
## **<a name="delivererInvoices"> 发票发票管理列表) </a>**     
[返回到目录](#menu)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/delivererInvoices
**参数验证**
**参数**
| 参数名|数据类型|必须|默认| 说明 |
|---|:---:|:---:|:---:|---|
| pageIndex | number | 否 | 1 | 当前页数 |
| pageSize | number | 否 | 10 | 每页记录数 |
| complateTax | string | 否 |  | 是否完税 |
| invoiceTime | string | 否 |  | 开发票时间 |
| applyNo | string | 否 |  | 发票申请编号 |
| inInvalid | string | 否 |  | 是否完税 |
| type | string | 否 |  | 发票类型 |
**示例**
```
{
"type":"10"
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
**示例**
```javascript
{
"status":0,
"msg":"操作成功",
"data":{
"count":2,
"rows":[
{
"applyNo":"gongsibao-futong001",
"invoiceId":"11665448190004592",
"breakReason":null,
"apply":{
"merchantId":"11064622752480055",
"merchantName":"司机宝",
"type":"增值税专用发票",
"invoiceAmount":400000000,
"invoiceTime":"2019-10-19",
"businessName":"北京富通勤国际贸易有限责任公司(个体工商)"
},
"invoice":{
"invoiceNo":"gongsibao4584585",
"status":"1060",
"statusName":"待审核"
}
},
{
"applyNo":"gongsibao-futong001",
"invoiceId":"11665448190004592",
"breakReason":"业务繁忙",
"apply":{
"merchantId":"11064622752480055",
"merchantName":"司机宝",
"type":"增值税专用发票",
"invoiceAmount":400000000,
"invoiceTime":"2019-10-19",
"businessName":"北京富通勤国际贸易有限责任公司(个体工商)"
},
"invoice":{
"invoiceNo":"gongsibao4584585",
"status":"1060",
"statusName":"待审核"
}
}
]
},
"bizmsg":"empty",
"requestid":"21da505b34d7423fbbb8865d64f652a5"
}
```
## **<a name="txPayment"> 上传完税 </a>**     
[返回到目录](#menu)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/txPayment
**参数验证**
**参数**
| 参数名|数据类型|必须|默认| 说明 |
|---|:---:|:---:|:---:|---|
| id | number | 是 |  | 发票ID |
| taxNo | number | 是 |  | 发票编号 |
| complateTax | string | 是 |  | 是否完税 |
| taxTime | string | 是 |  | 完税时间 |
| taxVoucher | string | 是 |  | 完税图片 |
**示例**
```
{
"id":"11665448190004592",
"taxNo": "DIE552SDKD",
"complateTax":1,
"taxTime":"2019-10-10",
"taxVoucher":"www.baidu.com"
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
<a name="menu">目录</a>
1. [地址列表](#addressList)
1. [地址信息](#addressInfo)
1. [添加/修改地址](#save)
1. [设置默认](#setDefault)
## **<a name="addressList"> 地址列表</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantaddressCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": "1",
"pageSize": "3",
"merchantId": "" // 商户id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 11,
"rows": [
{
"id": "12085609085001303", // 地址ID
"merchant_id": "11064625945481089", // 商户id
"merchantName": "杨庆菊的公司11编辑" // 商户名
"mailAddr": "杨庆菊客户的邮寄地址", // 邮寄地址
"mailTo": "杨庆菊客户的收件人", // 收件人
"mailMobile": "杨庆菊客户的收件人的手机号", // 收件电话
"isDefault": 1, // 是否默认 0否 1是
"created_at": "2019-10-01 09:33", // 创建时间
},
]
},
"requestid": "61964dc5e61d4326b9491ddfb77cd949"
}
```
## **<a name="addressInfo"> 地址信息</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantaddressCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": ""
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "12085609085001303", // 地址ID
"merchant_id": "11064625945481089", // 商户id
"merchantName": "杨庆菊的公司11编辑" // 商户名
"mailAddr": "杨庆菊客户的邮寄地址", // 邮寄地址
"mailTo": "杨庆菊客户的收件人", // 收件人
"mailMobile": "杨庆菊客户的收件人的手机号", // 收件电话
"isDefault": 1, // 是否默认 0否 1是
"created_at": "2019-10-01 09:33", // 创建时间
"requestid": "61964dc5e61d4326b9491ddfb77cd949"
}
```
## **<a name="save"> 添加/修改抬头</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantaddressCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "", // 地址id, 空的时候添加,有具体id时修改
"merchantId" :"11064624178480175", // 商户id
"mailAddr": "杨庆菊的地址5", // 邮寄地址
"mailTo": "杨庆菊的收件人6", // 收件人
"mailMobile": "杨庆菊的手机号27", // 收件人手机号
"isDefault" : 0 // 是否设置默认 0 否 1是
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
}
```
## **<a name="setDefault"> 设置默认</a>**
[返回到目录](#menu)
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "13661984313001961" // id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [商户nameList](#nameList)
1. [商户信息列表](#infoList)
1. [新增商户](#addMerchant)
1. [修改商户](#updMerchant)
1. [商户审核](#merchantAudit)
## **<a name="nameList"> 商户nameList</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantCtl/nameList]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": 110361382269, // 商户id
"name": "司机宝" // 商户名称
},
{
"id": 110361384474,
"name": "测试公司录入1"
},
{
"id": 110361384475,
"name": "测试公司录入3"
},
{
"id": 110361384476,
"name": "546444544"
}
]
}
```
## **<a name="infoList"> 商户信息列表</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantCtl/infoPage]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": 1, // 当前页
"pageSize": 10, // 每页显示条数
"name": "测试公司", // 公司名称
"merchantId": 11111, // 商户id
"createdBegin": "", // 创建时间-开始
"createdEnd": "" // 创建时间-结束
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 10,
"rows": [
{
"id": "11064624202480602", // 商户id
"name": "杨庆菊的公司7", // 商户名称
"taxType": "00", // 纳税人类型
"taxTypeName": "一般纳税人", // 纳税人类型名称
"contactName": "杨庆菊", // 联系人姓名
"contactMobile": "杨庆菊手机号", // 联系人手机号
"contactEmail": "杨庆菊email", // 联系人邮箱
"invoiceValid": 1, // 开票申请校验 0否 1是
"mustPay": 1, // 校验订单支付 0否 1是
"ownerName": "客户经 杨庆菊", // 客户经理姓名
"ownerMobile": "客户经理杨庆菊手机", // 客户经理手机号
"statusName": "待审核", // 商户状态名称
"status": "00", // 商户状态 00待审核 10待签约 90签约完成
"created_at": "2019-10-01 09:04", // 添加时间
},
]
},
"requestid": "081f13fd9dd5441094487eeff6d0ff6f"
}
```
## **<a name="addMerchant"> 新增商户</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantCtl/add]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"name": "测试公司录入3", // 商户名称
"taxType": "10", // 纳税人类型 00一般纳税人 10小规模纳税人
"contactName": "宋毅", // 联系人姓名
"contactMobile": "13338383838", // 联系人手机
"contactEmail": "songyi@gongisbao.com", // 联系人邮箱
"invoiceValid": 1, // 开票申请校验 0否 1是(必须数字格式 0 或者 1)
"mustPay": 0, // 校验订单支付 0否 1是(必须数字格式 0 或者 1)
"taxNo": "sssssssss", // 纳税人识别号
"invoiceAddr": "朝来高科技产业园33333", // 开票地址
"invoiceMobile": "13838383838", // 开票电话
"accountName": "宋毅", // 开户名称
"accountPublic": "xxxx对公账户22222", // 对公账户
"mailAddr": "来广营", // 邮寄地址
"mailTo": "宋小毅", // 收件人
"mailMobile": "13838383838", // 收件电话
"ownerId": "", // 客户经理姓名
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
## **<a name="updMerchant"> 修改商户</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantCtl/upd]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"name": "测试公司录入3", // 商户名称
"taxType": "10", // 纳税人类型 00一般纳税人 10小规模纳税人
"contactName": "宋毅", // 联系人姓名
"contactMobile": "13338383838", // 联系人手机
"contactEmail": "songyi@gongisbao.com", // 联系人邮箱
"invoiceValid": 1, // 开票申请校验 0否 1是(必须数字格式 0 或者 1)
"mustPay": 0, // 校验订单支付 0否 1是(必须数字格式 0 或者 1)
"ownerId": "", // 客户经理姓名
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
## **<a name="merchantAudit"> 商户审核</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantCtl/audit]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "xxxxxxxxx ", // 商户id
"ucname": "18600002222" // 商户登录帐号
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
<a name="menu">目录</a>
1. [充值列表](#rechargeList)
1. [充值信息](#rechargeInfo)
1. [充值审核](#rechargeAudit)
## **<a name="rechargeList"> 充值申请列表</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantrechargeCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": "1",
"pageSize": "30",
"merchantId": "11064622752480048"
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 11,
"rows": [
{
"id": "1789195248000236", // id
"merchant_id": "11064622752480048", // 商户id
"merchantName": "十一加班干这个事", // 商户名称
"outTradeNo": "杨庆菊2", // 充值流水号
"voucher": "https://www.baidu.com/1.png", // 充值凭证
"amt":1000, // 充值金额
"status": "00", // 充值状态 00待审核 10已入账 20审核失败
"statusName": "待审核", // 充值状态名称
"remark": "", // 审核备注
"auditUserName": null, // 审核人姓名
"auditTime": "2019-10-05 05:26:25", // 审核时间
"created_at": "2019-10-05 05:26:25", // 创建时间
"created_at": "2019-10-01 09:33:05", // 创建时间
},
...
]
},
"requestid": "f3771571a73f48b280dc11ae1e5a3cf1"
}
```
## **<a name="rechargeInfo"> 充值申请信息</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantrechargeCtl/add]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "1789195248000236", // 充值金额(分)
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "1789195248000236", // id
"merchant_id": "11064622752480048", // 商户id
"merchantName": "十一加班干这个事", // 商户名称
"outTradeNo": "杨庆菊2", // 充值流水号
"voucher": "https://www.baidu.com/1.png", // 充值凭证
"amt":1000, // 充值金额
"status": "00", // 充值状态 00待审核 10已入账 20审核失败
"statusName": "待审核", // 充值状态名称
"remark": "", // 审核备注
"auditUserName": null, // 审核人姓名
"created_at": "2019-10-05 05:26:25", // 创建时间
"created_at": "2019-10-01 09:33:05", // 创建时间
},
"requestid": "f3771571a73f48b280dc11ae1e5a3cf1"
}
```
## **<a name="rechargeAudit"> 充值审核</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantrechargeCtl/audit]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"action_process": "sjb",
"action_type": "merchantRechargeAudit",
"action_body": {
"id": "1789198739000692", // 充值id
"status": "20", // 状态 10审核通过 20审核驳回
"remark":"测试接口", // 审核备注
"opUser": { // 审核人信息
"ucid": "111111", // 审核人id
"ucname": "杨庆菊财务" // 审核人姓名
}
}
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "c359d5fa943a44c99f9f68527c2effb9"
}
```
<a name="menu">目录</a>
1. [签约列表](#page)
1. [添加/修改](#save)
1. [查看签约](#info)
## **<a name="page"> 签约列表</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantsignedCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage": 1, // 页码
"pageSize": 10, // 每页条数
"merchantId": 11111, // 商户id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 2,
"rows": [
{
"merchant_id": "11064625945481089", // 商户ID
"merchantName": "杨庆菊的公司11编辑" // 商户名称
"nameA": "杨庆菊的主体2222", // 签约主体
"contractNo": "杨庆菊录入合同2222号", // 合同编号
"beginDate": "2019-10-01", // 合同开始时间
"endDate": "2019-10-07", // 合同截至时间
"serviceRate": 322 // 服务费比率(整数防止精度损失)
"created_at": "2019-10-01 11:35", // 创建时间
},
]
}
}
```
## **<a name="save"> 添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantsignedCtl/save]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"merchantId": 110361382269, // 商户id
"nameA": "xxxxx有限公司", // 签约主体
"contractNo": "NO233332222", // 合同编码
"beginDate": "2019-08-22", // 合同开始时间
"endDate": "2020-08-22", // 合同结束时间
"serviceRate": "5.23", // 服务费率
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
## **<a name="info"> 查看签约</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchantsignedCtl/info]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"merchantId": "110361384474" // 商户id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"merchant_id": "11064625945481089", // 商户ID
"merchantName": "杨庆菊的公司11编辑" // 商户名称
"nameA": "杨庆菊的主体2222", // 签约主体
"contractNo": "杨庆菊录入合同2222号", // 合同编号
"beginDate": "2019-10-01", // 合同开始时间
"endDate": "2019-10-07", // 合同截至时间
"serviceRate": 322 // 服务费比率(整数防止精度损失)
"created_at": "2019-10-01 11:35", // 创建时间
},
"requestid": "b6df9966b91f4567887a606686952fb0"
}
```
<a name="menu">目录</a>
1. [抬头列表](#titleList)
1. [抬头列表](#titleInfo)
1. [添加/修改抬头](#saveTitle)
1. [设置默认](#setDefault)
## **<a name="titleList"> 抬头列表</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchanttitleCtl/merchantTitleList]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"action_process": "test",
"action_type": "merchantTitleList",
"action_body": {
"currentPage": "1",
"pageSize": "3",
"merchantId": "" // 商户id
}
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":{
"count":27,
"rows":[
{
"id":"13662688292002677",
"merchant_id":"11065403484481165",
"taxNo":"sssssssss",
"invoiceAddr":"朝来高科技产业园33333",
"invoiceMobile":"13838383838",
"accountName":"宋毅",
"accountPublic":"xxxx对公账户22222",
"isDefault":1,
"created_at":"2019-10-10 09:32:04",
"merchantName":"测试公司录入3334"
},
{
"id":"13661984313001961",
"merchant_id":"11064624178480175",
"taxNo":"12212134杨庆菊3",
"invoiceAddr":"杨庆菊的地址",
"invoiceMobile":"杨庆菊的手机号",
"accountName":"杨庆菊的账户名",
"accountPublic":"杨庆菊的对公账户",
"isDefault":1,
"created_at":"2019-10-02 05:59:05",
"merchantName":"杨庆菊的公司2"
}
]
},
"requestid":"2fd6b5ac87fa401bb19bf27cb27d3697"
}
```
## **<a name="titleInfo"> 抬头信息</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchanttitleCtl/merchantTitleInfo]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "" // id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": "13661985486002511", // id
"merchant_id": "11064624178480175", // 商户id
"merchantName": "杨庆菊的公司2", // 商户名称
"taxNo": "杨庆菊客户的号", // 纳税人识别号
"invoiceAddr": "杨庆菊客户的地址", // 开票地址
"invoiceMobile": "杨庆菊客户开票手机号", // 开票电话
"accountName": "杨庆菊客户的账户名称", // 开户名称
"accountPublic": "杨庆菊客户的对公账户", // 对公账户
"isDefault": 0, // 是否默认 0否 1是
"created_at": "2019-10-02 06:18", // 创建时间
},
"requestid": "cf6320a1b615423b8a9ceb3b66b713f1"
}
```
## **<a name="saveTitle"> 添加/修改抬头</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchanttitleCtl/merchantTitleSave]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "", // 抬头id,为空或者不填写该字段时新增,指定具体id时修改
"merchantId" :"11064624178480175", // 商户id
"taxNo": "杨庆菊客户的税号", // 纳税人识别号
"invoiceAddr": "杨庆菊客户的地址", // 开票地址
"invoiceMobile": "杨庆菊客户开票手机号", // 开票电话
"accountName": "杨庆菊客户的账户名称", // 开户名称
"accountPublic": "杨庆菊客户的对公账户", // 对公账户
"isDefault" : true, // 是否设置默认
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {}
}
```
## **<a name="setDefault"> 设置默认</a>**
[返回到目录](#menu)
##### URL
[/web/merchant/merchanttitleCtl/merchantTitleDefault]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "13661984313001961" // 抬头id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success"
}
```
\ No newline at end of file
<a name="menu">目录</a> <a name="menu">目录</a>
1. [资金账户](#accountList) 1. [ocr回调](#taxocrallback)
## **<a name="accountList"> 资金账户</a>** ## **<a name="taxocrallback"> ocr回调 </a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/merchant/merchantaccountCtl/page] [/api/tax/taxApi/taxocrallback]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
``` javascript ``` javascript
{ {
"currentPage": "1", "taxOcrId": 1, // ocr识别时传入的taxOcrId
"pageSize": "30", "itemList": [
"merchantId": "11064622752480048" {
"idName": "李大本事", // 姓名
"idNo": "222333", // 身份证
"incomeTax": "12343", // 个税金额
"actualAmt": "22", // 实发金额
"grant_time": "331112", // 发放时间
"param": "123123" // 马赛克参数
},
{
"idName": "李小蔽",
"idNo": "111",
"incomeTax": "222",
"actualAmt": "333",
"grant_time": "4356",
"param": "657"
}
]
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ```javascript
{
"status": 0, {
"msg": "success", "status": 0,
"data": { "msg": "success",
"count": 11, "data": null,
"rows": [ "requestid": "7443807c76b940a2bde2abd0311e2fd8"
{ }
"id": "12055982262001419", // 账户ID
"merchant_id": "11064625945481089", // 商户id
"merchantName": "杨庆菊的公司11编辑", // 商户名称
"banlance": 0, // 账户余额(元)
"created_at": "2019-10-01 09:33:05", // 创建时间
},
...
],
"requestid": "f3771571a73f48b280dc11ae1e5a3cf1"
}
}
``` ```
\ No newline at end of file
<a name="menu">目录</a> <a name="menu">目录</a>
1. [交易数据](#transdata) 1. [商户税务](#merchantTaxPage)
1. [业务办理数据](#businessData) 1. [个人税务](#personTaxPage)
1. [业务概览](#businessOverview) 1. [个人税务-完税证明](#personTaxPage_taxurl)
## **<a name="merchantTaxPage"> 商户税务 </a>**
## **<a name="transdata"> 本月交易数据</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/index/managerCtl/transData] [/web/tax/tcompanytaxCtl/taxPage]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
``` javascript ``` javascript
{ {
type: 1, // 筛选状态 1本月 2上月 3总计 "currentPage": "1",
"pageSize": "10",
"month": "", // 月份 如:2019-02
} }
``` ```
...@@ -22,104 +23,109 @@ ...@@ -22,104 +23,109 @@
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 0, "status": 0,
"msg": "success", "msg": "success",
"data": { "data": {
"orderCount": 19, // 业务订单量 "count": 1,
"orderPrice": 43600, // 订单交易额 "rows": [
"days": [ // echart日期 {
"2019-01", "companyName": "杭州淘粉吧网络技术股份有限公司", // 商户名
"2019-02", "mchtId": "1103667243432067073" // 商户id
"2019-03", "month_date": "2019-02", // 完税月份
], "tax_url": "https://g...", // 完税pdf
"dayCounts": [ // echart交易量 "tax_amt": "0", // 完税金额
1, "created_at": "2020-02-27 03:32:22",
0, "updated_at": "2020-02-27 03:32:24",
0, "deleted_at": null,
], "version": 0,
"priceCounts": [ // echart交易额 }
3000, ]
0,
0,
]
},
"requestid": "536712febd5b440f8abe7e5df7480aba"
} }
}
``` ```
## **<a name="businessData"> 业务办理数据</a>**
## **<a name="personTaxPage"> 个人税务 </a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/index/managerCtl/businessData] [/web/tax/tcompanytaxitemCtl/taxPage]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
``` javascript ``` javascript
{ {
type: 1, // 筛选状态 1本月 2上月 3总计 "currentPage": "1",
"pageSize": "10",
"month": "", // 月份 如:2019-02
"idName": "", // 姓名
"idNo": "", // 身份证
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 0, "status": 0,
"msg": "success", "msg": "success",
"data": { "data": {
"completeCount": 0, // 已完成订单量 "count": 3,
"toApplyCount": 10, // 待分配订单量 "rows": [
"toAuditCount": 1, // 待审核订单量 {
"handlingCount": 5 // 办理中订单量 "id": 4, // id
}, "month_date": "2020-02", // 完税月份
"requestid": "776c869048b440d4bf16f9e2f7b42fb8" "idName": "李小蔽", // 姓名
"idNo": "111", // 身份证号
"incomeTax": "222", // 个税
"actualAmt": "333", // 实发金额
"grant_time": "4356", // 完税月份
},
]
} }
}
``` ```
## **<a name="businessOverview"> 业务概览</a>** ## **<a name="personTaxPage_taxurl"> 个人税务-完税证明 </a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/index/managerCtl/deliverData] [/web/tax/tcompanytaxitemCtl/taxUrl]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
``` javascript ``` javascript
{ {
currentPage: 1, "id": "", // 个人税务列表返回的id
pageSize: 10,
type: 1, // 筛选状态 1本月 2上月 3总计
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 0, "status": 0,
"msg": "success", "msg": "success",
"data": { "data": {
"count": 3, "taxUrl": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_7511582721898214202026205818214tfb_month_12.pdf"
"rows": [ }
{
"deliverName": "某某交付商222", // 交付商
"servicePrice": "4492976", // 服务费
"completeCount": 0, // 完成订单量
"handlingCount": 17 // 办理中订单量
},
]
},
"requestid": "6ef971357a2745e4b2996a97149c0055"
} }
```
\ No newline at end of file ```
[返回主目录](/doc)
<a name="menu">目录</a>
1. [添加](#add)
1. [更新](#upd)
1. [删除](#del)
1. [菜单树](#tree)
1. [菜单树-子菜单模式](#byPid)
1. [明细](#queryById)
## **<a name="add"> 添加</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/addAuth]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"pid": 2, // 父节点id
"menuType": 1, // 菜单类型 1菜单, 2接口
"name": "个体户系统", // 菜单名称
"icon": "123", // 菜单icon 选填
"path": "/aaa/bbb" // 菜单路由 选填
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "2dc587798f974902b06123ce34c39090"
}
```
## **<a name="upd"> 更新</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/updAuth]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 8, // 菜单id
"pid": 2, // 父节点id
"menuType": 1, // 菜单类型 1菜单, 2接口
"name": "个体户系统", // 菜单名称
"icon": "123", // 菜单icon 选填
"path": "/aaa/bbb" // 菜单路由 选填
}
```
## **<a name="del"> 删除</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/delAuth]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
## **<a name="tree"> 菜单树</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/tree]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
{
"id": 1, // 菜单id
"pid": 0, // 父节点id
"menuType": 1, // 菜单类型 1菜单, 2接口
"name": "个体户系统", // 菜单名称
"icon": "123", // 菜单icon
"path": "aaaaaaaaa", // 菜单路由
"childs": [...] // 子菜单
}
},
"requestid": "007fd384e47641d2a71e9f3ef6292843"
}
```
## **<a name="byPid"> 菜单树-子菜单模式</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/byPid]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"pid": 1, // 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": [
{
"id": 1, // 菜单id
"pid": 0, // 父节点id
"menuType": 1, // 菜单类型 1菜单, 2接口
"name": "个体户系统", // 菜单名称
"icon": "123", // 菜单icon
"path": "aaaaaaaaa", // 菜单路由
}
],
"requestid": "b340e352d57548d880540bcd05fbfee3"
}
```
## **<a name="queryById"> 明细</a>**
[返回到目录](#menu)
##### URL
[/web/uc/authCtl/queryById]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": 1, // 菜单id
"pid": 0, // 父节点id
"menuType": 1, // 菜单类型 1菜单, 2接口
"name": "个体户系统", // 菜单名称
"icon": "123", // 菜单icon
"path": "aaaaaaaaa", // 菜单路由
},
"requestid": "6b34ba91355f407ab0592d3d8e39544c"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [短信验证码](#smsCode)
1. [登录](#login)
1. [当前用户信息查询](#currentUser)
1. [获取菜单](#getMenu)
## **<a name="smsCode"> 短信验证码</a>**
[返回到目录](#menu)
##### URL
[/web/auth/userCtl/smsCode]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
| 参数 | 必选 | 类型 | 说明|
| -------- | -------- | ------------|---------|
| **mobile** | 是 | String | 手机号码|
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
}
```
## **<a name="login"> 登录</a>**
[返回到目录](#menu)
##### URL
[/web/auth/userCtl/login]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
| 参数 | 必选 | 类型 | 说明|
| -------- | -------- | ------------|---------|
| **loginName** | 是 | String | 登录名|
| **password** | 是 | String | 密码 |
| **captchaKey** | 是 | String | 图片验证码key |
| **captchaCode** | 是 | String | 图片验证码填入值 |
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"xggadminsid": "3cb49932-fa02-44f0-90db-9f06fe02e5c7" // 登录key
}
}
```
## **<a name="currentUser"> 当前用户信息查询</a>**
[返回到目录](#menu)
##### URL
[/web/auth/userCtl/currentUser]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
}
```
## **<a name="getMenu"> 获取菜单</a>**
[返回到目录](#menu)
##### URL
[/web/auth/userCtl/getMenu]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
[
{
"name": "首页",
"path": "/",
"submenu": []
},
{
"name": "商户中心",
"path": "/merchants",
"submenu": [
{
"name": "客户管理",
"team": [
{
"name": "商户信息",
"path": "/merchants/businessInformation"
},
...
]
}
]
},
...
]
```
[返回主目录](/doc)
<a name="menu">目录</a>
1. [添加](#saveOrg)
1. [负责人列表](#orgUsers)
1. [更新(暂不提供)](#updOrg)
1. [删除](#delOrg)
1. [列表(条件)](#listOrg)
1. [明细](#queryById)
1. [根据PID查询子目录](#byPid)
1. [结构树](#tree)
## **<a name="saveOrg"> 添加</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/saveOrg]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, // 组织机构id 空添加 非空修改
"pid": 0, // 上级组织机构id
"orgname": "公司宝", // 组织机构名号曾
"main_ids": "36, 22" // 负责人id,多个以逗号分割
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {},
"bizmsg": "empty",
"requestid": "faf3871bc6a040d9b098ffa33d5a180a"
}
```
## **<a name="orgUsers"> 负责人列表</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/orgUsers]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, // 传入当前修改的组织机构id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 8,
"rows": [
{
"id": 17, // 编号
"ucname": "guodegang10", // 登录名
"mobile": "1381231332312", // 手机号
"realName": "郭德纲11", // 姓名
},
]
},
"requestid": "defbe7aa7b1045c4b644e1c9eb58fd88"
}
```
## **<a name="delOrg"> 删除</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/delOrg]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
## **<a name="listOrg"> 列表</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/listOrg]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"status": 0,
"msg": "success",
"data": {
"id": 17, // id
"ucname": "guodegang10", // 登录名
"uctype": 2, // 用户类型 1平台 2商户 3交付商 4个人
"uctypeId": "", // 用户类型id
"org_id": 3, // 组织机构id
"isMain": 0, // 是否主管
"isEnabled": 1, // 启用/禁用 0禁用 1启用
"created_at": "2019-11-29 10:43:32", // 创建时间
"mobile": "1381231332312", // 手机号
"realName": "郭德纲11", // 姓名
"roles": [ // 拥有角色
{
"role_id": "1" // 角色id
},
{
"role_id": "5"
},
{
"role_id": "6"
}
]
},
"requestid": "dd2731bca15c446595170e1ccf0b2b00"
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"count": 2,
"rows": [
{
"is_leaf": true, //是否叶子结点
"id": 3, //ID
"orgname": "sun", //组织结构的名称
"pid": 1, //父结点
"saas_id": 3, //saasID
"path": "/root/sun",//路径
"created_at": "2019-11-28T08:24:40.000Z",
"updated_at": "2019-11-28T08:24:40.000Z",
"deleted_at": null,
"version": 0
},
{
"id": 3,
"orgname": "sun",
"path": "/root/sun",
"pid": 1,
"saas_id": "3",
"is_leaf": 1,
"created_at": "2019-11-29T03:03:36.000Z",
"updated_at": "2019-11-29T03:03:36.000Z",
"deleted_at": null,
"version": 0
}
]
},
"bizmsg": "empty",
"requestid": "e0584277b1d0490ba2c575ac79a1a813"
}
```
## **<a name="queryById"> 明细</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/queryById]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"is_leaf": true, //是否叶子结点
"id": 3, //ID
"orgname": "sun", //组织结构的名称
"pid": 1, //父结点
"saas_id": 3, //saasID
"path": "/root/sun",//路径
"created_at": "2019-11-28T08:24:40.000Z",
"updated_at": "2019-11-28T08:24:40.000Z",
"deleted_at": null,
"version": 0
},
"bizmsg": "empty",
"requestid": "488de0d85b1b425c94166cb3a653b86c"
}
```
## **<a name="byPid"> 根据PID查询子目录</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/byPid]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"pid": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": [
{
"is_leaf": true, //是否叶子结点
"id": 3, //ID
"orgname": "sun", //组织结构的名称
"pid": 1, //父结点
"saas_id": 3, //saasID
"path": "/root/sun",//路径
"created_at": "2019-11-29T03:03:36.000Z",
"updated_at": "2019-11-29T03:03:36.000Z",
"deleted_at": null,
"version": 0
}
],
"bizmsg": "empty",
"requestid": "34791671e8584672b302f0f5acda16fa"
}
```
## **<a name="tree"> 结构树</a>**
[返回到目录](#menu)
##### URL
[/web/uc/orgCtl/tree]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"pid": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": [
{
"id": 1,
"orgname": "root",
"path": "/root",
"pid": 0,
"is_leaf": 1,
"saas_id": "2",
"created_at": "2019-11-28T08:24:40.000Z",
"updated_at": "2019-11-28T08:24:40.000Z",
"deleted_at": null,
"version": 0,
"childs": [
{
"id": 3,
"orgname": "sun",
"path": "/root/sun",
"pid": 1,
"is_leaf": 1,
"saas_id": "3",
"created_at": "2019-11-29T03:03:36.000Z",
"updated_at": "2019-11-29T03:03:36.000Z",
"deleted_at": null,
"version": 0,
"childs": []
}
]
}
],
"bizmsg": "empty",
"requestid": "72619d7a99cc437894b5880564b2847c"
}
```
\ No newline at end of file
[返回主目录](/doc)
<a name="menu">目录</a>
1. [添加](#addRole)
1. [更新](#updRole)
1. [删除](#delRole)
1. [列表(条件)](#listRole)
1. [明细](#queryById)
1. [设置权限](#setAuth)
## **<a name="addRole"> 添加</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/addRole]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"code":"公司宝001", //角色 编码 必传
"name":"划水员", //角色 名称 必传
"saas_id":2 //SAAS ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"version": 0,
"id": 2,
"code": "公司宝001", //角色 编码
"name": "划水员", //角色 名称
"saas_id": 2, //SAAS ID
"updated_at": "2019-11-29T05:51:00.027Z",
"created_at": "2019-11-29T05:51:00.027Z"
},
"bizmsg": "empty",
"requestid": "2af86a02c86d40cb87784feb1f445f96"
}
```
## **<a name="updRole"> 更新</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/updRole]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id":"xxx", //id 必传
"code": "公司宝001", //角色 编码 非必传
"name": "划水员", //角色 名称 非必传
"saas_id": 2, //SAAS ID 非必传
}
```
## **<a name="delRole"> 删除</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/delRole]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
## **<a name="listRole"> 列表</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/listRole]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"count": 2,
"rows": [
{
"id":"xxx", //id
"code": "公司宝001", //角色 编码
"name": "划水员", //角色 名称
"saas_id": 2, //SAAS ID
"created_at": "2019-11-29T05:51:00.000Z",
"updated_at": "2019-11-29T05:51:00.000Z",
"deleted_at": null,
"version": 0
},
{
"id": 3,
"code": "公司宝002",
"name": "划水员",
"saas_id": 2,
"created_at": "2019-11-29T05:54:10.000Z",
"updated_at": "2019-11-29T05:54:10.000Z",
"deleted_at": null,
"version": 0
}
]
},
"bizmsg": "empty",
"requestid": "9a285a07ac384cc0a25b36c179c49167"
}
```
## **<a name="queryById"> 明细</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/queryById]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"id":"xxx", //id
"code": "公司宝001", //角色 编码
"name": "划水员", //角色 名称
"saas_id": 2, //SAAS ID
"created_at": "2019-11-29T05:51:00.000Z",
"updated_at": "2019-11-29T05:51:00.000Z",
"deleted_at": null,
"version": 0
},
"bizmsg": "empty",
"requestid": "b642284a921f4655bdec81f50cb45f1d"
}
```
1. [](#)
## **<a name="setAuth"> 设置权限</a>**
[返回到目录](#menu)
##### URL
[/web/uc/roleCtl/setAuth]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
"authIds": [1,2,3,4,5,6,7,8] // 选择的权限id
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {},
"bizmsg": "empty",
"requestid": "b642284a921f4655bdec81f50cb45f1d"
}
```
\ No newline at end of file
[返回主目录](/doc)
<a name="menu">目录</a>
1. [添加](#addSaas)
1. [更新](#updSaas)
1. [删除](#delSaas)
1. [列表(条件)](#listSaas)
1. [明细](#queryById)
## **<a name="addSaas"> 添加</a>**
[返回到目录](#menu)
##### URL
[/web/uc/saasCtl/addSaas]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"name":"泰达米尔", //saas名称
"domain":"www.taidamier.com",//saas 域名
"managerMobile":"13404865182",//管理者电话
"managerId":1, //管理ID
"stype":2 //saas系统类型 1平台 2商户 3交付商 4个人
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"version": 0,
"id": 3,
"name": "德玛西亚之翼", //saas名称
"domain": "www.demaxiyazhili.com",//saas 域名
"managerMobile": "8555555",//管理者电话
"managerId": 1,//管理ID
"stype": 4, //saas系统类型 1平台 2商户 3交付商 4个人
"updated_at": "2019-11-29T02:42:14.859Z",
"created_at": "2019-11-29T02:42:14.859Z"
},
"bizmsg": "empty",
"requestid": "0c3b6b3664364ff89436c75957a62590"
}
```
## **<a name="updSaas"> 更新</a>**
[返回到目录](#menu)
##### URL
[/web/uc/saasCtl/updSaas]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
"name":"泰达米尔", //saas名称 非必传
"domain":"www.taidamier.com",//saas 域名 非必传
"managerMobile":"13404865182",//管理者电话 非必传
"managerId":1, //管理ID 非必传
"stype":2 //saas系统类型 1平台 2商户 3交付商 4个人 非必传
}
```
## **<a name="delSaas"> 删除</a>**
[返回到目录](#menu)
##### URL
[/web/uc/saasCtl/delSaas]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
## **<a name="listSaas"> 列表</a>**
[返回到目录](#menu)
##### URL
[/web/uc/saasCtl/listSaas]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"count": 3,
"rows": [
{
"id": 1,
"name": "勒夫兰",
"domain": "www.baidu.com",
"managerId": 1,
"managerMobile": "18833836395",
"stype": 1,
"created_at": "2019-11-28T03:50:55.000Z",
"updated_at": "2019-11-28T03:50:55.000Z",
"deleted_at": null,
"version": 1
},
{
"id": 2,
"name": "泰达米尔",
"domain": "www.taidamier.com",
"managerId": 1,
"managerMobile": "13404865182",
"stype": 3,
"created_at": "2019-11-29T02:15:25.000Z",
"updated_at": "2019-11-29T02:24:00.000Z",
"deleted_at": null,
"version": 1
},
{
"id": 3,
"name": "德玛西亚之翼",
"domain": "www.demaxiyazhili.com",
"managerId": 1,
"managerMobile": "8555555",
"stype": 4,
"created_at": "2019-11-29T02:42:14.000Z",
"updated_at": "2019-11-29T02:42:14.000Z",
"deleted_at": null,
"version": 0
}
]
},
"bizmsg": "empty",
"requestid": "59a01e0e2eb34603b189f705d94d36cd"
}
```
## **<a name="queryById"> 明细</a>**
[返回到目录](#menu)
##### URL
[/web/uc/saasCtl/queryById]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"version": 0,
"id": 3,
"name": "德玛西亚之翼", //saas名称
"domain": "www.demaxiyazhili.com",//saas 域名
"managerMobile": "8555555",//管理者电话
"managerId": 1,//管理ID
"stype": 4, //saas系统类型 1平台 2商户 3交付商 4个人
"updated_at": "2019-11-29T02:42:14.859Z",
"created_at": "2019-11-29T02:42:14.859Z"
},
"bizmsg": "empty",
"requestid": "2f33c6f6b55f4755a89bf25b8e831a61"
}
```
\ No newline at end of file
[返回主目录](/doc)
<a name="menu">目录</a>
1. [添加/修改](#saveUser)
1. [启用禁用](#enabled)
1. [删除](#del)
1. [明细](#queryById)
1. [列表页](#page)
1. [重置密码](#resetPassword)
1. [添加/修改](#saveUser)
## **<a name="add"> 添加/修改</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/saveUser]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "33", // 编号,为空时添加,不为空时修改
"org_id": 3, // 组织机构id
"ucname": "guodegang10", // 用户名/登录名
"mobile": "13811112222", // 手机号
"realName": "郭德纲10", // 姓名
"password": "123", // 密码
"roles": [1,2] // 角色列表
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "2dc587798f974902b06123ce34c39090"
}
```
## **<a name="enabled"> 启用禁用</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/enabled]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
"enabled": 0, // 0禁用 1启用
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "007fd384e47641d2a71e9f3ef6292843"
}
```
## **<a name="del"> 删除</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/delAuth]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "007fd384e47641d2a71e9f3ef6292843"
}
```
## **<a name="queryById"> 明细</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/queryById]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": 1, //记录ID 必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"id": 17, // id
"ucname": "guodegang10", // 登录名
"uctype": 2, // 用户类型 1平台 2商户 3交付商 4个人
"uctypeId": "", // 用户类型id
"org_id": 3, // 组织机构id
"isMain": 0, // 是否主管
"isEnabled": 1, // 启用/禁用 0禁用 1启用
"created_at": "2019-11-29 10:43:32", // 创建时间
"mobile": "1381231332312", // 手机号
"realName": "郭德纲11", // 姓名
"roles": [ // 拥有角色
{
"role_id": "1" // 角色id
},
{
"role_id": "5"
},
{
"role_id": "6"
}
]
},
"requestid": "dd2731bca15c446595170e1ccf0b2b00"
}
```
## **<a name="page"> 列表页</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/page]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"xxx": "", // 查询字段回头再说
"currentPage":1, //当前页
"pageSize":10, //每页条数
"saas_id":xxx, //saas ID 非必传
"ucname":"xxx", //用户名 非必传
"mobile":"",//电话 非必传
"realName":"",//姓名 非必传
"uctype":1, //类型 1平台 2 商户 3 交付商 4 个人 非必传
"createBegin":xxx, //开始时间 非必传
"createEnd":xx, //结束时间 非必传
"isEnabled":1, //是否可用 0不可用 1 可用 非必传
"orgpath":"/root/xxx",//路径 非必传
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"count": 8,
"rows": [
{
"id": 17, // 编号
"ucname": "guodegang10", // 登录名
"uctype": 2, // 用户类型 1平台 2商户 3交付商 4个人
"uctypeId": "", // 用户类型id
"org_id": 3, // 组织机构id
"isMain": 0, // 是否主管
"isEnabled": 1, // 启用/禁用 0禁用 1启用
"created_at": "2019-11-29 10:43:32", // 创建时间
"mobile": "1381231332312", // 手机号
"realName": "郭德纲11", // 姓名
"roleIds": "2", // 角色id
"roleNames": "业务员", // 角色名称
"orgname": "", // 组织机构
},
]
},
"requestid": "defbe7aa7b1045c4b644e1c9eb58fd88"
}
```
## **<a name="resetPassword"> 重置密码</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/resetPassword]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"id": "18", // 用户id
"password": "123123" // 新密码
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "defbe7aa7b1045c4b644e1c9eb58fd88"
}
```
\ No newline at end of file
<a name="menu">目录</a>
1. [登录](#login)
1. [当前用户信息查询](#currentUser)
1. [获取菜单](#getMenu)
## **<a name="login"> 登录</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/login]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
| 参数 | 必选 | 类型 | 说明|
| -------- | -------- | ------------|---------|
| **loginName** | 是 | String | 登录名|
| **password** | 是 | String | 密码 |
| **captchaKey** | 是 | String | 图片验证码key |
| **captchaCode** | 是 | String | 图片验证码填入值 |
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"xggadminsid": "3cb49932-fa02-44f0-90db-9f06fe02e5c7" // 登录key
}
}
```
## **<a name="currentUser"> 当前用户信息查询</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/currentUser]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
}
```
## **<a name="getMenu"> 获取菜单</a>**
[返回到目录](#menu)
##### URL
[/web/uc/userCtl/getMenu]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 返回结果
```javascript
[
{
"name": "首页",
"path": "/",
"submenu": []
},
{
"name": "商户中心",
"path": "/merchants",
"submenu": [
{
"name": "客户管理",
"team": [
{
"name": "商户信息",
"path": "/merchants/businessInformation"
},
...
]
}
]
},
...
]
```
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