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
c4515493
Commit
c4515493
authored
Apr 01, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
c62c5061
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletions
+31
-1
xggsve-invoice/app/base/api/impl/op/action.js
+3
-1
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
+1
-0
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+27
-0
No files found.
xggsve-invoice/app/base/api/impl/op/action.js
View file @
c4515493
...
@@ -51,7 +51,9 @@ class ActionAPI extends APIBase {
...
@@ -51,7 +51,9 @@ class ActionAPI extends APIBase {
case
"invoice"
:
// 查询发票详细信息
case
"invoice"
:
// 查询发票详细信息
opResult
=
await
this
.
iinvoiceSve
.
queryInvoice
(
action_body
);
opResult
=
await
this
.
iinvoiceSve
.
queryInvoice
(
action_body
);
break
;
break
;
case
"updateAccountCreation"
:
// 查询发票详细信息
opResult
=
await
this
.
iinvoiceSve
.
updateAccountCreation
(
action_body
);
break
;
// case "verificationAndCalculation": // 发票试算接口
// case "verificationAndCalculation": // 发票试算接口
// opResult = await rule.dispatcher(action_body);
// opResult = await rule.dispatcher(action_body);
// break;
// break;
...
...
xggsve-invoice/app/base/db/models/invoice/iinvoice.js
View file @
c4515493
...
@@ -49,6 +49,7 @@ module.exports = (db, DataTypes) => {
...
@@ -49,6 +49,7 @@ module.exports = (db, DataTypes) => {
product_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"商品ID"
},
product_id
:{
type
:
DataTypes
.
STRING
(
32
),
allowNull
:
true
,
delaultValue
:
''
,
comment
:
"商品ID"
},
status
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'status'
,
allowNull
:
true
,
comment
:
'订单状态 业务进度'
},
status
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'status'
,
allowNull
:
true
,
comment
:
'订单状态 业务进度'
},
red_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'red_status'
,
allowNull
:
true
,
comment
:
'1 未红冲 2 已红冲 3 红冲中'
},
red_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'red_status'
,
allowNull
:
true
,
comment
:
'1 未红冲 2 已红冲 3 红冲中'
},
account_creation
:
{
type
:
DataTypes
.
STRING
,
field
:
'account_creation'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'是否建账 0未建账 1已建账'
},
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
},
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
c4515493
...
@@ -339,5 +339,32 @@ class IInvoiceService extends ServiceBase {
...
@@ -339,5 +339,32 @@ class IInvoiceService extends ServiceBase {
}
}
}
}
/**
* 更新建账
* @param {*} params
*/
async
updateAccountCreation
(
params
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 发票ID 不能为空`
);
}
try
{
let
_invoice
=
await
this
.
dao
.
model
.
findOne
({
where
:{
id
:
this
.
trim
(
params
.
id
);
}
});
if
(
!
_invoice
){
return
system
.
getResult
(
null
,
`发票不存在`
);
}
_invoice
.
account_creation
=
1
;
_invoice
.
save
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
module
.
exports
=
IInvoiceService
;
module
.
exports
=
IInvoiceService
;
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