Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
0cae970d
Commit
0cae970d
authored
Jun 27, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改参数类型,加排序
parent
edd06982
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
InstructionsController.java
.../amos/fas/business/controller/InstructionsController.java
+3
-6
IContingencyPlanInstanceRepository.java
...ss/dao/repository/IContingencyPlanInstanceRepository.java
+11
-0
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/InstructionsController.java
View file @
0cae970d
...
...
@@ -9,10 +9,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -30,8 +27,8 @@ public class InstructionsController {
*/
@Permission
@ApiOperation
(
value
=
"指令流查询API"
,
notes
=
"指令流查询API"
)
@GetMapping
(
value
=
"/
{code}
"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
createPlan
(
@PathVariable
(
value
=
"code"
)
String
code
)
{
@GetMapping
(
value
=
"/
getBatchNoByCode
"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
getBatchNoByCode
(
@RequestParam
(
value
=
"code"
)
String
code
)
{
if
(
StringUtils
.
isEmpty
(
code
))
{
return
CommonResponseUtil2
.
failure
(
"参数有误"
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyPlanInstanceRepository.java
View file @
0cae970d
...
...
@@ -47,4 +47,15 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
List
<
ContingencyPlanInstance
>
queryForContent
(
String
batch_no
,
String
category
,
String
subCategory
);
Optional
<
ContingencyPlanInstance
>
findById
(
String
id
);
@Query
(
value
=
"SELECT "
+
" *"
+
" FROM "
+
" contingency_plan_instance t"
+
" WHERE"
+
" t.batch_no = ?"
+
" AND t.record_type = ?"
+
" ORDER BY"
+
" t.create_date DESC"
,
nativeQuery
=
true
)
List
<
ContingencyPlanInstance
>
queryForCategoryOrderByCreateDate
(
String
batch_no
,
String
recordType
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
0cae970d
...
...
@@ -284,7 +284,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if
(
StringUtils
.
isEmpty
(
batchNoByEquipId
))
{
return
list
;
}
List
<
ContingencyPlanInstance
>
instancesList
=
repository
.
queryForCategory
(
batchNoByEquipId
,
"MESSAGE"
);
List
<
ContingencyPlanInstance
>
instancesList
=
repository
.
queryForCategory
OrderByCreateDate
(
batchNoByEquipId
,
"MESSAGE"
);
instancesList
.
forEach
(
contingencyPlanInstance
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"crateDate"
,
contingencyPlanInstance
.
getCreateDate
());
...
...
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