fix (farm): 首页
- 在种面积的值取整
This commit is contained in:
@@ -307,7 +307,6 @@ public class PlotInfoServiceImpl implements PlotInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public List<PlotListRespVO> listPlotInfo(String baseId) {
|
public List<PlotListRespVO> listPlotInfo(String baseId) {
|
||||||
List<PlotListRespVO> pList = plotInfoMapper.listPlotInfo(baseId);
|
List<PlotListRespVO> pList = plotInfoMapper.listPlotInfo(baseId);
|
||||||
|
|
||||||
return pList;
|
return pList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -341,14 +341,13 @@ public class ProductionPlanServiceImpl implements ProductionPlanService {
|
|||||||
if (ObjectUtils.isEmpty(planList)) {
|
if (ObjectUtils.isEmpty(planList)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
double totalArea = planList.stream()
|
double totalArea = planList.stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(plan -> Objects.equals(plan.getPlanStatus(), PLAN_STATUS_2) || Objects.equals(plan.getPlanStatus(), PLAN_STATUS_6))
|
.filter(plan -> Objects.equals(plan.getPlanStatus(), PLAN_STATUS_2) || Objects.equals(plan.getPlanStatus(), PLAN_STATUS_6))
|
||||||
.mapToDouble(ProductionPlanDO::getPredictedArea)
|
.mapToDouble(ProductionPlanDO::getPredictedArea)
|
||||||
.sum();
|
.sum();
|
||||||
if (plotArea == null) {
|
|
||||||
return String.valueOf(totalArea);
|
|
||||||
}
|
|
||||||
if (ObjectUtils.isEmpty(totalArea)) {
|
if (ObjectUtils.isEmpty(totalArea)) {
|
||||||
return "0 亩";
|
return "0 亩";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
fpi.point AS point,
|
fpi.point AS point,
|
||||||
fbi.name AS baseName,
|
fbi.name AS baseName,
|
||||||
fpm.name AS manager,
|
fpm.name AS manager,
|
||||||
COALESCE(SUM(fpp.predicted_area), 0) AS beingBaseArea,
|
COALESCE(FLOOR(SUM(fpp.predicted_area)), 0) AS beingBaseArea,
|
||||||
GROUP_CONCAT(DISTINCT fsl.cultivar_name SEPARATOR ',') AS beingCropName
|
GROUP_CONCAT(DISTINCT fsl.cultivar_name SEPARATOR ',') AS beingCropName
|
||||||
FROM farm_plot_info fpi
|
FROM farm_plot_info fpi
|
||||||
LEFT JOIN farm_base_info fbi ON fpi.base_id = fbi.id AND fbi.deleted = 0
|
LEFT JOIN farm_base_info fbi ON fpi.base_id = fbi.id AND fbi.deleted = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user