|
@@ -63,6 +63,117 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="alarmApparatusExport" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilAlarmApparatusExport">
|
|
|
|
+ select z.* from (
|
|
|
|
+ SELECT area.`name` AS area_name,
|
|
|
|
+ building.`name` AS building_name,
|
|
|
|
+ unit.`name` AS unit_name,
|
|
|
|
+ house.`name` AS house_name,
|
|
|
|
+ house.new_phone AS user_phone,
|
|
|
|
+ house.house_user_name AS user_name,
|
|
|
|
+ dict.dict_label AS district,
|
|
|
|
+ area.administrative AS management_name,
|
|
|
|
+ `user`.nick_name AS install_user,
|
|
|
|
+ `user`.phonenumber AS install_phone,
|
|
|
|
+ info.update_info_time AS install_time,
|
|
|
|
+ material.material_quality_code AS material_quality_code,
|
|
|
|
+ quality.`name` AS material_quality_name
|
|
|
|
+ FROM z_engineering_civil civil
|
|
|
|
+ LEFT JOIN z_engineering_node node ON civil.id = node.civli_id
|
|
|
|
+ LEFT JOIN z_area area ON area.id = civil.area_id
|
|
|
|
+ LEFT JOIN z_building building ON building.id = civil.building_id
|
|
|
|
+ LEFT JOIN z_unit unit ON unit.id = civil.unit_id
|
|
|
|
+ LEFT JOIN z_house house ON house.id = civil.house_id
|
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_type = 'district' AND dict.dict_value = civil.district
|
|
|
|
+ LEFT JOIN z_engineering_info info ON info.eng_info_id = node.id
|
|
|
|
+ LEFT JOIN sys_user `user` ON `user`.user_id = info.construct_user
|
|
|
|
+ LEFT JOIN z_engineering_material material ON material.details_id = info.id
|
|
|
|
+ LEFT JOIN z_engin_material_quality quality ON quality.id = material.brand
|
|
|
|
+ WHERE node.type = '报警器'
|
|
|
|
+ <if test="p.district != null and p.district != ''">
|
|
|
|
+ and civil.district = #{p.district}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
|
+ and civil.area_id = #{p.areaId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
|
+ and civil.building_id = #{p.buildingId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
|
+ and civil.unit_id = #{p.unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginType != null and p.enginType != ''">
|
|
|
|
+ and civil.engin_type = #{p.enginType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginClassification != null and p.enginClassification != ''">
|
|
|
|
+ and civil.engin_classification = #{p.enginClassification}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginCycle != null and p.enginCycle != ''">
|
|
|
|
+ and civil.engin_cycle = 0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.beginTime != null and p.beginTime != ''">
|
|
|
|
+ AND info.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.createBy != null and p.createBy != ''">
|
|
|
|
+ and info.create_by like CONCAT(#{p.createBy},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <foreach collection="tableNames" item="name">
|
|
|
|
+ union
|
|
|
|
+ SELECT area.`name` AS area_name,
|
|
|
|
+ building.`name` AS building_name,
|
|
|
|
+ unit.`name` AS unit_name,
|
|
|
|
+ house.`name` AS house_name,
|
|
|
|
+ house.new_phone AS user_phone,
|
|
|
|
+ house.house_user_name AS user_name,
|
|
|
|
+ dict.dict_label AS district,
|
|
|
|
+ area.administrative AS management_name,
|
|
|
|
+ `user`.nick_name AS install_user,
|
|
|
|
+ `user`.phonenumber AS install_phone,
|
|
|
|
+ info.update_info_time AS install_time,
|
|
|
|
+ material.material_quality_code AS material_quality_code,
|
|
|
|
+ quality.`name` AS material_quality_name
|
|
|
|
+ FROM z_engineering_civil civil
|
|
|
|
+ LEFT JOIN z_engineering_node_${name} node ON civil.id = node.civli_id
|
|
|
|
+ LEFT JOIN z_area area ON area.id = civil.area_id
|
|
|
|
+ LEFT JOIN z_building building ON building.id = civil.building_id
|
|
|
|
+ LEFT JOIN z_unit unit ON unit.id = civil.unit_id
|
|
|
|
+ LEFT JOIN z_house house ON house.id = civil.house_id
|
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_type = 'district' AND dict.dict_value = civil.district
|
|
|
|
+ LEFT JOIN z_engineering_info_${name} info ON info.eng_info_id = node.id
|
|
|
|
+ LEFT JOIN sys_user `user` ON `user`.user_id = info.construct_user
|
|
|
|
+ LEFT JOIN z_engineering_material_${name} material ON material.details_id = info.id
|
|
|
|
+ LEFT JOIN z_engin_material_quality quality ON quality.id = material.brand
|
|
|
|
+ WHERE node.type = '报警器'
|
|
|
|
+ <if test="p.district != null and p.district != ''">
|
|
|
|
+ and civil.district = #{p.district}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
|
+ and civil.area_id = #{p.areaId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
|
+ and civil.building_id = #{p.buildingId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
|
+ and civil.unit_id = #{p.unitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginType != null and p.enginType != ''">
|
|
|
|
+ and civil.engin_type = #{p.enginType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginClassification != null and p.enginClassification != ''">
|
|
|
|
+ and civil.engin_classification = #{p.enginClassification}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.enginCycle != null and p.enginCycle != ''">
|
|
|
|
+ and civil.engin_cycle = 0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.beginTime != null and p.beginTime != ''">
|
|
|
|
+ AND info.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="p.createBy != null and p.createBy != ''">
|
|
|
|
+ and info.create_by like CONCAT(#{p.createBy},'%')
|
|
|
|
+ </if>
|
|
|
|
+ </foreach>
|
|
|
|
+ ) as z
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="exportObtainQualifiedRoom" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilObtainQualifiedRoom">
|
|
<select id="exportObtainQualifiedRoom" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilObtainQualifiedRoom">
|
|
SELECT
|
|
SELECT
|
|
@@ -348,7 +459,7 @@
|
|
</foreach>
|
|
</foreach>
|
|
order by a.update_info_time asc
|
|
order by a.update_info_time asc
|
|
</select>
|
|
</select>
|
|
-<select id="getObtainRoomcCompletionInformationList" resultType="com.ruoyi.zdsz.domain.vo.roomStatusVo">
|
|
|
|
|
|
+ <select id="getObtainRoomcCompletionInformationList" resultType="com.ruoyi.zdsz.domain.vo.roomStatusVo">
|
|
select
|
|
select
|
|
a.area_id,
|
|
a.area_id,
|
|
a.building_id,
|
|
a.building_id,
|