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
e78d9b7f
Commit
e78d9b7f
authored
Apr 11, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
bffad7c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
5 deletions
+36
-5
xggsve-invoice/app/base/api/impl/op/action.js
+3
-0
xggsve-invoice/app/base/db/impl/invoice/saasinvoiceapplyDao.js
+3
-0
xggsve-invoice/app/base/db/models/invoice/saasinvoiceapply.js
+21
-0
xggsve-invoice/app/base/service/impl/invoice/saasinvoiceapplySve.js
+8
-5
xggsve-invoice/app/base/utils/dictionary.js
+1
-0
No files found.
xggsve-invoice/app/base/api/impl/op/action.js
View file @
e78d9b7f
...
...
@@ -72,6 +72,9 @@ class ActionAPI extends APIBase {
case
"invoiceapplySave"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
save
(
action_body
);
break
;
case
"invoiceapplyById"
:
//发票申请列表(平台)
opResult
=
await
this
.
saasinvoiceapplySve
.
byId
(
action_body
);
break
;
// case "verificationAndCalculation": // 发票试算接口
// opResult = await rule.dispatcher(action_body);
...
...
xggsve-invoice/app/base/db/impl/invoice/saasinvoiceapplyDao.js
View file @
e78d9b7f
...
...
@@ -37,6 +37,9 @@ class SaasinvoiceapplyDao extends Dao {
if
(
params
.
apply_no
)
{
sql
.
push
(
"AND t1.`apply_no` = :apply_no"
);
}
if
(
params
.
owner_type
)
{
sql
.
push
(
"AND t1.`owner_type` = :owner_type"
);
}
if
(
params
.
begin_time
)
{
sql
.
push
(
"AND t1.`created_at` >= :begin_time"
);
}
...
...
xggsve-invoice/app/base/db/models/invoice/saasinvoiceapply.js
View file @
e78d9b7f
...
...
@@ -34,6 +34,11 @@ module.exports = function (sequelize, DataTypes) {
type
:
DataTypes
.
STRING
,
allowNull
:
true
},
invoice_amount
:
{
type
:
DataTypes
.
BIGINT
,
allowNull
:
true
,
defaultValue
:
0
},
status
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
...
...
@@ -123,6 +128,22 @@ module.exports = function (sequelize, DataTypes) {
type
:
DataTypes
.
BIGINT
,
allowNull
:
true
},
unit
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
},
quantity
:
{
type
:
DataTypes
.
INTEGER
,
allowNull
:
true
},
price
:
{
type
:
DataTypes
.
BIGINT
,
allowNull
:
true
},
remark
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
},
created_at
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
...
...
xggsve-invoice/app/base/service/impl/invoice/saasinvoiceapplySve.js
View file @
e78d9b7f
...
...
@@ -10,18 +10,21 @@ class SaasinvoiceapplyService extends ServiceBase {
super
(
"invoice"
,
ServiceBase
.
getDaoName
(
SaasinvoiceapplyService
));
this
.
dictionary
=
system
.
getObject
(
"util.dictionary"
);
}
async
byId
(
params
)
{
let
apply
=
this
.
dao
.
getById
(
params
.
id
);
this
.
handleDate
(
apply
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
this
.
dictionary
.
setRowName
(
"SAAS_INVOICE_APPLY"
,
apply
,[
"owner_type"
,
"fee_type"
,
"invoice_type"
,
"invoice_join"
]);
return
system
.
getResult
(
apply
);
}
async
save
(
params
)
{
if
(
params
.
fee_type
==
"10"
)
{
return
await
this
.
save10
(
params
);
}
}
async
save10
(
params
)
{
let
rs
=
await
this
.
dao
.
create
(
params
);
return
system
.
getResultSuccess
(
rs
);
}
async
merchantinvoiceapplyPage
(
params
)
{
params
.
currentPage
=
Number
(
params
.
currentPage
||
1
);
params
.
pageSize
=
Number
(
params
.
pageSize
||
10
);
...
...
@@ -37,7 +40,7 @@ class SaasinvoiceapplyService extends ServiceBase {
for
(
var
item
of
list
)
{
this
.
handleDate
(
item
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
// this.handleDate(item, ['invoice_time'], 'YYYY-MM-DD');
this
.
dictionary
.
setRowName
(
"SAAS_INVOICE_APPLY"
,
item
,[
"owner_type"
,
"fee_type"
,
"invoice_type"
,
"invoice_join"
]);
this
.
dictionary
.
setRowName
(
"SAAS_INVOICE_APPLY"
,
item
,[
"owner_type"
,
"fee_type"
,
"invoice_type"
,
"invoice_join"
,
"status"
]);
}
}
return
system
.
getResultSuccess
({
count
:
total
,
rows
:
list
});
...
...
@@ -58,7 +61,7 @@ class SaasinvoiceapplyService extends ServiceBase {
for
(
var
item
of
list
)
{
this
.
handleDate
(
item
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
// this.handleDate(item, ['invoice_time'], 'YYYY-MM-DD');
this
.
dictionary
.
setRowName
(
"SAAS_INVOICE_APPLY"
,
item
,[
"owner_type"
,
"fee_type"
,
"invoice_type"
,
"invoice_join"
]);
this
.
dictionary
.
setRowName
(
"SAAS_INVOICE_APPLY"
,
item
,[
"owner_type"
,
"fee_type"
,
"invoice_type"
,
"invoice_join"
,
"status"
]);
}
}
return
system
.
getResultSuccess
({
count
:
total
,
rows
:
list
});
...
...
xggsve-invoice/app/base/utils/dictionary.js
View file @
e78d9b7f
...
...
@@ -12,6 +12,7 @@ class Dictionary {
owner_type
:
{
"00"
:
"商户发票"
,
"10"
:
"平台发票"
},
fee_type
:
{
"00"
:
"注册订单费用"
,
"10"
:
"平台转账费用"
,
"20"
:
"商户转账费用"
},
invoice_type
:
{
"10"
:
"增值税专用发票"
,
"20"
:
" 增值税普通发票"
,
"30"
:
"普通发票"
},
status
:
{
"1000"
:
"待审核"
,
"1010"
:
"审核通过"
,
"1020"
:
"审核不通过"
,
"1030"
:
"发票办理"
,
"1040"
:
"发票开具"
,
"1050"
:
"平台办理中"
,
"1060"
:
"办理完成"
},
}
}
...
...
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