Commit 003b5213 authored by 高建强's avatar 高建强

item:应急处置新增极光推送开关

parent 3a59225c
......@@ -120,6 +120,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Value("${plan.instance.playImg}")
private String playImg;
@Value("${aurora.push.switch}")
private Boolean auroraPushSwitch;
@Override
public List<TreeSubjectVo> getPlanTree() {
......@@ -518,10 +521,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
public void sendMessage(String buttonCode, MessageVO messageVO) {
List<String> userIds = getUserIds(buttonCode);
if (!CollectionUtils.isEmpty(userIds)) {
// 添加极光推送开关
if (auroraPushSwitch) {
List<String> userIds = getUserIds(buttonCode);
if (!CollectionUtils.isEmpty(userIds)) {
messageVO.setRecivers(userIds);
sendMessage(messageVO);
}
}
}
......
package com.yeejoin.amos.fas.business.service.intfc;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.fas.business.jpush.PushMsgParam;
import com.yeejoin.amos.fas.business.service.model.ToipResponse;
import com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO;
import com.yeejoin.amos.fas.business.vo.MessageVO;
import com.yeejoin.amos.fas.business.vo.PlanStepVo;
import com.yeejoin.amos.fas.business.vo.TreeSubjectVo;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.PlanRule;
import com.yeejoin.amos.fas.dao.entity.TextPlan;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.web.bind.annotation.RequestParam;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import java.util.List;
......@@ -34,7 +26,8 @@ public interface IPlanVisual3dService {
/**
* 上传文字预案
* @param appId 预案ID
*
* @param appId 预案ID
* @param pathNameMap 文字预案文件路径:文件名称map
*/
void uploadTextPlan(String appId, Map<String, String> pathNameMap);
......@@ -49,22 +42,24 @@ public interface IPlanVisual3dService {
CommonResponse getResourceListByType(String type);
List<Map<String,Object>> getResourceById(String type,Long id);
List<Map<String, Object>> getResourceById(String type, Long id);
List<Map<String,Object>> getResourceTypeList();
List<Map<String, Object>> getResourceTypeList();
List<TreeSubjectVo> getTextPlanBySubjectId(String appId);
List<TreeSubjectVo> getTextPlanBySubjectId(String appId);
void deleteTextPlanFile(Long id);
void deleteTextPlanFile(Long id);
/**
* 查最新的批次号
*
* @return
*/
String getNewestBatchNo();
String getNewestBatchNo();
/**
* 根据批次号获取预案步骤
*
* @param batchNo 批次号
* @return 预案步骤
*/
......@@ -72,6 +67,7 @@ public interface IPlanVisual3dService {
/**
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @return 预案记录
*/
......@@ -79,6 +75,7 @@ public interface IPlanVisual3dService {
/**
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @return 预案记录
*/
......@@ -86,10 +83,11 @@ public interface IPlanVisual3dService {
PlanStepVo updatePlanStep(PlanStepVo planStepVo);
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);
/**
* 根据批次号获取预案的消息等记录
*
* @param batchNo
* @return
*/
......@@ -97,30 +95,11 @@ public interface IPlanVisual3dService {
ContingencyPlanInstance replyMessage(AgencyUserModel user, ContingencyPlanInstance dto);
List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo , List<RoleModel> roleModelList, int dataType);
// /**
// * 极光推送
// * @param json 消息体
// * @param buttonCode 按钮编码
// */
// void sendMessage(String json, String buttonCode);
//
// /**
// * 极光推送
// * @param buttonCode 按钮编码
// */
// void sendMessage(String buttonCode);
//
// /**
// * 极光推送
// * @param buttonCode 按钮编码
// * @param pushMsgParam 消息体
// */
// void sendMessage(String buttonCode, PushMsgParam pushMsgParam);
List<ContingencyPlanInstanceVO> selectDisposalActionList(String batchNo, List<RoleModel> roleModelList, int dataType);
/**
* 消息推送
* 极光推送消息
*
* @param buttonCode
* @param messageVO
*/
......@@ -129,6 +108,7 @@ public interface IPlanVisual3dService {
/**
* 修改动作执行状态
*
* @param id
* @return
*/
......
......@@ -62,6 +62,8 @@ number.plan.projectName=换流站消防专项预案
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
station.name = yinan
#极光推送开关
aurora.push.switch=false
param.safetyIndexChange.cron = 0 0 2 * * ?
......
......@@ -746,13 +746,13 @@
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="20221017-01">
<changeSet author="gaojianqiang" id="20221028-01">
<preConditions onFail="MARK_RAN">
<columnExists tableName="c_plan_rule" columnName="plan_step"/>
</preConditions>
<comment>修改属性字段值 plan_step</comment>
<sql>
UPDATE c_plan_rule SET plan_step = '[{"stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
UPDATE c_plan_rule SET plan_step = '[{"roleCode": "Digital_Responsing_Plan_A", "stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
</sql>
</changeSet>
......
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