|
@@ -1,12 +1,13 @@
|
|
|
package com.zcxk.rmcp.api.vo;
|
|
|
|
|
|
-import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+import com.zcxk.core.utils.DateUtil;
|
|
|
import com.zcxk.rmcp.api.enums.ReadStatusEnum;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
-import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
* @author Andy
|
|
@@ -15,6 +16,7 @@ import java.util.Date;
|
|
|
* @date 2021/7/22
|
|
|
**/
|
|
|
@Data
|
|
|
+@ApiModel
|
|
|
public class MeterReadRecordVo {
|
|
|
|
|
|
@ApiModelProperty(value="id")
|
|
@@ -78,8 +80,7 @@ public class MeterReadRecordVo {
|
|
|
private int readDate;
|
|
|
|
|
|
@ApiModelProperty(value="抄表时间/读表时间")
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
|
|
- private Long readTime;
|
|
|
+ private String readTime;
|
|
|
|
|
|
@ApiModelProperty(value="阀门状态")
|
|
|
private Integer valveStatus;
|
|
@@ -99,7 +100,14 @@ public class MeterReadRecordVo {
|
|
|
public String getReadStatus(){
|
|
|
return ReadStatusEnum.getMessage(readStatus);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ public String getReadTime(){
|
|
|
+ try {
|
|
|
+ return StringUtils.isNotEmpty(readTime) ? DateUtil.format(Long.parseLong(readTime), "yyyy-MM-dd HH:mm:ss") : readTime;
|
|
|
+ } catch (Exception e) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|