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
b88f6a14
Commit
b88f6a14
authored
Dec 09, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
e02e387c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
bpo-web/app/base/db/impl/etemplateDao.js
+20
-0
bpo-web/app/base/service/impl/econtractSve.js
+17
-0
No files found.
bpo-web/app/base/db/impl/etemplateDao.js
View file @
b88f6a14
...
@@ -19,5 +19,25 @@ class EtemplateDao extends Dao{
...
@@ -19,5 +19,25 @@ class EtemplateDao extends Dao{
var
list
=
await
this
.
customQuery
(
sql
,
{
queryLike
:
"%"
+
name
+
"%"
});
var
list
=
await
this
.
customQuery
(
sql
,
{
queryLike
:
"%"
+
name
+
"%"
});
return
list
||
[];
return
list
||
[];
}
}
async
findMapByIds
(
ids
,
attrs
)
{
var
result
=
{};
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
}
attrs
=
attrs
||
"*"
;
var
sql
=
"SELECT "
+
attrs
+
" FROM c_etemplate where id IN (:ids) "
;
var
list
=
await
this
.
customQuery
(
sql
,
{
ids
:
ids
});
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
}
for
(
var
item
of
list
)
{
result
[
item
.
id
]
=
item
;
}
return
result
;
}
}
}
module
.
exports
=
EtemplateDao
;
module
.
exports
=
EtemplateDao
;
bpo-web/app/base/service/impl/econtractSve.js
View file @
b88f6a14
...
@@ -12,6 +12,7 @@ class EcontractService extends ServiceBase {
...
@@ -12,6 +12,7 @@ class EcontractService extends ServiceBase {
constructor
()
{
constructor
()
{
super
(
ServiceBase
.
getDaoName
(
EcontractService
));
super
(
ServiceBase
.
getDaoName
(
EcontractService
));
this
.
etemplateSve
=
system
.
getObject
(
"service.etemplateSve"
);
this
.
etemplateSve
=
system
.
getObject
(
"service.etemplateSve"
);
this
.
etemplateDao
=
system
.
getObject
(
"db.etemplateDao"
);
this
.
ecompanyDao
=
system
.
getObject
(
"db.ecompanyDao"
);
this
.
ecompanyDao
=
system
.
getObject
(
"db.ecompanyDao"
);
this
.
usereaccountDao
=
system
.
getObject
(
"db.usereaccountDao"
)
this
.
usereaccountDao
=
system
.
getObject
(
"db.usereaccountDao"
)
this
.
utilesignbaoSve
=
system
.
getObject
(
"service.utilesignbaoSve"
);
this
.
utilesignbaoSve
=
system
.
getObject
(
"service.utilesignbaoSve"
);
...
@@ -352,6 +353,7 @@ class EcontractService extends ServiceBase {
...
@@ -352,6 +353,7 @@ class EcontractService extends ServiceBase {
}
}
await
this
.
setEaccount
(
page
.
rows
);
await
this
.
setEaccount
(
page
.
rows
);
await
this
.
setCompany
(
page
.
rows
);
await
this
.
setCompany
(
page
.
rows
);
await
this
.
setEtemplate
(
page
.
rows
);
}
}
return
page
;
return
page
;
}
}
...
@@ -388,6 +390,21 @@ class EcontractService extends ServiceBase {
...
@@ -388,6 +390,21 @@ class EcontractService extends ServiceBase {
}
}
}
}
async
setEtemplate
(
list
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
;
}
var
ids
=
[];
for
(
var
item
of
list
)
{
ids
.
push
(
item
.
etemplate_id
||
0
);
}
var
templateMap
=
await
this
.
etemplateDao
.
findMapByIds
(
ids
,
" id, nameA "
);
for
(
var
item
of
list
)
{
item
.
template
=
templateMap
[
item
.
etemplate_id
];
}
}
async
findInfo
(
obj
)
{
async
findInfo
(
obj
)
{
obj
=
obj
||
{};
obj
=
obj
||
{};
...
...
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