Commit dcfdd33f by 王昆

Merge branch 'xgg-admin-dev' of gitlab.gongsibao.com:jiangyong/zhichan into xgg-admin-dev

parents 1c9b46e9 0f049077
......@@ -62,5 +62,77 @@ class ManagerCtl extends CtlBase {
return system.getResultFail(500, "接口错误");
}
}
// 数据简报
async statTransData(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
try {
return await this.orderSve.statTransData(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
//待办事项
async needToBeDealtWith(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
try {
return await this.orderSve.needToBeDealtWith(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
//交付商统计
async statDeliverData(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
try {
return await this.orderSve.statDeliverData(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 交付商统计
async deliverStatTransData(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
if (!params.deliver_id) {
return system.getResult(null, `参数错误 交付商不能为空`);
}
try {
return await this.orderSve.deliverStatTransData(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 业务办理
async businessManagement(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
if (!params.deliver_id) {
return system.getResult(null, `参数错误 交付商不能为空`);
}
try {
return await this.orderSve.businessManagement(params);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = ManagerCtl;
\ No newline at end of file
......@@ -29,7 +29,7 @@ class OrderService extends ServiceBase {
async orderInfo(params) {
var rs = await this.callms("order", "orderInfo", params);
if(rs.data) {
if (rs.data) {
if (rs.data.orderDeliver && rs.data.orderDeliver.deliver_divide) {
rs.data.orderDeliver.deliver_divide = system.f2y(rs.data.orderDeliver.deliver_divide);
}
......@@ -57,10 +57,10 @@ class OrderService extends ServiceBase {
return res;
}
async statDeliverData(params) {
var res = await this.callms("order", "statDeliverData", params);
return res;
}
// async statDeliverData(params) {
// var res = await this.callms("order", "statDeliverData", params);
// return res;
// }
async setUcUser(rows) {
if (!rows || rows.length == 0) {
......@@ -170,5 +170,75 @@ class OrderService extends ServiceBase {
await this.pushapiSve.push(options);
}
// 数据简报
async statTransData(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
try {
return await this.callms("order", "statTransData", params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误 错误信息 ${error}`);
}
}
//待办事项
async needToBeDealtWith(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
try {
return await this.callms("order", "needToBeDealtWith", params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误 错误信息 ${error}`);
}
}
//交付商统计
async statDeliverData(params) {
if(!params.current_date){
return system.getResult(null,`参数错误 当前时间不能为空`);
}
try {
return await this.callms("order", "statDeliverData", params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误 错误信息 ${error}`);
}
}
// 交付商统计
async deliverStatTransData(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
if (!params.deliver_id) {
return system.getResult(null, `参数错误 交付商不能为空`);
}
try {
return await this.callms("order", "deliverStatTransData", params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误 错误信息 ${error}`);
}
}
// 业务办理
async businessManagement(params) {
if (!params.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
if (!params.deliver_id) {
return system.getResult(null, `参数错误 交付商不能为空`);
}
try {
return await this.callms("order", "businessManagement", params);
} catch (error) {
console.log(error);
return system.getResult(null,`系统错误 错误信息 ${error}`);
}
}
}
module.exports = OrderService;
\ 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