| | |
| | | when sfr.type = 10 then '移栽' |
| | | when sfr.type = 11 then '直播' |
| | | when sfr.type = 12 then '采收' |
| | | else '其他' end as typeName,sl.land_name landName,ss.strain_name strainName,bu.real_name realName |
| | | else '其他' end as typeName,sl.land_name landName,ss.strain_name strainName, |
| | | bu.real_name realName,ss1.agricultural_name agriculturalName |
| | | from sys_farming_record sfr |
| | | left join blade_user bu on bu.id = sfr.operator |
| | | left join sys_land sl on sl.id = sfr.land_id |
| | | left join sys_strain ss on ss.id = sfr.strain_id |
| | | left join sys_stockfactory ss1 on ss1.id = sfr.stock_id |
| | | where 1=1 |
| | | <if test="farm.landId!=null and farm.landId!=''"> |
| | | and sfr.land_id = #{farm.landId} |
| | |
| | | * 农场id |
| | | */ |
| | | private String farmId; |
| | | |
| | | /** |
| | | * 肥料名称 |
| | | */ |
| | | private String agriculturalName; |
| | | } |
| | |
| | | * 首页地块统计接口 |
| | | */ |
| | | @GetMapping("/selectCount") |
| | | public R selectCount(String deptId) { |
| | | List<Map<String, Object>> list = landService.selectZAre(deptId); |
| | | List<Map<String, Object>> lists = landService.selectSAre(deptId); |
| | | List list1 = landService.selectNum(deptId); |
| | | public R selectCount(LandVO land) { |
| | | List<Map<String, Object>> list = landService.selectZAre(land); |
| | | List<Map<String, Object>> lists = landService.selectSAre(land); |
| | | List list1 = landService.selectNum(land); |
| | | //总面积 |
| | | Double num = 0.0; |
| | | for (int i = 0; i < list.size(); i++) { |
| | |
| | | |
| | | /** |
| | | * 大屏地块统计接口 |
| | | * @param framId 农场id |
| | | * @param land 农场 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectXCount") |
| | | public R selectXCount(String framId) { |
| | | List<Map<String, Object>> list = landService.selectZAre(framId); |
| | | List<Map<String, Object>> lists = landService.selectSAre(framId); |
| | | List<Map<String, Object>> listw = landService.selectWAre(framId); |
| | | List list1 = landService.selectNum(framId); |
| | | public R selectXCount(LandVO land) { |
| | | List<Map<String, Object>> list = landService.selectZAre(land); |
| | | List<Map<String, Object>> lists = landService.selectSAre(land); |
| | | List<Map<String, Object>> listw = landService.selectWAre(land); |
| | | List list1 = landService.selectNum(land); |
| | | //总面积 |
| | | Double num = 0.0; |
| | | for (int i = 0; i < list.size(); i++) { |
| | |
| | | |
| | | List selectLandList(String userid); |
| | | |
| | | List selectNum(@Param("farmId") String farmId); |
| | | List selectNum(@Param("land") LandVO land); |
| | | |
| | | List<Map<String, Object>> selectZAre(@Param("farmId") String farmId); |
| | | List<Map<String, Object>> selectZAre(@Param("land") LandVO land); |
| | | |
| | | List<Map<String, Object>> selectSAre(@Param("farmId") String farmId); |
| | | List<Map<String, Object>> selectSAre(@Param("land") LandVO land); |
| | | |
| | | List<Map<String, Object>> selectWAre(@Param("farmId") String farmId); |
| | | List<Map<String, Object>> selectWAre(@Param("land") LandVO land); |
| | | |
| | | /** |
| | | * 地块列表(不分页) |
| | |
| | | <select id="selectZAre" resultType="java.util.HashMap"> |
| | | SELECT IFNULL(land_area, 0) as area, IFNULL(land_unit, 0) as unit FROM sys_land |
| | | WHERE is_deleted = 0 |
| | | <if test="farmId!= null and farmId!=''"> |
| | | and farm_id=#{farmId} |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and sl.farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and sl.dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | <!--土地使用面积--> |
| | |
| | | FROM sys_land |
| | | WHERE is_deleted = 0 |
| | | and type = 0 |
| | | <if test="farmId!= null and farmId!=''"> |
| | | and farm_id=#{farmId} |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and sl.farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and sl.dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | <!--土地未使用面积--> |
| | |
| | | FROM sys_land |
| | | WHERE is_deleted = 0 |
| | | and type = 1 |
| | | <if test="farmId!= null and farmId!=''"> |
| | | and farm_id=#{farmId} |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and sl.farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and sl.dept_id=#{land.deptId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | SELECT strain_id FROM sys_farm_plant sfp |
| | | left join sys_land sl on sl.id = sfp.land_id |
| | | WHERE sfp.status = 1 |
| | | <if test="farmId!= null and farmId!=''"> |
| | | and sl.farm_id=#{farmId} |
| | | <if test="land.farmId!= null and land.farmId!=''"> |
| | | and sl.farm_id=#{land.farmId} |
| | | </if> |
| | | <if test="land.deptId!= null and land.deptId!=''"> |
| | | and sl.dept_id=#{land.deptId} |
| | | </if> |
| | | GROUP BY sfp.strain_id |
| | | </select> |
| | |
| | | * 土地总面积 |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> selectZAre(String deptId); |
| | | List<Map<String, Object>> selectSAre(String deptId); |
| | | List<Map<String, Object>> selectWAre(String deptId); |
| | | List selectNum(String deptId); |
| | | List<Map<String, Object>> selectZAre(LandVO land); |
| | | List<Map<String, Object>> selectSAre(LandVO land); |
| | | List<Map<String, Object>> selectWAre(LandVO land); |
| | | List selectNum(LandVO land); |
| | | |
| | | /** |
| | | * 地块列表(不分页) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectZAre(String deptId) { |
| | | return baseMapper.selectZAre(deptId); |
| | | public List<Map<String, Object>> selectZAre(LandVO land) { |
| | | return baseMapper.selectZAre(land); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectSAre(String deptId) { |
| | | return baseMapper.selectSAre(deptId); |
| | | public List<Map<String, Object>> selectSAre(LandVO land) { |
| | | return baseMapper.selectSAre(land); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectWAre(String deptId) { |
| | | return baseMapper.selectWAre(deptId); |
| | | public List<Map<String, Object>> selectWAre(LandVO land) { |
| | | return baseMapper.selectWAre(land); |
| | | } |
| | | |
| | | @Override |
| | | public List selectNum(String deptId) { |
| | | return baseMapper.selectNum(deptId); |
| | | public List selectNum(LandVO land) { |
| | | return baseMapper.selectNum(land); |
| | | } |
| | | |
| | | /** |