|
@@ -152,16 +152,20 @@ public class YearPigBaseController {
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
|
|
- //出栏入栏比例
|
|
|
|
|
|
+ //认养未认养比例
|
|
@RequestMapping("/outAndInProportion")
|
|
@RequestMapping("/outAndInProportion")
|
|
public R outAndInProportion(Integer formFarmId){
|
|
public R outAndInProportion(Integer formFarmId){
|
|
- //出栏
|
|
|
|
- Integer outFenct = yearPigBaseService.findByoutFenceStatus(1,formFarmId);
|
|
|
|
- //育肥
|
|
|
|
- Integer inFenct = yearPigBaseService.findByoutFenceStatus(0,formFarmId);
|
|
|
|
|
|
+ //以认养
|
|
|
|
+ Integer adopted = yearPigBaseService.findByFosterStatus(1,formFarmId);
|
|
|
|
+ //未认养
|
|
|
|
+ Integer notAdopted = yearPigBaseService.findByFosterStatus(0,formFarmId);
|
|
Map<String,Integer> resultMap = new HashMap<String,Integer>();
|
|
Map<String,Integer> resultMap = new HashMap<String,Integer>();
|
|
- resultMap.put("outFenct",outFenct);
|
|
|
|
- resultMap.put("inFenct",inFenct);
|
|
|
|
|
|
+ resultMap.put("adopted",adopted);
|
|
|
|
+ resultMap.put("notAdopted",notAdopted);
|
|
|
|
+ Integer total = notAdopted + adopted;
|
|
|
|
+ resultMap.put("total",total);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
return R.ok().put("data",resultMap);
|
|
return R.ok().put("data",resultMap);
|
|
}
|
|
}
|