Commit c3b3ac31 authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer' into developer

parents 5340b951 1fe30cbd
......@@ -31,6 +31,13 @@ public class TdHYGFStationDayGenerate implements Serializable {
* 发电量
*/
private Double generate;
/**
* 满发小时数
*/
private Double fullhour;
/**
* 收益
*/
private Double income;
}
......@@ -31,6 +31,13 @@ public class TdHYGFStationMonthGenerate implements Serializable {
* 发电量
*/
private Double generate;
/**
* 满发小时数
*/
private Double fullhour;
/**
* 收益
*/
private Double income;
}
......@@ -31,6 +31,13 @@ public class TdHYGFStationYearGenerate implements Serializable {
* 发电量
*/
private Double generate;
/**
* 满发小时数
*/
private Double fullhour;
/**
* 收益
*/
private Double income;
}
......@@ -232,6 +232,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationDayGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate()/jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
if(ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())){
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -251,6 +252,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationMonthGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate()/jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
if(ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())){
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -270,6 +272,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate()/jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
if(ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())){
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......
......@@ -337,6 +337,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationDayGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -356,6 +357,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationMonthGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -375,6 +377,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
tdHYGFStationYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())) {
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......
......@@ -278,8 +278,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationDayGenerate.setThirdStationId(stationId);
tdHYGFStationDayGenerate.setDayTime(DateUtil.format(today1, "yyyy-MM-dd"));
tdHYGFStationDayGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationDayGenerate.setGenerate(stationEarn.getDayGeneration());
tdHYGFStationDayGenerate.setFullhour(stationEarn.getDayGeneration()/jpStation.getCapacity());
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate()/jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
if(ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())){
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
......@@ -297,8 +298,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationMonthGenerate.setThirdStationId(stationId);
tdHYGFStationMonthGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM"));
tdHYGFStationMonthGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationMonthGenerate.setGenerate(stationEarn.getMonthGeneration());
tdHYGFStationMonthGenerate.setFullhour(stationEarn.getMonthGeneration()/jpStation.getCapacity());
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate()/jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
if(ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())){
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
......@@ -316,8 +318,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationYearGenerate.setThirdStationId(stationId);
tdHYGFStationYearGenerate.setYearTime(DateUtil.format(today1, "yyyy"));
tdHYGFStationYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFStationYearGenerate.setGenerate(stationEarn.getYearGeneration());
tdHYGFStationYearGenerate.setFullhour(stationEarn.getYearGeneration()/jpStation.getCapacity());
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate()/jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
if(ObjectUtils.isEmpty(tdHYGFStationYearGenerate.getCreatedTime())){
tdHYGFStationYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationYearGenerateMapper.insert(tdHYGFStationYearGenerate);
......
......@@ -167,4 +167,9 @@ public class JpStationDto extends BaseDto {
* **/
List<Map<String,Object>> powerRatio;
String timeDateMonth;
String timeDateYear;
}
......@@ -46,4 +46,9 @@ public class DayGenerate {
@TableField("fullhour")
private Double fullhour;
@TableField("income")
// 日收益
private Double dayIncome;
}
......@@ -47,4 +47,10 @@ public class MonthGenerate {
* */
@TableField("fullhour")
private Double fullhour;
// 月收益
@TableField("income")
private Double monthIncome;
}
......@@ -46,4 +46,9 @@ public class YearGenerate {
* */
@TableField("fullhour")
private Double fullhour;
// 年收益
@TableField("income")
private Double yearIncome;
}
......@@ -57,7 +57,7 @@
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
and year = #{date}
GROUP BY `year_time`
</select>
......
......@@ -74,7 +74,7 @@ public class TDengineServerConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setDialectType("TAOS-RS");
paginationInterceptor.setDialectType("mysql");
return paginationInterceptor;
}
......
......@@ -481,8 +481,8 @@ public class JpStationController extends BaseController {
Map<String,Object> map=new HashMap<>();
DecimalFormat format2 = new DecimalFormat("0.00");
//炭
map.put("name1","实时功率");
map.put("name2","组件总容量");
map.put("name1","实时功率(kW)");
map.put("name2","组件总容量(MWp)");
map.put("value1",format2.format(jpStation.getRealTimePower()));
//硫
......@@ -490,31 +490,31 @@ public class JpStationController extends BaseController {
Map<String,Object> map2=new HashMap<>();
map2.put("name1","当日电量");
map2.put("name2","当日收益");
map2.put("name1","当日电量(kWh)");
map2.put("name2","当日收益(元)");
//炭
map2.put("value1",format2.format(jpStation.getDayGenerate()));
//硫
map2.put("value2",format2.format(jpStation.getDayIncome()));
Map<String,Object> map3=new HashMap<>();
map3.put("name1","当月电量");
map3.put("name2","当月收益");
map3.put("name1","当月电量(MWh)");
map3.put("name2","当月收益(万元)");
//炭
map3.put("value1",format2.format(jpStation.getMonthGenerate()));
//硫
map3.put("value2",format2.format(jpStation.getMonthIncome()));
Map<String,Object> map4=new HashMap<>();
map4.put("name1","累计电量");
map4.put("name2","累计收益");
map4.put("name1","累计电量(MWh)");
map4.put("name2","累计收益(万元)");
//炭
map4.put("value1",format2.format(jpStation.getYearGenerate()));
//硫
map4.put("value2",format2.format(jpStation.getYearIncome()));
date.add(map);
date.add(map4);
date.add(map2);
date.add(map3);
date.add(map4);
Page<Map<String,Object>> page = new Page<>(1, 4);
page.setRecords(date);
return ResponseHelper.buildResponse(page);
......
......@@ -206,15 +206,15 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
try {
if(type.equals("month")){
map= getDayListOfMonth(date);
data= dayGenerateMapper.getDayGeneratqx(date, statioId);
map= getDayListOfMonth(reviewDto.getTimeDateMonth());
data= dayGenerateMapper.getDayGeneratqx(reviewDto.getTimeDateMonth(), statioId);
}else if(type.equals("year")){
map= getyearListOfMonth(date);
data= dayGenerateMapper.getMonthGenerateqx(date,statioId);
map= getyearListOfMonth(reviewDto.getTimeDateYear());
data= dayGenerateMapper.getMonthGenerateqx(reviewDto.getTimeDateYear(),statioId);
}else{
map= getyearList();
data= dayGenerateMapper.getYearGenerateqx(date, statioId);
data= dayGenerateMapper.getYearGenerateqx(null, statioId);
}
listx =map.get("x");
......@@ -441,6 +441,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setFullhour(Double.valueOf(String.format("%.2f", jpStation.getAccumulatedPower()/jpStation.getCapacity())));
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setCumulativeIncome(jpStation.getCumulativeIncome());
hd.setDayIncome(null);
ld.add(hd);
}
......@@ -462,7 +463,6 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setFullhour(Double.valueOf(String.format("%.2f", jpStation.getAccumulatedPower()/jpStation.getCapacity())));
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setDayIncome(null);
ld.add(hd);
}
......@@ -485,7 +485,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setFullhour(dayGenerate.getFullhour());
hd.setDayGenerate(dayGenerate.getGenerate());
hd.setTimeDate(dayGenerate.getDayTime());
hd.setDayIncome(null);
hd.setDayIncome(dayGenerate.getDayIncome());
break;
}
}
......@@ -506,11 +506,10 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setStationContact(jpStation.getStationContact());
hd.setState(jpStation.getState());
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setMonthIncome(dayGenerate.getGenerate());
hd.setMonthGenerate(dayGenerate.getGenerate());
hd.setMonthIncome(dayGenerate.getMonthIncome());
hd.setTimeDate(dayGenerate.getMonthTime());
hd.setFullhour(dayGenerate.getFullhour());
hd.setMonthGenerate(null);
break;
}
}
......@@ -534,7 +533,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setFullhour(dayGenerate.getFullhour());
hd.setYearGenerate(dayGenerate.getGenerate());
hd.setYearIncome(null);
hd.setYearIncome(dayGenerate.getYearIncome());
hd.setTimeDate(dayGenerate.getYearTime());
break;
}
......
......@@ -212,11 +212,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
HashMap<String, String> alarmAbnormalityItem = new HashMap<>();
FanHealthIndex idxBizFanHealthIndex = idxBizFanHealthIndexList.get(i);
xDatas.add(idxBizFanHealthIndex.getAnalysisTime());
yDatas.add(idxBizFanHealthIndex.getHealthIndex());
yDatas.add(Double.valueOf(keepOneKeepDecimalPlace(idxBizFanHealthIndex.getHealthIndex())));
alarmAbnormalityItem.put("sort", String.valueOf(i));
alarmAbnormalityItem.put("time", idxBizFanHealthIndex.getAnalysisTime());
alarmAbnormalityItem.put("abnormal", String.valueOf(idxBizFanHealthIndex.getAnomaly()).replace("null","0.0"));
alarmAbnormalityItem.put("healthValue", String.valueOf(idxBizFanHealthIndex.getHealthIndex()));
alarmAbnormalityItem.put("abnormal", keepOneKeepDecimalPlace(idxBizFanHealthIndex.getAnomaly()));
alarmAbnormalityItem.put("healthValue", keepOneKeepDecimalPlace(idxBizFanHealthIndex.getHealthIndex()));
alarmAbnormalityList.add(alarmAbnormalityItem);
}
alarmTrendMap.put("xDatas", xDatas);
......@@ -265,11 +265,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
HashMap<String, String> alarmAbnormalityItem = new HashMap<>();
PvHealthIndex idxBizPvHealthIndex = idxBizPvHealthIndexList.get(i);
xDatas.add(idxBizPvHealthIndex.getAnalysisTime());
yDatas.add(idxBizPvHealthIndex.getHealthIndex());
yDatas.add(Double.valueOf(keepOneKeepDecimalPlace(idxBizPvHealthIndex.getHealthIndex())));
alarmAbnormalityItem.put("sort", String.valueOf(i));
alarmAbnormalityItem.put("time", idxBizPvHealthIndex.getAnalysisTime());
alarmAbnormalityItem.put("abnormal", String.valueOf(idxBizPvHealthIndex.getAnomaly()).replace("null","0.0"));
alarmAbnormalityItem.put("healthValue", String.valueOf(idxBizPvHealthIndex.getHealthIndex()));
alarmAbnormalityItem.put("abnormal", keepOneKeepDecimalPlace(idxBizPvHealthIndex.getAnomaly()));
alarmAbnormalityItem.put("healthValue", keepOneKeepDecimalPlace(idxBizPvHealthIndex.getHealthIndex()));
if (idxBizPvHealthIndexListSize >= 3) {
if (i == 0) {
endTime = handlerDateStr(idxBizPvHealthIndex.getAnalysisTime(), -8, 5);
......@@ -540,10 +540,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
Double processValue1 = indicatorDataListMap.get(s + "_" + process1Address);
Double processValue2 = indicatorDataListMap.get(s + "_" + process2Address);
Double processValue3 = indicatorDataListMap.get(s + "_" + process3Address);
currentValueMap.put("analyseValue", String.valueOf(analyseValue));
currentValueMap.put("processValue1", String.valueOf(processValue1));
currentValueMap.put("processValue2", String.valueOf(processValue2));
currentValueMap.put("processValue3", String.valueOf(processValue3));
currentValueMap.put("analyseValue", keepOneKeepDecimalPlace(analyseValue));
currentValueMap.put("processValue1", keepOneKeepDecimalPlace(processValue1));
currentValueMap.put("processValue2", keepOneKeepDecimalPlace(processValue2));
currentValueMap.put("processValue3", keepOneKeepDecimalPlace(processValue3));
HashMap<String, String> trainValueMap = getWorkingConditionCombinationIntervalFan(processValue1, processValue2, processValue3, idxBizFanPointVarCentralValueList);
trainValueMap.put("time", s);
currentValue.add(currentValueMap);
......@@ -599,10 +599,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
Double processValue1 = indicatorDataListMap.get(s + "_" + process1Address);
Double processValue2 = indicatorDataListMap.get(s + "_" + process2Address);
Double processValue3 = indicatorDataListMap.get(s + "_" + process3Address);
currentValueMap.put("analyseValue", String.valueOf(analyseValue));
currentValueMap.put("processValue1", String.valueOf(processValue1));
currentValueMap.put("processValue2", String.valueOf(processValue2));
currentValueMap.put("processValue3", String.valueOf(processValue3));
currentValueMap.put("analyseValue", keepOneKeepDecimalPlace(analyseValue));
currentValueMap.put("processValue1", keepOneKeepDecimalPlace(processValue1));
currentValueMap.put("processValue2", keepOneKeepDecimalPlace(processValue2));
currentValueMap.put("processValue3", keepOneKeepDecimalPlace(processValue3));
HashMap<String, String> trainValueMap = getWorkingConditionCombinationIntervalPv(processValue1, processValue2, processValue3, idxBizPvPointVarCentralValueList);
trainValueMap.put("time", s);
currentValue.add(currentValueMap);
......@@ -653,4 +653,17 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
result.put("warningCycle",warningCycle);
return result;
}
/**
* 保留一位小数
* @param input
* @return
*/
public String keepOneKeepDecimalPlace(Double input){
String result = "0.0";
if(!ObjectUtils.isEmpty(input)){
return String.format("%.1f",input) ;
}
return result;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment