|
|
|
@ -121,9 +121,16 @@ public class TraceabilityBaseServiceImpl implements TraceabilityBaseService { |
|
|
|
|
//先通过基地获取到所有地块id 遍历地块集合 获取地块种植的所有农作物的种植面积 及种类
|
|
|
|
|
List<Integer> ids = baseMapper.getAllPlotId(id); |
|
|
|
|
//当前种植种类
|
|
|
|
|
returnMap.put("currentPlantingSpecies", baseMapper.getCurrentPlantingSpecies(ids)); |
|
|
|
|
//当前种植面积
|
|
|
|
|
returnMap.put("currentPlantingArea", baseMapper.getCurrentPlantingArea(ids)); |
|
|
|
|
if(ids.size()>0){ |
|
|
|
|
returnMap.put("currentPlantingSpecies", baseMapper.getCurrentPlantingSpecies(ids)); |
|
|
|
|
//当前种植面积
|
|
|
|
|
returnMap.put("currentPlantingArea", baseMapper.getCurrentPlantingArea(ids)); |
|
|
|
|
}else { |
|
|
|
|
returnMap.put("currentPlantingSpecies", 0); |
|
|
|
|
returnMap.put("currentPlantingArea", 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return returnMap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|