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
5504ece2
Commit
5504ece2
authored
Apr 12, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
aa6e0b25
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
1 deletions
+33
-1
xggsve-invoice/app/base/api/impl/op/action.js
+6
-0
xggsve-invoice/app/base/db/impl/invoice/saasinvoiceapplyDao.js
+5
-0
xggsve-invoice/app/base/db/models/invoice/saasinvoiceapply.js
+4
-0
xggsve-invoice/app/base/service/impl/invoice/saasinvoiceapplySve.js
+17
-0
xggsve-invoice/app/base/utils/dictionary.js
+1
-1
No files found.
xggsve-invoice/app/base/api/impl/op/action.js
View file @
5504ece2
...
...
@@ -77,6 +77,12 @@ class ActionAPI extends APIBase {
case
"invoiceapplySave"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
save
(
action_body
);
break
;
case
"invoiceapplyBulkSave"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
bulkSave
(
action_body
);
break
;
case
"invoiceapplyStatus"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
updateStatus
(
action_body
);
break
;
case
"invoiceapplyById"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
byId
(
action_body
);
break
;
...
...
xggsve-invoice/app/base/db/impl/invoice/saasinvoiceapplyDao.js
View file @
5504ece2
...
...
@@ -30,6 +30,11 @@ class SaasinvoiceapplyDao extends Dao {
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
}
async
updateStatus
(
params
,
t
)
{
let
sql
=
`UPDATE
${
this
.
model
.
tableName
}
SET status = :status WHERE id = :id AND status = :preStatus`
;
return
this
.
customUpdate
(
sql
,
params
,
t
);
}
setCondition
(
params
,
sql
)
{
if
(
params
.
saas_merchant_id
){
sql
.
push
(
"AND t1.`saas_merchant_id` = :saas_merchant_id"
);
...
...
xggsve-invoice/app/base/db/models/invoice/saasinvoiceapply.js
View file @
5504ece2
...
...
@@ -16,6 +16,10 @@ module.exports = function (sequelize, DataTypes) {
allowNull
:
true
,
defaultValue
:
''
},
parent_id
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
},
batch_no
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
...
...
xggsve-invoice/app/base/service/impl/invoice/saasinvoiceapplySve.js
View file @
5504ece2
...
...
@@ -24,10 +24,27 @@ class SaasinvoiceapplyService extends ServiceBase {
return
await
this
.
save10
(
params
);
}
}
async
bulkSave
(
params
)
{
if
(
params
.
fee_type
==
"10"
)
{
return
await
this
.
bulkSave10
(
params
);
}
}
async
bulkSave10
(
params
)
{
let
rs
=
await
this
.
dao
.
bulkCreate
(
params
.
dataList
);
if
(
rs
&&
params
.
updateStatus
)
{
await
this
.
updateStatus
(
params
.
updateStatus
);
}
return
system
.
getResultSuccess
(
rs
);
}
async
save10
(
params
)
{
let
rs
=
await
this
.
dao
.
create
(
params
);
return
system
.
getResultSuccess
(
rs
);
}
async
updateStatus
(
params
)
{
let
rs
=
await
this
.
dao
.
updateStatus
(
params
);
return
system
.
getResultSuccess
(
rs
);
}
async
merchantinvoiceapplyPage
(
params
)
{
params
.
currentPage
=
Number
(
params
.
currentPage
||
1
);
params
.
pageSize
=
Number
(
params
.
pageSize
||
10
);
...
...
xggsve-invoice/app/base/utils/dictionary.js
View file @
5504ece2
...
...
@@ -26,7 +26,7 @@ class Dictionary {
return
;
}
for
(
let
field
of
fields
)
{
row
[
field
]
=
this
.
getDict
(
module
,
field
)[
row
[
field
]
||
""
]
||
""
;
row
[
field
+
"_name"
]
=
this
.
getDict
(
module
,
field
)[
row
[
field
]
||
""
]
||
""
;
}
}
...
...
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