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
c04cc53f
Commit
c04cc53f
authored
Jan 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
b307f173
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
240 additions
and
221 deletions
+240
-221
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+240
-221
No files found.
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
c04cc53f
...
@@ -12,16 +12,16 @@ class OorderstatusService extends ServiceBase {
...
@@ -12,16 +12,16 @@ class OorderstatusService extends ServiceBase {
this
.
oorderdeliverDao
=
system
.
getObject
(
"db.order.oorderdeliverDao"
);
this
.
oorderdeliverDao
=
system
.
getObject
(
"db.order.oorderdeliverDao"
);
this
.
oorderprocessDao
=
system
.
getObject
(
"db.order.oorderprocessDao"
);
this
.
oorderprocessDao
=
system
.
getObject
(
"db.order.oorderprocessDao"
);
this
.
obusinessmenDao
=
system
.
getObject
(
"db.order.obusinessmenDao"
);
this
.
obusinessmenDao
=
system
.
getObject
(
"db.order.obusinessmenDao"
);
this
.
osourceDao
=
system
.
getObject
(
"db.common.osourceDao"
);
this
.
osourceDao
=
system
.
getObject
(
"db.common.osourceDao"
);
this
.
oproductDao
=
system
.
getObject
(
"db.product.oproductDao"
);
this
.
oproductDao
=
system
.
getObject
(
"db.product.oproductDao"
);
this
.
oprocessDao
=
system
.
getObject
(
"db.product.oprocessDao"
);
this
.
oprocessDao
=
system
.
getObject
(
"db.product.oprocessDao"
);
this
.
oproductprocessDao
=
system
.
getObject
(
"db.product.oproductprocessDao"
);
this
.
oproductprocessDao
=
system
.
getObject
(
"db.product.oproductprocessDao"
);
this
.
BUSI_TYPE
=
1
;
//个体公商户类型
this
.
BUSI_TYPE
=
1
;
//个体公商户类型
this
.
ISBANK
=
true
;
//银行开户
this
.
ISBANK
=
true
;
//银行开户
this
.
TAXTYPE
=
[
1
,
2
];
//个税和增值税类别集合
this
.
TAXTYPE
=
[
1
,
2
];
//个税和增值税类别集合
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
=
"1150"
;
//平台交付审核成功状态码
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
=
"1150"
;
//平台交付审核成功状态码
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
=
"1140"
;
//平台交付审核失败状态码
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
=
"1140"
;
//平台交付审核失败状态码
}
}
/***************************************以下是订单处理的分发器***************************************************************** */
/***************************************以下是订单处理的分发器***************************************************************** */
...
@@ -48,7 +48,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -48,7 +48,7 @@ class OorderstatusService extends ServiceBase {
let
nextName
=
""
;
let
nextName
=
""
;
for
(
var
nextItem
of
nextList
)
{
for
(
var
nextItem
of
nextList
)
{
nextNames
.
push
(
nextItem
.
next_name
);
nextNames
.
push
(
nextItem
.
next_name
);
if
(
nextItem
.
next_status
==
params
.
status
)
{
if
(
nextItem
.
next_status
==
params
.
status
)
{
flag
=
true
;
flag
=
true
;
nextName
=
nextItem
.
next_name
;
nextName
=
nextItem
.
next_name
;
break
;
break
;
...
@@ -124,39 +124,39 @@ class OorderstatusService extends ServiceBase {
...
@@ -124,39 +124,39 @@ class OorderstatusService extends ServiceBase {
* @status String 下一个状态
* @status String 下一个状态
* @other Object 其他参数
* @other Object 其他参数
*/
*/
async
perfectInformation
(
params
){
async
perfectInformation
(
params
)
{
//验证参数
//验证参数
this
.
verificationPerfectInformation
(
params
);
this
.
verificationPerfectInformation
(
params
);
let
_oorderinforeg
=
await
this
.
oorderinforegDao
.
findById
(
params
.
_order
.
id
);
let
_oorderinforeg
=
await
this
.
oorderinforegDao
.
findById
(
params
.
_order
.
id
);
if
(
!
_oorderinforeg
)
{
if
(
!
_oorderinforeg
)
{
return
system
.
getResult
(
null
,
`订单异常 订单明细不存在,请联系管理员`
);
return
system
.
getResult
(
null
,
`订单异常 订单明细不存在,请联系管理员`
);
}
}
//更新订单子表
//更新订单子表
_oorderinforeg
.
legal_name
=
this
.
trim
(
params
.
legal_name
);
_oorderinforeg
.
legal_name
=
this
.
trim
(
params
.
legal_name
);
_oorderinforeg
.
id_card
=
this
.
trim
(
params
.
id_card
);
_oorderinforeg
.
id_card
=
this
.
trim
(
params
.
id_card
);
_oorderinforeg
.
legal_mobile
=
this
.
trim
(
params
.
legal_mobile
);
_oorderinforeg
.
legal_mobile
=
this
.
trim
(
params
.
legal_mobile
);
_oorderinforeg
.
names
=
this
.
trim
(
params
.
names
);
_oorderinforeg
.
names
=
this
.
trim
(
params
.
names
);
_oorderinforeg
.
capital
=
this
.
trim
(
params
.
capital
);
_oorderinforeg
.
capital
=
this
.
trim
(
params
.
capital
);
_oorderinforeg
.
domicile_id
=
this
.
trim
(
params
.
domicile_id
);
_oorderinforeg
.
domicile_id
=
this
.
trim
(
params
.
domicile_id
);
_oorderinforeg
.
domicile_name
=
this
.
trim
(
params
.
domicile_name
);
_oorderinforeg
.
domicile_name
=
this
.
trim
(
params
.
domicile_name
);
_oorderinforeg
.
business_scope_id
=
this
.
trim
(
params
.
business_scope_id
);
_oorderinforeg
.
business_scope_id
=
this
.
trim
(
params
.
business_scope_id
);
_oorderinforeg
.
business_type
=
this
.
trim
(
params
.
business_type
);
_oorderinforeg
.
business_type
=
this
.
trim
(
params
.
business_type
);
_oorderinforeg
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_oorderinforeg
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_oorderinforeg
.
idcard_front
=
this
.
trim
(
params
.
idcard_front
);
_oorderinforeg
.
idcard_front
=
this
.
trim
(
params
.
idcard_front
);
_oorderinforeg
.
idcard_back
=
this
.
trim
(
params
.
idcard_back
);
_oorderinforeg
.
idcard_back
=
this
.
trim
(
params
.
idcard_back
);
_oorderinforeg
.
other_file
=
this
.
trim
(
params
.
other_file
);
_oorderinforeg
.
other_file
=
this
.
trim
(
params
.
other_file
);
_oorderinforeg
.
guest_mail_addr
=
this
.
trim
(
params
.
guest_mail_addr
);
_oorderinforeg
.
guest_mail_addr
=
this
.
trim
(
params
.
guest_mail_addr
);
_oorderinforeg
.
guest_mail_to
=
this
.
trim
(
params
.
guest_mail_to
);
_oorderinforeg
.
guest_mail_to
=
this
.
trim
(
params
.
guest_mail_to
);
_oorderinforeg
.
guest_mail_mobile
=
this
.
trim
(
params
.
guest_mail_mobile
);
_oorderinforeg
.
guest_mail_mobile
=
this
.
trim
(
params
.
guest_mail_mobile
);
//更新主表
//更新主表
params
.
_order
.
service_items
=
this
.
trim
(
params
.
service_items
);
params
.
_order
.
service_items
=
this
.
trim
(
params
.
service_items
);
params
.
_order
.
service_remark
=
this
.
trim
(
params
.
service_remark
);
params
.
_order
.
service_remark
=
this
.
trim
(
params
.
service_remark
);
params
.
_order
.
status
=
this
.
trim
(
params
.
status
);
params
.
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
//开启事务
//开启事务
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
_oorderinforeg
.
save
();
await
_oorderinforeg
.
save
();
await
params
.
_order
.
save
();
await
params
.
_order
.
save
();
});
});
...
@@ -167,54 +167,54 @@ class OorderstatusService extends ServiceBase {
...
@@ -167,54 +167,54 @@ class OorderstatusService extends ServiceBase {
}
}
}
}
verificationPerfectInformation
(
params
){
verificationPerfectInformation
(
params
)
{
if
(
!
params
.
legal_name
)
{
if
(
!
params
.
legal_name
)
{
return
system
.
getResult
(
null
,
`参数错误 法人姓名不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 法人姓名不能为空`
);
}
}
if
(
!
params
.
id_card
)
{
if
(
!
params
.
id_card
)
{
return
system
.
getResult
(
null
,
`参数错误 法人身份证不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 法人身份证不能为空`
);
}
}
if
(
!
params
.
legal_mobile
)
{
if
(
!
params
.
legal_mobile
)
{
return
system
.
getResult
(
null
,
`参数错误 法人电话不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 法人电话不能为空`
);
}
}
if
(
!
params
.
names
)
{
if
(
!
params
.
names
)
{
return
system
.
getResult
(
null
,
`参数错误 个体户名称不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 个体户名称不能为空`
);
}
}
if
(
!
params
.
capital
)
{
if
(
!
params
.
capital
)
{
return
system
.
getResult
(
null
,
`参数错误 注册资本不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 注册资本不能为空`
);
}
}
if
(
!
params
.
domicile_id
)
{
if
(
!
params
.
domicile_id
)
{
return
system
.
getResult
(
null
,
`参数错误 注册地id不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 注册地id不能为空`
);
}
}
if
(
!
params
.
domicile_name
)
{
if
(
!
params
.
domicile_name
)
{
return
system
.
getResult
(
null
,
`参数错误 注册地名称不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 注册地名称不能为空`
);
}
}
if
(
!
params
.
business_scope_id
)
{
if
(
!
params
.
business_scope_id
)
{
return
system
.
getResult
(
null
,
`参数错误 经营范围id不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营范围id不能为空`
);
}
}
if
(
!
params
.
business_type
)
{
if
(
!
params
.
business_type
)
{
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
}
}
if
(
!
params
.
business_scope
)
{
if
(
!
params
.
business_scope
)
{
return
system
.
getResult
(
null
,
`参数错误 经营范围详情不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营范围详情不能为空`
);
}
}
if
(
!
params
.
idcard_front
)
{
if
(
!
params
.
idcard_front
)
{
return
system
.
getResult
(
null
,
`参数错误 身份证正面照片不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 身份证正面照片不能为空`
);
}
}
if
(
!
params
.
idcard_back
)
{
if
(
!
params
.
idcard_back
)
{
return
system
.
getResult
(
null
,
`参数错误 身份证反面照片不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 身份证反面照片不能为空`
);
}
}
if
(
!
params
.
other_file
)
{
if
(
!
params
.
other_file
)
{
return
system
.
getResult
(
null
,
`参数错误 其他文件不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 其他文件不能为空`
);
}
}
if
(
!
params
.
guest_mail_addr
)
{
if
(
!
params
.
guest_mail_addr
)
{
return
system
.
getResult
(
null
,
`参数错误 邮寄客户地址不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 邮寄客户地址不能为空`
);
}
}
if
(
!
params
.
guest_mail_to
)
{
if
(
!
params
.
guest_mail_to
)
{
return
system
.
getResult
(
null
,
`参数错误 客户收件人不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 客户收件人不能为空`
);
}
}
if
(
!
params
.
guest_mail_mobile
)
{
if
(
!
params
.
guest_mail_mobile
)
{
return
system
.
getResult
(
null
,
`参数错误 客户收件人电话不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 客户收件人电话不能为空`
);
}
}
// if(!params.guest_mail_no){
// if(!params.guest_mail_no){
...
@@ -227,8 +227,8 @@ class OorderstatusService extends ServiceBase {
...
@@ -227,8 +227,8 @@ class OorderstatusService extends ServiceBase {
// return system.getResult(null,`参数错误 客户验收文件不能为空`);
// return system.getResult(null,`参数错误 客户验收文件不能为空`);
// }
// }
if
(
!
params
.
service_items
)
{
if
(
!
params
.
service_items
)
{
return
system
.
getResult
(
null
,
`参数错误 服务项不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 服务项不能为空`
);
}
}
}
}
...
@@ -294,7 +294,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -294,7 +294,7 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
}
let
oorderDeliverProperty
=
{};
let
oorderDeliverProperty
=
{};
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
)
{
//成功
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
)
{
//成功
if
(
!
params
.
audit_remark
)
{
if
(
!
params
.
audit_remark
)
{
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
}
}
...
@@ -310,25 +310,25 @@ class OorderstatusService extends ServiceBase {
...
@@ -310,25 +310,25 @@ class OorderstatusService extends ServiceBase {
if
(
!
params
.
deliver_mail_mobile
)
{
if
(
!
params
.
deliver_mail_mobile
)
{
return
system
.
getResult
(
null
,
`参数错误 联系电话不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 联系电话不能为空`
);
}
}
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
audit_remark
);
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
audit_remark
);
oorderDeliverProperty
.
deliver_content
=
this
.
trim
(
deliver_content
);
oorderDeliverProperty
.
deliver_content
=
this
.
trim
(
deliver_content
);
oorderDeliverProperty
.
deliver_mail_addr
=
this
.
trim
(
deliver_mail_addr
);
oorderDeliverProperty
.
deliver_mail_addr
=
this
.
trim
(
deliver_mail_addr
);
oorderDeliverProperty
.
deliver_mail_to
=
this
.
trim
(
deliver_mail_to
);
oorderDeliverProperty
.
deliver_mail_to
=
this
.
trim
(
deliver_mail_to
);
oorderDeliverProperty
.
deliver_mail_mobile
=
this
.
trim
(
deliver_mail_mobile
);
oorderDeliverProperty
.
deliver_mail_mobile
=
this
.
trim
(
deliver_mail_mobile
);
}
else
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
)
{
//失败
}
else
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
)
{
//失败
// todo somthing...
// todo somthing...
oorderDeliverProperty
.
audit_result
=
params
.
nextName
;
oorderDeliverProperty
.
audit_result
=
params
.
nextName
;
if
(
!
this
.
trim
(
params
.
audit_remark
))
{
if
(
!
this
.
trim
(
params
.
audit_remark
))
{
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
}
}
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
params
.
audit_remark
);
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
params
.
audit_remark
);
}
else
{
}
else
{
return
system
.
getResult
(
null
,
`参数错误 非法的订单状态`
);
return
system
.
getResult
(
null
,
`参数错误 非法的订单状态`
);
}
}
oorderDeliverProperty
.
id
=
params
.
_order
.
deliver_id
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
params
.
id
;
orderProperty
.
id
=
params
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
...
@@ -361,22 +361,24 @@ class OorderstatusService extends ServiceBase {
...
@@ -361,22 +361,24 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 业务员ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 业务员ID不能为空`
);
}
}
try
{
try
{
let
_oorderdeliver
=
await
this
.
oorderdeliverDao
.
model
.
findOne
({
where
:{
let
_oorderdeliver
=
await
this
.
oorderdeliverDao
.
model
.
findOne
({
order_id
:
this
.
trim
(
params
.
_order
.
id
)
where
:
{
}});
order_id
:
this
.
trim
(
params
.
_order
.
id
)
if
(
!
_oorderdeliver
){
}
return
system
.
getResult
(
null
,
`参数错误 订单交付信息不存在`
);
});
if
(
!
_oorderdeliver
)
{
return
system
.
getResult
(
null
,
`参数错误 订单交付信息不存在`
);
}
}
let
orderdeliverProperty
=
{};
let
orderdeliverProperty
=
{};
orderdeliverProperty
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
orderdeliverProperty
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
orderdeliverProperty
.
id
=
_oorderdeliver
.
id
;
orderdeliverProperty
.
id
=
_oorderdeliver
.
id
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
orderProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
_oorderdeliver
.
update
(
orderProperty
,
t
);
await
_oorderdeliver
.
update
(
orderProperty
,
t
);
await
_order
.
update
(
orderProperty
,
t
);
await
_order
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -391,12 +393,12 @@ class OorderstatusService extends ServiceBase {
...
@@ -391,12 +393,12 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
businessRegister
(
params
){
async
businessRegister
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
_order
.
status
=
this
.
trim
(
params
.
status
);
...
@@ -405,7 +407,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -405,7 +407,7 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
res
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -416,34 +418,34 @@ class OorderstatusService extends ServiceBase {
...
@@ -416,34 +418,34 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
businessRegisterComplete
(
params
){
async
businessRegisterComplete
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
if
(
!
params
.
name
)
{
if
(
!
params
.
name
)
{
return
system
.
getResult
(
null
,
`参数错误 个体工商户名称不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 个体工商户名称不能为空`
);
}
}
if
(
!
params
.
credit_code
)
{
if
(
!
params
.
credit_code
)
{
return
system
.
getResult
(
null
,
`参数错误 统一社会信用代码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 统一社会信用代码不能为空`
);
}
}
if
(
!
params
.
business_place
)
{
if
(
!
params
.
business_place
)
{
return
system
.
getResult
(
null
,
`参数错误 经营场所不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营场所不能为空`
);
}
}
if
(
!
params
.
business_scope
)
{
if
(
!
params
.
business_scope
)
{
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
}
}
if
(
!
params
.
reg_date
)
{
if
(
!
params
.
reg_date
)
{
return
system
.
getResult
(
null
,
`参数错误 注册日期不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 注册日期不能为空`
);
}
}
if
(
!
params
.
business_img
)
{
if
(
!
params
.
business_img
)
{
return
system
.
getResult
(
null
,
`参数错误 执照照片不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 执照照片不能为空`
);
}
}
if
(
!
params
.
business_gov_file
)
{
if
(
!
params
.
business_gov_file
)
{
return
system
.
getResult
(
null
,
`参数错误 工商官方文件不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 工商官方文件不能为空`
);
}
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
name
=
this
.
trim
(
params
.
name
);
_obusinessmenProperty
.
name
=
this
.
trim
(
params
.
name
);
...
@@ -452,23 +454,23 @@ class OorderstatusService extends ServiceBase {
...
@@ -452,23 +454,23 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_obusinessmenProperty
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_obusinessmenProperty
.
reg_date
=
this
.
trim
(
params
.
reg_date
);
_obusinessmenProperty
.
reg_date
=
this
.
trim
(
params
.
reg_date
);
_obusinessmenProperty
.
business_img
=
this
.
trim
(
params
.
business_img
);
_obusinessmenProperty
.
business_img
=
this
.
trim
(
params
.
business_img
);
_obusinessmenProperty
.
business_gov_file
=
this
.
trim
(
params
.
business_gov_file
);
_obusinessmenProperty
.
business_gov_file
=
this
.
trim
(
params
.
business_gov_file
);
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
busi_type
=
this
.
BUSI_TYPE
;
orderProperty
.
busi_type
=
this
.
BUSI_TYPE
;
try
{
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
let
_obusinessmen
=
await
this
.
obusinessmenDao
.
create
(
_obusinessmenProperty
,
t
);
let
_obusinessmen
=
await
this
.
obusinessmenDao
.
create
(
_obusinessmenProperty
,
t
);
orderProperty
.
busi_id
=
_obusinessmen
.
id
;
orderProperty
.
busi_id
=
_obusinessmen
.
id
;
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -478,7 +480,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -478,7 +480,7 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
chapterEngraving
(
params
){
async
chapterEngraving
(
params
)
{
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
...
@@ -488,7 +490,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -488,7 +490,7 @@ class OorderstatusService extends ServiceBase {
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
error
);
return
system
.
getResult
(
error
);
}
}
}
}
/**
/**
...
@@ -504,31 +506,31 @@ class OorderstatusService extends ServiceBase {
...
@@ -504,31 +506,31 @@ class OorderstatusService extends ServiceBase {
* @farenzhang String 法人章
* @farenzhang String 法人章
* @zhang_gov_file String 刻章官方文件
* @zhang_gov_file String 刻章官方文件
*/
*/
async
chapterEngravedComplete
(
params
){
async
chapterEngravedComplete
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
if
(
!
params
.
gongzhang
)
{
if
(
!
params
.
gongzhang
)
{
return
system
.
getResult
(
null
,
`参数错误 公章不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 公章不能为空`
);
}
}
if
(
!
params
.
fapiaozhang
)
{
if
(
!
params
.
fapiaozhang
)
{
return
system
.
getResult
(
null
,
`参数错误 发票章不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 发票章不能为空`
);
}
}
if
(
!
params
.
caiwuzhang
)
{
if
(
!
params
.
caiwuzhang
)
{
return
system
.
getResult
(
null
,
`参数错误 财务章不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 财务章不能为空`
);
}
}
if
(
!
params
.
hetongzhang
)
{
if
(
!
params
.
hetongzhang
)
{
return
system
.
getResult
(
null
,
`参数错误 合同章不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 合同章不能为空`
);
}
}
if
(
!
params
.
farenzhang
)
{
if
(
!
params
.
farenzhang
)
{
return
system
.
getResult
(
null
,
`参数错误 法人章不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 法人章不能为空`
);
}
}
if
(
!
params
.
zhang_gov_file
)
{
if
(
!
params
.
zhang_gov_file
)
{
return
system
.
getResult
(
null
,
`参数错误 刻章官方文件不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 刻章官方文件不能为空`
);
}
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
...
@@ -545,14 +547,14 @@ class OorderstatusService extends ServiceBase {
...
@@ -545,14 +547,14 @@ class OorderstatusService extends ServiceBase {
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -563,7 +565,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -563,7 +565,7 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
backAccountOpening
(
params
){
async
backAccountOpening
(
params
)
{
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
...
@@ -573,7 +575,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -573,7 +575,7 @@ class OorderstatusService extends ServiceBase {
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
error
);
return
system
.
getResult
(
error
);
}
}
}
}
/**
/**
* 银行已开户
* 银行已开户
...
@@ -581,28 +583,28 @@ class OorderstatusService extends ServiceBase {
...
@@ -581,28 +583,28 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
backAccountOpenComplete
(
params
){
async
backAccountOpenComplete
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
if
(
!
params
.
bank_name
)
{
if
(
!
params
.
bank_name
)
{
return
system
.
getResult
(
null
,
`参数错误 账户名称不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 账户名称不能为空`
);
}
}
if
(
!
params
.
bank_no
)
{
if
(
!
params
.
bank_no
)
{
return
system
.
getResult
(
null
,
`参数错误 账户号不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 账户号不能为空`
);
}
}
if
(
!
params
.
bank
)
{
if
(
!
params
.
bank
)
{
return
system
.
getResult
(
null
,
`参数错误 开户行不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 开户行不能为空`
);
}
}
if
(
!
params
.
bank_img
)
{
if
(
!
params
.
bank_img
)
{
return
system
.
getResult
(
null
,
`参数错误 账户信息不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 账户信息不能为空`
);
}
}
if
(
!
params
.
bank_gov_file
)
{
if
(
!
params
.
bank_gov_file
)
{
return
system
.
getResult
(
null
,
`参数错误 银行开户官方文件不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 银行开户官方文件不能为空`
);
}
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
...
@@ -611,21 +613,21 @@ class OorderstatusService extends ServiceBase {
...
@@ -611,21 +613,21 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty
.
bank
=
this
.
trim
(
params
.
bank
);
_obusinessmenProperty
.
bank
=
this
.
trim
(
params
.
bank
);
_obusinessmenProperty
.
bank_img
=
this
.
trim
(
params
.
bank_img
);
_obusinessmenProperty
.
bank_img
=
this
.
trim
(
params
.
bank_img
);
_obusinessmenProperty
.
bank_gov_file
=
this
.
trim
(
params
.
bank_gov_file
);
_obusinessmenProperty
.
bank_gov_file
=
this
.
trim
(
params
.
bank_gov_file
);
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -635,7 +637,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -635,7 +637,7 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
taxReporting
(
params
){
async
taxReporting
(
params
)
{
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
...
@@ -645,7 +647,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -645,7 +647,7 @@ class OorderstatusService extends ServiceBase {
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
error
);
return
system
.
getResult
(
error
);
}
}
}
}
/**
/**
* 税务报道完成
* 税务报道完成
...
@@ -653,25 +655,25 @@ class OorderstatusService extends ServiceBase {
...
@@ -653,25 +655,25 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
taxReportComplete
(
params
){
async
taxReportComplete
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
if
(
!
params
.
tax_reg_day
)
{
if
(
!
params
.
tax_reg_day
)
{
return
system
.
getResult
(
null
,
`参数错误 税务登记日不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 税务登记日不能为空`
);
}
}
if
(
!
params
.
tax_org
)
{
if
(
!
params
.
tax_org
)
{
return
system
.
getResult
(
null
,
`参数错误 税务机构名称不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 税务机构名称不能为空`
);
}
}
if
(
!
params
.
ca_img
)
{
if
(
!
params
.
ca_img
)
{
return
system
.
getResult
(
null
,
`参数错误 CA照片不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 CA照片不能为空`
);
}
}
if
(
!
params
.
tax_gov_file
)
{
if
(
!
params
.
tax_gov_file
)
{
return
system
.
getResult
(
null
,
`参数错误 税务报道官方文件不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 税务报道官方文件不能为空`
);
}
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
...
@@ -679,21 +681,21 @@ class OorderstatusService extends ServiceBase {
...
@@ -679,21 +681,21 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty
.
tax_org
=
this
.
trim
(
params
.
tax_org
);
_obusinessmenProperty
.
tax_org
=
this
.
trim
(
params
.
tax_org
);
_obusinessmenProperty
.
ca_img
=
this
.
trim
(
params
.
ca_img
);
_obusinessmenProperty
.
ca_img
=
this
.
trim
(
params
.
ca_img
);
_obusinessmenProperty
.
tax_gov_file
=
this
.
trim
(
params
.
tax_gov_file
);
_obusinessmenProperty
.
tax_gov_file
=
this
.
trim
(
params
.
tax_gov_file
);
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -703,31 +705,31 @@ class OorderstatusService extends ServiceBase {
...
@@ -703,31 +705,31 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
taxCategoryDetermine
(
params
){
async
taxCategoryDetermine
(
params
)
{
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
if
(
!
params
.
status
)
{
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
}
if
(
!
params
.
common_tax_ladder
)
{
if
(
!
params
.
common_tax_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 普票个税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 普票个税阶梯不能为空`
);
}
}
if
(
!
params
.
common_other_ladder
)
{
if
(
!
params
.
common_other_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 普票增值税、附加税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 普票增值税、附加税阶梯不能为空`
);
}
}
if
(
!
params
.
special_tax_ladder
)
{
if
(
!
params
.
special_tax_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 专票个税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 专票个税阶梯不能为空`
);
}
}
if
(
!
params
.
special_other_ladder
)
{
if
(
!
params
.
special_other_ladder
)
{
return
system
.
getResult
(
null
,
`参数错误 专票增值税、附加税阶梯不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 专票增值税、附加税阶梯不能为空`
);
}
}
if
(
!
params
.
add_value_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
add_value_up_type
))
==
-
1
)
{
if
(
!
params
.
add_value_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
add_value_up_type
))
==
-
1
)
{
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
}
}
if
(
!
params
.
tax_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
tax_up_type
))
==
-
1
)
{
if
(
!
params
.
tax_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
tax_up_type
))
==
-
1
)
{
return
system
.
getResult
(
null
,
`参数错误 个税累计类型不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 个税累计类型不能为空`
);
}
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
...
@@ -737,21 +739,21 @@ class OorderstatusService extends ServiceBase {
...
@@ -737,21 +739,21 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty
.
special_other_ladder
=
this
.
trim
(
params
.
special_other_ladder
);
_obusinessmenProperty
.
special_other_ladder
=
this
.
trim
(
params
.
special_other_ladder
);
_obusinessmenProperty
.
add_value_up_type
=
this
.
trim
(
params
.
add_value_up_type
);
_obusinessmenProperty
.
add_value_up_type
=
this
.
trim
(
params
.
add_value_up_type
);
_obusinessmenProperty
.
tax_up_type
=
this
.
trim
(
params
.
tax_up_type
);
_obusinessmenProperty
.
tax_up_type
=
this
.
trim
(
params
.
tax_up_type
);
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
_obusinessmenProperty
.
id
=
_order
.
busi_id
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -761,7 +763,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -761,7 +763,7 @@ class OorderstatusService extends ServiceBase {
* @id 订单ID
* @id 订单ID
* @status String 下一个订单状态
* @status String 下一个订单状态
*/
*/
async
submitAudit
(
params
){
async
submitAudit
(
params
)
{
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
try
{
...
@@ -779,23 +781,40 @@ class OorderstatusService extends ServiceBase {
...
@@ -779,23 +781,40 @@ class OorderstatusService extends ServiceBase {
* @id String 订单ID
* @id String 订单ID
* @status String 订单状态
* @status String 订单状态
*/
*/
async
mailed
(
params
){
async
mailed
(
params
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
deliver_mail_no
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商交付快递单号不能为空`
);
}
if
(
!
params
.
deliver_mail_img
)
{
return
system
.
getResult
(
null
,
`参数错误 交付商交付快递单号图片不能为空`
);
}
let
oorderDeliverProperty
=
{};
oorderDeliverProperty
.
deliver_mail_no
=
this
.
trim
(
deliver_mail_no
);
oorderDeliverProperty
.
deliver_mail_img
=
this
.
trim
(
deliver_mail_img
);
let
_order
=
params
.
_order
;
oorderDeliverProperty
.
id
=
_order
.
deliver_id
;
let
orderProperty
=
{};
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
id
=
_order
.
id
;
try
{
try
{
if
(
!
params
.
id
){
await
this
.
db
.
transaction
(
async
t
=>
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
await
this
.
oorderdeliverDao
.
update
(
orderdeliverProperty
,
t
);
}
await
this
.
oorderdeliverDao
.
update
(
orderProperty
,
t
);
if
(
!
params
.
status
){
});
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
return
system
.
getResultSuccess
();
}
if
(
!
params
.
common_tax_ladder
){
return
system
.
getResult
(
null
,
`参数错误 普票个税阶梯不能为空`
);
}
if
(
!
params
.
common_other_ladder
){
return
system
.
getResult
(
null
,
`参数错误 普票增值税、附加税阶梯不能为空`
);
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
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