|
@@ -576,7 +576,7 @@
|
|
WHERE
|
|
WHERE
|
|
1=1
|
|
1=1
|
|
<if test="createTime != null and createTime != ''">
|
|
<if test="createTime != null and createTime != ''">
|
|
- and update_info_time between #{createTime[0]} and #{createTime[1]}
|
|
|
|
|
|
+ AND update_info_time BETWEEN concat( #{createTime[0]}, ' 00:00:00' ) AND concat( #{createTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="UserName != null and UserName != ''">
|
|
<if test="UserName != null and UserName != ''">
|
|
and create_by like CONCAT('%',#{UserName},'%')
|
|
and create_by like CONCAT('%',#{UserName},'%')
|
|
@@ -590,7 +590,7 @@
|
|
WHERE
|
|
WHERE
|
|
1=1
|
|
1=1
|
|
<if test="createTime != null and createTime != ''">
|
|
<if test="createTime != null and createTime != ''">
|
|
- and update_info_time between #{createTime[0]} and #{createTime[1]}
|
|
|
|
|
|
+ AND update_info_time BETWEEN concat( #{createTime[0]}, ' 00:00:00' ) AND concat( #{createTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="UserName != null and UserName != ''">
|
|
<if test="UserName != null and UserName != ''">
|
|
and create_by like CONCAT('%',#{UserName},'%')
|
|
and create_by like CONCAT('%',#{UserName},'%')
|
|
@@ -626,7 +626,7 @@
|
|
c.head_name,
|
|
c.head_name,
|
|
c.head_phone,
|
|
c.head_phone,
|
|
d.visit_type,
|
|
d.visit_type,
|
|
- d.corrosion_level AS corrosion_level,
|
|
|
|
|
|
+ l.name AS corrosion_level,
|
|
n.name as self_closing_valve_type,
|
|
n.name as self_closing_valve_type,
|
|
m.name as brand,
|
|
m.name as brand,
|
|
e.`name` AS material_quality,
|
|
e.`name` AS material_quality,
|
|
@@ -635,11 +635,14 @@
|
|
c.update_info_time as updateInfoTime,
|
|
c.update_info_time as updateInfoTime,
|
|
c.create_by as createBy,
|
|
c.create_by as createBy,
|
|
c.remark,
|
|
c.remark,
|
|
- d.remark as remarkd
|
|
|
|
|
|
+ d.remark as remarkd,
|
|
|
|
+ us.nick_name as nickName,
|
|
|
|
+ us.phonenumber
|
|
FROM
|
|
FROM
|
|
z_engineering_civil a
|
|
z_engineering_civil a
|
|
LEFT JOIN z_engineering_node b ON a.id = b.civli_id
|
|
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_info c ON b.id = c.eng_info_id
|
|
|
|
+ LEFT JOIN sys_user us ON us.user_name = c.create_by
|
|
LEFT JOIN z_engineering_material d ON c.id = d.details_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_material_quality e ON e.id = d.material_quality
|
|
LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
@@ -653,7 +656,14 @@
|
|
LEFT JOIN z_engin_material_quality m ON m.id = d.brand
|
|
LEFT JOIN z_engin_material_quality m ON m.id = d.brand
|
|
LEFT JOIN z_engin_material_quality n ON n.id = d.self_closing_valve_type
|
|
LEFT JOIN z_engin_material_quality n ON n.id = d.self_closing_valve_type
|
|
WHERE
|
|
WHERE
|
|
- a.create_time LIKE CONCAT(REPLACE(#{createTime}, '_', '-'),'%')
|
|
|
|
|
|
+ a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and c.del_flag = '0'
|
|
|
|
+ and d.del_flag = '0'
|
|
|
|
+ and g.del_flag = '0'
|
|
|
|
+ and h.del_flag = '0'
|
|
|
|
+ and i.del_flag = '0'
|
|
|
|
+ and j.del_flag = '0'
|
|
<if test="p.district != null and p.district != ''">
|
|
<if test="p.district != null and p.district != ''">
|
|
and a.district = #{p.district}
|
|
and a.district = #{p.district}
|
|
</if>
|
|
</if>
|
|
@@ -676,7 +686,7 @@
|
|
and a.engin_cycle = 0
|
|
and a.engin_cycle = 0
|
|
</if>
|
|
</if>
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
- and c.update_info_time between #{p.beginTime[0]} and #{p.beginTime[1]}
|
|
|
|
|
|
+ AND c.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
and c.create_by like CONCAT(#{p.createBy},'%')
|
|
and c.create_by like CONCAT(#{p.createBy},'%')
|
|
@@ -710,7 +720,7 @@
|
|
c.head_name,
|
|
c.head_name,
|
|
c.head_phone,
|
|
c.head_phone,
|
|
d.visit_type,
|
|
d.visit_type,
|
|
- d.corrosion_level AS corrosion_level,
|
|
|
|
|
|
+ l.name AS corrosion_level,
|
|
n.name as self_closing_valve_type,
|
|
n.name as self_closing_valve_type,
|
|
m.name as brand,
|
|
m.name as brand,
|
|
e.`name` AS material_quality,
|
|
e.`name` AS material_quality,
|
|
@@ -719,11 +729,14 @@
|
|
c.update_info_time as updateInfoTime,
|
|
c.update_info_time as updateInfoTime,
|
|
c.create_by as createBy,
|
|
c.create_by as createBy,
|
|
c.remark,
|
|
c.remark,
|
|
- d.remark as remarkd
|
|
|
|
|
|
+ d.remark as remarkd,
|
|
|
|
+ us.nick_name as nickName,
|
|
|
|
+ us.phonenumber
|
|
FROM
|
|
FROM
|
|
z_engineering_civil a
|
|
z_engineering_civil a
|
|
LEFT JOIN z_engineering_node_${name} b ON a.id = b.civli_id
|
|
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_info_${name} c ON b.id = c.eng_info_id
|
|
|
|
+ LEFT JOIN sys_user us ON us.user_name = c.create_by
|
|
LEFT JOIN z_engineering_material_${name} d ON c.id = d.details_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_material_quality e ON e.id = d.material_quality
|
|
LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
LEFT JOIN z_engin_specifications f ON f.id = d.specifications
|
|
@@ -733,11 +746,18 @@
|
|
LEFT JOIN z_house j ON j.id = a.house_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
|
|
LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
AND k.dict_value = a.engin_classification
|
|
AND k.dict_value = a.engin_classification
|
|
- LEFT JOIN z_engin_specifications l ON l.id = d.corrosion_level
|
|
|
|
|
|
+ LEFT JOIN z_engin_material_quality l ON l.id = d.corrosion_level
|
|
LEFT JOIN z_engin_material_quality m ON m.id = d.brand
|
|
LEFT JOIN z_engin_material_quality m ON m.id = d.brand
|
|
LEFT JOIN z_engin_material_quality n ON n.id = d.self_closing_valve_type
|
|
LEFT JOIN z_engin_material_quality n ON n.id = d.self_closing_valve_type
|
|
WHERE
|
|
WHERE
|
|
- a.create_time LIKE CONCAT(REPLACE(#{name}, '_', '-'),'%')
|
|
|
|
|
|
+ a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and c.del_flag = '0'
|
|
|
|
+ and d.del_flag = '0'
|
|
|
|
+ and g.del_flag = '0'
|
|
|
|
+ and h.del_flag = '0'
|
|
|
|
+ and i.del_flag = '0'
|
|
|
|
+ and j.del_flag = '0'
|
|
<if test="p.district != null and p.district != ''">
|
|
<if test="p.district != null and p.district != ''">
|
|
and a.district = #{p.district}
|
|
and a.district = #{p.district}
|
|
</if>
|
|
</if>
|
|
@@ -760,7 +780,7 @@
|
|
and a.engin_cycle = 0
|
|
and a.engin_cycle = 0
|
|
</if>
|
|
</if>
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
- and c.update_info_time between #{p.beginTime[0]} and #{p.beginTime[1]}
|
|
|
|
|
|
+ AND c.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
and c.create_by like CONCAT(#{p.createBy},'%')
|
|
and c.create_by like CONCAT(#{p.createBy},'%')
|
|
@@ -800,7 +820,9 @@
|
|
null AS updateInfoTime,
|
|
null AS updateInfoTime,
|
|
null AS createBy,
|
|
null AS createBy,
|
|
null AS remark,
|
|
null AS remark,
|
|
- null AS remarkd
|
|
|
|
|
|
+ null AS remarkd,
|
|
|
|
+ null as nickName,
|
|
|
|
+ null as phonenumber
|
|
FROM
|
|
FROM
|
|
z_engin_not_installed a
|
|
z_engin_not_installed a
|
|
LEFT JOIN sys_dict_data b ON a.district = b.dict_value AND b.dict_type = 'district'
|
|
LEFT JOIN sys_dict_data b ON a.district = b.dict_value AND b.dict_type = 'district'
|
|
@@ -828,7 +850,7 @@
|
|
and a.engin_type = #{p.enginType}
|
|
and a.engin_type = #{p.enginType}
|
|
</if>
|
|
</if>
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
- and a.create_time between #{p.beginTime[0]} and #{p.beginTime[1]}
|
|
|
|
|
|
+ AND a.create_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
<if test="p.createBy != null and p.createBy != ''">
|
|
and a.create_by like CONCAT(#{p.createBy},'%')
|
|
and a.create_by like CONCAT(#{p.createBy},'%')
|
|
@@ -871,7 +893,12 @@
|
|
LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
AND k.dict_value = a.engin_classification
|
|
AND k.dict_value = a.engin_classification
|
|
WHERE
|
|
WHERE
|
|
- a.create_time LIKE CONCAT(REPLACE(#{createTime}, '_', '-'),'%')
|
|
|
|
|
|
+ a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and g.del_flag = '0'
|
|
|
|
+ and h.del_flag = '0'
|
|
|
|
+ and i.del_flag = '0'
|
|
|
|
+ and j.del_flag = '0'
|
|
<if test="p.district != null and p.district != ''">
|
|
<if test="p.district != null and p.district != ''">
|
|
and a.district = #{p.district}
|
|
and a.district = #{p.district}
|
|
</if>
|
|
</if>
|
|
@@ -928,7 +955,12 @@
|
|
LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
LEFT JOIN sys_dict_data k ON k.dict_type = a.engin_type
|
|
AND k.dict_value = a.engin_classification
|
|
AND k.dict_value = a.engin_classification
|
|
WHERE
|
|
WHERE
|
|
- a.create_time LIKE CONCAT(REPLACE(#{name}, '_', '-'),'%')
|
|
|
|
|
|
+ a.del_flag = '0'
|
|
|
|
+ and b.del_flag = '0'
|
|
|
|
+ and g.del_flag = '0'
|
|
|
|
+ and h.del_flag = '0'
|
|
|
|
+ and i.del_flag = '0'
|
|
|
|
+ and j.del_flag = '0'
|
|
<if test="p.district != null and p.district != ''">
|
|
<if test="p.district != null and p.district != ''">
|
|
and a.district = #{p.district}
|
|
and a.district = #{p.district}
|
|
</if>
|
|
</if>
|
|
@@ -994,7 +1026,7 @@
|
|
and a.engin_cycle = 0
|
|
and a.engin_cycle = 0
|
|
</if>
|
|
</if>
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
- and a.update_info_time between #{p.beginTime[0]} and #{p.beginTime[1]}
|
|
|
|
|
|
+ AND a.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="p.type != null and p.type != ''">
|
|
<if test="p.type != null and p.type != ''">
|
|
and b.type =#{p.type}
|
|
and b.type =#{p.type}
|
|
@@ -1029,7 +1061,7 @@
|
|
and a.engin_cycle = 0
|
|
and a.engin_cycle = 0
|
|
</if>
|
|
</if>
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
<if test="p.beginTime != null and p.beginTime != ''">
|
|
- and a.update_info_time between #{p.beginTime[0]} and #{p.beginTime[1]}
|
|
|
|
|
|
+ AND a.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
|
|
</if>
|
|
</if>
|
|
<if test="p.type != null and p.type != ''">
|
|
<if test="p.type != null and p.type != ''">
|
|
and b.type =#{p.type}
|
|
and b.type =#{p.type}
|