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
8ba5d81b
Commit
8ba5d81b
authored
Sep 09, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频配置保存API
parent
5cad9df5
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
0 deletions
+63
-0
PlanStepJsonVO.java
...ain/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
+4
-0
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+9
-0
EmergencyTaskRoleMapper.java
...amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
+2
-0
PlanStepServiceImpl.java
...n/amos/fas/business/service/impl/PlanStepServiceImpl.java
+11
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+22
-0
IPlanStepService.java
...oin/amos/fas/business/service/intfc/IPlanStepService.java
+2
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+4
-0
EmergencyTaskRoleMapper.xml
.../src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
+9
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
View file @
8ba5d81b
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.fas.dao.dto;
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.fas.dao.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
PlanStepJsonVO
{
public
class
PlanStepJsonVO
{
...
@@ -51,4 +53,6 @@ public class PlanStepJsonVO {
...
@@ -51,4 +53,6 @@ public class PlanStepJsonVO {
* 是否自动执行;1自动,0非自动
* 是否自动执行;1自动,0非自动
*/
*/
private
Integer
isAuto
;
private
Integer
isAuto
;
private
List
<
Map
<
String
,
String
>>
videos
=
new
ArrayList
<>();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
8ba5d81b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
...
@@ -338,4 +339,12 @@ public class PlanVisual3dController extends BaseController {
...
@@ -338,4 +339,12 @@ public class PlanVisual3dController extends BaseController {
String
roleNames
=
emergencyTaskService
.
getRolesNameByUserId
(
user
.
getUserId
());
String
roleNames
=
emergencyTaskService
.
getRolesNameByUserId
(
user
.
getUserId
());
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateTaskStatusById
(
id
,
runStatus
,
user
.
getRealName
(),
user
.
getUserId
(),
roleNames
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateTaskStatusById
(
id
,
runStatus
,
user
.
getRealName
(),
user
.
getUserId
(),
roleNames
));
}
}
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询预案下处置动作列表"
,
notes
=
"分页查询预案下处置动作列表"
)
@PostMapping
(
value
=
"/updatePlanStepData"
)
public
ResponseModel
updatePlanStepData
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
updatePlanStepData
(
map
.
get
(
"stepCode"
).
toString
(),
(
List
<
String
>)
map
.
get
(
"videos"
)));
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
View file @
8ba5d81b
...
@@ -35,4 +35,6 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
...
@@ -35,4 +35,6 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
List
<
EmergencyTaskRole
>
selectListFilterEmptyTask
();
List
<
EmergencyTaskRole
>
selectListFilterEmptyTask
();
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
void
updatePlanStepByPlanType
(
@Param
(
"planType"
)
String
planType
,
@Param
(
"planStepJson"
)
String
planStepJson
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanStepServiceImpl.java
View file @
8ba5d81b
...
@@ -82,4 +82,15 @@ public class PlanStepServiceImpl implements IPlanStepService {
...
@@ -82,4 +82,15 @@ public class PlanStepServiceImpl implements IPlanStepService {
redisTemplate
.
delete
(
"planTask"
);
redisTemplate
.
delete
(
"planTask"
);
// redisTemplate.opsForValue().set("planTask", "");
// redisTemplate.opsForValue().set("planTask", "");
}
}
@Override
public
void
updatePlanStepByPlanType
(
String
planStepJson
)
{
String
planType
=
""
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
if
(
StringUtils
.
isNotEmpty
(
planType
))
{
emergencyTaskRoleMapper
.
updatePlanStepByPlanType
(
planType
,
planStepJson
);
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
8ba5d81b
...
@@ -284,6 +284,28 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -284,6 +284,28 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
@Override
@Override
public
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
List
<
String
>
videos
)
{
String
json
=
planStepService
.
getPlanStep
();
List
<
PlanStepJsonVO
>
res
=
JSON
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
res
.
forEach
(
item
->
{
if
(
item
.
getStepCode
().
equals
(
stepCode
))
{
ArrayList
<
Map
<
String
,
String
>>
videoList
=
new
ArrayList
<>();
videos
.
forEach
(
t
->
{
Map
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"code"
,
t
.
split
(
"@"
)[
0
]);
hashMap
.
put
(
"name"
,
t
.
split
(
"@"
)[
1
]);
videoList
.
add
(
hashMap
);
});
item
.
setVideos
(
videoList
);
}
});
String
planStepJson
=
JSON
.
toJSONString
(
res
);
planStepService
.
updatePlanStepByPlanType
(
planStepJson
);
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
planStepJson
);
return
res
;
}
@Override
public
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
)
{
public
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
)
{
// 根据批次号获取预案记录
// 根据批次号获取预案记录
List
<
Map
<
String
,
Object
>>
instancesList
=
contingencyPlanInstanceRepository
.
queryRecord
(
batchNo
,
"MESSAGE"
);
List
<
Map
<
String
,
Object
>>
instancesList
=
contingencyPlanInstanceRepository
.
queryRecord
(
batchNo
,
"MESSAGE"
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanStepService.java
View file @
8ba5d81b
...
@@ -31,4 +31,6 @@ public interface IPlanStepService {
...
@@ -31,4 +31,6 @@ public interface IPlanStepService {
void
initPlanStep
();
void
initPlanStep
();
void
initPlanTask
();
void
initPlanTask
();
void
updatePlanStepByPlanType
(
String
planStepJson
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
8ba5d81b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.business.vo.*
;
...
@@ -142,4 +144,6 @@ public interface IPlanVisual3dService {
...
@@ -142,4 +144,6 @@ public interface IPlanVisual3dService {
ContingencyPlanInstance
updateStatusByIdWeb
(
ContingencyPlanInstance
contingencyPlanInstance
,
Boolean
runStatus
);
ContingencyPlanInstance
updateStatusByIdWeb
(
ContingencyPlanInstance
contingencyPlanInstance
,
Boolean
runStatus
);
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
);
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
);
List
<
PlanStepJsonVO
>
updatePlanStepData
(
String
stepCode
,
List
<
String
>
videos
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
View file @
8ba5d81b
...
@@ -91,4 +91,12 @@
...
@@ -91,4 +91,12 @@
WHERE
WHERE
`obligationId` = #{roleId}
`obligationId` = #{roleId}
</delete>
</delete>
<update
id=
"updatePlanStepByPlanType"
>
UPDATE
c_plan_step_config
SET `data` = #{planStepJson}
WHERE
`type` = #{planType}
</update>
</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