Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
3ad1436f
Commit
3ad1436f
authored
Dec 17, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDCI download: include INSTCODE, ACCENUMB, GENUS
- Updated template
parent
8be56d09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
src/main/java/org/genesys2/server/service/impl/DownloadServiceImpl.java
...org/genesys2/server/service/impl/DownloadServiceImpl.java
+12
-9
src/main/resources/template/download/PDCI.xlsx
src/main/resources/template/download/PDCI.xlsx
+0
-0
No files found.
src/main/java/org/genesys2/server/service/impl/DownloadServiceImpl.java
View file @
3ad1436f
...
...
@@ -52,7 +52,6 @@ import org.genesys2.server.model.genesys.Accession;
import
org.genesys2.server.model.genesys.AccessionAlias
;
import
org.genesys2.server.model.genesys.AccessionCollect
;
import
org.genesys2.server.model.genesys.AccessionGeo
;
import
org.genesys2.server.model.genesys.AccessionId
;
import
org.genesys2.server.model.genesys.AccessionRef
;
import
org.genesys2.server.model.genesys.AccessionRemark
;
import
org.genesys2.server.model.genesys.PDCI
;
...
...
@@ -217,7 +216,7 @@ public class DownloadServiceImpl implements DownloadService {
final
PDCI
pdci
=
accession
.
getAccessionId
().
getPdci
();
if
(
pdci
!=
null
)
{
Row
row
=
sheet
.
createRow
(++
i
);
writePDCIRow
(
row
,
pdci
);
writePDCIRow
(
row
,
accession
,
pdci
);
if
(
i
%
1000
==
0
)
{
LOG
.
info
(
"Writing PDCI row={}"
,
i
);
...
...
@@ -674,19 +673,23 @@ public class DownloadServiceImpl implements DownloadService {
}
}
private
void
writePDCIRow
(
Row
row
,
PDCI
pdci
)
{
private
void
writePDCIRow
(
Row
row
,
Accession
accession
,
PDCI
pdci
)
{
// Process and write result
AccessionId
accession
=
pdci
.
getAccession
();
int
cell
=
0
;
updateCell
(
row
,
cell
++,
accession
.
getInstCode
());
updateCell
(
row
,
cell
++,
accession
.
getAccessionNumber
());
updateCell
(
row
,
cell
++,
accession
.
getGenus
());
if
(
accession
.
getUuid
()
!=
null
)
{
updateCell
(
row
,
0
,
accession
.
getUuid
().
toString
());
updateCell
(
row
,
cell
++
,
accession
.
getUuid
().
toString
());
}
updateCell
(
row
,
1
,
pdci
.
getScore
());
int
col
=
2
;
updateCell
(
row
,
cell
++,
pdci
.
getScore
())
;
for
(
String
indicator
:
pdci
.
getIndependentItems
())
{
updateCell
(
row
,
c
o
l
++,
getPDCIScore
(
pdci
,
indicator
));
updateCell
(
row
,
c
el
l
++,
getPDCIScore
(
pdci
,
indicator
));
}
for
(
String
indicator
:
pdci
.
getDependentItems
())
{
updateCell
(
row
,
c
o
l
++,
getPDCIScore
(
pdci
,
indicator
));
updateCell
(
row
,
c
el
l
++,
getPDCIScore
(
pdci
,
indicator
));
}
}
...
...
src/main/resources/template/download/PDCI.xlsx
View file @
3ad1436f
No preview for this file type
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