|
@@ -285,19 +285,18 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectResourcesLandInfoCount" parameterType="CenterdataTResourcesLandInfo" resultType="java.util.Map">
|
|
<select id="selectResourcesLandInfoCount" parameterType="CenterdataTResourcesLandInfo" resultType="java.util.Map">
|
|
- select dict.dict_label name,sum(a.area) value from centerdata_t_resources_land_info a
|
|
|
|
- left join ${database_system}.sys_dict_data dict on dict.dict_value = a.attribute
|
|
|
|
|
|
+ select dict.dict_label name,IFNULL(sum(a.area),0) value from ${database_system}.sys_dict_data dict
|
|
|
|
+ left join centerdata_t_resources_land_info a on a.attribute=dict.dict_value
|
|
left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
|
|
left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
|
|
where dict.dict_type = 'farm_field_attribute'
|
|
where dict.dict_type = 'farm_field_attribute'
|
|
- group by a.attribute
|
|
|
|
|
|
+ group by dict.dict_value
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectFarmBasicFarmlandCount" parameterType="CenterdataTFarmBasicFarmland" resultType="java.util.Map">
|
|
<select id="selectFarmBasicFarmlandCount" parameterType="CenterdataTFarmBasicFarmland" resultType="java.util.Map">
|
|
- select dict.dict_label name,sum(a.area) value from centerdata_t_farm_basic_farmland a
|
|
|
|
- left join ${database_system}.sys_dict_data dict on dict.dict_value = a.attribute
|
|
|
|
|
|
+ select dict.dict_label name,IFNULL(sum(a.area),0) value from ${database_system}.sys_dict_data dict
|
|
|
|
+ left join centerdata_t_farm_basic_farmland a on a.attribute = dict.dict_value
|
|
left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
|
|
left join ${database_system}.sys_dept d on a.dept_id=d.dept_id
|
|
where dict.dict_type = 'farm_field_attribute'
|
|
where dict.dict_type = 'farm_field_attribute'
|
|
- group by a.attribute
|
|
|
|
|
|
+ group by dict.dict_value
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|