修改时间
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package com.njcn.csharmonic.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.common.utils.serializer.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -15,9 +18,8 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
public class ThdDataVO {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime time;
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
private String lineId;
|
||||
private String position;
|
||||
private String lineName;
|
||||
|
||||
@@ -64,7 +64,7 @@ public class DeviceDataTrendServiceImpl implements DeviceDataTrendService {
|
||||
vo.setLineId(statisticalDataDTO.getLineId());
|
||||
vo.setPhase(statisticalDataDTO.getPhaseType());
|
||||
|
||||
vo.setTime(statisticalDataDTO.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
vo.setTime(statisticalDataDTO.getTime());
|
||||
vo.setStatMethod(statisticalDataDTO.getValueType());
|
||||
vo.setStatisticalData(BigDecimal.valueOf(statisticalDataDTO.getValue()).setScale(4, RoundingMode.UP).doubleValue());
|
||||
vo.setStatisticalIndex(temp.getDataId());
|
||||
|
||||
@@ -80,7 +80,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
ThdDataVO thdDataVO = new ThdDataVO();
|
||||
BeanUtils.copyProperties(temp,thdDataVO);
|
||||
thdDataVO.setStatisticalName(statisticalName);
|
||||
thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
thdDataVO.setTime(temp.getTime());
|
||||
String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
thdDataVO.setPosition(position);
|
||||
Double statisticalValue = 0.00;
|
||||
@@ -106,7 +106,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
ThdDataVO thdDataVO = new ThdDataVO();
|
||||
BeanUtils.copyProperties(temp,thdDataVO);
|
||||
thdDataVO.setStatisticalName(thdDataQueryParm.getStatisticalName());
|
||||
thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
thdDataVO.setTime(temp.getTime());
|
||||
String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
thdDataVO.setPosition(position);
|
||||
Double statisticalValue = 0.00;
|
||||
@@ -133,7 +133,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
ThdDataVO thdDataVO = new ThdDataVO();
|
||||
BeanUtils.copyProperties(temp,thdDataVO);
|
||||
thdDataVO.setStatisticalName(statisticalName);
|
||||
thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
thdDataVO.setTime(temp.getTime());
|
||||
String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
thdDataVO.setPosition(position);
|
||||
Double statisticalValue = 0.00;
|
||||
@@ -158,7 +158,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
ThdDataVO thdDataVO = new ThdDataVO();
|
||||
BeanUtils.copyProperties(temp,thdDataVO);
|
||||
thdDataVO.setStatisticalName(thdDataQueryParm.getStatisticalName());
|
||||
thdDataVO.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
thdDataVO.setTime(temp.getTime());
|
||||
String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), thdDataVO.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
thdDataVO.setPosition(position);
|
||||
Double statisticalValue = 0.00;
|
||||
@@ -214,7 +214,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
vo.setPhase(phaseReflection(temp.getPhaseType()));
|
||||
String position = finalCsLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), vo.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
vo.setPosition(position);
|
||||
vo.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
vo.setTime(temp.getTime());
|
||||
vo.setStatMethod(temp.getValueType());
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setStatisticalIndex(data.getId());
|
||||
@@ -265,7 +265,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
vo.setPhase(temp.getPhaseType());
|
||||
String position = csLinePOList.stream().filter(csLinePO -> Objects.equals(csLinePO.getLineId(), vo.getLineId())).collect(Collectors.toList()).get(0).getPosition();
|
||||
vo.setPosition(position);
|
||||
vo.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
vo.setTime(temp.getTime());
|
||||
vo.setStatMethod(temp.getValueType());
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setStatisticalIndex(epdPqd.getId());
|
||||
@@ -325,7 +325,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
|
||||
vo.setLineName(lineName);
|
||||
vo.setPosition(position);
|
||||
vo.setTime(temp.getTime().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
vo.setTime(temp.getTime());
|
||||
vo.setStatMethod(temp.getValueType());
|
||||
vo.setStatisticalData(Double.valueOf(df.format(temp.getValue())));
|
||||
vo.setStatisticalIndex(epdPqd.getId());
|
||||
|
||||
Reference in New Issue
Block a user