| | |
| | | <if test="farmPlant.varieties!=null and farmPlant.varieties!=''"> |
| | | and sfp.varieties like concat('%',#{farmPlant.varieties},'%') |
| | | </if> |
| | | <if test="farmPlant.startTime!=null and farmPlant.startTime!=''"> |
| | | and sfp.transplan_time >= #{farmPlant.startTime} |
| | | </if> |
| | | <if test="farmPlant.endTime!=null and farmPlant.endTime!=''"> |
| | | and sfp.transplan_time <= #{farmPlant.endTime} |
| | | </if> |
| | | order by sfp.id desc |
| | | </select> |
| | | |
| | | <!--自定义查询农场养殖记录分页数据--> |
| | | <select id="getFarmPlantStatistics" resultType="org.springblade.modules.farmplant.vo.FarmPlantVO"> |
| | | select sfp.strain_id,ss.strain_name strainName,sum(sl.land_area) areas,land_unit landUnit from sys_farm_plant sfp |
| | | left join sys_strain ss on ss.id = sfp.strain_id |
| | | left join sys_land sl on sl.id = sfp.land_id |
| | | where 1=1 |
| | | <if test="farmPlant.startTime!=null and farmPlant.startTime!=''"> |
| | | and sfp.transplan_time >= #{farmPlant.startTime} |
| | | </if> |
| | | <if test="farmPlant.endTime!=null and farmPlant.endTime!=''"> |
| | | and sfp.transplan_time <= #{farmPlant.endTime} |
| | | </if> |
| | | group by sfp.strain_id,strain_name,land_unit |
| | | </select> |
| | | </mapper> |