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
a7b6ce11
Commit
a7b6ce11
authored
Jan 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
c04cc53f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
125 additions
and
14 deletions
+125
-14
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+125
-14
No files found.
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
a7b6ce11
...
...
@@ -20,8 +20,8 @@ class OorderstatusService extends ServiceBase {
this
.
BUSI_TYPE
=
1
;
//个体公商户类型
this
.
ISBANK
=
true
;
//银行开户
this
.
TAXTYPE
=
[
1
,
2
];
//个税和增值税类别集合
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
=
"11
5
0"
;
//平台交付审核成功状态码
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
=
"11
4
0"
;
//平台交付审核失败状态码
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
=
"11
6
0"
;
//平台交付审核成功状态码
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
=
"11
5
0"
;
//平台交付审核失败状态码
}
/***************************************以下是订单处理的分发器***************************************************************** */
...
...
@@ -310,15 +310,15 @@ class OorderstatusService extends ServiceBase {
if
(
!
params
.
deliver_mail_mobile
)
{
return
system
.
getResult
(
null
,
`参数错误 联系电话不能为空`
);
}
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
audit_remark
);
oorderDeliverProperty
.
deliver_content
=
this
.
trim
(
deliver_content
);
oorderDeliverProperty
.
deliver_mail_addr
=
this
.
trim
(
deliver_mail_addr
);
oorderDeliverProperty
.
deliver_mail_to
=
this
.
trim
(
deliver_mail_to
);
oorderDeliverProperty
.
deliver_mail_mobile
=
this
.
trim
(
deliver_mail_mobile
);
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
params
.
audit_remark
);
oorderDeliverProperty
.
deliver_content
=
this
.
trim
(
params
.
deliver_content
);
oorderDeliverProperty
.
deliver_mail_addr
=
this
.
trim
(
params
.
deliver_mail_addr
);
oorderDeliverProperty
.
deliver_mail_to
=
this
.
trim
(
params
.
deliver_mail_to
);
oorderDeliverProperty
.
deliver_mail_mobile
=
this
.
trim
(
params
.
deliver_mail_mobile
);
}
else
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
)
{
//失败
// todo somthing...
oorderDeliverProperty
.
audit_result
=
params
.
nextName
;
if
(
!
this
.
trim
(
params
.
audit_remark
))
{
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
}
...
...
@@ -327,6 +327,7 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 非法的订单状态`
);
}
oorderDeliverProperty
.
id
=
params
.
_order
.
deliver_id
;
oorderDeliverProperty
.
audit_result
=
params
.
nextName
;
let
orderProperty
=
{};
orderProperty
.
id
=
params
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
...
...
@@ -335,7 +336,7 @@ class OorderstatusService extends ServiceBase {
let
self
=
this
;
await
this
.
db
.
transaction
(
async
t
=>
{
//更新交付orderdeliver记录
await
self
.
oorderdeliverDao
.
cre
ate
(
oorderDeliverProperty
,
t
);
await
self
.
oorderdeliverDao
.
upd
ate
(
oorderDeliverProperty
,
t
);
//更新oorder订单记录
await
self
.
dao
.
update
(
orderProperty
,
t
);
});
...
...
@@ -347,6 +348,116 @@ class OorderstatusService extends ServiceBase {
}
/**
* 平台验收
* @param {*} params
*/
async
platformAuditDetermine
(
params
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
let
orderDeliverProperty
=
{};
orderDeliverProperty
.
completed_at
=
new
Date
();
orderDeliverProperty
.
id
=
params
.
_order
.
id
;
let
orderProperty
=
{};
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
oorderdeliverDao
.
update
(
orderDeliverProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 客户交付
* @param {*} params
*/
async
deliverCustomer
(
params
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
!
params
.
guest_mail_no
)
{
return
system
.
getResult
(
null
,
`参数错误 客户快递单号不能为空`
);
}
if
(
!
params
.
guest_mail_img
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商交付快递单号图片不能为空`
);
}
let
oorderInforegProperty
=
{};
oorderInforegProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
oorderInforegProperty
.
guest_mail_no
=
this
.
trim
(
params
.
guest_mail_no
);
oorderInforegProperty
.
guest_mail_img
=
this
.
trim
(
params
.
guest_mail_img
);
let
oorderProperty
=
{};
oorderProperty
.
status
=
this
.
trim
(
params
.
status
);
oorderProperty
.
id
=
params
.
_order
.
id
;
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
oorderinforegDao
.
update
(
oorderInforegProperty
,
t
);
await
this
.
dao
.
update
(
oorderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 订单完成
* @param {*} params
*/
async
orderComplete
(
params
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
!
params
.
guest_accpet_file
)
{
return
system
.
getResult
(
null
,
`参数错误 客户验收文件不能为空`
);
}
let
oorderInforegProperty
=
{};
oorderInforegProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
oorderInforegProperty
.
guest_accpet_file
=
this
.
trim
(
params
.
guest_accpet_file
);
let
oorderProperty
=
{};
oorderProperty
.
status
=
this
.
trim
(
params
.
status
);
oorderProperty
.
id
=
params
.
_order
.
id
;
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
oorderinforegDao
.
update
(
oorderInforegProperty
,
t
);
await
this
.
dao
.
update
(
oorderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**********************************以下是交付商订单业务处理******************************************************** */
/**
...
...
@@ -378,7 +489,7 @@ class OorderstatusService extends ServiceBase {
orderProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
await
this
.
db
.
transaction
(
async
t
=>
{
await
_oorderdeliver
.
update
(
orderProperty
,
t
);
await
_order
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
...
...
@@ -796,8 +907,8 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 交付商交付快递单号图片不能为空`
);
}
let
oorderDeliverProperty
=
{};
oorderDeliverProperty
.
deliver_mail_no
=
this
.
trim
(
deliver_mail_no
);
oorderDeliverProperty
.
deliver_mail_img
=
this
.
trim
(
deliver_mail_img
);
oorderDeliverProperty
.
deliver_mail_no
=
this
.
trim
(
params
.
deliver_mail_no
);
oorderDeliverProperty
.
deliver_mail_img
=
this
.
trim
(
params
.
deliver_mail_img
);
let
_order
=
params
.
_order
;
oorderDeliverProperty
.
id
=
_order
.
deliver_id
;
...
...
@@ -808,8 +919,8 @@ class OorderstatusService extends ServiceBase {
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
oorderdeliverDao
.
update
(
o
rderd
eliverProperty
,
t
);
await
this
.
oorderdeliverD
ao
.
update
(
orderProperty
,
t
);
await
this
.
oorderdeliverDao
.
update
(
o
orderD
eliverProperty
,
t
);
await
this
.
d
ao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
...
...
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