Commit 7fcf6030 authored by tangwei's avatar tangwei

Merge branch 'developer' into develop_ccs

parents bb0b6e91 e73990ed
...@@ -554,6 +554,8 @@ ...@@ -554,6 +554,8 @@
a.region_code LIKE CONCAT('%', #{item}, '%') a.region_code LIKE CONCAT('%', #{item}, '%')
</foreach> </foreach>
</if> </if>
order by a.call_time desc
</select> </select>
......
...@@ -180,7 +180,7 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -180,7 +180,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据 // 编辑同步redis装备iotcode数据
syncDataService.saveOrUpdateEquipIotCodeRedisData(null); syncDataService.saveOrUpdateEquipIotCodeRedisData(null);
if (syncSwitch) { if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(equipmentId); equipmentSpecificSerivce.equipSpecificDataSync(date.getEquipmentSpecific().getId());
} }
EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class); EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
controllerProxy.refreshCount(vo.getBizOrgCode()); controllerProxy.refreshCount(vo.getBizOrgCode());
...@@ -291,7 +291,7 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -291,7 +291,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据 // 编辑同步redis装备iotcode数据
syncDataService.saveOrUpdateEquipIotCodeRedisData(null); syncDataService.saveOrUpdateEquipIotCodeRedisData(null);
if (syncSwitch) { if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(bean.getEquipmentId()); equipmentSpecificSerivce.equipSpecificDataSync(equipmentSpecific.getId());
} }
// 刷新缓存,新的单位和之前的单位都刷新 // 刷新缓存,新的单位和之前的单位都刷新
EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class); EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
......
...@@ -185,7 +185,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -185,7 +185,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
LocalDateTime createDate = (LocalDateTime) x.get("createDate"); LocalDateTime createDate = (LocalDateTime) x.get("createDate");
x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant())); x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant()));
x.put("handleType", ConfirmAlamEnum.getTypeByCode(String.valueOf(x.get("handleType")))); x.put("handleType", ConfirmAlamEnum.getTypeByCode(String.valueOf(x.get("handleType"))));
x.put("fireEquipmentName", x.get("fireEquipmentName")); // 冗余统一跑马灯显示字段取值
x.put("equipmentSpecificIndexName", x.get("fireEquipmentSpecificIndexName"));
} }
} }
return resultPage; return resultPage;
......
...@@ -336,7 +336,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -336,7 +336,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
list.add(alertHandlerInfoDto); list.add(alertHandlerInfoDto);
} }
map.put("agReturnVisit",dispatchPaper.getFeedbackTime()); map.put("agReturnVisit",dispatchPaper.getFeedbackFinishTime()); // 修复BUG 3439 by kongfm
} else { } else {
for(String s:str) { for(String s:str) {
AlertHandlerInfoDto alertHandlerInfoDto = new AlertHandlerInfoDto(); AlertHandlerInfoDto alertHandlerInfoDto = new AlertHandlerInfoDto();
......
...@@ -3103,80 +3103,149 @@ GROUP BY ...@@ -3103,80 +3103,149 @@ GROUP BY
-- ---------------------------- -- ----------------------------
-- View structure for v_fire_cafs_fightingsys_equip_count -- View structure for v_fire_cafs_fightingsys_equip_count
-- ---------------------------- -- ----------------------------
DROP VIEW DROP VIEW IF EXISTS `v_fire_cafs_fightingsys_equip_count`;
IF EXISTS `v_fire_cafs_fightingsys_equip_count`;
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `v_fire_cafs_fightingsys_equip_count` AS CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `v_fire_cafs_fightingsys_equip_count` AS
SELECT SELECT
SUM( sum(
(
CASE CASE
WHEN temp.`value` = 'true' THEN WHEN (`temp`.`value` = 'true') THEN
1 1
ELSE ELSE
0 0
END END
) AS total, )
temp.fieldlabel, ) AS `total`,
temp.fieldname `temp`.`fieldlabel` AS `fieldlabel`,
`temp`.`fieldname` AS `fieldname`
FROM FROM
( (
SELECT SELECT
(
CASE CASE
WHEN esi.equipment_index_key LIKE '%Run' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Run'
) THEN
'Run' 'Run'
WHEN esi.equipment_index_key LIKE '%Stop' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Stop'
) THEN
'Stop' 'Stop'
WHEN esi.equipment_index_key LIKE '%Open' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%_Open'
) THEN
'Open' 'Open'
WHEN esi.equipment_index_key LIKE '%Close' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Close'
) THEN
'Close' 'Close'
WHEN esi.equipment_index_key LIKE '%Fault' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Fault'
) THEN
'Fault' 'Fault'
WHEN esi.equipment_index_key LIKE '%RemoteControl' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%_RemoteControl'
) THEN
'RemoteControl' 'RemoteControl'
WHEN esi.equipment_index_key LIKE '%Alarm' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Alarm'
) THEN
'Alarm' 'Alarm'
WHEN esi.equipment_index_key LIKE '%Abnormal' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Abnormal'
) THEN
'Abnormal' 'Abnormal'
END AS fieldname, END
) AS `fieldname`,
(
CASE CASE
WHEN esi.equipment_index_key LIKE '%Run' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Run'
) THEN
'运行' '运行'
WHEN esi.equipment_index_key LIKE '%Stop' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Stop'
) THEN
'停止' '停止'
WHEN esi.equipment_index_key LIKE '%Open' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%_Open'
) THEN
'开到位' '开到位'
WHEN esi.equipment_index_key LIKE '%Close' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Close'
) THEN
'关到位' '关到位'
WHEN esi.equipment_index_key LIKE '%Fault' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Fault'
) THEN
'故障' '故障'
WHEN esi.equipment_index_key LIKE '%RemoteControl' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%_RemoteControl'
) THEN
'远方' '远方'
WHEN esi.equipment_index_key LIKE '%Alarm' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Alarm'
) THEN
'告警' '告警'
WHEN esi.equipment_index_key LIKE '%Abnormal' THEN WHEN (
`esi`.`equipment_index_key` LIKE '%Abnormal'
) THEN
'异常' '异常'
END AS fieldlabel, END
esi.`value` ) AS `fieldlabel`,
FROM `esi`.`value` AS `value`
wl_equipment_specific_index esi FROM
LEFT JOIN wl_equipment_specific es ON es.id = esi.equipment_specific_id (
LEFT JOIN f_fire_fighting_system fs ON find_in_set(`fs`.`id`, `es`.`system_id`) (
WHERE `wl_equipment_specific_index` `esi`
fs.`code` = '029026401813010000000023' LEFT JOIN `wl_equipment_specific` `es` ON (
AND ( (
esi.equipment_index_key LIKE '%Run' `es`.`id` = `esi`.`equipment_specific_id`
OR esi.equipment_index_key LIKE '%Stop' )
OR esi.equipment_index_key LIKE '%Open' )
OR esi.equipment_index_key LIKE '%Close' )
OR esi.equipment_index_key LIKE '%Fault' LEFT JOIN `f_fire_fighting_system` `fs` ON (
OR esi.equipment_index_key LIKE '%RemoteControl' (
OR esi.equipment_index_key LIKE '%Alarm' 0 <> find_in_set(`fs`.`id`, `es`.`system_id`)
OR esi.equipment_index_key LIKE '%Abnormal' )
) )
) temp )
WHERE
(
(
`fs`.`code` = '029026401813010000000023'
)
AND (
(
`esi`.`equipment_index_key` LIKE '%Run'
)
OR (
`esi`.`equipment_index_key` LIKE '%Stop'
)
OR (
`esi`.`equipment_index_key` LIKE '%_Open'
)
OR (
`esi`.`equipment_index_key` LIKE '%Close'
)
OR (
`esi`.`equipment_index_key` LIKE '%Fault'
)
OR (
`esi`.`equipment_index_key` LIKE '%_RemoteControl'
)
OR (
`esi`.`equipment_index_key` LIKE '%Alarm'
)
OR (
`esi`.`equipment_index_key` LIKE '%Abnormal'
)
)
)
) `temp`
GROUP BY GROUP BY
temp.fieldlabel, `temp`.`fieldlabel`,
temp.fieldname; `temp`.`fieldname`;
-- ---------------------------- -- ----------------------------
-- View structure for v_person_plan_task -- View structure for v_person_plan_task
-- ---------------------------- -- ----------------------------
......
...@@ -199,16 +199,17 @@ ...@@ -199,16 +199,17 @@
AS fireEquipmentPointValue, AS fireEquipmentPointValue,
wlesal.type AS type, wlesal.type AS type,
wlesal.create_date AS createDate, wlesal.create_date AS createDate,
wlesal.location AS warehouseStructureName, CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/
(select (select
group_concat(fet.`name`) group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = wlesal.equipment_specific_id where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName ) as equipmentName,
wlesal.equipment_specific_name as equipmentSpecificName,
wles.position
FROM wl_equipment_specific_alarm_log wlesal FROM wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
left join wl_stock_detail as wsd on wsd.equipment_specific_id = wlesal.equipment_specific_id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d ) d
......
...@@ -807,7 +807,7 @@ ...@@ -807,7 +807,7 @@
LEFT JOIN wl_area a ON a.id = es.area_id LEFT JOIN wl_area a ON a.id = es.area_id
<where> <where>
<if test="equipmentId != null"> <if test="equipmentId != null">
ed.equipment_id = #{equipmentId} es.id = #{equipmentId}
</if> </if>
</where> </where>
</select> </select>
......
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