|
@@ -266,7 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and update_info_time between #{createTime[0]} and #{createTime[1]}
|
|
|
</if>
|
|
|
<if test="UserName != null and UserName != ''">
|
|
|
- and create_by like CONCAT(#{UserName},'%')
|
|
|
+ and create_by like CONCAT('%',#{UserName},'%')
|
|
|
</if>
|
|
|
<foreach collection="tableNames" item="name">
|
|
|
union
|
|
@@ -280,9 +280,160 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and update_info_time between #{createTime[0]} and #{createTime[1]}
|
|
|
</if>
|
|
|
<if test="UserName != null and UserName != ''">
|
|
|
- and create_by like CONCAT(#{UserName},'%')
|
|
|
+ and create_by like CONCAT('%',#{UserName},'%')
|
|
|
</if>
|
|
|
</foreach>
|
|
|
|
|
|
</select>
|
|
|
+ <select id="getexportList" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilExportVo">
|
|
|
+ SELECT
|
|
|
+ a.district,
|
|
|
+ g.`name` AS area_id,
|
|
|
+ h.`name` AS building_id,
|
|
|
+ i.`name` AS unit_id,
|
|
|
+ j.`name` AS house_id,
|
|
|
+ k.dict_label AS engin_classification,
|
|
|
+ CASE
|
|
|
+ a.engin_type
|
|
|
+ WHEN 'new_built' THEN
|
|
|
+ '新建' ELSE '旧改'
|
|
|
+ END AS engin_type,
|
|
|
+ a.completion_status,
|
|
|
+ b.type,
|
|
|
+ c.construct_addre,
|
|
|
+ c.construct_according_drawings,
|
|
|
+ c.segmented_compression_qualified,
|
|
|
+ c.backfill_time,
|
|
|
+ c.construct_phone,
|
|
|
+ c.construct_time,
|
|
|
+ c.head_name,
|
|
|
+ c.head_phone,
|
|
|
+ d.corrosion_level,
|
|
|
+ d.visit_type,
|
|
|
+ d.self_closing_valve_type,
|
|
|
+ d.brand,
|
|
|
+ e.`name` AS material_quality,
|
|
|
+ f.`name` AS specifications,
|
|
|
+ d.number,
|
|
|
+ c.update_info_time as updateInfoTime,
|
|
|
+ c.create_by as createBy
|
|
|
+ FROM
|
|
|
+ z_engineering_civil a
|
|
|
+ LEFT JOIN z_engineering_node b ON a.id = b.civli_id
|
|
|
+ LEFT JOIN z_engineering_info c ON b.id = c.eng_info_id
|
|
|
+ LEFT JOIN z_engineering_material d ON c.id = d.details_id
|
|
|
+ LEFT JOIN z_engin_material_quality e ON e.id = d.material_quality
|
|
|
+ LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
|
+ LEFT JOIN z_area g ON g.id = a.area_id
|
|
|
+ LEFT JOIN z_building h ON h.id = a.building_id
|
|
|
+ LEFT JOIN z_unit i ON i.id = a.unit_id
|
|
|
+ LEFT JOIN z_house j ON j.id = a.house_id
|
|
|
+ LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
|
+ AND k.dict_value = a.engin_classification
|
|
|
+ WHERE
|
|
|
+ a.create_time LIKE CONCAT(REPLACE(#{createTime}, '_', '-'),'%')
|
|
|
+ <if test="p.district != null and p.district != ''">
|
|
|
+ and a.district = #{p.district}
|
|
|
+ </if>
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
+ and a.area_id = #{p.areaId}
|
|
|
+ </if>
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
+ and a.building_id = #{p.buildingId}
|
|
|
+ </if>
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
+ and a.unit_id = #{p.unitId}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginType != null and p.enginType != ''">
|
|
|
+ and engin_type = #{p.enginType}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginClassification != null and p.enginClassification != ''">
|
|
|
+ and engin_classification = #{p.enginClassification}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginCycle != null and p.enginCycle != ''">
|
|
|
+ and engin_cycle = 0
|
|
|
+ </if>
|
|
|
+ <if test="p.beginTime != null and p.beginTime != ''">
|
|
|
+ and update_info_time between #{beginTime[0]} and #{beginTime[1]}
|
|
|
+ </if>
|
|
|
+ <if test="p.createBy != null and p.createBy != ''">
|
|
|
+ and create_by like CONCAT(#{p.createBy},'%')
|
|
|
+ </if>
|
|
|
+ <foreach collection="tableNames" item="name">
|
|
|
+ union
|
|
|
+ SELECT
|
|
|
+ a.district,
|
|
|
+ g.`name` AS area_id,
|
|
|
+ h.`name` AS building_id,
|
|
|
+ i.`name` AS unit_id,
|
|
|
+ j.`name` AS house_id,
|
|
|
+ k.dict_label AS engin_classification,
|
|
|
+ CASE
|
|
|
+ a.engin_type
|
|
|
+ WHEN 'new_built' THEN
|
|
|
+ '新建' ELSE '旧改'
|
|
|
+ END AS engin_type,
|
|
|
+ a.completion_status,
|
|
|
+ b.type,
|
|
|
+ c.construct_addre,
|
|
|
+ c.construct_according_drawings,
|
|
|
+ c.segmented_compression_qualified,
|
|
|
+ c.backfill_time,
|
|
|
+ c.construct_phone,
|
|
|
+ c.construct_time,
|
|
|
+ c.head_name,
|
|
|
+ c.head_phone,
|
|
|
+ d.corrosion_level,
|
|
|
+ d.visit_type,
|
|
|
+ d.self_closing_valve_type,
|
|
|
+ d.brand,
|
|
|
+ e.`name` AS material_quality,
|
|
|
+ f.`name` AS specifications,
|
|
|
+ d.number,
|
|
|
+ c.update_info_time as updateInfoTime,
|
|
|
+ c.create_by as createBy
|
|
|
+ FROM
|
|
|
+ z_engineering_civil a
|
|
|
+ LEFT JOIN z_engineering_node_${name} b ON a.id = b.civli_id
|
|
|
+ LEFT JOIN z_engineering_info_${name} c ON b.id = c.eng_info_id
|
|
|
+ LEFT JOIN z_engineering_material_${name} d ON c.id = d.details_id
|
|
|
+ LEFT JOIN z_engin_material_quality e ON e.id = d.material_quality
|
|
|
+ LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
|
+ LEFT JOIN z_area g ON g.id = a.area_id
|
|
|
+ LEFT JOIN z_building h ON h.id = a.building_id
|
|
|
+ LEFT JOIN z_unit i ON i.id = a.unit_id
|
|
|
+ LEFT JOIN z_house j ON j.id = a.house_id
|
|
|
+ LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
|
+ AND k.dict_value = a.engin_classification
|
|
|
+ WHERE
|
|
|
+ a.create_time LIKE CONCAT(REPLACE(#{name}, '_', '-'),'%')
|
|
|
+ <if test="p.district != null and p.district != ''">
|
|
|
+ and a.district = #{p.district}
|
|
|
+ </if>
|
|
|
+ <if test="p.areaId != null and p.areaId != ''">
|
|
|
+ and a.area_id = #{p.areaId}
|
|
|
+ </if>
|
|
|
+ <if test="p.buildingId != null and p.buildingId != ''">
|
|
|
+ and a.building_id = #{p.buildingId}
|
|
|
+ </if>
|
|
|
+ <if test="p.unitId != null and p.unitId != ''">
|
|
|
+ and a.unit_id = #{p.unitId}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginType != null and p.enginType != ''">
|
|
|
+ and engin_type = #{p.enginType}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginClassification != null and p.enginClassification != ''">
|
|
|
+ and engin_classification = #{p.enginClassification}
|
|
|
+ </if>
|
|
|
+ <if test="p.enginCycle != null and p.enginCycle != ''">
|
|
|
+ and engin_cycle = 0
|
|
|
+ </if>
|
|
|
+ <if test="p.beginTime != null and p.beginTime != ''">
|
|
|
+ and update_info_time between #{beginTime[0]} and #{beginTime[1]}
|
|
|
+ </if>
|
|
|
+ <if test="p.createBy != null and p.createBy != ''">
|
|
|
+ and create_by like CONCAT(#{p.createBy},'%')
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|