Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangweidong
patzn-cloud-service-hmhj
Commits
7d251600
Commit
7d251600
authored
Jun 17, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HMHJ报告生成优化
parent
808f4142
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
EntrustSampleItemIndexServiceImpl.java
.../hmhj/service/impl/EntrustSampleItemIndexServiceImpl.java
+1
-1
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+9
-7
EntrustSampleItemMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
+1
-1
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemIndexServiceImpl.java
View file @
7d251600
...
...
@@ -52,7 +52,7 @@ public class EntrustSampleItemIndexServiceImpl extends BaseServiceImpl<EntrustSa
public
List
<
EntrustSampleItemIndex
>
listBySampleId
(
Long
id
)
{
List
<
EntrustSampleItem
>
itemList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
eq
(
"entrust_sample_id"
,
id
));
if
(
CollectionUtils
.
is
Not
Empty
(
itemList
)){
if
(
CollectionUtils
.
isEmpty
(
itemList
)){
return
null
;
}
List
<
Long
>
itemIds
=
itemList
.
stream
().
map
(
s
->{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
7d251600
...
...
@@ -75,7 +75,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
private
IEntrustReportService
entrustReportService
;
@Autowired
private
IOriginalTemplateConfigService
originalTemplateConfigService
;
@Autowired
private
IEntrustReportTemplateConfigService
entrustReportTemplateConfigService
;
@Autowired
private
IEntrustService
entrustService
;
...
...
@@ -361,7 +362,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
e
.
printStackTrace
();
}
List
<
OriginalTemplateConfig
>
configList
=
original
TemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
templateId
));
List
<
EntrustReportTemplateConfig
>
configList
=
entrustReport
TemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
templateId
));
OriginalUtil
.
doReplace
(
xssfWorkbook
,
entrust
);
XSSFSheet
sheetOne
=
xssfWorkbook
.
getSheetAt
(
0
);
String
sheetName
=
sheetOne
.
getSheetName
();
...
...
@@ -375,7 +376,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
List
<
EntrustSampleItemIndex
>
indexList
=
entrustSampleItemIndexService
.
listBySampleId
(
vo
.
getId
());
vo
.
setIndexList
(
indexList
);
XSSFRow
xssfRow
=
sheetOne
.
getRow
(
beginRow
);
for
(
Original
TemplateConfig
config:
configList
)
{
for
(
EntrustReport
TemplateConfig
config:
configList
)
{
XSSFCell
cell
=
xssfRow
.
getCell
(
config
.
getColumnPlace
());
if
(
"sn"
.
equals
(
config
.
getDataAttribute
())){
continue
;
...
...
@@ -392,7 +393,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
FileOutputStream
os
=
null
;
File
file
=
null
;
try
{
file
=
File
.
createTempFile
(
generated
,
".
doc
x"
);
file
=
File
.
createTempFile
(
generated
,
".
xls
x"
);
os
=
new
FileOutputStream
(
file
);
xssfWorkbook
.
write
(
os
);
os
.
flush
();
...
...
@@ -442,8 +443,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
for
(
EntrustSampleVO
vo:
sampleVOList
)
{
XSSFRow
xssfRow
=
sheetOne
.
getRow
(
beginRow
);
for
(
OriginalTemplateConfig
config:
configList
)
{
List
<
EntrustSampleItemIndex
>
indexList
=
entrustSampleItemIndexService
.
listBySampleId
(
vo
.
getId
());
vo
.
setIndexList
(
indexList
);
for
(
EntrustReportTemplateConfig
config:
configList
)
{
if
(
null
==
config
.
getColumnPlace
()){
continue
;
}
...
...
@@ -458,7 +460,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
sn
++;
}
for
(
Original
TemplateConfig
config:
configList
)
{
for
(
EntrustReport
TemplateConfig
config:
configList
)
{
if
(
null
==
config
.
getMergeRowNum
()){
config
.
setMergeRowNum
(
1
);
}
...
...
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
View file @
7d251600
...
...
@@ -144,7 +144,7 @@
<select
id=
"selectVOListBySampleIds"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO"
>
SELECT i.id,i.name,i.agreed_value,i.test_value,i.standard,s.code AS "sampleCode"
SELECT i.id,i.name,i.agreed_value,i.test_value,i.
entrust_sample_id,i.
standard,s.code AS "sampleCode"
FROM
entrust_sample_item i
JOIN entrust_sample s ON i.entrust_sample_id = s.ID
...
...
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