Commit 5d6e11d8 authored by litengwei's avatar litengwei

代码提交

parent dc51e9f2
...@@ -294,4 +294,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -294,4 +294,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
IPage<EquipTypeImgAmountVO> getMonitoringUnitList(@Param("page") IPage page,@Param("equipTypeAmountPage") EquipTypeAmountPageDTO equipTypeAmountPage); IPage<EquipTypeImgAmountVO> getMonitoringUnitList(@Param("page") IPage page,@Param("equipTypeAmountPage") EquipTypeAmountPageDTO equipTypeAmountPage);
List<Map<String, Object >> getMonitoringCount(String bizOrgCode); List<Map<String, Object >> getMonitoringCount(String bizOrgCode);
String getMonitoringEquip(String id);
String getMonitoringOther(String id);
} }
...@@ -2149,6 +2149,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -2149,6 +2149,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override @Override
public IPage<EquipTypeImgAmountVO> getMonitoringUnitList(EquipTypeAmountPageDTO equipTypeAmountPage) { public IPage<EquipTypeImgAmountVO> getMonitoringUnitList(EquipTypeAmountPageDTO equipTypeAmountPage) {
IPage<EquipTypeImgAmountVO> record = equipmentSpecificMapper.getMonitoringUnitList(equipTypeAmountPage.getPage(),equipTypeAmountPage);
record.getRecords().forEach(e-> {
e.setEquip(equipmentSpecificMapper.getMonitoringEquip(String.valueOf(e.getId())));
e.setOther(equipmentSpecificMapper.getMonitoringOther(String.valueOf(e.getId())));
});
return equipmentSpecificMapper.getMonitoringUnitList(equipTypeAmountPage.getPage(),equipTypeAmountPage); return equipmentSpecificMapper.getMonitoringUnitList(equipTypeAmountPage.getPage(),equipTypeAmountPage);
} }
......
...@@ -2601,9 +2601,7 @@ ...@@ -2601,9 +2601,7 @@
wes.biz_org_name as bizOrgName, wes.biz_org_name as bizOrgName,
wes.name as equipmentName, wes.name as equipmentName,
wed.equipment_name systemType, wed.equipment_name systemType,
wes.equip_status AS equipStatus, wes.equip_status AS equipStatus
(SELECT IFNULL(SUM(IF(aqr.SOURCE = 'equip', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = wes.id ) as 'equip',
(SELECT IFNULL(SUM(IF(aqr.SOURCE != 'equip', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = wes.id ) as 'other'
FROM FROM
wl_equipment_specific wes wl_equipment_specific wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
...@@ -2635,4 +2633,11 @@ ...@@ -2635,4 +2633,11 @@
GROUP BY code GROUP BY code
</select> </select>
<select id="getMonitoringEquip" resultType="java.lang.String">
SELECT IFNULL(SUM(IF(aqr.SOURCE = 'equip', 1, 0)), 0) as num FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = #{id}
</select>
<select id="getMonitoringOther" resultType="java.lang.String">
SELECT IFNULL(SUM(IF(aqr.SOURCE != 'equip', 1, 0)), 0) as num FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = #{id}
</select>
</mapper> </mapper>
\ No newline at end of file
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