Commit 1a2021d9 authored by 高建强's avatar 高建强

item:修改实时监测分页统计bug

parent 1142b3c7
......@@ -113,15 +113,20 @@
</choose>
</select>
<select id="queryForFireEquipmentHistoryCount" resultType="long">
SELECT
count(1)
COUNT(1)
FROM
(
SELECT
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
ein.name as eq_point_name,
CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
ELSE ind.value END 'e_value',
ein.unit as eq_point_unit,
sce.name as source_name,
(
SELECT
group_concat(DISTINCT f.`name`)
......@@ -131,12 +136,15 @@
WHERE
efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName,
ind.update_date
ind.update_date as create_date
FROM
wl_equipment_specific_index ind
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
WHERE 1=1 AND ind.value IS NOT NULL
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
left join f_risk_source as sce on str.source_id = sce.id
) d
WHERE
1 = 1
......@@ -147,8 +155,9 @@
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if test="startTime!=null">
AND d.update_date BETWEEN '${startTime}' AND '${endTime}'
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
AND e_value IS NOT NULL AND e_value != ''
</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