Commit 28800c2c authored by KeYong's avatar KeYong

修改现场bug

parent f6357920
...@@ -11,9 +11,9 @@ import java.util.Map; ...@@ -11,9 +11,9 @@ import java.util.Map;
*/ */
public enum DutyPersonEnum { public enum DutyPersonEnum {
FIRE_PERSON("驻站消防","fire"), FIRE_PERSON("驻站消防","fire"),
OPS_PERSON("运维人员","ops"), OPS_PERSON("运维人员","ops"),
REAL_PERSON("物业安保","realEstate"); REAL_PERSON("物业安保人员","realEstate");
/** /**
* 名称,描述 * 名称,描述
......
...@@ -23,6 +23,7 @@ import org.slf4j.Logger; ...@@ -23,6 +23,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -45,6 +46,7 @@ public class PlanVisual3dController extends BaseController { ...@@ -45,6 +46,7 @@ public class PlanVisual3dController extends BaseController {
private IPlanVisual3dService planVisual3dService; private IPlanVisual3dService planVisual3dService;
@Autowired @Autowired
@Lazy
private IEmergencyTaskService emergencyTaskService; private IEmergencyTaskService emergencyTaskService;
@Autowired @Autowired
......
...@@ -727,17 +727,17 @@ public class RiskSourceController extends BaseController { ...@@ -727,17 +727,17 @@ public class RiskSourceController extends BaseController {
if (commonPageable.getPageNumber() == 0) { if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1); commonPageable.setPageNumber(1);
} }
ReginParams reginParams = getSelectedOrgInfo(); // ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getOrgCode(reginParams); // String orgCode = getOrgCode(reginParams);
String bizOrgCode = null; String bizOrgCode = null;
if (StringUtil.isNotEmpty(orgCode)) { // if (StringUtil.isNotEmpty(orgCode)) {
bizOrgCode = contingencyPlanInstanceMapper.getBizOrgCode(orgCode); // bizOrgCode = contingencyPlanInstanceMapper.getBizOrgCode(orgCode);
if (!StringUtil.isNotEmpty(bizOrgCode)) { // if (!StringUtil.isNotEmpty(bizOrgCode)) {
return CommonResponseUtil.success(null); // return CommonResponseUtil.success(null);
} // }
} else { // } else {
return CommonResponseUtil.success(null); // return CommonResponseUtil.success(null);
} // }
return CommonResponseUtil.success(riskSourceService.getWaterInfo(commonPageable, bizOrgCode)); return CommonResponseUtil.success(riskSourceService.getWaterInfo(commonPageable, bizOrgCode));
} }
......
...@@ -103,7 +103,7 @@ public interface View3dMapper extends BaseMapper { ...@@ -103,7 +103,7 @@ public interface View3dMapper extends BaseMapper {
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<SafetyExecuteBo> getRiskErrorTop5(String orgCode); List<SafetyExecuteBo> getRiskErrorTop5();
/** /**
* 巡检异常示最新5条 * 巡检异常示最新5条
...@@ -111,7 +111,7 @@ public interface View3dMapper extends BaseMapper { ...@@ -111,7 +111,7 @@ public interface View3dMapper extends BaseMapper {
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<SafetyExecuteBo> getCheckErrorTop5(String orgCode); List<SafetyExecuteBo> getCheckErrorTop5();
/** /**
* 火灾告警最新5条 * 火灾告警最新5条
...@@ -119,7 +119,7 @@ public interface View3dMapper extends BaseMapper { ...@@ -119,7 +119,7 @@ public interface View3dMapper extends BaseMapper {
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<SafetyExecuteBo> getFireAlarmTop5(String orgCode); List<SafetyExecuteBo> getFireAlarmTop5();
/** /**
* 设备状态最新5条 * 设备状态最新5条
......
...@@ -191,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen ...@@ -191,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
String fireEquipId = String.valueOf(map.get("fireEquipId")); String fireEquipId = String.valueOf(map.get("fireEquipId"));
List<Long> fireEquipments = new ArrayList<>(); List<Long> fireEquipments = new ArrayList<>();
// 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II) // 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II)
if (stepIndex == index) { // if (stepIndex == index) {
Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId)); // Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
if (equipment.get() != null) { // if (equipment.get() != null) {
String fireEquipNamePrefix = equipment.get().getName().substring(0, 2); // String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix); // List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]); // String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// 获取消防设备id列表 // // 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings); // fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
} // }
} else { // } else {
String[] fireEquipIds = new String[]{fireEquipId}; String[] fireEquipIds = new String[]{fireEquipId};
// 获取消防设备id列表 // 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(fireEquipIds); fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(fireEquipIds);
} // }
PlanStepJsonVO vo = result.stream().filter(x -> x.getIndex() == index).collect(Collectors.toList()).get(0); PlanStepJsonVO vo = result.stream().filter(x -> x.getIndex() == index).collect(Collectors.toList()).get(0);
List<ConditionVO> list = vo.getCondition(); List<ConditionVO> list = vo.getCondition();
...@@ -232,11 +232,11 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen ...@@ -232,11 +232,11 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
planMessageDao.save(message); planMessageDao.save(message);
} }
} }
if (pumpStepIndex == index) { // if (pumpStepIndex == index) {
return 0 < resultSize; // return 0 < resultSize;
} else { // } else {
return (0 < resultSize && num == resultSize); return (0 < resultSize && num == resultSize);
} // }
} else { } else {
return false; return false;
} }
......
...@@ -446,11 +446,11 @@ public class View3dServiceImpl implements IView3dService { ...@@ -446,11 +446,11 @@ public class View3dServiceImpl implements IView3dService {
StatisticsErrorTypeEum.risk.getCode(); StatisticsErrorTypeEum.risk.getCode();
switch (type) { switch (type) {
case "risk"://风险异常 case "risk"://风险异常
return view3dMapper.getRiskErrorTop5(orgCode); return view3dMapper.getRiskErrorTop5();
case "check"://巡检异常 case "check"://巡检异常
return view3dMapper.getCheckErrorTop5(orgCode); return view3dMapper.getCheckErrorTop5();
case "fire"://火灾告警 case "fire"://火灾告警
return view3dMapper.getFireAlarmTop5(orgCode); return view3dMapper.getFireAlarmTop5();
default: default:
throw new YeeException("不支持的类型 -->" + type); throw new YeeException("不支持的类型 -->" + type);
} }
...@@ -468,19 +468,20 @@ public class View3dServiceImpl implements IView3dService { ...@@ -468,19 +468,20 @@ public class View3dServiceImpl implements IView3dService {
JSONArray dataList = JSONObject.parseArray(JSONStr); JSONArray dataList = JSONObject.parseArray(JSONStr);
if (!ObjectUtils.isEmpty(dataList)) { if (!ObjectUtils.isEmpty(dataList)) {
for (Object x : dataList) { for (Object x : dataList) {
Map<String, Object> resultMap = new HashMap<>();
String json = JSON.toJSONString(((JSONObject) x).get("data")); String json = JSON.toJSONString(((JSONObject) x).get("data"));
JSONArray array = JSONObject.parseArray(json); JSONArray array = JSONObject.parseArray(json);
if (!ObjectUtils.isEmpty(array)) { if (!ObjectUtils.isEmpty(array)) {
Map<String, String> result = (Map<String, String>) array.get(0); for(Object obj : array){
String total = result.get("total"); Map<String, String> result = (Map<String, String>) obj;
String postTypeName = result.get("postTypeName"); String total = result.get("total");
if (DutyPersonEnum.FIRE_PERSON.getName().equals(postTypeName)) { String postTypeName = result.get("postTypeName");
map.put("firePersonNumber", total); if (DutyPersonEnum.FIRE_PERSON.getName().equals(postTypeName)) {
} else if (DutyPersonEnum.OPS_PERSON.getName().equals(postTypeName)) { map.put("firePersonNumber", total);
map.put("dutyPersonNumber", total); } else if (DutyPersonEnum.OPS_PERSON.getName().equals(postTypeName)) {
} else if (DutyPersonEnum.REAL_PERSON.getName().equals(postTypeName)) { map.put("dutyPersonNumber", total);
map.put("securityPersonNumber", total); } else if (DutyPersonEnum.REAL_PERSON.getName().equals(postTypeName)) {
map.put("securityPersonNumber", total);
}
} }
} }
} }
......
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
ein.name as eq_point_name, ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是' CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否' WHEN 'false' THEN '否'
ELSE ind.value END 'e_value', ELSE FORMAT(IFNULL(ind.value, 0), 2) END 'e_value',
ein.unit as eq_point_unit, ein.unit as eq_point_unit,
CONCAT(IFNULL(str.full_name,''),' ',IFNULL(sto.description,'')) as source_name, CONCAT(IFNULL(str.full_name,''),' ',IFNULL(sto.description,'')) as source_name,
( (
......
...@@ -195,7 +195,6 @@ ...@@ -195,7 +195,6 @@
FROM f_rpn_change_log n FROM f_rpn_change_log n
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
WHERE n.type = 0 WHERE n.type = 0
AND (r.org_code = #{org_code} OR r.org_code like CONCAT(#{org_code},'-%'))
ORDER BY n.create_date desc ORDER BY n.create_date desc
limit 0,5 limit 0,5
</select> </select>
...@@ -208,7 +207,6 @@ ...@@ -208,7 +207,6 @@
left join p_point I ON I.id = p.point_id left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3') where p.is_ok IN ('2', '3')
AND I.is_delete = 0 AND I.is_delete = 0
AND (p.org_code = #{orgCode} OR p.org_code like CONCAT(#{orgCode},'-%') )
ORDER BY p.check_time desc ORDER BY p.check_time desc
limit 0,5 limit 0,5
</select> </select>
...@@ -610,20 +608,20 @@ ...@@ -610,20 +608,20 @@
WHERE WHERE
s.instanceId = r.source_id s.instanceId = r.source_id
) AS tmp ) AS tmp
<where> HAVING
<if test="inputText!=null and inputText != ''" > 1 = 1
AND ( <if test="inputText!=null and inputText != ''">
tmp.code LIKE '%${inputText}%' (
OR tmp.name LIKE '%${inputText}%' tmp.code LIKE '%${inputText}%'
) OR tmp.name LIKE '%${inputText}%'
</if> )
<if test="type!=null and type!=''"> </if>
AND tmp.typeCode = #{type} <if test="type!=null and type!=''">
</if> AND tmp.typeCode = #{type}
<if test="riskSourceId != null and riskSourceId!=''"> </if>
AND tmp.riskSourceId = #{riskSourceId} <if test="riskSourceId != null and riskSourceId!=''">
</if> AND tmp.riskSourceId = #{riskSourceId}
</where> </if>
) t ) t
</select> </select>
<select id="retrieveAll" resultType="java.util.HashMap"> <select id="retrieveAll" resultType="java.util.HashMap">
...@@ -1068,7 +1066,8 @@ ...@@ -1068,7 +1066,8 @@
f_risk_source r f_risk_source r
where s.instanceId = r.source_id where s.instanceId = r.source_id
) as tmp ) as tmp
<where> HAVING
1 = 1
<if test="inputText!=null and inputText != ''"> <if test="inputText!=null and inputText != ''">
AND ( AND (
tmp.code LIKE '%${inputText}%' tmp.code LIKE '%${inputText}%'
...@@ -1081,7 +1080,6 @@ ...@@ -1081,7 +1080,6 @@
<if test="riskSourceId != null and riskSourceId!=''"> <if test="riskSourceId != null and riskSourceId!=''">
AND tmp.riskSourceId = #{riskSourceId} AND tmp.riskSourceId = #{riskSourceId}
</if> </if>
</where>
LIMIT ${start},${length} LIMIT ${start},${length}
</select> </select>
<select id="retrieve3AllCount" resultType="long"> <select id="retrieve3AllCount" resultType="long">
......
[
{
"stepCode": "0",
"stepName": "确认火情",
"stepStatus": "0",
"buttonCode": "FIRE_CONFIRM",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 0,
"checkYesOrNo": ""
},
{
"stepCode": "1",
"stepName": "汇报火情",
"stepStatus": "1",
"buttonCode": "LEADER_REPORT_FIRE",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 1,
"checkYesOrNo": ""
},
{
"stepCode": "2",
"stepName": "拨打报警电话",
"stepStatus": "0",
"buttonCode": "CALL_PHONE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 2,
"checkYesOrNo": ""
},
{
"stepCode": "3",
"stepName": "全站广播通报火情",
"stepStatus": "0",
"buttonCode": "ALL_STATION_PA",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 3,
"isAuto": 0
},
{
"stepCode": "4",
"stepName": "起火换流变转检修",
"stepStatus": "0",
"buttonCode": "FIRE_TRANSVERTER_TO_OVERHAUL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 4,
"checkYesOrNo": ""
},
{
"stepCode": "5",
"stepName": "核对一次设备状态",
"stepStatus": "0",
"buttonCode": "VERIFY_EQUIP_STATUS",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 5,
"checkYesOrNo": ""
},
{
"stepCode": "6",
"stepName": "电缆沟封堵",
"stepStatus": "0",
"buttonCode": "PLUG_CABLETRENCH",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 6,
"checkYesOrNo": ""
},
{
"stepCode": "7",
"stepName": "水喷雾系统启动",
"stepStatus": "0",
"buttonCode": "OPEN_WATERSYSTEM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 7,
"checkYesOrNo": "",
"condition": [
{
"equipName": "雨淋阀",
"equipCode": "92130300BH644",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "WSS_DelugeValve_Start",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "8",
"stepName": "CAFS启动",
"stepStatus": "0",
"buttonCode": "CAFS_OPEN",
"isParallel": "1",
"roleCode": "",
"index": 8,
"checkYesOrNo": ""
},
{
"stepCode": "9",
"stepName": "停运相关设备",
"stepStatus": "0",
"buttonCode": "SHUTDOWN_RELATED_EQUIP",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 9,
"checkYesOrNo": ""
},
{
"stepCode": "10",
"stepName": "通讯管控",
"stepStatus": "0",
"buttonCode": "COMMUNICATION_CONTROL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 10,
"checkYesOrNo": ""
},
{
"stepCode": "11",
"stepName": "防火封堵",
"stepStatus": "0",
"buttonCode": "FIRE_SEALING",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 11,
"checkYesOrNo": ""
},
{
"stepCode": "12",
"stepName": "反馈火情",
"stepStatus": "0",
"buttonCode": "FEEDBACK_FIRE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 12,
"checkYesOrNo": ""
},
{
"stepCode": "13",
"stepName": "启动事故排油系统",
"stepStatus": "1",
"buttonCode": "DRAIN_OIL_CONFIRM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 13,
"checkYesOrNo": ""
},
{
"stepCode": "14",
"stepName": "接引横扇社会消防力量进站",
"stepStatus": "0",
"buttonCode": "INTRODUCE_FORCES_INTO_STATION_HS",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 14,
"checkYesOrNo": ""
},
{
"stepCode": "15",
"stepName": "指挥权交接",
"stepStatus": "0",
"buttonCode": "HANDOVER_FIGTHHING",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 15,
"checkYesOrNo": ""
},
{
"stepCode": "16",
"stepName": "处理油污",
"stepStatus": "0",
"buttonCode": "OIL_INSPECTION",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 16,
"checkYesOrNo": ""
},
{
"stepCode": "17",
"stepName": "接引吴江社会消防力量进站",
"stepStatus": "0",
"buttonCode": "INTRODUCE_FORCES_INTO_STATION_WJ",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 17,
"checkYesOrNo": ""
},
{
"stepCode": "18",
"stepName": "启动涡扇炮机器人",
"stepStatus": "0",
"buttonCode": "START_TURBOFAN_ROBOT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 18,
"checkYesOrNo": ""
},
{
"stepCode": "19",
"stepName": "确认明火扑灭",
"stepStatus": "0",
"buttonCode": "FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 19,
"checkYesOrNo": ""
},
{
"stepCode": "20",
"stepName": "事故汇报",
"stepStatus": "0",
"buttonCode": "ACCIDENT_REPORT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 20,
"checkYesOrNo": ""
},
{
"stepCode": "21",
"stepName": "退出预案",
"stepStatus": "0",
"buttonCode": "END_EMERGENCY",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 21,
"checkYesOrNo": ""
}
]
\ No newline at end of file
...@@ -233,12 +233,12 @@ ...@@ -233,12 +233,12 @@
<repository> <repository>
<id>Releases</id> <id>Releases</id>
<name>Releases</name> <name>Releases</name>
<url>http://36.46.149.14:8081/nexus/content/repositories/releases/</url> <url>http://113.142.68.105:8081/nexus/content/repositories/releases/</url>
</repository> </repository>
<repository> <repository>
<id>Snapshots</id> <id>Snapshots</id>
<name>Snapshots</name> <name>Snapshots</name>
<url>http://36.46.149.14:8081/nexus/content/repositories/snapshots/</url> <url>http://113.142.68.105:8081/nexus/content/repositories/snapshots/</url>
</repository> </repository>
<!-- <repository>--> <!-- <repository>-->
<!-- <id>maven-public-ty</id>--> <!-- <id>maven-public-ty</id>-->
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
<pluginRepository> <pluginRepository>
<id>public</id> <id>public</id>
<name>Public Repositories</name> <name>Public Repositories</name>
<url>http://36.46.149.14:8081/nexus/content/groups/public/</url> <url>http://113.142.68.105:8081/nexus/content/groups/public/</url>
</pluginRepository> </pluginRepository>
</pluginRepositories> </pluginRepositories>
......
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