Commit dac98d56 authored by 张森's avatar 张森

Merge remote-tracking branch 'origin/develop_dl' into develop_dl_4.0

parents a6599fb0 8ba5d81b
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<parent> <parent>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId> <artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
</parent> </parent>
<!-- <dependencies> <!-- <dependencies>
......
...@@ -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<>();
} }
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
<parent> <parent>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId> <artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysCommon</artifactId> <artifactId>YeeAmosFireAutoSysCommon</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
</dependency> </dependency>
<dependency> <dependency>
......
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")));
}
} }
...@@ -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);
} }
...@@ -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);
}
}
} }
...@@ -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");
......
...@@ -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);
} }
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);
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<parent> <parent>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId> <artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
</parent> </parent>
<dependencies> <dependencies>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<dependency> <dependency>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysService</artifactId> <artifactId>YeeAmosFireAutoSysService</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -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
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId> <artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>3.7.1.0</version> <version>3.7.2.3</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>YeeAmosFireAutoSysRoot</name> <name>YeeAmosFireAutoSysRoot</name>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment