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
2ab7b08c
Commit
2ab7b08c
authored
Jan 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
30d4375a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
372 additions
and
13 deletions
+372
-13
xggsve-order/app/base/db/models/order/obusinessmen.js
+2
-2
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+370
-11
No files found.
xggsve-order/app/base/db/models/order/obusinessmen.js
View file @
2ab7b08c
...
@@ -31,7 +31,7 @@ module.exports = function (db, DataTypes) {
...
@@ -31,7 +31,7 @@ module.exports = function (db, DataTypes) {
bank_img
:
{
type
:
DataTypes
.
STRING
,
field
:
'bank_img'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'账户信息'
},
bank_img
:
{
type
:
DataTypes
.
STRING
,
field
:
'bank_img'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'账户信息'
},
bank_gov_file
:
{
type
:
DataTypes
.
STRING
,
field
:
'bank_gov_file'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'银行开户官方文件'
},
bank_gov_file
:
{
type
:
DataTypes
.
STRING
,
field
:
'bank_gov_file'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'银行开户官方文件'
},
ca_img
:
{
type
:
DataTypes
.
STRING
,
field
:
'ca_img'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'CA照片'
},
ca_img
:
{
type
:
DataTypes
.
STRING
,
field
:
'ca_img'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'CA照片'
},
tax_reg_day
:
{
type
:
DataTypes
.
DATE
,
field
:
'tax_reg_day'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'税务登记日'
},
tax_reg_day
:
{
type
:
DataTypes
.
DATE
,
field
:
'tax_reg_day'
,
allowNull
:
true
,
comment
:
'税务登记日'
},
tax_org
:
{
type
:
DataTypes
.
STRING
,
field
:
'tax_org'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'税务机构名称'
},
tax_org
:
{
type
:
DataTypes
.
STRING
,
field
:
'tax_org'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'税务机构名称'
},
tax_gov_file
:
{
type
:
DataTypes
.
STRING
,
field
:
'tax_gov_file'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'税务报道官方文件'
},
tax_gov_file
:
{
type
:
DataTypes
.
STRING
,
field
:
'tax_gov_file'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'税务报道官方文件'
},
notes
:
{
type
:
DataTypes
.
STRING
,
field
:
'notes'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'备注'
},
notes
:
{
type
:
DataTypes
.
STRING
,
field
:
'notes'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'备注'
},
...
@@ -54,7 +54,7 @@ module.exports = function (db, DataTypes) {
...
@@ -54,7 +54,7 @@ module.exports = function (db, DataTypes) {
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
},
},
{
{
timestamps
:
tru
e
,
timestamps
:
fals
e
,
underscore
:
true
,
underscore
:
true
,
paranoid
:
true
,
paranoid
:
true
,
version
:
true
,
version
:
true
,
...
...
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
2ab7b08c
...
@@ -11,12 +11,14 @@ class OorderstatusService extends ServiceBase {
...
@@ -11,12 +11,14 @@ class OorderstatusService extends ServiceBase {
this
.
oorderinforegDao
=
system
.
getObject
(
"db.order.oorderinforegDao"
);
this
.
oorderinforegDao
=
system
.
getObject
(
"db.order.oorderinforegDao"
);
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
.
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
.
ISBANK
=
true
;
//银行开户
}
}
/***************************************以下是订单处理的分发器***************************************************************** */
/***************************************以下是订单处理的分发器***************************************************************** */
...
@@ -290,16 +292,16 @@ class OorderstatusService extends ServiceBase {
...
@@ -290,16 +292,16 @@ class OorderstatusService extends ServiceBase {
if
(
!
_oorderdeliver
){
if
(
!
_oorderdeliver
){
return
system
.
getResult
(
null
,
`参数错误 订单交付信息不存在`
);
return
system
.
getResult
(
null
,
`参数错误 订单交付信息不存在`
);
}
}
await
this
.
db
.
transaction
(
async
t
=>
{
let
orderdeliverProperty
=
{};
//更新订单交付表业务员ID
orderdeliverProperty
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
_oorderdeliver
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
orderdeliverProperty
.
id
=
_oorderdeliver
.
id
;
//更新订单状态
let
_order
=
params
.
_order
;
_order
.
status
=
this
.
trim
(
params
.
status
);
await
_oorderdeliver
.
save
();
await
_order
.
save
();
let
orderProperty
=
{};
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
id
=
this
.
trim
(
params
.
_order
.
id
);
await
this
.
db
.
transaction
(
async
t
=>
{
await
_oorderdeliver
.
update
(
orderProperty
,
t
);
await
_order
.
update
(
orderProperty
,
t
);
});
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -308,6 +310,363 @@ class OorderstatusService extends ServiceBase {
...
@@ -308,6 +310,363 @@ class OorderstatusService extends ServiceBase {
}
}
}
}
/**
* 工商注册中
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
businessRegister
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
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
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 工商注册完成
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
businessRegisterComplete
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
name
){
return
system
.
getResult
(
null
,
`参数错误 个体工商户名称不能为空`
);
}
if
(
!
params
.
credit_code
){
return
system
.
getResult
(
null
,
`参数错误 统一社会信用代码不能为空`
);
}
if
(
!
params
.
business_place
){
return
system
.
getResult
(
null
,
`参数错误 经营场所不能为空`
);
}
if
(
!
params
.
business_scope
){
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
}
if
(
!
params
.
reg_date
){
return
system
.
getResult
(
null
,
`参数错误 注册日期不能为空`
);
}
if
(
!
params
.
business_img
){
return
system
.
getResult
(
null
,
`参数错误 执照照片不能为空`
);
}
if
(
!
params
.
business_gov_file
){
return
system
.
getResult
(
null
,
`参数错误 工商官方文件不能为空`
);
}
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
name
=
this
.
trim
(
params
.
name
);
_obusinessmenProperty
.
credit_code
=
this
.
trim
(
params
.
credit_code
);
_obusinessmenProperty
.
business_place
=
this
.
trim
(
params
.
business_place
);
_obusinessmenProperty
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_obusinessmenProperty
.
reg_date
=
this
.
trim
(
params
.
reg_date
);
_obusinessmenProperty
.
business_img
=
this
.
trim
(
params
.
business_img
);
_obusinessmenProperty
.
business_gov_file
=
this
.
trim
(
params
.
business_gov_file
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
busi_type
=
this
.
BUSI_TYPE
;
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
let
_obusinessmen
=
await
this
.
obusinessmenDao
.
create
(
_obusinessmenProperty
,
t
);
orderProperty
.
busi_id
=
_obusinessmen
.
id
;
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 刻章办理中
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
chapterEngraving
(
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
* @Statsu String 下一个订单
* @other Object 其他参数
* @gongzhang String 公章
* @fapiaozhang String 发票章
* @caiwuzhang String 财务章
* @hetongzhang String 合同章
* @farenzhang String 法人章
* @zhang_gov_file String 刻章官方文件
*/
async
chapterEngravedComplete
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
gongzhang
){
return
system
.
getResult
(
null
,
`参数错误 公章不能为空`
);
}
if
(
!
params
.
fapiaozhang
){
return
system
.
getResult
(
null
,
`参数错误 发票章不能为空`
);
}
if
(
!
params
.
caiwuzhang
){
return
system
.
getResult
(
null
,
`参数错误 财务章不能为空`
);
}
if
(
!
params
.
hetongzhang
){
return
system
.
getResult
(
null
,
`参数错误 合同章不能为空`
);
}
if
(
!
params
.
farenzhang
){
return
system
.
getResult
(
null
,
`参数错误 法人章不能为空`
);
}
if
(
!
params
.
zhang_gov_file
){
return
system
.
getResult
(
null
,
`参数错误 刻章官方文件不能为空`
);
}
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
gongzhang
=
this
.
trim
(
params
.
gongzhang
);
_obusinessmenProperty
.
fapiaozhang
=
this
.
trim
(
params
.
fapiaozhang
);
_obusinessmenProperty
.
caiwuzhang
=
this
.
trim
(
params
.
caiwuzhang
);
_obusinessmenProperty
.
hetongzhang
=
this
.
trim
(
params
.
hetongzhang
);
_obusinessmenProperty
.
farenzhang
=
this
.
trim
(
params
.
farenzhang
);
_obusinessmenProperty
.
zhang_gov_file
=
this
.
trim
(
params
.
zhang_gov_file
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 银行开户中
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
backAccountOpening
(
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 订单ID
* @status String 下一个订单状态
*/
async
chapterEngravedComplete
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
bank_name
){
return
system
.
getResult
(
null
,
`参数错误 账户名称不能为空`
);
}
if
(
!
params
.
bank_no
){
return
system
.
getResult
(
null
,
`参数错误 账户号不能为空`
);
}
if
(
!
params
.
bank
){
return
system
.
getResult
(
null
,
`参数错误 开户行不能为空`
);
}
if
(
!
params
.
bank_img
){
return
system
.
getResult
(
null
,
`参数错误 账户信息不能为空`
);
}
if
(
!
params
.
bank_gov_file
){
return
system
.
getResult
(
null
,
`参数错误 银行开户官方文件不能为空`
);
}
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
bank_name
=
this
.
trim
(
params
.
bank_name
);
_obusinessmenProperty
.
bank_no
=
this
.
trim
(
params
.
bank_no
);
_obusinessmenProperty
.
bank
=
this
.
trim
(
params
.
bank
);
_obusinessmenProperty
.
bank_img
=
this
.
trim
(
params
.
bank_img
);
_obusinessmenProperty
.
bank_gov_file
=
this
.
trim
(
params
.
bank_gov_file
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 税务报道中
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
taxReporting
(
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 订单ID
* @status String 下一个订单状态
*/
async
taxReportComplete
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
tax_reg_day
){
return
system
.
getResult
(
null
,
`参数错误 税务登记日不能为空`
);
}
if
(
!
params
.
tax_org
){
return
system
.
getResult
(
null
,
`参数错误 税务机构名称不能为空`
);
}
if
(
!
params
.
ca_img
){
return
system
.
getResult
(
null
,
`参数错误 CA照片不能为空`
);
}
if
(
!
params
.
tax_gov_file
){
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
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 核定税种
* @param {*} params
* @id 订单ID
* @status String 下一个订单状态
*/
async
taxCategoryDetermine
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
if
(
!
params
.
status
){
return
system
.
getResult
(
null
,
`参数错误 状态码不能为空`
);
}
if
(
!
params
.
tax_reg_day
){
return
system
.
getResult
(
null
,
`参数错误 税务登记日不能为空`
);
}
if
(
!
params
.
tax_org
){
return
system
.
getResult
(
null
,
`参数错误 税务机构名称不能为空`
);
}
if
(
!
params
.
ca_img
){
return
system
.
getResult
(
null
,
`参数错误 CA照片不能为空`
);
}
if
(
!
params
.
tax_gov_file
){
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
);
let
_order
=
params
.
_order
;
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
try
{
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
obusinessmenDao
.
update
(
_obusinessmenProperty
,
t
);
await
this
.
dao
.
update
(
orderProperty
,
t
);
});
return
system
.
getResultSuccess
();
}
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