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
d8cd9aa2
Commit
d8cd9aa2
authored
Jul 22, 2021
by
ghxdhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加orderBy字段排序
parent
7de04c42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+2
-1
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/EntrustSampleItemServiceImpl.java
View file @
d8cd9aa2
...
@@ -510,6 +510,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
...
@@ -510,6 +510,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if
(
CollectionUtils
.
isEmpty
(
voList
))
{
if
(
CollectionUtils
.
isEmpty
(
voList
))
{
return
null
;
return
null
;
}
}
voList
=
voList
.
stream
().
sorted
(
Comparator
.
comparing
(
item
->
item
.
getOrderBy
())).
collect
(
Collectors
.
toList
());
Entrust
entrust
=
entrustService
.
getById
(
voList
.
get
(
0
).
getEntrustId
());
Entrust
entrust
=
entrustService
.
getById
(
voList
.
get
(
0
).
getEntrustId
());
InputStream
io
=
ossClient
.
download
(
template
.
getObjectKey
());
InputStream
io
=
ossClient
.
download
(
template
.
getObjectKey
());
if
(
null
==
io
)
{
if
(
null
==
io
)
{
...
@@ -542,7 +543,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
...
@@ -542,7 +543,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
for
(
EntrustSampleItemVO
itemVO
:
voList
)
{
for
(
EntrustSampleItemVO
itemVO
:
voList
)
{
sampleIdsList
.
add
(
itemVO
.
getEntrustSampleId
());
sampleIdsList
.
add
(
itemVO
.
getEntrustSampleId
());
}
}
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
));
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
)
.
orderBy
(
"order_by"
,
true
)
);
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
mapReplace
.
put
(
"#{sampleFrom}"
,
sampleList
.
get
(
0
).
getSampleFrom
());
mapReplace
.
put
(
"#{sampleFrom}"
,
sampleList
.
get
(
0
).
getSampleFrom
());
mapReplace
.
put
(
"#{sampleName}"
,
sampleList
.
get
(
0
).
getName
());
mapReplace
.
put
(
"#{sampleName}"
,
sampleList
.
get
(
0
).
getName
());
...
...
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
View file @
d8cd9aa2
...
@@ -249,7 +249,7 @@
...
@@ -249,7 +249,7 @@
<select
id=
"selectVOListByIds"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO"
>
<select
id=
"selectVOListByIds"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO"
>
SELECT i.id,i.name,i.entrust_sample_id,s.entrust_id,i.agreed_value,i.test_value,i.standard,s.code AS
SELECT i.id,i.name,i.entrust_sample_id,s.entrust_id,i.agreed_value,i.test_value,i.standard,s.code AS
"sampleCode",s.name AS "sampleName",
"sampleCode",s.name AS "sampleName",
s.order_by,
s.sample_shape ,s.sample_quantity, s.standard, s.sample_from,s.product_code,s.name_code
s.sample_shape ,s.sample_quantity, s.standard, s.sample_from,s.product_code,s.name_code
FROM
FROM
entrust_sample_item i
entrust_sample_item i
...
...
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