Commit 82b2fa84 authored by tangwei's avatar tangwei

修改户用光伏监控页面bug

parent 1bb12800
......@@ -34,6 +34,8 @@
</foreach>
</if>
</where>
order by start_time DESC
</select>
<select id="getByTime" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto">
......
......@@ -65,7 +65,7 @@ public class MonthPowerServiceImpl extends BaseService<MonthPowerDto,MonthPower,
for (MonthPower monthPower : list) {
for (MonthPower power : listdday) {
if(monthPower.getThirdStationId().equals(power.getThirdStationId())){
power.setCreatedTime(monthPower.getCreatedTime());
monthPower.setCreatedTime(power.getCreatedTime());
}else{
}
......
......@@ -55,7 +55,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
if (collector != null) {
List<TdHygfJpCollectorHistoryDto> list = this.baseMapper.dayList(collector.getSnCode(),
collector.getThirdStationId(), TimeUtil.getStartTimeOfDay(day)- 8 * 60 * 60 * 1000, TimeUtil.getEndTimeOfDay(day)- 8 * 60 * 60 * 1000);
collector.getThirdStationId(), TimeUtil.getStartTimeOfDay(day), TimeUtil.getEndTimeOfDay(day));
if (!list.isEmpty()) {
list.forEach(i -> {
i.setTimeFormat(TimeUtil.minuteFormat(i.getTime()));
......@@ -118,8 +118,8 @@ public class TdHygfJpCollectorHistoryServiceImpl
int month = cal.get(Calendar.MONTH) + 1;
int year = cal.get(Calendar.YEAR);
// 月表
List<Map<String, Object>> monthList = this.baseMapper.dayToMonth(TimeUtil.getStartTimeOfDay(dayTime)- 8 * 60 * 60 * 1000,
TimeUtil.getEndTimeOfDay(dayTime)- 8 * 60 * 60 * 1000);
List<Map<String, Object>> monthList = this.baseMapper.dayToMonth(TimeUtil.getStartTimeOfDay(dayTime),
TimeUtil.getEndTimeOfDay(dayTime));
for (int i = 0; i < monthList.size(); i++) {
monthList.get(i).put("created_time", dayTime.getTime() + i);
monthList.get(i).put("day", day);
......
......@@ -49,7 +49,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
JpInverter invertor = jpInvertorServiceImpl.getById(id);
if (invertor != null) {
List<TdHygfJpInvertorElecHistoryDto> list = this.baseMapper.dayList(invertor.getSnCode(),
invertor.getThirdStationId(), TimeUtil.getStartTimeOfDay(day)- 8 * 60 * 60 * 1000, TimeUtil.getEndTimeOfDay(day)- 8 * 60 * 60 * 1000);
invertor.getThirdStationId(), TimeUtil.getStartTimeOfDay(day), TimeUtil.getEndTimeOfDay(day));
if (!list.isEmpty()) {
list.forEach(i -> {
i.setTimeFormat(TimeUtil.minuteFormat(i.getTime()));
......@@ -110,8 +110,8 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
int month = cal.get(Calendar.MONTH) + 1;
int year = cal.get(Calendar.YEAR);
// 月表
List<Map<String, Object>> monthList = this.baseMapper.dayToMonth(TimeUtil.getStartTimeOfDay(dayTime)- 8 * 60 * 60 * 1000,
TimeUtil.getEndTimeOfDay(dayTime)- 8 * 60 * 60 * 1000);
List<Map<String, Object>> monthList = this.baseMapper.dayToMonth(TimeUtil.getStartTimeOfDay(dayTime),
TimeUtil.getEndTimeOfDay(dayTime));
for (int i = 0; i < monthList.size(); i++) {
monthList.get(i).put("created_time", dayTime.getTime() + i);
monthList.get(i).put("day", day);
......@@ -127,7 +127,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
for (Map<String, Object> map : monthList) {
for (JpInvertorElecHistoryMonthDto jpInvertorElecHistoryMonthDto : listold) {
if (map.get("third_station_id").toString().equals(jpInvertorElecHistoryMonthDto.getThirdStationId())&&map.get("sn_code").toString().trim().equals(jpInvertorElecHistoryMonthDto.getSnCode().trim())&&map.get("day").toString().equals(jpInvertorElecHistoryMonthDto.getDay())) {
if (map.get("third_station_id").toString().equals(jpInvertorElecHistoryMonthDto.getThirdStationId().trim())&&map.get("sn_code").toString().trim().equals(jpInvertorElecHistoryMonthDto.getSnCode().trim())&&map.get("day").toString().equals(jpInvertorElecHistoryMonthDto.getDay())) {
map.put("created_time", jpInvertorElecHistoryMonthDto.getCreatedTime());
}
}
......
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