Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
84a8172a
Commit
84a8172a
authored
Oct 14, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ymt):安全技术档案管理, D1_A3 8大类设备技术档案列表信息添加排序
parent
5756be0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+10
-1
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
84a8172a
...
@@ -175,6 +175,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -175,6 +175,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
static
final
String
LEVEL
=
"company"
;
private
static
final
String
LEVEL
=
"company"
;
private
static
final
String
EQUSTATE
=
"EQU_STATE"
;
private
static
final
String
EQUSTATE
=
"EQU_STATE"
;
private
static
final
String
USEPLACE
=
"USE_PLACE"
;
private
static
final
String
USEPLACE
=
"USE_PLACE"
;
private
static
final
String
REC_DATE
=
"REC_DATE"
;
@Autowired
@Autowired
ESEquipmentCategory
esEquipmentCategory
;
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
@Autowired
...
@@ -2159,13 +2160,20 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -2159,13 +2160,20 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
boolMust
.
must
(
meBuilder
);
boolMust
.
must
(
meBuilder
);
}
}
builder
.
query
(
boolMust
);
builder
.
query
(
boolMust
);
builder
.
sort
(
"REC_DATE"
,
SortOrder
.
DESC
);
builder
.
sort
(
"REC_DATE"
,
Optional
.
ofNullable
(
map
.
getString
(
"sort"
))
.
map
(
s
->
s
.
split
(
","
))
.
filter
(
sortParams
->
"ascend"
.
equals
(
sortParams
[
1
]))
.
map
(
s
->
SortOrder
.
ASC
)
.
orElse
(
SortOrder
.
DESC
));
builder
.
from
((
map
.
getInteger
(
"number"
)
-
1
)
*
map
.
getInteger
(
"size"
));
builder
.
from
((
map
.
getInteger
(
"number"
)
-
1
)
*
map
.
getInteger
(
"size"
));
builder
.
size
(
map
.
getInteger
(
"size"
));
builder
.
size
(
map
.
getInteger
(
"size"
));
request
.
source
(
builder
);
request
.
source
(
builder
);
List
<
JSONObject
>
list
=
new
LinkedList
<>();
List
<
JSONObject
>
list
=
new
LinkedList
<>();
long
totle
=
0
;
long
totle
=
0
;
try
{
try
{
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
for
(
org
.
elasticsearch
.
search
.
SearchHit
hit
:
response
.
getHits
().
getHits
())
{
for
(
org
.
elasticsearch
.
search
.
SearchHit
hit
:
response
.
getHits
().
getHits
())
{
System
.
out
.
println
(
hit
);
System
.
out
.
println
(
hit
);
...
@@ -2176,6 +2184,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -2176,6 +2184,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
status
=
EquimentEnum
.
getName
.
get
(
integer
);
String
status
=
EquimentEnum
.
getName
.
get
(
integer
);
dto2
.
put
(
EQUSTATE
,
status
);
dto2
.
put
(
EQUSTATE
,
status
);
}
}
dto2
.
put
(
REC_DATE
,
dateFormat
.
format
(
dto2
.
get
(
REC_DATE
)));
list
.
add
(
dto2
);
list
.
add
(
dto2
);
}
}
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
totle
=
response
.
getInternalResponse
().
hits
().
getTotalHits
().
value
;
...
...
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