Commit abad225c by 孙亚楠

dd

parent 4fb57cac
......@@ -62,5 +62,37 @@ class ManagerCtl extends CtlBase {
return system.getResultFail(500, "接口错误");
}
}
// 交付商统计
async deliverStatTransData(pobj, pobj2, req) {
if (!pobj.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
pobj.deliver_id = req.query.deliver_id;
try {
return await this.orderSve.deliverStatTransData(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 业务办理
async businessManagement(pobj, pobj2, req) {
if (!pobj.current_date) {
return system.getResult(null, `参数错误 当前时间不能为空`);
}
pobj.deliver_id = req.query.deliver_id;
try {
return await this.orderSve.businessManagement(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = ManagerCtl;
\ No newline at end of file
......@@ -83,11 +83,37 @@ class OrderService extends ServiceBase {
}
}
// 交付商统计
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;
// var task=new UserService();
// task.getUserStatisticGroupByApp().then(function(result){
// console.log((result));
// }).catch(function(e){
// console.log(e);
// });
\ No newline at end of file
module.exports = OrderService;
\ No newline at end of file
<a name="menu">目录</a>
1. [交付商统计](#deliverStatTransData)
1. [业务办理数据](#businessManagement)
## **<a name="deliverStatTransData"> 交付商统计</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/deliverStatTransData]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"current_date": "2020-01", //当前月分
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"orderCount": 2,
"orderPrice": 3,
"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,
2,
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,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
"bizmsg": "empty",
"requestid": "6e872669c7b4472da2a0462c20fae0ef"
}
```
## **<a name="businessManagement"> 业务办理数据</a>**
[返回到目录](#menu)
##### URL
[/web/index/managerCtl/businessManagement]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"current_date": "2020-01", //当前月份
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "操作成功",
"data": {
"orderCompleteCount": 0, //订单完成数量
"orderHandlingCount": 1 //订单处理中数量
},
"bizmsg": "empty",
"requestid": "e2e9f48cbd694ec3b876cd88bb549dc0"
}
```
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