大屏添加查询值
This commit is contained in:
@ -23,6 +23,9 @@ public class AnnualOverviewResp {
|
||||
@ApiModelProperty(value = "电站总数")
|
||||
Integer stationNumber;
|
||||
|
||||
@ApiModelProperty(value = "在建-电站总数")
|
||||
Integer underStationNumber;
|
||||
|
||||
//年总放(日冻结表计算)
|
||||
@ApiModelProperty(value = "年总放")
|
||||
BigDecimal yearDischarge;
|
||||
@ -45,6 +48,10 @@ public class AnnualOverviewResp {
|
||||
@ApiModelProperty(value = "年度收益总额")
|
||||
BigDecimal yearProfit;
|
||||
|
||||
//月度收益总额
|
||||
@ApiModelProperty(value = "月度收益总额")
|
||||
BigDecimal monthDayProfit;
|
||||
|
||||
//日充 yearCharge日放yearDischarge 总放 总充
|
||||
|
||||
//年总放(日冻结表计算)
|
||||
@ -63,6 +70,9 @@ public class AnnualOverviewResp {
|
||||
@ApiModelProperty(value = "总充")
|
||||
BigDecimal totalCharge;
|
||||
|
||||
@ApiModelProperty(value = "转换效率")
|
||||
BigDecimal systemEfficiency;
|
||||
|
||||
//各站收益
|
||||
List<Subdata> list =new ArrayList<>();
|
||||
|
||||
|
||||
@ -28,6 +28,10 @@ public class EnergySavingRespVo {
|
||||
@ApiModelProperty(value = "等效经济收入")
|
||||
BigDecimal income;
|
||||
|
||||
@ApiModelProperty(value = "等效绿证(张)")
|
||||
BigDecimal greenNum;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -83,6 +83,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
private final static BigDecimal value = new BigDecimal("0.475");
|
||||
private final static BigDecimal parameter = new BigDecimal("18.3");
|
||||
private final static BigDecimal four = new BigDecimal("0.4");
|
||||
private final static BigDecimal one = new BigDecimal("0.1");
|
||||
private final static BigDecimal fours = new BigDecimal("40");
|
||||
private final static BigDecimal coalPrice = new BigDecimal("0.6");//煤炭价格
|
||||
private final static Integer maxSize = 30;
|
||||
@ -206,11 +207,15 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
private AnnualOverviewResp getOverviewDatas(List<Station> list) {
|
||||
AnnualOverviewResp annualOverviewResp = new AnnualOverviewResp();
|
||||
List<Station> stations = new ArrayList<>();
|
||||
List<Station> underStations = new ArrayList<>();
|
||||
list.stream().filter(i -> CommonConstant.TWO.equals(i.getStatus())).forEach(s -> underStations.add(s));
|
||||
list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).forEach(s -> stations.add(s));
|
||||
//装机容量
|
||||
BigDecimal capacity = BigDecimal.ZERO;
|
||||
//电站总数
|
||||
//在线-电站总数
|
||||
Integer stationNumber = stations.size();
|
||||
//在建-电站总数
|
||||
Integer underStationNumber = underStations.size();
|
||||
for (Station station : stations) {
|
||||
//装机容量进行累加
|
||||
BigDecimal capacityStation = station.getCapacity();
|
||||
@ -221,6 +226,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
//set装机容量/电站数量
|
||||
annualOverviewResp.setCapacity(capacity);
|
||||
annualOverviewResp.setStationNumber(stationNumber);
|
||||
annualOverviewResp.setUnderStationNumber(underStationNumber);
|
||||
//日充/日放(日冻结表计算)
|
||||
BigDecimal dayCharge = BigDecimal.ZERO;
|
||||
BigDecimal dayDischarge = BigDecimal.ZERO;
|
||||
@ -285,6 +291,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
annualOverviewResp.setYearProfit(overviewProfit.getYearProfit()==null?null:overviewProfit.getYearProfit().multiply(new BigDecimal("10000")));
|
||||
annualOverviewResp.setTotalProfit(overviewProfit.getTotalProfit()==null?null:overviewProfit.getTotalProfit().multiply(new BigDecimal("10000")));
|
||||
annualOverviewResp.setTodayProfit(overviewProfit.getTodayProfit()==null?null:overviewProfit.getTodayProfit().multiply(new BigDecimal("10000")));
|
||||
annualOverviewResp.setMonthDayProfit(overviewProfit.getMonthDayProfit()==null?null:overviewProfit.getMonthDayProfit().multiply(new BigDecimal("10000")));
|
||||
//时间当年
|
||||
DateTime begin = DateUtil.beginOfYear(new Date());
|
||||
String beginString = DateUtil.format(begin, CommonConstant.DATE_YMD);
|
||||
@ -309,6 +316,13 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
annualOverviewResp.setDayDischarge(annualOverviewResp.getDayDischarge().add(respVO.getReversePowerToday()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getReversePowerToday())));
|
||||
}
|
||||
});
|
||||
//转换效率
|
||||
BigDecimal systemEfficiency = BigDecimal.ZERO;
|
||||
if(annualOverviewResp.getTotalDischarge().compareTo(BigDecimal.ZERO)>0
|
||||
&&annualOverviewResp.getTotalCharge().compareTo(BigDecimal.ZERO)>0){
|
||||
systemEfficiency = annualOverviewResp.getTotalDischarge().divide(annualOverviewResp.getTotalCharge(), 4, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
annualOverviewResp.setSystemEfficiency(systemEfficiency);
|
||||
return annualOverviewResp;
|
||||
}
|
||||
|
||||
@ -522,6 +536,10 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
energySavingRespVo.setEquivalentCoal(equivalentCoal);
|
||||
//等效经济收入 等效经济收入=等效节约煤*煤价 (600元/吨) 等效节约煤此处单位为kg,故而单价调整为0.6元/kg
|
||||
energySavingRespVo.setIncome(equivalentCoal.multiply(coalPrice));
|
||||
//等效绿证(张) 可获绿证数 = 总放电量 - 下网充电量 × (1 - 储能综合效率η)
|
||||
//储能综合效率η:按磷酸铁锂电池平均效率 90% 计算
|
||||
BigDecimal greenNum = totalDischarge.subtract(totalCharge.multiply(one));
|
||||
energySavingRespVo.setGreenNum(greenNum);
|
||||
return energySavingRespVo;
|
||||
}
|
||||
|
||||
@ -1581,6 +1599,16 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
||||
monthProfit = monthProfit.add(chartValue.getProfit());
|
||||
}
|
||||
annualOverviewResp.setYearProfit(monthProfit);
|
||||
// 计算当月收益
|
||||
startDate = DateUtil.beginOfMonth(date);
|
||||
List<DateTime> monthDayTime = DateUtil.rangeToList(startDate, endDate, DateField.DAY_OF_MONTH);
|
||||
List<AnnualChartValue> monthDayProfitCurve = new ArrayList<>();
|
||||
getAnnualOverviewResp(monthDayProfitCurve, monthDayTime, CommonConstant.DATE_YMD, dayMap);
|
||||
BigDecimal monthDayProfit = BigDecimal.ZERO;
|
||||
for (AnnualChartValue chartValue : monthDayProfitCurve) {
|
||||
monthDayProfit = monthDayProfit.add(chartValue.getProfit());
|
||||
}
|
||||
annualOverviewResp.setMonthDayProfit(monthDayProfit);
|
||||
// 计算今日收益
|
||||
List<DateTime> todayDateTime = DateUtil.rangeToList(endDate, endDate, DateField.DAY_OF_MONTH);
|
||||
List<AnnualChartValue> todayProfitCurve = new ArrayList<>();
|
||||
|
||||
@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@ -200,8 +201,11 @@ public class IargeScreenShowController {
|
||||
@CommonLargeScreenToken
|
||||
public DataResult<AnnualOverviewResp> getCommonOverviewData(HttpServletRequest request) {
|
||||
AnnualOverviewResp annualOverviewResp = iargeScreenShowService.getOverviewData(getSimpleUser(request));
|
||||
BigDecimal systemEfficiency = annualOverviewResp.getSystemEfficiency();
|
||||
bigDecimalUtil.keepTwoDecimalPlaces(annualOverviewResp);
|
||||
bigDecimalUtil.ifIsNUll(annualOverviewResp);
|
||||
//单独保持精度
|
||||
annualOverviewResp.setSystemEfficiency(systemEfficiency);
|
||||
return DataResult.success(annualOverviewResp);
|
||||
}
|
||||
|
||||
@ -346,8 +350,11 @@ public class IargeScreenShowController {
|
||||
@TokenIgnore
|
||||
public DataResult<AnnualOverviewResp> getZhongZiOverviewData(@RequestBody CockpitReqVO vo) {
|
||||
AnnualOverviewResp annualOverviewResp = iargeScreenShowService.getOverviewData(getByDeptId(vo.getDeptId()));
|
||||
BigDecimal systemEfficiency = annualOverviewResp.getSystemEfficiency();
|
||||
bigDecimalUtil.keepTwoDecimalPlaces(annualOverviewResp);
|
||||
bigDecimalUtil.ifIsNUll(annualOverviewResp);
|
||||
//单独保持精度
|
||||
annualOverviewResp.setSystemEfficiency(systemEfficiency);
|
||||
return DataResult.success(annualOverviewResp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user