Commit 456ed99e authored by KeYong's avatar KeYong

更新

parent 98c50fc0
...@@ -79,6 +79,28 @@ public class ContingencyPlanInstance extends BusinessEntity{ ...@@ -79,6 +79,28 @@ public class ContingencyPlanInstance extends BusinessEntity{
@Column(name = "person_img") @Column(name = "person_img")
private String personImg; private String personImg;
@Column(name = "task_sort")
private Integer taskSort;
@Column(name = "step_code")
private String stepCode;
public void setTaskSort(Integer taskSort) {
this.taskSort = taskSort;
}
public void setStepCode(String stepCode) {
this.stepCode = stepCode;
}
public Integer getTaskSort() {
return taskSort;
}
public String getStepCode() {
return stepCode;
}
public String getPersonImg() { public String getPersonImg() {
return personImg; return personImg;
} }
...@@ -184,8 +206,6 @@ public class ContingencyPlanInstance extends BusinessEntity{ ...@@ -184,8 +206,6 @@ public class ContingencyPlanInstance extends BusinessEntity{
this.content = content; this.content = content;
} }
public String getIcon() { public String getIcon() {
return icon; return icon;
} }
......
...@@ -31,4 +31,6 @@ public class EmergencyRelationTree extends BasicEntity { ...@@ -31,4 +31,6 @@ public class EmergencyRelationTree extends BasicEntity {
//树节点展示标识 //树节点展示标识
private String type; private String type;
private String code;
} }
\ No newline at end of file
...@@ -972,4 +972,32 @@ public class ContingencyAction implements CustomerAction { ...@@ -972,4 +972,32 @@ public class ContingencyAction implements CustomerAction {
private Boolean findByBatchNoAndStatus(String batchNo) { private Boolean findByBatchNoAndStatus(String batchNo) {
return CollectionUtils.isEmpty(planOperationRecordDao.findByBatchNoAndStatus(batchNo, 0)); return CollectionUtils.isEmpty(planOperationRecordDao.findByBatchNoAndStatus(batchNo, 0));
} }
/**
* 任务动作保存
* @param taskName 任务名称
*
*/
@RuleMethod(methodLabel = "任务动作保存", project = "换流站消防专项预案")
@Transactional
public void saveTaskInfo(@MethodParam(paramLabel = "动作名称") String taskName, @MethodParam(paramLabel = "角色编码") String roleCode, @MethodParam(paramLabel = "任务编号") Integer taskNum, @MethodParam(paramLabel = "步骤编码") String stepCode, @MethodParam(paramLabel = "按钮json字符串") String buttonJson, @MethodParam(paramLabel = "预案对象") Object paramObj) {
ContingencyRo contingencyRo = (ContingencyRo) paramObj;
String batchNo = contingencyRo.getBatchNo();
if (!findByBatchNoAndStatus(batchNo)) {
String instanceId = iContingencyInstance.getInstanceIdByBatchNOAndCategory("TASKOPERATE", taskName, batchNo);
if (!StringUtils.isEmpty(instanceId)) {
return;
}
ContingencyPlanInstance contingencyPlanInstance = new ContingencyPlanInstance();
contingencyPlanInstance.setBatchNo(batchNo);
contingencyPlanInstance.setRecordType("TASKOPERATE");
contingencyPlanInstance.setRoleCode(roleCode);
contingencyPlanInstance.setCategory(taskName);
contingencyPlanInstance.setCreateDate(new Date());
contingencyPlanInstance.setTaskSort(taskNum);
contingencyPlanInstance.setStepCode(stepCode);
contingencyPlanInstance.setContent(buttonJson);
contingencyPlanInstanceRepository.save(contingencyPlanInstance);
}
}
} }
...@@ -257,4 +257,35 @@ public class ContingencyPlanController extends BaseController { ...@@ -257,4 +257,35 @@ public class ContingencyPlanController extends BaseController {
return CommonResponseUtil2.success(contingencyPlanService.getUserOperateCountAndPlanName(roleModelList)); return CommonResponseUtil2.success(contingencyPlanService.getUserOperateCountAndPlanName(roleModelList));
} }
@ApiOperation(value = "获取当前登录人待处置任务及预案信息")
@RequestMapping(value = "/getUserOperateCountAndTaskName", method = RequestMethod.GET)
public ResponseModel getUserOperateCountAndTaskName() {
AgencyUserModel user = getUserInfo();
List<RoleModel> roleModelList = new ArrayList<>();
for (Long key : user.getOrgRoles().keySet()) {
roleModelList.addAll(user.getOrgRoles().get(key));
}
return CommonResponseUtil2.success(contingencyPlanService.getUserOperateCountAndTaskName(roleModelList));
}
@ApiOperation(value = "获取当前登录人待处置任务及预案信息")
@GetMapping(value = "/task/page")
public ResponseModel selectTaskActionPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "batchNo", required = false) String batchNo,
@RequestParam(value = "runState", required = false) String runState,
@RequestParam(value = "updateDate", required = false) String updateDate,
@RequestParam(value = "roleName", required = false) String roleName
) {
if (current < 1 || size < 1) {
throw new YeeException("分页参数有误");
}
List<String> list = new ArrayList<>();
if (!StringUtils.isEmpty(roleName)) {
String[] ids = new String(roleName).split(",");
list = Arrays.asList(ids);
}
return CommonResponseUtil2.success(contingencyPlanService.selectTaskActionPage(current, size, batchNo, runState, updateDate, list));
}
} }
...@@ -46,6 +46,7 @@ public class EmergencyTaskController extends BaseController{ ...@@ -46,6 +46,7 @@ public class EmergencyTaskController extends BaseController{
tree.setId(e.getId()); tree.setId(e.getId());
tree.setName(e.getDictName()); tree.setName(e.getDictName());
tree.setType("0"); tree.setType("0");
tree.setCode(e.getDictValue());
tree.setChildren(treeNodes.stream().filter(t->t.getObligationId().equals(e.getId())).collect(Collectors.toList())); tree.setChildren(treeNodes.stream().filter(t->t.getObligationId().equals(e.getId())).collect(Collectors.toList()));
list.add(tree); list.add(tree);
}); });
......
...@@ -251,9 +251,50 @@ public class PlanVisual3dController extends BaseController { ...@@ -251,9 +251,50 @@ public class PlanVisual3dController extends BaseController {
} }
@Permission @Permission
@ApiOperation(httpMethod = "GET", value = "分页查询预案下处置动作列表", notes = "分页查询预案下处置动作列表")
@GetMapping(value = "/plan/selectTaskActionPage")
public ResponseModel selectTaskActionPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "batchNo") String batchNo,
@RequestParam(value = "dataType") int dataType
) {
if (current < 1 || size < 1) {
throw new YeeException("分页参数有误");
}
AgencyUserModel user = getUserInfo();
List<RoleModel> roleModelList = new ArrayList<>();
for (Long key : user.getOrgRoles().keySet()) {
roleModelList.addAll(user.getOrgRoles().get(key));
}
return CommonResponseUtil2.success(planVisual3dService.selectTaskActionPage(current, size, batchNo, roleModelList, dataType));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "查询预案下处置动作列表", notes = "查询预案下处置动作列表")
@GetMapping(value = "/plan/selectTaskActionList")
public ResponseModel selectTaskActionList(@RequestParam(value = "batchNo") String batchNo,
@RequestParam(value = "dataType") int dataType
) {
AgencyUserModel user = getUserInfo();
List<RoleModel> roleModelList = new ArrayList<>();
for (Long key : user.getOrgRoles().keySet()) {
roleModelList.addAll(user.getOrgRoles().get(key));
}
return CommonResponseUtil2.success(planVisual3dService.selectTaskActionList(batchNo, roleModelList, dataType));
}
@Permission
@ApiOperation(value = "修改动作执行状态", notes = "修改动作执行状态") @ApiOperation(value = "修改动作执行状态", notes = "修改动作执行状态")
@PostMapping(value = "/updateStatusById") @PostMapping(value = "/updateStatusById")
public ResponseModel updateStatusById(@RequestParam("id") String id, @RequestParam("runStatus") Boolean runStatus) { public ResponseModel updateStatusById(@RequestParam("id") String id, @RequestParam("runStatus") Boolean runStatus) {
return CommonResponseUtil.successNew(planVisual3dService.updateStatusById(id, runStatus)); return CommonResponseUtil.successNew(planVisual3dService.updateStatusById(id, runStatus));
} }
@Permission
@ApiOperation(value = "修改任务动作执行状态", notes = "修改任务动作执行状态")
@PostMapping(value = "/status/modify")
public ResponseModel updateTaskStatusById(@RequestParam("id") String id, @RequestParam("runStatus") Boolean runStatus) {
return CommonResponseUtil.successNew(planVisual3dService.updateTaskStatusById(id, runStatus));
}
} }
...@@ -79,6 +79,16 @@ public class TimeLineController extends BaseController { ...@@ -79,6 +79,16 @@ public class TimeLineController extends BaseController {
} }
@Permission @Permission
@ApiOperation(httpMethod = "POST", value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/click", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse clickButton(@RequestBody PlanExecuteVo vo) throws Exception {
AgencyUserModel userInfo = getUserInfo();
String user = userInfo.getRealName();
iContingencyInstance.clickButton(vo.getBatchNo(), vo.getStepCode(), vo.getButtonJson(), vo.getContingencyPlanId(), vo.getButtonCode(), vo.getConfirm(), vo.getStepState(), "true", "false", getToken(), getProduct(), getAppKey(), user);
return CommonResponseUtil.success("SUCCESS");
}
@Permission
@ApiOperation(httpMethod = "PUT", value = "点击按钮", notes = "点击按钮") @ApiOperation(httpMethod = "PUT", value = "点击按钮", notes = "点击按钮")
@RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/fire/exit", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse fireExit(@RequestParam("batchNo") String batchNo, public CommonResponse fireExit(@RequestParam("batchNo") String batchNo,
......
...@@ -26,8 +26,18 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns ...@@ -26,8 +26,18 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
List<ContingencyPlanInstanceVO> selectDisposalActionPage(@Param("current") int current, @Param("size") int size,@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo); List<ContingencyPlanInstanceVO> selectDisposalActionPage(@Param("current") int current, @Param("size") int size,@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo);
List<ContingencyPlanInstanceVO> selectTaskActionPage(@Param("current") int current, @Param("size") int size,@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo);
int selectCountDisposalActionPage(@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo); int selectCountDisposalActionPage(@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo);
int selectCountTaskActionPage(@Param("type") String type, @Param("status") String status,@Param("list") List<String> roles ,@Param("batchNo") String batchNo);
List<ContingencyPlanInstanceVO> selectDisposalActionList(@Param("type") String type, @Param("status") String status, @Param("list") List<String> roles , @Param("batchNo") String batchNo); List<ContingencyPlanInstanceVO> selectDisposalActionList(@Param("type") String type, @Param("status") String status, @Param("list") List<String> roles , @Param("batchNo") String batchNo);
List<ContingencyPlanInstanceVO> selectTaskActionList(@Param("type") String type, @Param("status") String status, @Param("list") List<String> roles , @Param("batchNo") String batchNo);
int countTaskPage(@Param("type") String type, @Param("batchNo") String batchNo, @Param("list") List<String> roles);
List<ContingencyPlanInstanceVO> getTaskActionPage(@Param("current") int current, @Param("size") int size, @Param("batchNo") String batchNo, @Param("type") String type, @Param("runState") String runState, @Param("updateDate") String updateDate, @Param("list") List<String> roles);
} }
...@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl; ...@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl;
import com.yeejoin.amos.fas.business.service.intfc.*; import com.yeejoin.amos.fas.business.service.intfc.*;
import com.yeejoin.amos.fas.business.service.model.Operate; import com.yeejoin.amos.fas.business.service.model.Operate;
import com.yeejoin.amos.fas.business.service.model.OperateGroup; import com.yeejoin.amos.fas.business.service.model.OperateGroup;
import com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO;
import com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData; import com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance; import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.Equipment; import com.yeejoin.amos.fas.dao.entity.Equipment;
...@@ -116,7 +117,7 @@ public class BizContingencyHandler implements EventHandler{ ...@@ -116,7 +117,7 @@ public class BizContingencyHandler implements EventHandler{
event.getPlanExecute().getButtonCode(), event.getPlanExecute().getButtonCode(),
event.getPlanExecute().getIsExecute(), event.getPlanExecute().getIsExecute(),
event.getPlanExecute().getIsAuto()); event.getPlanExecute().getIsAuto());
setButtonExecuted( event.getPlanExecute().getBatchNo(), setButtonExecuted(event.getPlanExecute().getBatchNo(),
event.getPlanExecute().getContingencyPlanId(), event.getPlanExecute().getContingencyPlanId(),
event.getPlanExecute().getButtonCode(), event.getPlanExecute().getButtonCode(),
event.getPlanExecute().getConfirm(), event.getPlanExecute().getConfirm(),
...@@ -220,6 +221,17 @@ public class BizContingencyHandler implements EventHandler{ ...@@ -220,6 +221,17 @@ public class BizContingencyHandler implements EventHandler{
result.put("msgContext", Collections.EMPTY_MAP); result.put("msgContext", Collections.EMPTY_MAP);
result.put("msgType", "getStepList"); result.put("msgType", "getStepList");
result.put("planStep", objects); result.put("planStep", objects);
String planTask = "";
if (redisTemplate.hasKey("planTask")) {
planTask = Objects.requireNonNull(redisTemplate.opsForValue().get("planTask")).toString();
} else {
List<ContingencyPlanInstanceVO> list = planVisual3dService.selectTaskActionList(batchNo, null, 1);
if (0 < list.size()) {
planTask = JSON.toJSONString(list);
}
}
JSONArray taskObjects = JSON.parseArray(planTask);
result.put("planTask", taskObjects);
webMqttComponent.publish(topic, JSON.toJSONString(result)); webMqttComponent.publish(topic, JSON.toJSONString(result));
} }
}); });
......
...@@ -56,6 +56,8 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -56,6 +56,8 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
static LinkedList<Map<String, String>> fireQueue = new LinkedList<>(); static LinkedList<Map<String, String>> fireQueue = new LinkedList<>();
public final static List<String> list = Arrays.asList("0", "1", "2", "5", "9", "10", "11");
@Autowired @Autowired
private IContingencyPlanInstanceRepository repository; private IContingencyPlanInstanceRepository repository;
...@@ -156,6 +158,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -156,6 +158,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
planInstance.setCategory(category); planInstance.setCategory(category);
planInstance.setBatchNo(instanceNo); planInstance.setBatchNo(instanceNo);
planInstance.setCreateDate(new Date()); planInstance.setCreateDate(new Date());
if ("OPERATE".equalsIgnoreCase(recordType)) {
JSONObject obj = JSON.parseObject(content);
planInstance.setStepCode(String.valueOf(obj.get("stepCode")));
}
//计算序号 //计算序号
int count = repository.countByBatchNo(instanceNo); int count = repository.countByBatchNo(instanceNo);
planInstance.setSort(++count); planInstance.setSort(++count);
...@@ -381,6 +387,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -381,6 +387,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning()); redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// 应急处置中断,初始化planStep,json数据 // 应急处置中断,初始化planStep,json数据
planStepService.initPlanStep(); planStepService.initPlanStep();
planStepService.initPlanTask();
// 应急处置中断,更新预案信息表结束时间 // 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService.updateEndTimeById(batchNo); contingencyInstanceInfoService.updateEndTimeById(batchNo);
} }
...@@ -487,6 +494,39 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -487,6 +494,39 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
return Optional.empty(); return Optional.empty();
} }
@Override
public Optional<Equipment> clickButton(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception {
List<String> strs = list.stream().filter(x -> x.equals(stepCode)).collect(Collectors.toList());
if (0 < strs.size()) {
PlanExecuteVo vo = new PlanExecuteVo();
vo.setConfirm(buttonState);
vo.setStepState(stepStateOnbutton);
vo.setBatchNo(batchNo);
vo.setStepCode(stepCode);
vo.setButtonCode(buttonCode);
vo.setContingencyPlanId(contingencyPlanId);
vo.setButtonJson(buttonJson);
vo.setIsAuto(isAuto);
vo.setIsExecute(isExecute);
ContingecyExecEvent fireEvent = new ContingecyExecEvent(this);
fireEvent.setEventType(EventType.FIRE_NEXT_RULE.name());
fireEvent.setPlanExecute(vo);
fireEvent.setContext(RequestContext.cloneRequestContext());
applicationContext.publishEvent(fireEvent);
ContingecyExecEvent updateEvent = new ContingecyExecEvent(this);
updateEvent.setEventType(EventType.UPDATE_CONTINGENCY_DATE.name());
updateEvent.setPlanExecute(vo);
updateEvent.setContext(RequestContext.cloneRequestContext());
try {
applicationContext.publishEvent(updateEvent);
} catch (Exception e) {
e.printStackTrace();
}
}
return Optional.empty();
}
@Autowired @Autowired
List<EventHandler> handlers; List<EventHandler> handlers;
......
...@@ -37,6 +37,7 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -37,6 +37,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -92,6 +93,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -92,6 +93,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
private Boolean dataSyncSwitch; private Boolean dataSyncSwitch;
@Autowired @Autowired
private ContingencyInstanceInfoMapper contingencyInstanceInfoMapper;
@Autowired
private IDataSyncService dataSyncService; private IDataSyncService dataSyncService;
private final PlanOperationRecordMapper planOperationRecordMapper; private final PlanOperationRecordMapper planOperationRecordMapper;
private final IPlanDetailDao planDetailDao; private final IPlanDetailDao planDetailDao;
...@@ -246,15 +250,16 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -246,15 +250,16 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
result.setMessage(ReserveEnum.RUN.getText()); result.setMessage(ReserveEnum.RUN.getText());
result.setBatchNo(batchNo); result.setBatchNo(batchNo);
equipmentHandlerService.executeDynamicPlan(batchNo, deviceData, equipment, equipmentSpecific, toke, operationRecord.getId()); equipmentHandlerService.executeDynamicPlan(batchNo, deviceData, equipment, equipmentSpecific, toke, operationRecord.getId());
// String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan"); // app端使用
// Map<String, Object> map = new HashMap<>(); String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
// JSONObject msgContext = new JSONObject(); Map<String, Object> map = new HashMap<>();
// msgContext.put("content", "startPlan"); JSONObject msgContext = new JSONObject();
// map.put("contingency", new ContingencyRo()); msgContext.put("content", "startPlan");
//// map.put("msgContext", "{\"content\":\"startPlan\"}"); map.put("contingency", new ContingencyRo());
// map.put("msgContext", msgContext); // map.put("msgContext", "{\"content\":\"startPlan\"}");
// map.put("msgType", "refreshRecord"); map.put("msgContext", msgContext);
// webMqttComponent.publish(topic, JSON.toJSONString(map)); map.put("msgType", "refreshRecord");
webMqttComponent.publish(topic, JSON.toJSONString(map));
} }
return result; return result;
} }
...@@ -881,6 +886,28 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -881,6 +886,28 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
} }
@Override @Override
public Page<ContingencyPlanInstanceVO> selectTaskActionPage(int current, int size, String batchNo, String runState, String updateDate, List<String> roleList) {
List<String> roles = new ArrayList<>();
String type = "TASKOPERATE";
Page<ContingencyPlanInstanceVO> page = new Page<>(current, size);
int total = 0;
total = contingencyInstanceInfoMapper.countTaskPage(type, batchNo, roleList);
long start = (page.getCurrent() - 1) * page.getSize();
if (total == 0) {
page.setCurrent(1);
} else {
if (total < start) {
page.setCurrent(1);
start = 0;
}
List<ContingencyPlanInstanceVO> list = contingencyInstanceInfoMapper.getTaskActionPage((int) start, size, batchNo, type, runState, updateDate, roles);
page.setRecords(list);
page.setTotal(total);
}
return page;
}
@Override
public Map<String, Object> getUserOperateCountAndPlanName(List<RoleModel> roleModelList) { public Map<String, Object> getUserOperateCountAndPlanName(List<RoleModel> roleModelList) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List<PlanOperationRecord> recordList = planOperationRecordDao.findByStatus(0); List<PlanOperationRecord> recordList = planOperationRecordDao.findByStatus(0);
...@@ -898,4 +925,22 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -898,4 +925,22 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
return map; return map;
} }
@Override
public Map<String, Object> getUserOperateCountAndTaskName(List<RoleModel> roleModelList) {
Map<String, Object> map = new HashMap<>();
List<PlanOperationRecord> recordList = planOperationRecordDao.findByStatus(0);
if (!CollectionUtils.isEmpty(recordList)) {
PlanOperationRecord record = recordList.get(0);
String batchNo = record.getBatchNo();
ContingencyInstanceInfoVO instanceInfo = contingencyInstanceInfoService.selectDisposalDetails(batchNo);
if (instanceInfo != null) {
map.put("planName", instanceInfo.getName());
map.put("batchNo", batchNo);
List<ContingencyPlanInstanceVO> list = planVisual3dService.selectTaskActionList(batchNo, roleModelList, 1);
map.put("taskNum", list.size());
}
}
return map;
}
} }
\ No newline at end of file
...@@ -77,4 +77,10 @@ public class PlanStepServiceImpl implements IPlanStepService { ...@@ -77,4 +77,10 @@ public class PlanStepServiceImpl implements IPlanStepService {
redisTemplate.opsForValue().set("planStep", getPlanStep()); redisTemplate.opsForValue().set("planStep", getPlanStep());
redisTemplate.delete("isMock"); redisTemplate.delete("isMock");
} }
@Override
public void initPlanTask() {
redisTemplate.delete("planTask");
redisTemplate.opsForValue().set("planTask", "");
}
} }
...@@ -483,13 +483,15 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -483,13 +483,15 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
dto.setPersonImg(personImg); dto.setPersonImg(personImg);
} }
dto.setContent(StringUtil.isNotEmpty(dto.getContent()) ? dto.getContent() : ""); dto.setContent(StringUtil.isNotEmpty(dto.getContent()) ? dto.getContent() : "");
repository.save(dto); ContingencyPlanInstance instance = repository.save(dto);
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan"); if (!ObjectUtils.isEmpty(instance)) {
Map<String, Object> map = new HashMap<>(); String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
map.put("contingency", new ContingencyRo()); Map<String, Object> map = new HashMap<>();
map.put("msgContext", Collections.EMPTY_MAP); map.put("contingency", new ContingencyRo());
map.put("msgType", "replayMessage"); map.put("msgContext", Collections.EMPTY_MAP);
webMqttComponent.publish(topic, JSON.toJSONString(map)); map.put("msgType", "replayMessage");
webMqttComponent.publish(topic, JSON.toJSONString(map));
}
return dto; return dto;
} }
...@@ -534,6 +536,59 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -534,6 +536,59 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} }
@Override @Override
public Page<ContingencyPlanInstanceVO> selectTaskActionPage(int current, int size, String disposalId, List<RoleModel> roleModelList, int dataType) {
List<String> roles = new ArrayList<>();
String type = "TASKOPERATE";
String status = "";
Page<ContingencyPlanInstanceVO> page = new Page<>(current, size);
for (RoleModel roleModel : roleModelList) {
roles.add(roleModel.getRoleName());
}
int total = 0;
if (ObjectUtils.isEmpty(status)) {
total = contingencyInstanceInfoMapper.selectCountTaskActionPage(type, null, roles, disposalId);
} else {
total = contingencyInstanceInfoMapper.selectCountTaskActionPage(type, status, roles, disposalId);
}
long start = (page.getCurrent() - 1) * page.getSize();
if (total == 0) {
page.setCurrent(1);
} else {
if (total < start) {
page.setCurrent(1);
start = 0;
}
List<ContingencyPlanInstanceVO> list = contingencyInstanceInfoMapper.selectTaskActionPage((int) start, size, type, status, roles, disposalId);
page.setRecords(list);
page.setTotal(total);
}
return page;
}
@Override
public List<ContingencyPlanInstanceVO> selectTaskActionList(String batchNo, List<RoleModel> roleModelList, int dataType) {
List<String> roles = new ArrayList<>();
String type = "TASKOPERATE";
String status = "";
if ("1".equals(String.valueOf(dataType))) {
if (null != roleModelList && 0 < roleModelList.size()) {
for (RoleModel roleModel : roleModelList) {
roles.add(roleModel.getRoleName());
}
}
// 根据当前用户预案角色、未执行动作
status = "1";
} else if ("2".equals(String.valueOf(dataType))) {
// 当前用户预案角色、全部动作数据
for (RoleModel roleModel : roleModelList) {
roles.add(roleModel.getRoleName());
}
}
return contingencyInstanceInfoMapper.selectTaskActionList(type, status, roles, batchNo);
}
@Override
public List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo, List<RoleModel> roleModelList, int dataType) { public List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo, List<RoleModel> roleModelList, int dataType) {
List<String> roles = new ArrayList<>(); List<String> roles = new ArrayList<>();
String type = "OPERATE"; String type = "OPERATE";
...@@ -610,6 +665,28 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -610,6 +665,28 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} }
@Override @Override
public boolean updateTaskStatusById(String id, Boolean runStatus) {
boolean bool = false;
if (runStatus) {
ContingencyPlanInstance instance = contingencyPlanInstanceMapper.getMessageById(id);
ContingencyPlanInstance contingencyPlanInstance = deleteButton(instance);
bool = contingencyPlanInstanceMapper.updateStatusById(id, contingencyPlanInstance.getContent(), runStatus);
} else {
bool = contingencyPlanInstanceMapper.updateStatusById(id, null, runStatus);
}
if (bool) {
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
Map<String, Object> map = new HashMap<>();
map.put("contingency", new ContingencyRo());
map.put("msgContext", Collections.EMPTY_MAP);
map.put("msgType", "refreshTaskRecord");
webMqttComponent.publish(topic, JSON.toJSONString(map));
}
return bool;
}
@Override
public ContingencyPlanInstance updateStatusByIdWeb(ContingencyPlanInstance contingencyPlanInstance, Boolean runStatus) { public ContingencyPlanInstance updateStatusByIdWeb(ContingencyPlanInstance contingencyPlanInstance, Boolean runStatus) {
if (runStatus) { if (runStatus) {
deleteButton(contingencyPlanInstance); deleteButton(contingencyPlanInstance);
......
...@@ -25,6 +25,8 @@ public interface IContingencyInstance { ...@@ -25,6 +25,8 @@ public interface IContingencyInstance {
Optional<Equipment> fire(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception; Optional<Equipment> fire(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception;
Optional<Equipment> clickButton(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception;
/** /**
* 扩展属性赋值 * 扩展属性赋值
* @param contingencyPlanInstance * @param contingencyPlanInstance
......
package com.yeejoin.amos.fas.business.service.intfc; package com.yeejoin.amos.fas.business.service.intfc;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.fas.business.vo.ContingencyPlanParamVo; import com.yeejoin.amos.fas.business.vo.*;
import com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo;
import com.yeejoin.amos.fas.business.vo.PlanDetailVo;
import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.dao.entity.PlanDetail; import com.yeejoin.amos.fas.dao.entity.PlanDetail;
import com.yeejoin.amos.fas.dao.entity.PlanOperationRecord; import com.yeejoin.amos.fas.dao.entity.PlanOperationRecord;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
...@@ -141,5 +138,9 @@ public interface IContingencyPlanService { ...@@ -141,5 +138,9 @@ public interface IContingencyPlanService {
Map<String, Object> getUserOperateCountAndPlanName(List<RoleModel> roleModelList); Map<String, Object> getUserOperateCountAndPlanName(List<RoleModel> roleModelList);
Map<String, Object> getUserOperateCountAndTaskName(List<RoleModel> roleModelList);
String getPlanBatchNo(); String getPlanBatchNo();
Page<ContingencyPlanInstanceVO> selectTaskActionPage(int current, int size, String batchNo, String runState, String updateDate, List<String> roleList);
} }
...@@ -27,4 +27,6 @@ public interface IPlanStepService { ...@@ -27,4 +27,6 @@ public interface IPlanStepService {
String getPlanStep(); String getPlanStep();
void initPlanStep(); void initPlanStep();
void initPlanTask();
} }
...@@ -91,6 +91,8 @@ public interface IPlanVisual3dService { ...@@ -91,6 +91,8 @@ public interface IPlanVisual3dService {
Page<ContingencyPlanInstanceVO> selectDisposalActionPage(int current, int size, String batchNo, List<RoleModel> roleModelList, int dataType); Page<ContingencyPlanInstanceVO> selectDisposalActionPage(int current, int size, String batchNo, List<RoleModel> roleModelList, int dataType);
Page<ContingencyPlanInstanceVO> selectTaskActionPage(int current, int size, String batchNo, List<RoleModel> roleModelList, int dataType);
/** /**
* 根据批次号获取预案的消息等记录 * 根据批次号获取预案的消息等记录
* *
...@@ -103,6 +105,8 @@ public interface IPlanVisual3dService { ...@@ -103,6 +105,8 @@ public interface IPlanVisual3dService {
List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo, List<RoleModel> roleModelList, int dataType); List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo, List<RoleModel> roleModelList, int dataType);
List<ContingencyPlanInstanceVO> selectTaskActionList(String batchNo, List<RoleModel> roleModelList, int dataType);
/** /**
* 极光推送消息 * 极光推送消息
* *
...@@ -120,6 +124,8 @@ public interface IPlanVisual3dService { ...@@ -120,6 +124,8 @@ public interface IPlanVisual3dService {
*/ */
boolean updateStatusById(String id, Boolean runStatus); boolean updateStatusById(String id, Boolean runStatus);
boolean updateTaskStatusById(String id, Boolean runStatus);
/** /**
* 修改动作执行状态-web * 修改动作执行状态-web
* @param contingencyPlanInstance * @param contingencyPlanInstance
......
...@@ -12,7 +12,7 @@ public class ContingencyPlanInstanceVO { ...@@ -12,7 +12,7 @@ public class ContingencyPlanInstanceVO {
protected String id; protected String id;
private String recordType;// 记录类型:消息MESSAGE,操作OPERATE ,回复消息REPLYMESSAGE private String recordType;// 记录类型:消息MESSAGE,操作OPERATE, 回复消息REPLYMESSAGE, 任务指令TASKOPERATE
private String content ;// 记录内容:文本信息或者json数据 private String content ;// 记录内容:文本信息或者json数据
......
...@@ -843,4 +843,18 @@ ...@@ -843,4 +843,18 @@
ADD INDEX `INDEX_BATCH_NO`(`batch_No`) USING BTREE; ADD INDEX `INDEX_BATCH_NO`(`batch_No`) USING BTREE;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="keyong" id="1682647357">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="contingency_plan_instance" columnName="task_sort"/>
</not>
</preConditions>
<comment>增加任务动作相关字段</comment>
<sql>
ALTER TABLE `contingency_plan_instance`
ADD COLUMN `task_sort` int DEFAULT NULL AFTER `person_img`,
ADD COLUMN `step_code` varchar(20) NULL AFTER `task_sort`;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -64,6 +64,57 @@ ...@@ -64,6 +64,57 @@
order by cpi.`create_date` ASC order by cpi.`create_date` ASC
LIMIT #{current}, #{size} LIMIT #{current}, #{size}
</select> </select>
<select id="selectTaskActionPage" resultType="com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO">
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
, cpi.`update_user`, cpi.`is_delete`, cpi.`tips`, IFNULL(cpi.`runstate`, 0) AS runstate, cpi.`file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, cpi.`start_user_id`, cpi.`person_img`,cii.name
from contingency_plan_instance cpi left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
<if test="batchNo != null and batchNo != ''">
cpi.batch_no = #{batchNo}
</if>
<if test="type != null and type != ''">
and cpi.record_type = #{type}
</if>
<if test="status != null and status != ''">
and (cpi.runstate is null or cpi.runstate = 0)
</if>
<if test="list != null and list.size() >0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
cpi.role_code like concat('%',#{role},'%')
</foreach>
</if>
</where>
order by cpi.`create_date` ASC
LIMIT #{current}, #{size}
</select>
<select id="selectCountTaskActionPage" resultType="java.lang.Integer">
select count(1) from contingency_plan_instance
<where>
<if test="batchNo != null and batchNo != ''">
batch_no = #{batchNo}
</if>
<if test="type != null and type != ''">
and record_type = #{type}
</if>
<if test="status != null and status != ''">
and (runstate is null or runstate = 0)
</if>
<if test="list != null and list.size() >0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
role_code like concat('%',#{role},'%')
</foreach>
</if>
</where>
</select>
<select id="selectCountDisposalActionPage" resultType="java.lang.Integer"> <select id="selectCountDisposalActionPage" resultType="java.lang.Integer">
select count(1) from contingency_plan_instance select count(1) from contingency_plan_instance
<where> <where>
...@@ -77,14 +128,13 @@ ...@@ -77,14 +128,13 @@
and (runstate is null or runstate = 0) and (runstate is null or runstate = 0)
</if> </if>
<if test="list != null and list.size() >0"> <if test="list != null and list.size() >0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or"> <foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
role_code like concat('%',#{role},'%') role_code like concat('%',#{role},'%')
</foreach> </foreach>
</if> </if>
</where> </where>
</select> </select>
<select id="selectDisposalActionList" resultType="com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO"> <select id="selectDisposalActionList" resultType="com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO">
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num` select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date` , cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
...@@ -112,5 +162,86 @@ ...@@ -112,5 +162,86 @@
</where> </where>
order by cpi.`create_date` order by cpi.`create_date`
</select> </select>
<select id="selectTaskActionList" resultType="com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO">
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
, cpi.`update_user`, cpi.`is_delete`, cpi.`tips`, IFNULL(cpi.`runstate`, 0) AS runstate, cpi.`file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, cpi.`start_user_id`, cpi.`person_img`,cii.name
from contingency_plan_instance cpi left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
<if test="batchNo != null and batchNo != ''">
cpi.batch_no = #{batchNo}
</if>
<if test="type != null and type != ''">
and cpi.record_type = #{type}
</if>
<if test="status != null and status != ''">
and (cpi.runstate is null or cpi.runstate = 0)
</if>
<if test="list != null and list.size() >0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
cpi.role_code like concat('%',#{role},'%')
</foreach>
</if>
</where>
order by cpi.`create_date`
</select>
<select id="countTaskPage" resultType="java.lang.Integer">
select count(1) from contingency_plan_instance
<where>
<if test="type != null and type != ''">
and record_type = #{type}
</if>
<if test="batchNo != null and batchNo != ''">
batch_no = #{batchNo}
</if>
<if test="list != null and list.size() >0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
role_code like concat('%', #{role}, '%')
</foreach>
</if>
</where>
</select>
<select id="getTaskActionPage" resultType="com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO">
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
, cpi.`update_user`, cpi.`is_delete`, cpi.`tips`, IFNULL(cpi.`runstate`, 0) AS runstate, cpi.`file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, cpi.`start_user_id`, cpi.`person_img`,cii.name
from contingency_plan_instance cpi left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
<if test="batchNo != null and batchNo != ''">
cpi.batch_no = #{batchNo}
</if>
<if test="type != null and type != ''">
and cpi.record_type = #{type}
</if>
<if test="list != null and list.size() > 0">
<foreach collection="list" item="role" index="index" open="and (" close=") " separator="or">
cpi.role_code like concat('%',#{role},'%')
</foreach>
</if>
</where>
<if test="updateDate != null and updateDate != '' and updateDate == 0">
order by cpi.`update_date` DESC
</if>
<if test="updateDate != null and updateDate != '' and updateDate == 1">
order by cpi.`update_date` ASC
</if>
<if test="runState != null and runState != '' and runState == 0">
, cpi.runstate DESC
</if>
<if test="runState != null and runState != '' and runState == 1">
, cpi.runstate ASC
</if>
LIMIT #{current}, #{size}
</select>
</mapper> </mapper>
[ [
{ {
"stepCode": "0", "stepCode": "0",
"stepName": "确认情", "stepName": "确认情",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "FIRE_CONFIRM", "buttonCode": "FIRE_CONFIRM",
"isParallel": "1", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 0, "index": 0,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "15", "stepCode": "1",
"stepName": "全站广播通报火情", "stepName": "停运换流阀",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "ALL_STATION_PA", "buttonCode": "STOP_COMMUTATION",
"isParallel": "1", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 1, "index": 1,
"isAuto": 0, "checkYesOrNo": "",
"checkYesOrNo": "" "condition": [
{
"equipName": "换流器",
"equipCode": "92261200S7944",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "DCCP_DCCPStreamTransformerCharged",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
}, },
{ {
"stepCode": "2", "stepCode": "2",
"stepName": "拨打警电话", "stepName": "拨打警电话",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "CALL_PHONE", "buttonCode": "CALL_PHONE",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 2, "index": 2,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "16", "stepCode": "3",
"stepName": "停运起火换流器", "stepName": "确认油枕排油系统已开启",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "STOP_FIRE_TRANSVERTER", "buttonCode": "DRAIN_OIL_CONFIRM",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 3, "index": 3,
"checkYesOrNo": "",
"condition": [ "condition": [
{ {
"equipName": "开关", "equipName": "排油阀",
"equipCode": "590000003EB44", "equipCode": "92102700EBA44",
"equipSpeName": "", "equipSpeName": "",
"equipSpeCode": "", "equipSpeCode": "",
"equipSpeIndexKey": "Running_Alarm", "equipSpeIndexKey": "ONL_OilDischargeDeviceOilPillowDischargeOpen",
"standardValue": "false", "standardValue": "true",
"inAndOr": "and" "inAndOr": "and"
} }
], ],
"outAndOr": "and", "outAndOr": "and",
"isAuto": 0, "isAuto": 0
"checkYesOrNo": ""
}, },
{ {
"stepCode": "3", "stepCode": "4",
"stepName": "确认油枕排油系统已开启", "stepName": "确认水喷雾系统已开启",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "DRAIN_OIL_CONFIRM", "buttonCode": "OPEN_WATERSYSTEM",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 4, "index": 4,
"checkYesOrNo": "",
"condition": [ "condition": [
{ {
"equipName": "排油阀", "equipName": "雨淋阀",
"equipCode": "92100400VWE44", "equipCode": "92130300BH644",
"equipSpeName": "", "equipSpeName": "",
"equipSpeCode": "", "equipSpeCode": "",
"equipSpeIndexKey": "ONL_DrainOilValve_Open", "equipSpeIndexKey": "WSS_DelugeValve_Start",
"standardValue": "true", "standardValue": "true",
"inAndOr": "and" "inAndOr": "and"
} }
], ],
"outAndOr": "and", "outAndOr": "and",
"isAuto": 0, "isAuto": 0
"checkYesOrNo": ""
}, },
{ {
"stepCode": "4", "stepCode": "5",
"stepName": "泡沫喷淋系统已开启", "stepName": "断开上级电源",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "OPEN_WATERSYSTEM", "buttonCode": "OFF_POWER",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 5, "index": 5,
"condition": [
{
"equipName": "主机",
"equipCode": "92030100TGX44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_CompAirFoamHost_Outfire",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "7", "stepCode": "6",
"stepName": "一键启动消防炮", "stepName": "停运阀厅空调系统",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "MONITOR_START", "buttonCode": "STOP_AIRCON",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 6, "index": 6,
"condition": [
{
"equipName": "CAFS消防炮",
"equipCode": "92032200BUX44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_GunValve_Open",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "17", "stepCode": "7",
"stepName": "消防泵正常启动", "stepName": "一键开启消防炮",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "FIRE_PUMP_START", "buttonCode": "MONITOR_START",
"isParallel": "1", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A", "roleCode": "Digital_Responsing_Plan_A",
"index": 7, "index": 7,
"checkYesOrNo": "",
"condition": [ "condition": [
{ {
"equipName": "消防", "equipName": "消防炮阀",
"equipCode": "920106007GV44", "equipCode": "92032200BUX44",
"equipSpeName": "", "equipSpeName": "",
"equipSpeCode": "", "equipSpeCode": "",
"equipSpeIndexKey": "FHS_FirePump_Start", "equipSpeIndexKey": "CAFS_CAFSFireGunEquipmentValveStatus",
"standardValue": "true", "standardValue": "true",
"inAndOr": "or" "inAndOr": "and"
} }
], ],
"outAndOr": "and", "outAndOr": "and",
"isAuto": 0, "isAuto": 0
"checkYesOrNo": ""
}, },
{ {
"stepCode": "18", "stepCode": "8",
"stepName": "向各级调度、领导汇报火情", "stepName": "驻站消防队指挥权交接",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "LEADER_REPORT_FIRE", "buttonCode": "HANDOVER_COMMAND",
"isParallel": "0", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 8, "index": 8,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "19", "stepCode": "9",
"stepName": "停运本极对端换流器", "stepName": "确认本体排油已开启",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "STOP_LOCAL_END_TRANSVERTER", "buttonCode": "OWNER_DRAIN_OIL",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 9, "index": 9,
"checkYesOrNo": "",
"condition": [ "condition": [
{ {
"equipName": "开关", "equipName": "排油阀",
"equipCode": "590000003EB44", "equipCode": "92102700EBA44",
"equipSpeName": "", "equipSpeName": "",
"equipSpeCode": "", "equipSpeCode": "",
"equipSpeIndexKey": "Running_Alarm", "equipSpeIndexKey": "ONL_OilDischargeDeviceOilyPillowDischargeOpen",
"standardValue": "false", "standardValue": "true",
"inAndOr": "and" "inAndOr": "and"
} }
], ],
"outAndOr": "and", "outAndOr": "and",
"isAuto": 0, "isAuto": 0
"checkYesOrNo": ""
}, },
{ {
"stepCode": "20", "stepCode": "10",
"stepName": "停运阀冷系统", "stepName": "启动阀厅应急预案",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "STOP_VALVE_COOL_SYS", "buttonCode": "START_VALVE_HALL_CONTINGENCY",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 10, "index": 10,
"condition": [
{
"equipName": "阀冷系统主机",
"equipCode": "59000000H9G44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "normal_running_state",
"standardValue": "false",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "6", "stepCode": "11",
"stepName": "停运阀厅空调系统", "stepName": "电缆沟封堵",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "STOP_AIRCON", "buttonCode": "PLUG_CABLETRENCH",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 11, "index": 11,
"condition": [
{
"equipName": "AIRCS-风机",
"equipCode": "92230600UH244",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "AIRCS_Fan_Start",
"standardValue": "false",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
"stepCode": "5", "stepCode": "12",
"stepName": "断开冷却器上级电源", "stepName": "政府消防队指挥权交接",
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "OFF_POWER", "buttonCode": "HANDOVER_FIGTHHING",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 12, "index": 12,
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "21",
"stepName": "起火换流器转检修",
"stepStatus": "0",
"buttonCode": "FIRE_TRANSVERTER_TO_OVERHAUL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 13,
"condition": [
{
"equipName": "地刀",
"equipCode": "59000000SAT44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "Running_Alarm",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "22",
"stepName": "对阀侧套管、阀厅进行降温",
"stepStatus": "0",
"buttonCode": "VALVE_HALL_COOL",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 14,
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "8",
"stepName": "驻站消防队指挥权交接",
"stepStatus": "0",
"buttonCode": "HANDOVER_COMMAND",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 15,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
...@@ -290,30 +201,7 @@ ...@@ -290,30 +201,7 @@
"buttonCode": "FIRE_EXTINCT", "buttonCode": "FIRE_EXTINCT",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 16, "index": 13,
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "23",
"stepName": "确认无复燃情况",
"stepStatus": "0",
"buttonCode": "CONFIRM_REKINDLE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 17,
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "24",
"stepName": "向各级调度、领导汇报已灭火",
"stepStatus": "0",
"buttonCode": "LEADER_REPORT_FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 18,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
}, },
{ {
...@@ -323,8 +211,7 @@ ...@@ -323,8 +211,7 @@
"buttonCode": "END_EMERGENCY", "buttonCode": "END_EMERGENCY",
"isParallel": "1", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B", "roleCode": "Digital_Responsing_Plan_B",
"index": 19, "index": 14,
"isAuto": 0,
"checkYesOrNo": "" "checkYesOrNo": ""
} }
] ]
\ No newline at end of file
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