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
69ae6245
Commit
69ae6245
authored
Jul 11, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预案智能辅助等API提交
parent
236b3034
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
8 deletions
+57
-8
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+23
-8
IContingencyPlanInstanceRepository.java
...ss/dao/repository/IContingencyPlanInstanceRepository.java
+11
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+16
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+7
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
69ae6245
...
...
@@ -150,23 +150,38 @@ public class PlanVisual3dController extends BaseController {
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@GetMapping
(
value
=
"/plan/getPlanStep/{batchNo}"
)
public
ResponseModel
getPlanStep
(
@PathVariable
(
"batchNo"
)
String
batchNo
)
{
String
newestBatchNo
=
planVisual3dService
.
getNewestBatchNo
();
if
(!
StringUtil
.
isNotEmpty
(
newestBatchNo
))
{
@GetMapping
(
value
=
"/plan/getPlanStep"
)
public
ResponseModel
getPlanStep
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
newestB
atchNo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
b
atchNo
));
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的记录"
,
notes
=
"根据R批次号获取预案的记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord/{batchNo}"
)
public
ResponseModel
getPlaneRecord
(
@PathVariable
(
"batchNo"
)
String
batchNo
)
{
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecordByBatchNo
(
batchNo
));
}
@Permission
@ApiOperation
(
value
=
"预案智能辅助"
,
notes
=
"预案智能辅助"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordOne"
)
public
ResponseModel
getPlaneRecordOne
()
{
String
newestBatchNo
=
planVisual3dService
.
getNewestBatchNo
();
if
(!
StringUtil
.
isNotEmpty
(
newestBatchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecordByBatchNo
(
newestBatchNo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecord
One
ByBatchNo
(
newestBatchNo
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyPlanInstanceRepository.java
View file @
69ae6245
...
...
@@ -70,4 +70,15 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
" ORDER BY"
+
" t.create_date ASC"
,
nativeQuery
=
true
)
List
<
Map
<
String
,
Object
>>
queryRecord
(
String
batchNo
,
String
recordType
);
@Query
(
value
=
"SELECT "
+
" t.content stepName, t.create_date time"
+
" FROM "
+
" contingency_plan_instance t"
+
" WHERE"
+
" t.batch_no = ?"
+
" AND t.record_type = ?"
+
" ORDER BY"
+
" t.create_date DESC limit 1"
,
nativeQuery
=
true
)
List
<
Map
<
String
,
Object
>>
queryRecordOne
(
String
batchNo
,
String
recordType
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
69ae6245
...
...
@@ -287,4 +287,20 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
return
toipResponse
;
}
@Override
public
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
)
{
// 根据批次号获取预案记录
List
<
Map
<
String
,
Object
>>
instancesList
=
contingencyPlanInstanceRepository
.
queryRecordOne
(
batchNo
,
"MESSAGE"
);
ToipResponse
toipResponse
=
new
ToipResponse
();
if
(!
ObjectUtils
.
isEmpty
(
instancesList
))
{
Map
<
String
,
Object
>
msgContext
=
new
HashMap
<>(
1
);
msgContext
.
put
(
"content"
,
instancesList
);
ContingencyOriginalData
contingencyOriginalData
=
contingencyOriginalDataDao
.
findByBatchNo
(
batchNo
);
toipResponse
.
setMsgType
(
"recordarea"
);
toipResponse
.
setMsgContext
(
msgContext
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
}
return
toipResponse
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
69ae6245
...
...
@@ -61,4 +61,11 @@ public interface IPlanVisual3dService {
* @return 预案记录
*/
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
);
/**
* 根据批次号获取预案记录
* @param batchNo 批次号
* @return 预案记录
*/
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
);
}
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