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
64ad9f28
Commit
64ad9f28
authored
Sep 12, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应急处置流程视频配置增加绑定换流变逻辑
parent
601836e7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
19 deletions
+92
-19
PlanStepJsonVO.java
...ain/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
+2
-1
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+11
-1
EmergencyTaskRoleMapper.java
...amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
+3
-0
PlanStepServiceImpl.java
...n/amos/fas/business/service/impl/PlanStepServiceImpl.java
+9
-3
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+36
-11
IPlanStepService.java
...oin/amos/fas/business/service/intfc/IPlanStepService.java
+1
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+9
-2
EmergencyTaskRoleMapper.xml
.../src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
+21
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
View file @
64ad9f28
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.dao.dto;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.dao.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -54,5 +55,5 @@ public class PlanStepJsonVO {
...
@@ -54,5 +55,5 @@ public class PlanStepJsonVO {
*/
*/
private
Integer
isAuto
;
private
Integer
isAuto
;
private
List
<
Map
<
String
,
String
>>
videos
=
new
ArrayList
<>();
private
Map
<
String
,
List
<
Map
<
String
,
String
>>>
videos
=
new
HashMap
<>();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
64ad9f28
...
@@ -169,6 +169,13 @@ public class PlanVisual3dController extends BaseController {
...
@@ -169,6 +169,13 @@ public class PlanVisual3dController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
value
=
"根据电力装备Code获取"
,
notes
=
"根据电力装备Code获取"
)
@GetMapping
(
value
=
"/getPlanStepByEquipCode"
)
public
ResponseModel
getPlanStepByEquipCode
(
@RequestParam
(
value
=
"equipCode"
)
String
equipCode
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByEquipCode
(
equipCode
));
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@GetMapping
(
value
=
"/plan/step/tree"
)
@GetMapping
(
value
=
"/plan/step/tree"
)
public
ResponseModel
getPlanStepTree
(
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
)
{
public
ResponseModel
getPlanStepTree
(
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
)
{
...
@@ -345,6 +352,9 @@ public class PlanVisual3dController extends BaseController {
...
@@ -345,6 +352,9 @@ public class PlanVisual3dController extends BaseController {
@PostMapping
(
value
=
"/updatePlanStepData"
)
@PostMapping
(
value
=
"/updatePlanStepData"
)
public
ResponseModel
updatePlanStepData
(
@RequestBody
Map
<
String
,
Object
>
map
public
ResponseModel
updatePlanStepData
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
)
{
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
updatePlanStepData
(
map
.
get
(
"stepCode"
).
toString
(),
(
List
<
String
>)
map
.
get
(
"videos"
)));
String
stepCode
=
map
.
get
(
"stepCode"
).
toString
();
String
equipCode
=
map
.
get
(
"equipCode"
).
toString
();
List
<
String
>
videos
=
(
List
<
String
>)
map
.
get
(
"videos"
);
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
updatePlanStepData
(
stepCode
,
equipCode
,
videos
));
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
View file @
64ad9f28
...
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
public
interface
EmergencyTaskRoleMapper
extends
BaseMapper
<
EmergencyTaskRole
>
{
public
interface
EmergencyTaskRoleMapper
extends
BaseMapper
<
EmergencyTaskRole
>
{
...
@@ -37,4 +38,6 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
...
@@ -37,4 +38,6 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
void
updatePlanStepByPlanType
(
@Param
(
"planType"
)
String
planType
,
@Param
(
"planStepJson"
)
String
planStepJson
);
void
updatePlanStepByPlanType
(
@Param
(
"planType"
)
String
planType
,
@Param
(
"planStepJson"
)
String
planStepJson
);
Map
<
String
,
String
>
queryPlanStepByEquipCode
(
@Param
(
"equipCode"
)
String
equipCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanStepServiceImpl.java
View file @
64ad9f28
...
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
...
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
...
@@ -84,10 +85,15 @@ public class PlanStepServiceImpl implements IPlanStepService {
...
@@ -84,10 +85,15 @@ public class PlanStepServiceImpl implements IPlanStepService {
}
}
@Override
@Override
public
void
updatePlanStepByPlanType
(
String
planStepJson
)
{
public
void
updatePlanStepByPlanType
(
String
equipCode
,
String
planStepJson
)
{
String
planType
=
""
;
String
planType
=
""
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
equipCode
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
Map
<
String
,
String
>
planStepMap
=
emergencyTaskRoleMapper
.
queryPlanStepByEquipCode
(
equipCode
);
planType
=
planStepMap
.
get
(
"type"
);
}
else
{
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
}
}
if
(
StringUtils
.
isNotEmpty
(
planType
))
{
if
(
StringUtils
.
isNotEmpty
(
planType
))
{
emergencyTaskRoleMapper
.
updatePlanStepByPlanType
(
planType
,
planStepJson
);
emergencyTaskRoleMapper
.
updatePlanStepByPlanType
(
planType
,
planStepJson
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
64ad9f28
...
@@ -126,6 +126,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -126,6 +126,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Lazy
@Lazy
@Autowired
@Autowired
private
IEmergencyTaskService
emergencyTaskService
;
private
IEmergencyTaskService
emergencyTaskService
;
@Autowired
private
EmergencyTaskRoleMapper
emergencyTaskRoleMapper
;
@Override
@Override
public
void
uploadTextPlan
(
String
appId
,
Map
<
String
,
String
>
pathNameMap
)
{
public
void
uploadTextPlan
(
String
appId
,
Map
<
String
,
String
>
pathNameMap
)
{
...
@@ -275,6 +277,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -275,6 +277,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
return
toipResponse
;
return
toipResponse
;
}
}
/**
* 根据电力装备Code获取
*
* @param equipCode 电力装备Code
* @return 预案步骤
*/
@Override
public
JSONArray
getPlanStepByEquipCode
(
String
equipCode
)
{
Map
<
String
,
String
>
planStepMap
=
emergencyTaskRoleMapper
.
queryPlanStepByEquipCode
(
equipCode
);
String
planStep
=
planStepMap
.
get
(
"data"
);
return
JSON
.
parseArray
(
planStep
);
}
@Override
@Override
public
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
)
{
public
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
)
{
String
json
=
planStepService
.
getPlanStep
();
String
json
=
planStepService
.
getPlanStep
();
...
@@ -283,25 +298,35 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -283,25 +298,35 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
@Override
@Override
public
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
List
<
String
>
videos
)
{
public
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
String
equipCode
,
List
<
String
>
videos
)
{
String
json
=
planStepService
.
getPlanStep
();
String
planStep
=
""
;
List
<
PlanStepJsonVO
>
res
=
JSON
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
equipCode
))
{
res
.
forEach
(
item
->
{
Map
<
String
,
String
>
planStepMap
=
emergencyTaskRoleMapper
.
queryPlanStepByEquipCode
(
equipCode
);
if
(
item
.
getStepCode
().
equals
(
stepCode
))
{
planStep
=
planStepMap
.
get
(
"data"
);
}
else
{
planStep
=
planStepService
.
getPlanStep
();
}
List
<
PlanStepJsonVO
>
planStepJsonVOS
=
JSON
.
parseArray
(
planStep
,
PlanStepJsonVO
.
class
);
for
(
PlanStepJsonVO
planStepJsonVO
:
planStepJsonVOS
)
{
if
(
planStepJsonVO
.
getStepCode
().
equals
(
stepCode
))
{
ArrayList
<
Map
<
String
,
String
>>
videoList
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
String
>>
videoList
=
new
ArrayList
<>();
Map
<
String
,
List
<
Map
<
String
,
String
>>>
videosMap
=
planStepJsonVO
.
getVideos
();
videos
.
forEach
(
t
->
{
videos
.
forEach
(
t
->
{
Map
<
String
,
String
>
hashMap
=
new
HashMap
<>();
Map
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"code"
,
t
.
split
(
"@"
)[
0
]);
hashMap
.
put
(
"code"
,
t
.
split
(
"@"
)[
0
]);
hashMap
.
put
(
"name"
,
t
.
split
(
"@"
)[
1
]);
hashMap
.
put
(
"name"
,
t
.
split
(
"@"
)[
1
]);
videoList
.
add
(
hashMap
);
videoList
.
add
(
hashMap
);
});
});
item
.
setVideos
(
videoList
);
videosMap
.
put
(
equipCode
,
videoList
);
planStepJsonVO
.
setVideos
(
videosMap
);
}
}
});
}
String
planStepJson
=
JSON
.
toJSONString
(
res
);
String
planStepJson
=
JSON
.
toJSONString
(
planStepJsonVOS
);
planStepService
.
updatePlanStepByPlanType
(
planStepJson
);
planStepService
.
updatePlanStepByPlanType
(
equipCode
,
planStepJson
);
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
planStepJson
);
if
(!
org
.
springframework
.
util
.
StringUtils
.
hasText
(
equipCode
))
{
return
res
;
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
planStepJson
);
}
return
planStepJsonVOS
;
}
}
@Override
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanStepService.java
View file @
64ad9f28
...
@@ -32,5 +32,5 @@ public interface IPlanStepService {
...
@@ -32,5 +32,5 @@ public interface IPlanStepService {
void
initPlanTask
();
void
initPlanTask
();
void
updatePlanStepByPlanType
(
String
planStepJson
);
void
updatePlanStepByPlanType
(
String
equipCode
,
String
planStepJson
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
64ad9f28
...
@@ -48,7 +48,7 @@ public interface IPlanVisual3dService {
...
@@ -48,7 +48,7 @@ public interface IPlanVisual3dService {
* @return
* @return
*/
*/
String
getNewestBatchNo
();
String
getNewestBatchNo
();
/**
/**
* 查最新的批次号
* 查最新的批次号
...
@@ -64,6 +64,13 @@ public interface IPlanVisual3dService {
...
@@ -64,6 +64,13 @@ public interface IPlanVisual3dService {
* @return 预案步骤
* @return 预案步骤
*/
*/
ToipResponse
getPlanStepByBatchNo
(
String
batchNo
);
ToipResponse
getPlanStepByBatchNo
(
String
batchNo
);
/**
* 根据电力装备Code获取
*
* @param equipCode 电力装备Code
* @return 预案步骤
*/
JSONArray
getPlanStepByEquipCode
(
String
equipCode
);
/**
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
...
@@ -145,5 +152,5 @@ public interface IPlanVisual3dService {
...
@@ -145,5 +152,5 @@ public interface IPlanVisual3dService {
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
);
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
);
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
List
<
String
>
videos
);
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
String
equipCode
,
List
<
String
>
videos
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
View file @
64ad9f28
...
@@ -99,4 +99,24 @@
...
@@ -99,4 +99,24 @@
WHERE
WHERE
`type` = #{planType}
`type` = #{planType}
</update>
</update>
<select
id=
"queryPlanStepByEquipCode"
resultType=
"java.util.Map"
>
SELECT
*
FROM
c_plan_step_config
WHERE
id = (
SELECT DISTINCT
( t3.classify_id )
FROM
f_equipment t1
LEFT JOIN c_plan_equipment t2 ON t2.fire_equipment_id = t1.id
LEFT JOIN c_plan_detail t3 ON t3.id = t2.plan_id
WHERE
t1.code = #{equipCode}
ORDER BY t1.create_date desc
LIMIT 1
)
</select>
</mapper>
</mapper>
\ No newline at end of file
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