农业需水
parent
8cc8566f11
commit
f9765f11ac
|
|
@ -1,6 +1,7 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
|
||||
import com.gunshi.project.hsz.model.RiceGrowConfig;
|
||||
import com.gunshi.project.hsz.model.RiceWaterForecastCycle;
|
||||
import com.gunshi.project.hsz.model.RiceWaterForecastMonth;
|
||||
import com.gunshi.project.hsz.model.RiceWaterKi;
|
||||
|
|
@ -13,13 +14,15 @@ import java.util.List;
|
|||
public class RiceRqWaterCaculateVo {
|
||||
|
||||
|
||||
private List<RiceWaterKi> riceWaterKis;
|
||||
private List<RiceWaterKi> riceWaterKis;// 灌水定额配置
|
||||
|
||||
private List<RiceWaterForecastCycle> riceWaterForecastCycles;
|
||||
private List<RiceWaterForecastCycle> riceWaterForecastCycles;//周期数据
|
||||
|
||||
private List<RiceWaterForecastMonth> riceWaterForecastMonths;
|
||||
private List<RiceWaterForecastMonth> riceWaterForecastMonths;//月份数据
|
||||
|
||||
private BigDecimal irrigationCycleTotalUse;
|
||||
private BigDecimal irrigationCycleTotalUse;//按年份统计总水量
|
||||
|
||||
private BigDecimal irrigationMonthTotalUse;
|
||||
private BigDecimal irrigationMonthTotalUse;//按月份统计总水量
|
||||
|
||||
private RiceGrowConfig riceGrowConfig;//水稻生长参数配置表
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,9 +425,15 @@ public class RiceRqWaterService extends ServiceImpl<RiceRqWaterMapper, RiceRqWat
|
|||
}
|
||||
|
||||
public List<RiceWaterForecastMonth> irrigationComprehensiveCaculateMonth(RiceWaterCaculateDto dto) {
|
||||
List<RiceIrrigationUse> riceIrrigationUses = irrigationCaculate(dto);//获取灌区水稻用水量
|
||||
List<RiceWaterForecastMonth> res = new ArrayList<>();
|
||||
RiceGrowConfig riceGrowConfig = dto.getRiceGrowConfig();
|
||||
List<RiceIrrigationUse> riceIrrigationUses = irrigationCaculate(dto);//获取灌区水稻用水量
|
||||
BigDecimal totalWaterUse = BigDecimal.ZERO;
|
||||
for (RiceIrrigationUse riceIrrigationUs : riceIrrigationUses) {
|
||||
totalWaterUse = totalWaterUse.add(riceIrrigationUs.getIrrigationUse());
|
||||
}
|
||||
riceGrowConfig.setWaterUse(totalWaterUse);
|
||||
List<RiceWaterForecastMonth> res = new ArrayList<>();
|
||||
|
||||
//灌溉区面积(亩)
|
||||
BigDecimal sArea = riceGrowConfig.getArea();
|
||||
|
||||
|
|
@ -571,6 +577,7 @@ public class RiceRqWaterService extends ServiceImpl<RiceRqWaterMapper, RiceRqWat
|
|||
|
||||
public RiceRqWaterCaculateVo caculate(RiceWaterCaculateDto dto) {
|
||||
//先计算阶段耗水量
|
||||
RiceGrowConfig riceGrowConfig = dto.getRiceGrowConfig();
|
||||
RiceRqWaterCaculateVo vo = new RiceRqWaterCaculateVo();
|
||||
List<RiceWaterKi> riceWaterKis = stageCaculate(dto);
|
||||
dto.setRiceWaterKis(riceWaterKis);
|
||||
|
|
@ -580,6 +587,7 @@ public class RiceRqWaterService extends ServiceImpl<RiceRqWaterMapper, RiceRqWat
|
|||
for (RiceWaterForecastMonth riceWaterForecastMonth : riceWaterForecastMonths) {
|
||||
monthTotal = monthTotal.add(riceWaterForecastMonth.getIrrigationUse());
|
||||
}
|
||||
riceGrowConfig.setIrrigationUse(monthTotal);
|
||||
//计算灌区水稻用水量-按周期
|
||||
List<RiceWaterForecastCycle> riceWaterForecastCycles = irrigationComprehensiveCaculateCycle(dto);
|
||||
BigDecimal cycleTotal = BigDecimal.ZERO;
|
||||
|
|
|
|||
Loading…
Reference in New Issue