fix (farm): 首页
- 在种面积的值取整
This commit is contained in:
@@ -307,7 +307,6 @@ public class PlotInfoServiceImpl implements PlotInfoService {
|
||||
@Override
|
||||
public List<PlotListRespVO> listPlotInfo(String baseId) {
|
||||
List<PlotListRespVO> pList = plotInfoMapper.listPlotInfo(baseId);
|
||||
|
||||
return pList;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user