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
a5862c72
Commit
a5862c72
authored
Mar 14, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
38e9db1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
+32
-2
No files found.
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
View file @
a5862c72
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../svems.base"
)
const
ServiceBase
=
require
(
"../../svems.base"
);
const
settings
=
require
(
"../../../../config/settings"
)
const
settings
=
require
(
"../../../../config/settings"
);
class
InvoiceService
extends
ServiceBase
{
class
InvoiceService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
userSve
=
system
.
getObject
(
"service.uc.userSve"
);
}
}
async
processDics
(
params
)
{
async
processDics
(
params
)
{
var
rs
=
await
this
.
callms
(
"invoice"
,
"processDics"
,
params
);
var
rs
=
await
this
.
callms
(
"invoice"
,
"processDics"
,
params
);
...
@@ -48,9 +50,36 @@ class InvoiceService extends ServiceBase {
...
@@ -48,9 +50,36 @@ class InvoiceService extends ServiceBase {
async
invoice
(
params
)
{
async
invoice
(
params
)
{
var
rs
=
await
this
.
callms
(
"invoice"
,
"invoice"
,
params
);
var
rs
=
await
this
.
callms
(
"invoice"
,
"invoice"
,
params
);
await
this
.
setUcUser
([
rs
.
data
]);
return
rs
;
return
rs
;
}
}
async
setUcUser
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
}
let
ids
=
[];
for
(
let
row
of
rows
)
{
if
(
row
.
bd_id
)
{
ids
.
push
(
row
.
bd_id
);
}
if
(
row
.
assign_user_id
)
{
ids
.
push
(
row
.
assign_user_id
);
}
}
let
userRs
=
await
this
.
userSve
.
mapByIds
({
ids
:
ids
});
let
userMap
=
userRs
.
data
||
{};
for
(
let
row
of
rows
)
{
let
user
=
userMap
[
row
.
bd_id
]
||
{};
row
.
bd_name
=
user
.
realName
||
""
;
let
assignUser
=
userMap
[
row
.
assign_user_id
]
||
{};
row
.
assign_user_name
=
assignUser
.
realName
||
""
;
}
}
}
}
module
.
exports
=
InvoiceService
;
module
.
exports
=
InvoiceService
;
\ No newline at end of file
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