|
@@ -99,22 +99,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
values (#{time}, #{civi}, #{gy}, #{industry}, #{touch}, #{infrastructure}, #{pipe})
|
|
|
</insert>
|
|
|
<select id="civiNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_civil eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_civil eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="gyNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_gy eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_gy eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="industryNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_industry eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_industry eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="touchNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_touch_operation_engineering eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_touch_operation_engineering eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="infrastructureNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_infrastructure eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_infrastructure eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="pipeNumEng" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_pipe_jacking eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_pipe_jacking eng on eng.id = node.civli_id where info.del_flag = 0 and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
</select>
|
|
|
<select id="getCountEngineering" resultType="java.util.LinkedHashMap">
|
|
|
<if test="time != null and time != ''">
|
|
@@ -181,8 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<insert id="setConstructionMap">
|
|
|
delete from z_bigscreen_construction_map where time = #{time};
|
|
|
- insert into z_bigscreen_construction_map (time, civi, gy, industry, touch, infrastructure, pipe)
|
|
|
- values (#{time}, #{civi}, #{gy}, #{industry}, #{touch}, #{infrastructure}, #{pipe})
|
|
|
+ insert into z_bigscreen_construction_map (time, json)
|
|
|
+ values (#{time}, #{json})
|
|
|
</insert>
|
|
|
<select id="getConstructionMap" resultType="java.util.LinkedHashMap">
|
|
|
<if test="time != null and time != ''">
|
|
@@ -207,19 +207,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
values (#{time}, #{json})
|
|
|
</insert>
|
|
|
<select id="civiNumNew" resultType="java.util.Map">
|
|
|
- select dict_value `key`, count(dict.dict_value) `value` from sys_dict_data dict
|
|
|
- left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
+ select dict_value `key`, count(dict_value) `value` from (select dict_value from sys_dict_data dict left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
- group by dict.dict_value
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
+ group by civi.area_id) areas
|
|
|
+ group by areas.dict_value
|
|
|
</select>
|
|
|
<select id="gyNumNew" resultType="java.util.Map">
|
|
|
select dict_value `key`, count(dict.dict_value) `value` from sys_dict_data dict
|
|
|
left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="industryNumNew" resultType="java.util.Map">
|
|
@@ -227,7 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="touchNumNew" resultType="java.util.Map">
|
|
@@ -235,7 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="infrastructureNumNew" resultType="java.util.Map">
|
|
@@ -243,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="pipeNumNew" resultType="java.util.Map">
|
|
@@ -251,7 +251,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'new_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="getConstructionNew" resultType="java.util.LinkedHashMap">
|
|
@@ -277,15 +277,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
values (#{time}, #{json})
|
|
|
</insert>
|
|
|
<select id="civiNumOld" resultType="java.util.Map">
|
|
|
- select dict_value `key`, count(dict.dict_value) `value` from sys_dict_data dict
|
|
|
- left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
+ select dict_value `key`, count(dict_value) `value` from (select dict_value from sys_dict_data dict left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
left join ${node} node on node.civli_id = civi.id
|
|
|
left join ${info} info on info.eng_info_id = node.id
|
|
|
- where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'old_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
- group by dict.dict_value
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'old_renovation' and date_format(info.update_time, '%Y-%m-%d') = #{time}
|
|
|
+ group by civi.house_id) houses
|
|
|
+ group by houses.dict_value
|
|
|
</select>
|
|
|
<select id="gyNumOld" resultType="java.lang.Long">
|
|
|
- select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_gy eng on eng.id = node.civli_id where date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ select dict_value `key`, count(dict.dict_value) `value` from sys_dict_data dict
|
|
|
+ left join z_engineering_civil civi on dict.dict_value = civi.district
|
|
|
+ left join ${node} node on node.civli_id = civi.id
|
|
|
+ left join ${info} info on info.eng_info_id = node.id
|
|
|
+ where dict_type = 'district' and info.del_flag = 0 and civi.engin_type = 'old_renovation' and date_format(info.create_time, '%Y-%m-%d') = #{time}
|
|
|
+ group by dict.dict_value
|
|
|
</select>
|
|
|
<select id="industryNumOld" resultType="java.lang.Long">
|
|
|
select count(eng.id) from ${info} info left join ${node} node on info.eng_info_id = node.id left join z_engineering_industry eng on eng.id = node.civli_id where date_format(info.create_time, '%Y-%m-%d') = #{time}
|