Commit c8cb56fe authored by lisong's avatar lisong

修改电梯月度情况综述定时统计

parent fd9f770b
...@@ -95,7 +95,7 @@ public class AlertCalledDto extends BaseDto { ...@@ -95,7 +95,7 @@ public class AlertCalledDto extends BaseDto {
private String alertStageCode; private String alertStageCode;
@ApiModelProperty(value = "组织机构") @ApiModelProperty(value = "组织机构")
private String orgCode; private String bizOrgCode;
@ApiModelProperty(value = "使用单位") @ApiModelProperty(value = "使用单位")
private String useUnit; private String useUnit;
......
...@@ -161,8 +161,8 @@ public class AlertCalled extends BaseEntity { ...@@ -161,8 +161,8 @@ public class AlertCalled extends BaseEntity {
/** /**
* 组织机构 * 组织机构
*/ */
@TableField("org_code") @TableField("biz_org_code")
private String orgCode; private String bizOrgCode;
/** /**
* 工单编号 * 工单编号
......
...@@ -17,27 +17,19 @@ ...@@ -17,27 +17,19 @@
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) AS elevatorNum, WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) AS elevatorNum,
(SELECT COUNT(1) (SELECT COUNT(1)
FROM tz_alert_called FROM tz_alert_called
WHERE equipment_id IN (SELECT RECORD WHERE biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate}) AS emergencyEventsAll,
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%') ) and call_time BETWEEN #{startDate} and #{endDate}) AS emergencyEventsAll,
(SELECT COUNT(1) (SELECT COUNT(1)
FROM tz_alert_called FROM tz_alert_called
WHERE alarm_type_code = '960' WHERE alarm_type_code = '960'
AND equipment_id IN (SELECT RECORD AND biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate}) AS trappedPeople,
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) and call_time BETWEEN #{startDate} and #{endDate}) AS trappedPeople,
(SELECT COUNT(1) (SELECT COUNT(1)
FROM tz_alert_called FROM tz_alert_called
WHERE alarm_type_code = '961' WHERE alarm_type_code = '961'
AND equipment_id IN (SELECT RECORD AND biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate}) AS breakdownRescue,
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) and call_time BETWEEN #{startDate} and #{endDate}) AS breakdownRescue,
(SELECT COUNT(1) (SELECT COUNT(1)
FROM tz_alert_called FROM tz_alert_called
WHERE alarm_type_code = '962' WHERE alarm_type_code = '962'
AND equipment_id IN (SELECT RECORD AND biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate}) AS complaint,
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) and call_time BETWEEN #{startDate} and #{endDate}) AS complaint,
( (
SELECT ( SELECT (
( (
...@@ -46,10 +38,7 @@ ...@@ -46,10 +38,7 @@
WHERE alert_called_id IN ( WHERE alert_called_id IN (
SELECT sequence_nbr SELECT sequence_nbr
FROM tz_alert_called FROM tz_alert_called
WHERE equipment_id IN ( WHERE biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate})
SELECT RECORD
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) and call_time BETWEEN #{startDate} and #{endDate})
AND field_code = 'trapped_num' AND field_code = 'trapped_num'
) - ( ) - (
SELECT ifnull(SUM(field_value), 0) SELECT ifnull(SUM(field_value), 0)
...@@ -57,10 +46,7 @@ ...@@ -57,10 +46,7 @@
WHERE alert_called_id IN ( WHERE alert_called_id IN (
SELECT sequence_nbr SELECT sequence_nbr
FROM tz_alert_called FROM tz_alert_called
WHERE equipment_id IN ( WHERE biz_org_code LIKE concat(#{orgCode}, '%') and call_time BETWEEN #{startDate} and #{endDate})
SELECT RECORD
FROM idx_biz_jg_supervision_info
WHERE ORG_BRANCH_CODE LIKE concat(#{orgCode}, '%')) and call_time BETWEEN #{startDate} and #{endDate})
AND field_code = 'die_num' AND field_code = 'die_num'
) )
)) AS rescuePersonnel )) AS rescuePersonnel
......
...@@ -354,11 +354,13 @@ ...@@ -354,11 +354,13 @@
ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'latitude', null ) AS latitude, ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'latitude', null ) AS latitude,
ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'longitude', null ) AS longitude, ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'longitude', null ) AS longitude,
ifnull(jui.FACTORY_USE_SITE_STREET, '') AS street, ifnull(jui.FACTORY_USE_SITE_STREET, '') AS street,
concat(jui.PROVINCE, '#',jui.CITY, '#',jui.COUNTY) AS regionCode concat(jui.PROVINCE, '#',jui.CITY, '#',jui.COUNTY) AS regionCode,
jsi.ORG_BRANCH_CODE as orgCode
FROM FROM
idx_biz_jg_use_info jui idx_biz_jg_use_info jui
LEFT JOIN idx_biz_jg_other_info joi ON jui.RECORD = joi.RECORD LEFT JOIN idx_biz_jg_other_info joi ON jui.RECORD = joi.RECORD
LEFT JOIN idx_biz_jg_register_info jri ON jri.RECORD = jui.RECORD LEFT JOIN idx_biz_jg_register_info jri ON jri.RECORD = jui.RECORD
LEFT JOIN idx_biz_jg_supervision_info jsi ON jsi.RECORD = jui.RECORD
WHERE WHERE
jri.EQU_LIST = '3000' jri.EQU_LIST = '3000'
<if test="elevator.rescueCode!=null and elevator.rescueCode!='' "> <if test="elevator.rescueCode!=null and elevator.rescueCode!='' ">
......
...@@ -592,6 +592,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -592,6 +592,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalled.setCity(map.get("city").toString()); alertCalled.setCity(map.get("city").toString());
alertCalled.setDistrict(map.get("district").toString()); alertCalled.setDistrict(map.get("district").toString());
alertCalled.setRegionCode(map.get("regionCode").toString()); alertCalled.setRegionCode(map.get("regionCode").toString());
alertCalled.setBizOrgCode(map.get("orgCode").toString());
} }
......
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