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