| | |
| | | |
| | | <select id="selectLandPage" resultMap="landResultMap"> |
| | | SELECT l.land_name, |
| | | l.land_unit, |
| | | l.id, |
| | | l.land_area , |
| | | ST_ASTEXT(land_range) as land_range, |
| | |
| | | where id = #{land.id} |
| | | </update> |
| | | |
| | | <update id="updateLandAr"> |
| | | update sys_land set user_id = #{land.userId}, |
| | | land_area = #{land.landArea}, |
| | | <if test="land.landRange!=null and land.landRange!=''"> |
| | | land_range = ST_GeomFromText(${land.landRange}), |
| | | </if> |
| | | url = #{land.url}, |
| | | where id = #{land.id} |
| | | </update> |
| | | |
| | | <select id="selectLandList" resultType="java.util.HashMap"> |
| | | select id, land_name as landName |
| | | from sys_land |
| | |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | <!--土地使用面积--> |
| | | <select id="selectSAre" resultType="java.util.HashMap"> |
| | |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | <!--土地未使用面积--> |
| | | <select id="selectWAre" resultType="java.util.HashMap"> |
| | |
| | | and type = 1 |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | GROUP BY sfp.strain_id |
| | | </select> |
| | | |
| | | <!--查询统计地块是否有轮廓--> |
| | | <select id="getLandIsAreaStatistic" resultType="java.lang.Integer"> |
| | | SELECT count(*) FROM sys_land where land_range is not null |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | union all |
| | | SELECT count(*) FROM sys_land where land_range is null |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |