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
3bc1054d
Commit
3bc1054d
authored
Jan 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
d14817f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
13 deletions
+146
-13
xggsve-order/app/base/api/impl/op/action.js
+5
-1
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+14
-0
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+127
-12
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
3bc1054d
...
...
@@ -19,6 +19,7 @@ class ActionAPI extends APIBase {
this
.
oorderdeliverSve
=
system
.
getObject
(
"service.order.oorderdeliverSve"
);
this
.
oorderstatusSve
=
system
.
getObject
(
"service.order.oorderstatusSve"
);
this
.
oprocessSve
=
system
.
getObject
(
"service.product.oprocessSve"
);
this
.
obusinessmenDao
=
system
.
getObject
(
"service.order.obusinessmenDao"
);
}
/**
* 接口跳转
...
...
@@ -59,7 +60,7 @@ class ActionAPI extends APIBase {
case
"handleStatus"
:
//进度处理
opResult
=
await
this
.
oorderstatusSve
.
handleStatus
(
action_body
);
break
;
case
"addSourceOrder"
:
// 创建来源订单
opResult
=
await
this
.
oorderSve
.
addSourceOrder
(
action_body
);
break
;
...
...
@@ -67,6 +68,9 @@ class ActionAPI extends APIBase {
case
"allProcess"
:
// 查询业务进度
opResult
=
await
this
.
oprocessSve
.
allNames
(
action_body
);
break
;
case
"queryObusinessmen"
:
//查询个体工商户信息
opResult
=
await
this
.
obusinessmenDao
.
queryObusinessmen
(
action_body
);
break
;
//******************************************************************** */
...
...
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
3bc1054d
...
...
@@ -8,6 +8,20 @@ class ObusinessmenService extends ServiceBase {
super
(
"order"
,
ServiceBase
.
getDaoName
(
ObusinessmenService
));
}
/**
* 根据ID查记录
* @param {*} params
* @Id 个体户ID
*/
async
queryObusinessmen
(
params
){
try
{
let
obj
=
await
this
.
findById
(
this
.
trim
(
params
.
id
));
return
system
.
getResult
(
obj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
`系统错误 错误信息
${
error
}
`
);
}
}
}
...
...
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
3bc1054d
...
...
@@ -19,6 +19,9 @@ class OorderstatusService extends ServiceBase {
this
.
oproductprocessDao
=
system
.
getObject
(
"db.product.oproductprocessDao"
);
this
.
BUSI_TYPE
=
1
;
//个体公商户类型
this
.
ISBANK
=
true
;
//银行开户
this
.
TAXTYPE
=
[
1
,
2
];
//个税和增值税类别集合
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
=
"1150"
;
//平台交付审核成功状态码
this
.
PALTFORM_DELIVER_AUDIT_FILE_CODE
=
"1140"
;
//平台交付审核失败状态码
}
/***************************************以下是订单处理的分发器***************************************************************** */
...
...
@@ -39,12 +42,15 @@ class OorderstatusService extends ServiceBase {
}
let
_orderStatus
=
await
this
.
getOrderProcessStatus
(
_order
.
id
,
_order
.
status
);
let
nextList
=
JSON
.
parse
(
_orderStatus
.
next_status
);
_orderStatus
.
next_status
=
next_status
;
let
flag
=
false
;
let
nextNames
=
[];
let
nextName
=
""
;
for
(
var
nextItem
of
nextList
)
{
nextNames
.
push
(
nextItem
.
next_name
);
if
(
nextItem
.
next_status
==
params
.
status
)
{
flag
=
true
;
nextName
=
nextItem
.
next_name
;
break
;
}
}
...
...
@@ -54,6 +60,8 @@ class OorderstatusService extends ServiceBase {
}
params
.
_order
=
_order
;
params
.
_orderStatus
=
_orderStatus
;
params
.
nextName
=
nextName
;
//调用对应的方法 TODO SOMETHING .....
// 调用func
...
...
@@ -271,6 +279,71 @@ class OorderstatusService extends ServiceBase {
}
}
/**
* 平台交付审核(审核成功OR失败)
* @param {*} params
*/
async
platformDeliverAudit
(
params
)
{
//参数验证
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
let
oorderDeliverProperty
=
{};
if
(
this
.
trim
(
params
.
status
)
==
this
.
PALTFORM_DELIVER_AUDIT_SUCCESS_CODE
){
//成功
if
(
!
params
.
audit_remark
)
{
return
system
.
getResult
(
null
,
`参数错误 交付审核备注不能为空`
);
}
if
(
!
params
.
deliver_content
)
{
return
system
.
getResult
(
null
,
`参数错误 交付内容注不能为空`
);
}
if
(
!
params
.
deliver_mail_addr
)
{
return
system
.
getResult
(
null
,
`参数错误 交付地址不能为空`
);
}
if
(
!
params
.
deliver_mail_to
)
{
return
system
.
getResult
(
null
,
`参数错误 收件人不能为空`
);
}
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
);
}
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
,
`参数错误 交付审核备注不能为空`
);
}
oorderDeliverProperty
.
audit_remark
=
this
.
trim
(
params
.
audit_remark
);
}
else
{
return
system
.
getResult
(
null
,
`参数错误 非法的订单状态`
);
}
let
orderProperty
=
{};
orderProperty
.
id
=
params
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
let
self
=
this
;
await
this
.
db
.
transaction
(
async
t
=>
{
//更新交付orderdeliver记录
await
self
.
oorderdeliverDao
.
create
(
oorderDeliverProperty
,
t
);
//更新oorder订单记录
await
self
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**********************************以下是交付商订单业务处理******************************************************** */
...
...
@@ -633,24 +706,32 @@ class OorderstatusService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
tax_reg_day
){
return
system
.
getResult
(
null
,
`参数错误
税务登记日
不能为空`
);
if
(
!
params
.
common_tax_ladder
){
return
system
.
getResult
(
null
,
`参数错误
普票个税阶梯
不能为空`
);
}
if
(
!
params
.
tax_org
){
return
system
.
getResult
(
null
,
`参数错误
税务机构名称
不能为空`
);
if
(
!
params
.
common_other_ladder
){
return
system
.
getResult
(
null
,
`参数错误
普票增值税、附加税阶梯
不能为空`
);
}
if
(
!
params
.
ca_img
){
return
system
.
getResult
(
null
,
`参数错误
CA照片
不能为空`
);
if
(
!
params
.
special_tax_ladder
){
return
system
.
getResult
(
null
,
`参数错误
专票个税阶梯
不能为空`
);
}
if
(
!
params
.
tax_gov_file
){
return
system
.
getResult
(
null
,
`参数错误 税务报道官方文件不能为空`
);
if
(
!
params
.
special_other_ladder
){
return
system
.
getResult
(
null
,
`参数错误 专票增值税、附加税阶梯不能为空`
);
}
if
(
!
params
.
add_value_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
add_value_up_type
))
==
-
1
){
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
}
if
(
!
params
.
tax_up_type
&&
this
.
TAXTYPE
.
indexOf
(
Number
(
params
.
tax_up_type
))
==
-
1
){
return
system
.
getResult
(
null
,
`参数错误 个税累计类型不能为空`
);
}
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
tax_reg_day
=
this
.
trim
(
params
.
tax_reg_day
);
_obusinessmenProperty
.
tax_org
=
this
.
trim
(
params
.
tax_org
);
_obusinessmenProperty
.
ca_img
=
this
.
trim
(
params
.
ca_img
);
_obusinessmenProperty
.
tax_gov_file
=
this
.
trim
(
params
.
tax_gov_file
);
_obusinessmenProperty
.
common_tax_ladder
=
this
.
trim
(
params
.
common_tax_ladder
);
_obusinessmenProperty
.
common_other_ladder
=
this
.
trim
(
params
.
common_other_ladder
);
_obusinessmenProperty
.
special_tax_ladder
=
this
.
trim
(
params
.
special_tax_ladder
);
_obusinessmenProperty
.
special_other_ladder
=
this
.
trim
(
params
.
special_other_ladder
);
_obusinessmenProperty
.
add_value_up_type
=
this
.
trim
(
params
.
add_value_up_type
);
_obusinessmenProperty
.
tax_up_type
=
this
.
trim
(
params
.
tax_up_type
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
...
...
@@ -668,6 +749,40 @@ class OorderstatusService extends ServiceBase {
}
}
/**
* 交付商提交审核
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
submitAudit
(
params
){
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
let
res
=
await
_order
.
save
();
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
/**
* 交付商邮寄
* @param {*} params
* @id String 订单ID
* @status String 订单状态
*/
async
mailed
(
params
){
try
{
}
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