Commit 96d3415b authored by lisong's avatar lisong

修改bug

parent 3085c425
......@@ -470,6 +470,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.statisticsByStation(bizOrgCode));
}
......@@ -485,6 +488,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.todayAlarmEquipment(bizOrgCode));
}
@PersonIdentify
......@@ -500,6 +506,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.todayAlarmMessage(bizOrgCode));
}
@PersonIdentify
......@@ -515,6 +524,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.todayAlarmUnEliminateEquipment(bizOrgCode));
}
@PersonIdentify
......@@ -530,6 +542,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.todayAlarmUnEliminateMessage(bizOrgCode));
}
......@@ -546,6 +561,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.monthAlarm(bizOrgCode));
}
@PersonIdentify
......@@ -561,6 +579,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFireFightingSystemService.yearsAlarm(bizOrgCode));
}
......@@ -579,8 +600,15 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(iFireFightingSystemService.alarmList(page, bizOrgCode));
Page<Map<String, Object>> mapPage = iFireFightingSystemService.alarmList(page, bizOrgCode);
for (Map<String, Object> record : mapPage.getRecords()) {
record.put("createDate", ObjectUtils.isEmpty(record.get("createDate")) ? "" :String.valueOf(record.get("createDate")).replaceAll("T", " "));
}
return CommonResponseUtil.success(mapPage);
}
@PersonIdentify
......@@ -598,6 +626,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(iFireFightingSystemService.equipList(page, bizOrgCode));
}
......
......@@ -2187,7 +2187,7 @@
LEFT JOIN wl_equipment_category ec ON ec.id = fs.system_type
<where>
<if test="bizOrgCode!=null and bizOrgCode!=''">
and fs.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
and fs.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
ORDER BY fs.sort
......@@ -2204,7 +2204,7 @@
<where>
log.`status` = 1
<if test="bizOrgCode!=null and bizOrgCode!=''">
and es.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
and es.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
<if test="systemCode!=null and systemCode!=''">
and FIND_IN_SET( #{systemCode,jdbcType=VARCHAR}, log.system_codes )
......@@ -2220,7 +2220,7 @@
<where>
log.`confirm_date` IS NULL
<if test="bizOrgCode!=null and bizOrgCode!=''">
and es.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
and es.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS unConfirmInfoNum
......@@ -2234,7 +2234,7 @@
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 117
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if> ) `cou`
</select>
......@@ -2246,7 +2246,7 @@
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 116
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if> ) `cou`
</select>
......@@ -2285,7 +2285,7 @@
<where>
1=1
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND wc.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
AND wc.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) a
......@@ -2324,7 +2324,7 @@
<where>
1=1
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND wc.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
AND wc.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
group by `wc`.`id`
......@@ -2381,7 +2381,7 @@
AND r.is_delete = 1
AND ou.`code` IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
<if test="systemCode!=null and systemCode!=''">
AND fs.code = #{systemCode,jdbcType=VARCHAR}
......@@ -2432,7 +2432,7 @@
and `nz`.code = #{systemCode}
</if>
<if test="bizOrgCode!=null and bizOrgCode!=''">
and `nz`.biz_org_code = #{bizOrgCode}
and `nz`.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
</select>
......@@ -2467,7 +2467,7 @@
curdate() - INTERVAL 30 DAY
) &lt;= cast( `rd`.`report_date` AS date ))
AND ( `fs`.`code` = #{systemCode} )
AND ( `fs`.`biz_org_code` = #{bizOrgCode} )
AND ( `fs`.`biz_org_code` like concat(#{bizOrgCode}, '%') )
AND ((
`rd`.`index_type` LIKE '%Fault'
)
......@@ -2492,7 +2492,7 @@
f_fire_fighting_system
where
code = #{systemCode} and
biz_org_code = #{bizOrgCode}
biz_org_code like concat(#{bizOrgCode}, '%')
</select>
<select id="equipmentState" resultType="java.util.Map">
......@@ -2540,7 +2540,7 @@
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
WHERE
ed.`code` LIKE '92010800%'
AND biz_org_code = #{bizOrgCode}
AND biz_org_code like concat(#{bizOrgCode}, '%')
</select>
<select id="queryPressureNowStateBySpecificId" resultType="java.util.Map">
......@@ -2569,7 +2569,7 @@
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
WHERE
ed.`code` LIKE '92010800%'
AND biz_org_code = #{bizOrgCode}
AND biz_org_code like concat(#{bizOrgCode}, '%')
</select>
<select id="exportEquipmentList" resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentExportVO">
SELECT
......@@ -2650,7 +2650,7 @@
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and wesp.biz_org_code = #{dto.bizOrgCode}
and wesp.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
......@@ -2897,7 +2897,7 @@
SELECT COUNT(1) FROM wl_video v
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
v.biz_org_code = #{bizOrgCode}
v.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS videoNum,
......@@ -2905,7 +2905,7 @@
SELECT COUNT(1) FROM wl_equipment_specific ws
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
ws.biz_org_code = #{bizOrgCode}
ws.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
)AS equipNum
......@@ -2959,7 +2959,7 @@
( SELECT count( DISTINCT `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log`
WHERE create_date LIKE concat( curdate( ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentDateNum`,
(
......@@ -2971,7 +2971,7 @@
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
......@@ -2984,7 +2984,7 @@
WHERE
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentMonthNum`,
(
......@@ -2996,7 +2996,7 @@
`create_date` LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `lastMonthNum`
......@@ -3053,7 +3053,7 @@
( SELECT count( `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log` WHERE
create_date LIKE concat( curdate( ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentDateNum`,
......@@ -3065,7 +3065,7 @@
WHERE
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `yesterdayNum`,
......@@ -3077,7 +3077,7 @@
WHERE
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentMonthNum`,
(
......@@ -3089,7 +3089,7 @@
create_date LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `lastMonthNum`
......@@ -3150,7 +3150,7 @@
WHERE
create_date LIKE concat( curdate( ), '%' ) AND status = 1
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentDateNum`,
(
......@@ -3165,7 +3165,7 @@
AND status = 1
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `yesterdayNum`,
......@@ -3179,7 +3179,7 @@
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
AND status = 1
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentMonthNum`,
......@@ -3195,7 +3195,7 @@
AND status = 1
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `lastMonthNum`
......@@ -3255,7 +3255,7 @@
WHERE
create_date LIKE concat( curdate( ), '%' ) AND confirm_date IS NULL
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentDateNum`,
(
......@@ -3270,7 +3270,7 @@
AND confirm_date IS NULL
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `yesterdayNum`,
......@@ -3284,7 +3284,7 @@
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
AND confirm_date IS NULL
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `currentMonthNum`,
......@@ -3300,7 +3300,7 @@
AND confirm_date IS NULL
<if test="bizOrgCode != null and bizOrgCode != ''">
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
) AS `lastMonthNum`
......@@ -3330,8 +3330,7 @@
= `monthUtil`.`click_date`
AND `fireAlarm`.`equipment_specific_index_name` = '火警'
<if test="bizOrgCode != null and bizOrgCode != ''">
and fireAlarm.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code =
#{bizOrgCode} )
and fireAlarm.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
</if>
)
......@@ -3351,8 +3350,7 @@
LEFT JOIN `wl_equipment_specific_alarm_log` `breakdown` ON `monthUtil`.`click_date` = date_format(
`breakdown`.`create_date`, '%Y-%m-%d' ) AND `breakdown`.`equipment_specific_index_name` = '故障'
<if test="bizOrgCode != null and bizOrgCode != ''">
and breakdown.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code =
#{bizOrgCode} )
and breakdown.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
</if>
)
......@@ -3372,7 +3370,7 @@
LEFT JOIN `wl_equipment_specific_alarm_log` `shield` ON date_format( `shield`.`create_date`, '%Y-%m-%d' ) =
`monthUtil`.`click_date` AND `shield`.`equipment_specific_index_name` = '屏蔽'
<if test="bizOrgCode != null and bizOrgCode != ''">
and shield.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode}
and shield.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%')
)
</if>
......@@ -3395,7 +3393,7 @@
date_format( `other`.`create_date`, '%Y-%m-%d' ) = `monthUtil`.`click_date`
AND `other`.`equipment_specific_index_name` NOT IN ( '火警', '故障', '屏蔽' )
<if test="bizOrgCode != null and bizOrgCode != ''">
and other.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode} )
and other.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
</if>
......@@ -3427,7 +3425,7 @@
FROM
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
<if test="bizOrgCode != null and bizOrgCode != ''">
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode} )
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
</if>
)
......@@ -3444,7 +3442,7 @@
FROM
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
<if test="bizOrgCode != null and bizOrgCode != ''">
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode} )
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
</if>
)
GROUP BY
......@@ -3461,7 +3459,7 @@
SELECT * FROM alarm_all_list_view
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
specificId in (SELECT id FROM wl_equipment_specific WHERE biz_org_code = #{bizOrgCode})
specificId in (SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%'))
</if>
</where>
ORDER BY createDate DESC
......
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