| | |
| | | </if> ) c ON c.dict_key = l.land_unit |
| | | LEFT JOIN ( SELECT id, farm_name FROM sys_farm ) v ON v.id = l.farm_id |
| | | where l.is_deleted = 0 |
| | | <if test="land.landType!=null and land.landType != ''"> |
| | | <if test="land.landType!=null and land.landType != '' or land.landType == 0 "> |
| | | and l.land_type = #{land.landType} |
| | | </if> |
| | | <if test="land.landName!=null and land.landName != ''"> |
| | |
| | | |
| | | <!--查询统计地块是否有轮廓--> |
| | | <select id="getLandIsAreaStatistic" resultType="java.lang.Integer"> |
| | | SELECT count(*) FROM sys_land where land_range is not null |
| | | SELECT count(*) FROM sys_land where land_range is not null AND sys_land.is_deleted = 0 |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | |
| | | and dept_id=#{land.deptId} |
| | | </if> |
| | | union all |
| | | SELECT count(*) FROM sys_land where land_range is null |
| | | SELECT count(*) FROM sys_land where land_range is null AND sys_land.is_deleted = 0 |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and farm_id=#{land.farmId} |
| | | </if> |
| | |
| | | AND sfp.status = #{land.sfpStatus} |
| | | </if> |
| | | </select> |
| | | <select id="findPlantInLand" resultType="org.springblade.modules.lang.vo.LandVO"> |
| | | SELECT land.*,sfp.id AS sfpId,sfp.strain_id |
| | | FROM sys_land land |
| | | LEFT JOIN sys_farm_plant sfp ON land.id = sfp.land_id |
| | | WHERE land.is_deleted = 0 AND sfp.status = 1 |
| | | AND land.id = #{ids} |
| | | </select> |
| | | |
| | | </mapper> |