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
c91c900c
Commit
c91c900c
authored
Aug 25, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预案步骤查询优化
parent
4b49dd73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
IContingencyPlanInstanceRepository.java
...ss/dao/repository/IContingencyPlanInstanceRepository.java
+2
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+3
-8
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyPlanInstanceRepository.java
View file @
c91c900c
...
@@ -85,5 +85,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
...
@@ -85,5 +85,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
@Query
(
value
=
"SELECT * FROM `contingency_plan_instance` WHERE batch_no = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT * FROM `contingency_plan_instance` WHERE batch_no = ?1"
,
nativeQuery
=
true
)
List
<
ContingencyPlanInstance
>
findByBatchNo
(
String
batchNo
);
List
<
ContingencyPlanInstance
>
findByBatchNo
(
String
batchNo
);
@Query
(
value
=
"SELECT id FROM `contingency_plan_instance` WHERE batch_no = ?1 AND record_type = ?2 ORDER BY sort DESC LIMIT 1"
,
nativeQuery
=
true
)
String
findByBatchNoAndRecordType
(
String
batchNo
,
String
recordType
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
c91c900c
...
@@ -246,8 +246,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -246,8 +246,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
@Override
public
ToipResponse
getPlanStepByBatchNo
(
String
batchNo
)
{
public
ToipResponse
getPlanStepByBatchNo
(
String
batchNo
)
{
ToipResponse
toipResponse
=
new
ToipResponse
();
ToipResponse
toipResponse
=
new
ToipResponse
();
// 根据批次号查询预案步骤
// String planStep = planOperationRecordMapper.getPlanStepByBatchNo(batchNo);
String
planStep
=
""
;
String
planStep
=
""
;
if
(
redisTemplate
.
hasKey
(
"planStep"
))
{
if
(
redisTemplate
.
hasKey
(
"planStep"
))
{
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
...
@@ -265,12 +263,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -265,12 +263,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
msgContext
.
put
(
"currentStep"
,
contingencyOriginalData
.
getStep
());
msgContext
.
put
(
"currentStep"
,
contingencyOriginalData
.
getStep
());
msgContext
.
put
(
"confirm"
,
contingencyOriginalData
.
getConfirm
());
msgContext
.
put
(
"confirm"
,
contingencyOriginalData
.
getConfirm
());
msgContext
.
put
(
"createDate"
,
contingencyOriginalData
.
getCreateDate
());
msgContext
.
put
(
"createDate"
,
contingencyOriginalData
.
getCreateDate
());
List
<
ContingencyPlanInstance
>
list
=
contingencyPlanInstanceRepository
.
findByBatchNo
(
batchNo
);
String
caseId
=
contingencyPlanInstanceRepository
.
findByBatchNoAndRecordType
(
batchNo
,
"OPERATE"
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(
StringUtils
.
isNotEmpty
(
caseId
))
{
List
<
ContingencyPlanInstance
>
collect
=
list
.
stream
().
filter
(
x
->
"OPERATE"
.
equals
(
x
.
getRecordType
())).
collect
(
Collectors
.
toList
());
msgContext
.
put
(
"caseId"
,
caseId
);
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
msgContext
.
put
(
"caseId"
,
collect
.
get
(
0
).
getId
());
}
}
}
toipResponse
.
setMsgType
(
"steparea"
);
toipResponse
.
setMsgType
(
"steparea"
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
...
...
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