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
8bd8714e
Commit
8bd8714e
authored
Apr 27, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddg
parent
b5220f75
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
4 deletions
+139
-4
xgg-deliver/app/base/controller/impl/order/orderCtl.js
+117
-4
xgg-deliver/app/base/service/impl/order/orderSve.js
+18
-0
xgg-deliver/app/config/routes/web.js
+4
-0
xgg-deliver/app/front/entry/public/apidoc/order/aliOrder.md
+0
-0
No files found.
xgg-deliver/app/base/controller/impl/order/orderCtl.js
View file @
8bd8714e
...
...
@@ -196,9 +196,10 @@ class OrderCtl extends CtlBase {
// return system.getResult(null, `参数错误 工商官方文件不能为空`);
// }
pobj
.
bd_id
=
req
.
loginUser
.
id
;
pobj
.
bd_path
=
req
.
loginUser
.
orgpath
;
if
(
!
pobj
.
deliver_id
){
return
system
.
getResult
(
null
,
`请重新登录`
);
}
pobj
.
deliver_id
=
pobj
.
deliver_id
;
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
...
...
@@ -542,6 +543,9 @@ class OrderCtl extends CtlBase {
}
pobj
.
deliver_id
=
pobj
.
deliverId
;
pobj
.
deliver_name
=
pobj
.
deliverName
||
""
;
pobj
.
delier_user_id
=
pobj
.
delier_user_id
||
""
;
pobj
.
deliver_user_path
=
pobj
.
deliver_user_path
||
""
;
try
{
return
await
this
.
orderSve
.
addSourceOrder
(
pobj
);
}
catch
(
error
)
{
...
...
@@ -572,9 +576,117 @@ class OrderCtl extends CtlBase {
}
}
/**
* ali建账
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
accountCreation
(
pobj
,
pobj2
,
req
){
if
(
!
pobj
.
id
){
return
system
.
getResult
(
null
,
`订单【
${
pobj
.
id
}
】不存在`
)
}
if
(
!
pobj
.
status
){
return
system
.
getResult
(
null
,
`订单状态不能为空`
)
}
if
(
!
pobj
.
province
){
return
system
.
getResult
(
null
,
`省份不能为空`
)
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* ali客户交付
* @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_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
}
`
);
}
}
/**
* 阿里 全部订单
* @returns {Promise<void>}
*/
async
aliOrderPageAll
(
pobj
,
pobj2
,
req
){
var
condition
=
{
currentPage
:
Number
(
pobj
.
currentPage
||
1
),
pageSize
:
Number
(
pobj
.
pageSize
||
10
),
deliver_id
:
pobj
.
deliver_id
,
}
if
(
pobj
.
createdBegin
){
condition
.
createdBegin
=
this
.
trim
(
pobj
.
createdBegin
);
}
if
(
pobj
.
createdEnd
){
condition
.
createdEnd
=
this
.
trim
(
pobj
.
createdEnd
);
}
if
(
pobj
.
status
){
condition
.
status
=
this
.
trim
(
pobj
.
status
);
}
this
.
doTimeCondition
(
condition
,
[
"createdBegin"
,
"createdEnd"
]);
return
await
this
.
orderSve
.
aliOrderPageAll
(
condition
);
}
/**
* 阿里 我的业务订单
* @returns {Promise<void>}
*/
async
aliOrderPage
(
pobj
,
pobj2
,
req
){
//1.2010~2090状态
let
statusMap
=
{
"1"
:
"2010"
,
//待完善
"2"
:
"2020"
,
//工商注册
"3"
:
"2030"
,
//刻章办理
"4"
:
"2040"
,
//银行开户
"5"
:
"2050"
,
//税务报道
"6"
:
"2060"
,
//核定税种
"7"
:
"2070"
,
//建帐
"8"
:
"2080"
,
//客户交付
"9"
:
"2090"
//订单完成
};
if
(
!
statusMap
[
pobj
.
status
]){
return
system
.
getResult
(
null
,
`订单状态错误`
);
}
var
condition
=
{
currentPage
:
Number
(
pobj
.
currentPage
||
1
),
pageSize
:
Number
(
pobj
.
pageSize
||
10
),
deliver_id
:
pobj
.
deliver_id
,
status
:
statusMap
[
pobj
.
status
],
isMain
:
pobj
.
isMain
,
isManager
:
pobj
.
isManager
,
delier_user_id
:
pobj
.
delier_user_id
,
deliver_user_path
:
pobj
.
deliver_user_path
}
if
(
pobj
.
createdBegin
){
condition
.
createdBegin
=
this
.
trim
(
pobj
.
createdBegin
);
}
if
(
pobj
.
createdEnd
){
condition
.
createdEnd
=
this
.
trim
(
pobj
.
createdEnd
);
}
this
.
doTimeCondition
(
condition
,
[
"createdBegin"
,
"createdEnd"
]);
return
await
this
.
orderSve
.
aliOrderPage
(
condition
);
}
}
module
.
exports
=
OrderCtl
;
\ No newline at end of file
xgg-deliver/app/base/service/impl/order/orderSve.js
View file @
8bd8714e
...
...
@@ -137,5 +137,22 @@ class OrderService extends ServiceBase {
}
}
async
aliOrderPageAll
(
params
){
try
{
return
await
this
.
callms
(
"order"
,
"aliOrderPageAll"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
aliOrderPage
(
params
){
try
{
return
await
this
.
callms
(
"order"
,
"aliOrderPage"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
OrderService
;
\ No newline at end of file
xgg-deliver/app/config/routes/web.js
View file @
8bd8714e
...
...
@@ -105,6 +105,10 @@ module.exports = function (app) {
req
.
body
.
deliverId
=
req
.
loginUser
.
deliver_id
||
""
;
req
.
body
.
deliver_id
=
req
.
loginUser
.
deliver_id
||
""
;
req
.
body
.
deliverName
=
req
.
loginUser
.
deliver
.
name
||
""
;
req
.
body
.
delier_user_id
=
req
.
loginUser
.
id
||
""
;
req
.
body
.
deliver_user_path
=
req
.
loginUser
.
org_path
||
""
;
req
.
body
.
isManager
=
req
.
loginUser
.
isManager
;
req
.
body
.
isAdmin
=
req
.
loginUser
.
isAdmin
;
}
params
.
push
(
methodName
);
...
...
xgg-deliver/app/front/entry/public/apidoc/order/aliOrder.md
0 → 100644
View file @
8bd8714e
This diff is collapsed.
Click to expand it.
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