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
14ce85df
Commit
14ce85df
authored
Mar 13, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
4e4f9517
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
xggsve-invoice/app/base/db/impl/invoice/iinvoicedeliverDao.js
+10
-0
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
+7
-11
No files found.
xggsve-invoice/app/base/db/impl/invoice/iinvoicedeliverDao.js
View file @
14ce85df
...
@@ -95,6 +95,16 @@ class IinvoicedeliverDao extends Dao {
...
@@ -95,6 +95,16 @@ class IinvoicedeliverDao extends Dao {
}
}
}
}
/**
* 根据invoice_id 获取 交付信息
* @param {*} invoice_id
*/
async
findOne
(
invoice_id
){
let
sql
=
`SELECT * FROM I_INVOICE_DELIVER WHERE INVOICE_ID=:invoice_id`
;
var
_invoiceDeliver
=
await
this
.
customQuery
(
sql
,
{
invoice_id
:
invoice_id
});
return
_invoiceDeliver
||
{};
}
// //交付商业务概览
// //交付商业务概览
// async countStat(params) {
// async countStat(params) {
// var sql = [];
// var sql = [];
...
...
xggsve-invoice/app/base/service/impl/invoice/iinvoiceSve.js
View file @
14ce85df
...
@@ -308,28 +308,24 @@ class IInvoiceService extends ServiceBase {
...
@@ -308,28 +308,24 @@ class IInvoiceService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 ID不能为空`
)
return
system
.
getResult
(
null
,
`参数错误 ID不能为空`
)
}
}
try
{
try
{
let
_invoice
=
await
this
.
dao
.
find
ById
(
this
.
trim
(
params
.
id
));
let
_invoice
=
await
this
.
dao
.
get
ById
(
this
.
trim
(
params
.
id
));
if
(
!
_invoice
){
if
(
!
_invoice
){
return
system
.
getResult
(
null
,
`发票不存在`
);
return
system
.
getResult
(
null
,
`发票不存在`
);
}
}
this
.
handleDate
(
_invoice
,
[
'invoice_time'
,
'apply_time'
,
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
this
.
handleDate
(
_invoice
,
[
'invoice_time'
,
'apply_time'
,
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
let
_invoiceinforeg
=
await
this
.
iinvoiceinforegDao
.
find
ById
(
this
.
trim
(
params
.
id
))
||
{};
let
_invoiceinforeg
=
await
this
.
iinvoiceinforegDao
.
get
ById
(
this
.
trim
(
params
.
id
))
||
{};
this
.
handleDate
(
_invoiceinforeg
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
this
.
handleDate
(
_invoiceinforeg
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
let
_invoicedeliver
=
await
this
.
iinvoicedeliverDao
.
model
.
findOne
({
let
_invoicedeliver
=
await
this
.
iinvoicedeliverDao
.
findOne
(
this
.
trim
(
params
.
id
))
||
{};
where
:{
invoice_id
:
_invoice
.
id
}
})
||
{};
this
.
handleDate
(
_invoicedeliver
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
this
.
handleDate
(
_invoicedeliver
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
let
_invoicesummaryinfo
=
await
this
.
iinvoicesummaryinfoDao
.
find
ById
(
this
.
trim
(
params
.
id
));
let
_invoicesummaryinfo
=
await
this
.
iinvoicesummaryinfoDao
.
get
ById
(
this
.
trim
(
params
.
id
));
_invoicesummaryinfo
.
summary
=
JSON
.
parse
(
_invoicesummaryinfo
.
summary
);
_invoicesummaryinfo
.
summary
=
JSON
.
parse
(
_invoicesummaryinfo
.
summary
);
this
.
handleDate
(
_invoicesummaryinfo
,
[
'invoice_time'
,
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
this
.
handleDate
(
_invoicesummaryinfo
,
[
'invoice_time'
,
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
_invoice
.
dataValues
.
invoiceinforeg
=
_invoiceinforeg
;
_invoice
.
invoiceinforeg
=
_invoiceinforeg
;
_invoice
.
dataValues
.
invoicedeliver
=
_invoicedeliver
;
_invoice
.
invoicedeliver
=
_invoicedeliver
;
_invoice
.
dataValues
.
invoicesummaryinfo
=
_invoicesummaryinfo
;
_invoice
.
invoicesummaryinfo
=
_invoicesummaryinfo
;
return
system
.
getResult
(
_invoice
);
return
system
.
getResult
(
_invoice
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
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