fix (farm): 首页

- 在种面积的值取整
This commit is contained in:
达富斌
2025-11-19 15:23:19 +08:00
parent c3d5bc45a8
commit f8cc2aa0cb
3 changed files with 3 additions and 5 deletions

View File

@@ -307,7 +307,6 @@ public class PlotInfoServiceImpl implements PlotInfoService {
@Override
public List<PlotListRespVO> listPlotInfo(String baseId) {
List<PlotListRespVO> pList = plotInfoMapper.listPlotInfo(baseId);
return pList;
}

View File

@@ -341,14 +341,13 @@ public class ProductionPlanServiceImpl implements ProductionPlanService {
if (ObjectUtils.isEmpty(planList)) {
return null;
}
double totalArea = planList.stream()
.filter(Objects::nonNull)
.filter(plan -> Objects.equals(plan.getPlanStatus(), PLAN_STATUS_2) || Objects.equals(plan.getPlanStatus(), PLAN_STATUS_6))
.mapToDouble(ProductionPlanDO::getPredictedArea)
.sum();
if (plotArea == null) {
return String.valueOf(totalArea);
}
if (ObjectUtils.isEmpty(totalArea)) {
return "0 亩";
} else {

View File

@@ -18,7 +18,7 @@
fpi.point AS point,
fbi.name AS baseName,
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
FROM farm_plot_info fpi
LEFT JOIN farm_base_info fbi ON fpi.base_id = fbi.id AND fbi.deleted = 0