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
6de828a0
Commit
6de828a0
authored
Apr 29, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
bfcfea3d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
+1
-1
xggsve-invoice/app/base/db/models/product/iprocess.js
+1
-0
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+18
-1
xggsve-invoice/app/base/service/impl/invoice/iinvoicestatusSve.js
+5
-0
No files found.
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
View file @
6de828a0
...
@@ -53,7 +53,7 @@ module.exports = (db, DataTypes) => {
...
@@ -53,7 +53,7 @@ module.exports = (db, DataTypes) => {
saas_deliver_api
:
{
type
:
DataTypes
.
STRING
,
field
:
'saas_deliver_api'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'saas系统状态通知api'
},
saas_deliver_api
:
{
type
:
DataTypes
.
STRING
,
field
:
'saas_deliver_api'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'saas系统状态通知api'
},
ali_deliver_api
:{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"发票状态更新回调api"
},
ali_deliver_api
:{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
"发票状态更新回调api"
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
true
},
},
{
},
{
timestamps
:
false
,
timestamps
:
false
,
...
...
xggsve-invoice/app/base/db/models/product/iprocess.js
View file @
6de828a0
...
@@ -6,6 +6,7 @@ module.exports = function (db, DataTypes) {
...
@@ -6,6 +6,7 @@ module.exports = function (db, DataTypes) {
return
db
.
define
(
'iprocess'
,
{
return
db
.
define
(
'iprocess'
,
{
name
:
{
type
:
DataTypes
.
STRING
,
field
:
'name'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'流程名称'
},
name
:
{
type
:
DataTypes
.
STRING
,
field
:
'name'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'流程名称'
},
status
:
{
type
:
DataTypes
.
STRING
,
field
:
'status'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'流程状态'
},
status
:
{
type
:
DataTypes
.
STRING
,
field
:
'status'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'流程状态'
},
product_id
:{
type
:
DataTypes
.
STRING
,
field
:
'product_id'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'所属产品一级分类'
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
6de828a0
...
@@ -16,7 +16,7 @@ class IInvoiceService extends ServiceBase {
...
@@ -16,7 +16,7 @@ class IInvoiceService extends ServiceBase {
this
.
iinvoicedeliverDao
=
system
.
getObject
(
"db.invoice.iinvoicedeliverDao"
);
this
.
iinvoicedeliverDao
=
system
.
getObject
(
"db.invoice.iinvoicedeliverDao"
);
this
.
RULE_INVOICE_TYPE
=
[
"10"
,
'20'
,
'30'
];
//发票类型
this
.
RULE_INVOICE_TYPE
=
[
"10"
,
'20'
,
'30'
];
//发票类型
this
.
RULE_BUSINESSMEN_TYPE
=
[
'10'
,
'20'
];
//销售方类型
this
.
RULE_BUSINESSMEN_TYPE
=
[
'10'
,
'20'
];
//销售方类型
this
.
DEFAULT_PRODUCT_ID
=
"500
1
0000"
;
//默认产品ID
this
.
DEFAULT_PRODUCT_ID
=
"500
2
0000"
;
//默认产品ID
this
.
iproductDao
=
system
.
getObject
(
"db.product.iproductDao"
);
this
.
iproductDao
=
system
.
getObject
(
"db.product.iproductDao"
);
this
.
iprocessDao
=
system
.
getObject
(
"db.product.iprocessDao"
);
this
.
iprocessDao
=
system
.
getObject
(
"db.product.iprocessDao"
);
this
.
iproductprocessDao
=
system
.
getObject
(
"db.product.iproductprocessDao"
);
this
.
iproductprocessDao
=
system
.
getObject
(
"db.product.iproductprocessDao"
);
...
@@ -152,6 +152,23 @@ class IInvoiceService extends ServiceBase {
...
@@ -152,6 +152,23 @@ class IInvoiceService extends ServiceBase {
await
this
.
iinvoiceprocessDao
.
model
.
bulkCreate
(
processList
,
{
await
this
.
iinvoiceprocessDao
.
model
.
bulkCreate
(
processList
,
{
transaction
:
t
transaction
:
t
});
});
//如果存在交付商信息这需要创建交付商记录
if
(
params
.
deliver_id
){
let
iinvoicedeliverProperty
=
{
invoice_id
:
_invoice
.
id
,
deliver_id
:
params
.
deliver_id
,
deliver_name
:
params
.
deliverName
,
deliver_delive
:
0
};
let
iinvoicedeliver
=
await
this
.
iinvoicedeliverDao
.
create
(
iinvoicedeliverProperty
,
t
);
//将id和交付商商id回写到发票表种
let
_invoiceProperty
=
{
id
:
_invoice
.
id
,
invoice_deliver_id
:
iinvoicedeliver
.
id
,
deliver_id
:
params
.
deliver_id
}
await
this
.
dao
.
update
(
_invoiceProperty
,
t
);
}
});
});
return
system
.
getResult
(
`success`
);
return
system
.
getResult
(
`success`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoicestatusSve.js
View file @
6de828a0
...
@@ -424,6 +424,10 @@ class IinvoicestatusService extends ServiceBase {
...
@@ -424,6 +424,10 @@ class IinvoicestatusService extends ServiceBase {
if
(
!
params
.
operator_id
)
{
if
(
!
params
.
operator_id
)
{
return
system
.
getResult
(
null
,
`参数错误 业务员ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 业务员ID不能为空`
);
}
}
if
(
!
params
.
operator_path
)
{
return
system
.
getResult
(
null
,
`参数错误 业务员URL不能为空`
);
}
try
{
try
{
let
_iinvoicedeliver
=
await
this
.
iinvoicedeliverDao
.
model
.
findOne
({
let
_iinvoicedeliver
=
await
this
.
iinvoicedeliverDao
.
model
.
findOne
({
where
:
{
where
:
{
...
@@ -435,6 +439,7 @@ class IinvoicestatusService extends ServiceBase {
...
@@ -435,6 +439,7 @@ class IinvoicestatusService extends ServiceBase {
}
}
let
invoicedeliverProperty
=
{};
let
invoicedeliverProperty
=
{};
invoicedeliverProperty
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
invoicedeliverProperty
.
operator_id
=
this
.
trim
(
params
.
operator_id
);
invoicedeliverProperty
.
operator_path
=
this
.
trim
(
params
.
operator_path
);
invoicedeliverProperty
.
id
=
_iinvoicedeliver
.
id
;
invoicedeliverProperty
.
id
=
_iinvoicedeliver
.
id
;
let
invoiceProperty
=
{};
let
invoiceProperty
=
{};
...
...
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