Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
7db3b101
Commit
7db3b101
authored
Jan 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
7f05fd75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
296 additions
and
2 deletions
+296
-2
xgg-admin/app/base/controller/impl/order/orderCtl.js
+135
-0
xgg-admin/app/base/service/impl/order/orderSve.js
+2
-2
xgg-admin/app/front/entry/public/apidoc/order/order.md
+159
-0
No files found.
xgg-admin/app/base/controller/impl/order/orderCtl.js
View file @
7db3b101
...
...
@@ -205,6 +205,140 @@ class OrderCtl extends CtlBase {
}
}
/**
* 分配交付商
* @param {*} params
*/
async
assignDeliver
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
pobj
.
deliver_id
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商ID不能为空`
);
}
if
(
!
pobj
.
deliver_id
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商ID不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
`deliver_divide`
))
{
return
system
.
getResult
(
null
,
`参数错误 交付商分成不能为空`
);
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 交付商审核
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async
platformDeliverAudit
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
pobj
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
pobj
.
status
==
"1160"
)
{
if
(
!
pobj
.
audit_remark
)
{
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
}
if
(
!
pobj
.
deliver_content
)
{
return
system
.
getResult
(
null
,
`参数错误 交付内容注不能为空`
);
}
if
(
!
pobj
.
deliver_mail_addr
)
{
return
system
.
getResult
(
null
,
`参数错误 交付地址不能为空`
);
}
if
(
!
pobj
.
deliver_mail_to
)
{
return
system
.
getResult
(
null
,
`参数错误 收件人不能为空`
);
}
if
(
!
pobj
.
deliver_mail_mobile
)
{
return
system
.
getResult
(
null
,
`参数错误 联系电话不能为空`
);
}
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 平台验收
* @param {*} params
*/
async
platformAuditDetermine
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
pobj
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 客户交付
* @param {*} params
*/
async
deliverCustomer
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
pobj
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
!
pobj
.
guest_mail_no
)
{
return
system
.
getResult
(
null
,
`参数错误 客户快递单号不能为空`
);
}
if
(
!
pobj
.
guest_mail_img
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商交付快递单号图片不能为空`
);
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 订单完成
* @param {*} params
*/
async
orderComplete
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
pobj
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
!
pobj
.
guest_accpet_file
)
{
return
system
.
getResult
(
null
,
`参数错误 客户验收文件不能为空`
);
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
OrderCtl
;
\ No newline at end of file
xgg-admin/app/base/service/impl/order/orderSve.js
View file @
7db3b101
...
...
@@ -72,7 +72,7 @@ class OrderService extends ServiceBase {
}
}
let
userRs
=
await
this
.
userSve
.
mapByIds
({
ids
:
ids
});
let
userRs
=
await
this
.
userSve
.
mapByIds
({
ids
:
ids
});
let
userMap
=
userRs
.
data
||
{};
for
(
let
row
of
rows
)
{
...
...
@@ -159,7 +159,7 @@ class OrderService extends ServiceBase {
// 已完成
params
.
courierNo
=
this
.
trim
(
obj
.
deliverNo
);
params
.
courierImg
=
this
.
trim
(
obj
.
deliverImg
);
}
else
if
(
handlingStatus
.
indexOf
(
status
)
!=
-
1
)
{}
else
{
}
else
if
(
handlingStatus
.
indexOf
(
status
)
!=
-
1
)
{
}
else
{
return
;
}
options
.
params
=
params
;
...
...
xgg-admin/app/front/entry/public/apidoc/order/order.md
View file @
7db3b101
...
...
@@ -7,6 +7,11 @@
1.
[
订单服务内容
](
#orderChooseProducts
)
1.
[
查询订单详情
](
#orderInfo
)
1.
[
完善订单
](
#perfectInformation
)
1.
[
平台分配交付商
](
#assignDeliver
)
1.
[
交付商审核
](
#platformDeliverAudit
)
1.
[
交付商验收
](
#platformAuditDetermine
)
1.
[
客户交付
](
#deliverCustomer
)
1.
[
订单完成
](
#orderComplete
)
## **<a name="processList"> 业务进度字典 </a>**
[
返回到目录
](
#menu
)
...
...
@@ -478,3 +483,156 @@
}
```
## **<a name="perfectInformation"> 平台分配交付商 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/assignDeliver
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"id"
:
"1567514204003444"
,
//订单ID
"deliver_id"
:
"444444444444444"
,
//交付商ID
"deliver_divide"
:
"444444"
,
//交付商分成
"status"
:
"1020"
,
//订单状态
"deliver_name"
:
"郭德纲交付商"
//交付商名称
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="platformDeliverAudit"> 交付商审核 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/platformDeliverAudit
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
//成功
{
"id"
:
"1567514119003310"
,
//订单ID
"status"
:
"1160"
,
//订单状态
"audit_remark"
:
"赵本山很有趣,同意审批"
,
//审核备注
"deliver_content"
:
"交付内容"
,
//审核内容
"deliver_mail_addr"
:
"象牙山刘老根街道258号"
,
//邮寄地址
"deliver_mail_to"
:
"赵本山"
,
//邮寄人
"deliver_mail_mobile"
:
"1888888888"
//邮寄电话
}
//失败
{
"id"
:
"1567514119003310"
,
"status"
:
"1150"
,
"audit_remark"
:
"赵本山很有趣,不同意审批"
//审核备注
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="platformAuditDetermine"> 平台验收 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/platformAuditDetermine
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"id"
:
"1567514119003310"
,
"status"
:
"1180"
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="deliverCustomer"> 客户交付 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/deliverCustomer
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"id"
:
"1567514119003310"
,
//订单ID
"status"
:
"1180"
,
//订单状态
"guest_mail_no"
:
"1567514119003310"
,
//客户快递单号
"guest_mail_img"
:
"学校学习学校"
//交付商交付快递单号图片
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="orderComplete"> 订单完成 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/orderComplete
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"id"
:
"1567514119003310"
,
//订单ID
"status"
:
"1180"
,
//订单状态
"guest_accpet_file"
:
"1567514119003310"
//客户验收文件
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment