|
@@ -5,8 +5,7 @@ import com.ruoyi.common.annotation.Excel;
|
|
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
-import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
-import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
+import lombok.Data;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
@@ -17,6 +16,7 @@ import java.util.Date;
|
|
|
* @author ruoyi
|
|
|
* @date 2024-05-14
|
|
|
*/
|
|
|
+@Data
|
|
|
@ApiModel(value = "ITwinCalc2hr", description = "2小时统计数据")
|
|
|
public class TwinCalc2hr extends BaseEntity {
|
|
|
private static final long serialVersionUID = 1L;
|
|
@@ -38,6 +38,9 @@ public class TwinCalc2hr extends BaseEntity {
|
|
|
this.lengthB = BigDecimal.ZERO;
|
|
|
this.weightA = BigDecimal.ZERO;
|
|
|
this.weightB = BigDecimal.ZERO;
|
|
|
+ this.kwh = BigDecimal.ZERO;
|
|
|
+ this.kwhA = BigDecimal.ZERO;
|
|
|
+ this.kwhB = BigDecimal.ZERO;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -208,6 +211,24 @@ public class TwinCalc2hr extends BaseEntity {
|
|
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
|
|
@ApiModelProperty("更新时间")
|
|
|
private Date updatedTime;
|
|
|
+ /**
|
|
|
+ * 总电量
|
|
|
+ */
|
|
|
+ @Excel(name = "总电量")
|
|
|
+ @ApiModelProperty("总电量")
|
|
|
+ private BigDecimal kwh;
|
|
|
+ /**
|
|
|
+ * A班电量
|
|
|
+ */
|
|
|
+ @Excel(name = "A班电量")
|
|
|
+ @ApiModelProperty("A班电量")
|
|
|
+ private BigDecimal kwhA;
|
|
|
+ /**
|
|
|
+ * A班电量
|
|
|
+ */
|
|
|
+ @Excel(name = "B班电量")
|
|
|
+ @ApiModelProperty("B班电量")
|
|
|
+ private BigDecimal kwhB;
|
|
|
|
|
|
/**
|
|
|
* 计算累加数据
|
|
@@ -231,233 +252,18 @@ public class TwinCalc2hr extends BaseEntity {
|
|
|
this.lengthB = this.lengthB.add(calc2hr.getLengthB());
|
|
|
this.weightA = this.weightA.add(calc2hr.getWeightA());
|
|
|
this.weightB = this.weightB.add(calc2hr.getWeightB());
|
|
|
- }
|
|
|
-
|
|
|
- public void setId(Long id) {
|
|
|
- this.id = id;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getId() {
|
|
|
- return id;
|
|
|
- }
|
|
|
-
|
|
|
- public void setDataDate(Date dataDate) {
|
|
|
- this.dataDate = dataDate;
|
|
|
- }
|
|
|
-
|
|
|
- public Date getDataDate() {
|
|
|
- return dataDate;
|
|
|
- }
|
|
|
-
|
|
|
- public void setTimePeriod(String timePeriod) {
|
|
|
- this.timePeriod = timePeriod;
|
|
|
- }
|
|
|
-
|
|
|
- public String getTimePeriod() {
|
|
|
- return timePeriod;
|
|
|
- }
|
|
|
-
|
|
|
- public void setDeviceId(Long deviceId) {
|
|
|
- this.deviceId = deviceId;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getDeviceId() {
|
|
|
- return deviceId;
|
|
|
- }
|
|
|
-
|
|
|
- public void setLengthA(BigDecimal lengthA) {
|
|
|
- this.lengthA = lengthA;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getLengthA() {
|
|
|
- return lengthA;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOpenTimeA(BigDecimal openTimeA) {
|
|
|
- this.openTimeA = openTimeA;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getOpenTimeA() {
|
|
|
- return openTimeA;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCloseTimeA(BigDecimal closeTimeA) {
|
|
|
- this.closeTimeA = closeTimeA;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getCloseTimeA() {
|
|
|
- return closeTimeA;
|
|
|
- }
|
|
|
-
|
|
|
- public void setLengthB(BigDecimal lengthB) {
|
|
|
- this.lengthB = lengthB;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getLengthB() {
|
|
|
- return lengthB;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCloseTimeB(BigDecimal closeTimeB) {
|
|
|
- this.closeTimeB = closeTimeB;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getCloseTimeB() {
|
|
|
- return closeTimeB;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOpenTimeB(BigDecimal openTimeB) {
|
|
|
- this.openTimeB = openTimeB;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getOpenTimeB() {
|
|
|
- return openTimeB;
|
|
|
- }
|
|
|
-
|
|
|
- public void setWeight(BigDecimal weight) {
|
|
|
- this.weight = weight;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getWeight() {
|
|
|
- return weight;
|
|
|
- }
|
|
|
-
|
|
|
- public void setWeightA(BigDecimal weightA) {
|
|
|
- this.weightA = weightA;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getWeightA() {
|
|
|
- return weightA;
|
|
|
- }
|
|
|
-
|
|
|
- public void setWeightB(BigDecimal weightB) {
|
|
|
- this.weightB = weightB;
|
|
|
- }
|
|
|
-
|
|
|
- public BigDecimal getWeightB() {
|
|
|
- return weightB;
|
|
|
- }
|
|
|
-
|
|
|
- public void setAlarm(Long alarm) {
|
|
|
- this.alarm = alarm;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getAlarm() {
|
|
|
- return alarm;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop1A(Long stop1A) {
|
|
|
- this.stop1A = stop1A;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop1A() {
|
|
|
- return stop1A;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop2A(Long stop2A) {
|
|
|
- this.stop2A = stop2A;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop2A() {
|
|
|
- return stop2A;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop3A(Long stop3A) {
|
|
|
- this.stop3A = stop3A;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop3A() {
|
|
|
- return stop3A;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop1B(Long stop1B) {
|
|
|
- this.stop1B = stop1B;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop1B() {
|
|
|
- return stop1B;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop2B(Long stop2B) {
|
|
|
- this.stop2B = stop2B;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop2B() {
|
|
|
- return stop2B;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStop3B(Long stop3B) {
|
|
|
- this.stop3B = stop3B;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getStop3B() {
|
|
|
- return stop3B;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCreatedBy(String createdBy) {
|
|
|
- this.createdBy = createdBy;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCreatedBy() {
|
|
|
- return createdBy;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCreatedTime(Date createdTime) {
|
|
|
- this.createdTime = createdTime;
|
|
|
- }
|
|
|
-
|
|
|
- public Date getCreatedTime() {
|
|
|
- return createdTime;
|
|
|
- }
|
|
|
-
|
|
|
- public void setUpdatedBy(String updatedBy) {
|
|
|
- this.updatedBy = updatedBy;
|
|
|
- }
|
|
|
-
|
|
|
- public String getUpdatedBy() {
|
|
|
- return updatedBy;
|
|
|
- }
|
|
|
-
|
|
|
- public void setUpdatedTime(Date updatedTime) {
|
|
|
- this.updatedTime = updatedTime;
|
|
|
- }
|
|
|
-
|
|
|
- public Date getUpdatedTime() {
|
|
|
- return updatedTime;
|
|
|
+ this.kwh = this.kwh.add(calc2hr.getKwh());
|
|
|
+ this.kwhA = this.kwhA.add(calc2hr.getKwhA());
|
|
|
+ this.kwhB = this.kwhB.add(calc2hr.getKwhB());
|
|
|
}
|
|
|
|
|
|
public Object[] toArray() {
|
|
|
- Object[] objects = {this.dataDate, this.timePeriod, this.deviceId, this.lengthA, this.openTimeA, this.closeTimeA, this.lengthB, this.closeTimeB, this.openTimeB, this.weight, this.weightA, this.weightB, this.alarm, this.stop1A, this.stop2A, this.stop3A, this.stop1B, this.stop2B, this.stop3B, getRemark()};
|
|
|
+ Object[] objects = {
|
|
|
+ this.dataDate, this.timePeriod, this.deviceId, this.lengthA, this.openTimeA,
|
|
|
+ this.closeTimeA, this.lengthB, this.closeTimeB, this.openTimeB, this.weight,
|
|
|
+ this.weightA, this.weightB, this.alarm, this.stop1A, this.stop2A,
|
|
|
+ this.stop3A, this.stop1B, this.stop2B, this.stop3B, getRemark(),
|
|
|
+ this.kwh, this.kwhA, this.kwhB};
|
|
|
return objects;
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- public String toString() {
|
|
|
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
|
|
- .append("id", getId())
|
|
|
- .append("dataDate", getDataDate())
|
|
|
- .append("timePeriod", getTimePeriod())
|
|
|
- .append("deviceId", getDeviceId())
|
|
|
- .append("lengthA", getLengthA())
|
|
|
- .append("openTimeA", getOpenTimeA())
|
|
|
- .append("closeTimeA", getCloseTimeA())
|
|
|
- .append("lengthB", getLengthB())
|
|
|
- .append("closeTimeB", getCloseTimeB())
|
|
|
- .append("openTimeB", getOpenTimeB())
|
|
|
- .append("weight", getWeight())
|
|
|
- .append("weightA", getWeightA())
|
|
|
- .append("weightB", getWeightB())
|
|
|
- .append("alarm", getAlarm())
|
|
|
- .append("stop1A", getStop1A())
|
|
|
- .append("stop2A", getStop2A())
|
|
|
- .append("stop3A", getStop3A())
|
|
|
- .append("stop1B", getStop1B())
|
|
|
- .append("stop2B", getStop2B())
|
|
|
- .append("stop3B", getStop3B())
|
|
|
- .append("createdBy", getCreatedBy())
|
|
|
- .append("createdTime", getCreatedTime())
|
|
|
- .append("updatedBy", getUpdatedBy())
|
|
|
- .append("updatedTime", getUpdatedTime())
|
|
|
- .append("remark", getRemark())
|
|
|
- .toString();
|
|
|
- }
|
|
|
}
|