123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515 |
- package com.ruoyi.biz.domain;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.ruoyi.biz.tools.Tools;
- import com.ruoyi.common.annotation.Excel;
- import com.ruoyi.common.core.domain.BaseEntity;
- import com.ruoyi.common.utils.bean.BeanUtils;
- 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 java.math.BigDecimal;
- import java.util.Date;
- /**
- * 日统计数据对象 twin_calc_day
- *
- * @author ruoyi
- * @date 2024-05-22
- */
- @ApiModel(value = "ITwinCalcDay", description = "日统计数据")
- public class TwinCalcDay extends BaseEntity {
- private static final long serialVersionUID = 1L;
- /**
- * ID
- */
- private Long id;
- /**
- * 时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
- @ApiModelProperty("时间")
- private Date time;
- /**
- * 总米长
- */
- @Excel(name = "总米长")
- @ApiModelProperty("总米长")
- private BigDecimal length;
- /**
- * 总重量
- */
- @Excel(name = "总重量")
- @ApiModelProperty("总重量")
- private BigDecimal weight;
- /**
- * 稼动率
- */
- @Excel(name = "稼动率")
- @ApiModelProperty("稼动率")
- private BigDecimal efficiency;
- /**
- * 总电量
- */
- @Excel(name = "总电量")
- @ApiModelProperty("总电量")
- private BigDecimal kwh;
- /**
- * 告警数量
- */
- @Excel(name = "告警数量")
- @ApiModelProperty("告警数量")
- private Long alarm;
- /**
- * A班米长
- */
- @Excel(name = "A班米长")
- @ApiModelProperty("A班米长")
- private BigDecimal lengthA;
- /**
- * A班重量
- */
- @Excel(name = "A班重量")
- @ApiModelProperty("A班重量")
- private BigDecimal weightA;
- /**
- * A班稼动率
- */
- @Excel(name = "A班稼动率")
- @ApiModelProperty("A班稼动率")
- private BigDecimal efficiencyA;
- /**
- * A班开机时间
- */
- @Excel(name = "A班开机时间")
- @ApiModelProperty("A班开机时间")
- private BigDecimal openTimeA;
- /**
- * A班停机时间
- */
- @Excel(name = "A班停机时间")
- @ApiModelProperty("A班停机时间")
- private BigDecimal closeTimeA;
- /**
- * A班电量
- */
- @Excel(name = "A班电量")
- @ApiModelProperty("A班电量")
- private BigDecimal kwhA;
- /**
- * A班停经片停机
- */
- @Excel(name = "A班停经片停机")
- @ApiModelProperty("A班停经片停机")
- private Long stop1A;
- /**
- * A班CCD停机
- */
- @Excel(name = "A班CCD停机")
- @ApiModelProperty("A班CCD停机")
- private Long stop2A;
- /**
- * A班人工停机
- */
- @Excel(name = "A班人工停机")
- @ApiModelProperty("A班人工停机")
- private Long stop3A;
- /**
- * B班米长
- */
- @Excel(name = "B班米长")
- @ApiModelProperty("B班米长")
- private BigDecimal lengthB;
- /**
- * B班重量
- */
- @Excel(name = "B班重量")
- @ApiModelProperty("B班重量")
- private BigDecimal weightB;
- /**
- * B班稼动率
- */
- @Excel(name = "B班稼动率")
- @ApiModelProperty("B班稼动率")
- private BigDecimal efficiencyB;
- /**
- * B班开机时间
- */
- @Excel(name = "B班开机时间")
- @ApiModelProperty("B班开机时间")
- private BigDecimal openTimeB;
- /**
- * B班停机时间
- */
- @Excel(name = "B班停机时间")
- @ApiModelProperty("B班停机时间")
- private BigDecimal closeTimeB;
- /**
- * B班电量
- */
- @Excel(name = "B班电量")
- @ApiModelProperty("B班电量")
- private BigDecimal kwhB;
- /**
- * B班停经片停机
- */
- @Excel(name = "B班停经片停机")
- @ApiModelProperty("B班停经片停机")
- private Long stop1B;
- /**
- * B班CCD停机
- */
- @Excel(name = "B班CCD停机")
- @ApiModelProperty("B班CCD停机")
- private Long stop2B;
- /**
- * B班人工停机
- */
- @Excel(name = "B班人工停机")
- @ApiModelProperty("B班人工停机")
- private Long stop3B;
- /**
- * 创建人
- */
- @Excel(name = "创建人")
- @ApiModelProperty("创建人")
- private String createdBy;
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
- @ApiModelProperty("创建时间")
- private Date createdTime;
- /**
- * 更新人
- */
- @Excel(name = "更新人")
- @ApiModelProperty("更新人")
- private String updatedBy;
- /**
- * 更新时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
- @ApiModelProperty("更新时间")
- private Date updatedTime;
- /**
- * 从calc2hr转换为当前对象
- *
- * @param calc2hr 2小时统计的对象
- */
- public void convert(TwinCalc2hr calc2hr) {
- BeanUtils.copyProperties(calc2hr, this);
- this.time = calc2hr.getDataDate();
- // this.kwh = this.kwhA.add(this.kwhB);
- this.weight = this.weightA.add(this.weightB);
- this.length = this.lengthA.add(this.lengthB);
- this.efficiencyA = Tools.calcPercent(this.openTimeA, this.closeTimeA);
- this.efficiencyB = Tools.calcPercent(this.openTimeB, this.closeTimeB);
- BigDecimal totalOpenTime = this.openTimeA.add(this.openTimeB);
- BigDecimal totalCloseTime = this.closeTimeA.add(this.closeTimeB);
- this.efficiency = Tools.calcPercent(totalOpenTime, totalCloseTime);
- }
- public void setId(Long id) {
- this.id = id;
- }
- public Long getId() {
- return id;
- }
- public void setTime(Date time) {
- this.time = time;
- }
- public Date getTime() {
- return time;
- }
- public void setLength(BigDecimal length) {
- this.length = length;
- }
- public BigDecimal getLength() {
- return length;
- }
- public void setWeight(BigDecimal weight) {
- this.weight = weight;
- }
- public BigDecimal getWeight() {
- return weight;
- }
- public void setEfficiency(BigDecimal efficiency) {
- this.efficiency = efficiency;
- }
- public BigDecimal getEfficiency() {
- return efficiency;
- }
- public void setKwh(BigDecimal kwh) {
- this.kwh = kwh;
- }
- public BigDecimal getKwh() {
- return kwh;
- }
- public void setAlarm(Long alarm) {
- this.alarm = alarm;
- }
- public Long getAlarm() {
- return alarm;
- }
- public void setLengthA(BigDecimal lengthA) {
- this.lengthA = lengthA;
- }
- public BigDecimal getLengthA() {
- return lengthA;
- }
- public void setWeightA(BigDecimal weightA) {
- this.weightA = weightA;
- }
- public BigDecimal getWeightA() {
- return weightA;
- }
- public void setEfficiencyA(BigDecimal efficiencyA) {
- this.efficiencyA = efficiencyA;
- }
- public BigDecimal getEfficiencyA() {
- return efficiencyA;
- }
- 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 setKwhA(BigDecimal kwhA) {
- this.kwhA = kwhA;
- }
- public BigDecimal getKwhA() {
- return kwhA;
- }
- 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 setLengthB(BigDecimal lengthB) {
- this.lengthB = lengthB;
- }
- public BigDecimal getLengthB() {
- return lengthB;
- }
- public void setWeightB(BigDecimal weightB) {
- this.weightB = weightB;
- }
- public BigDecimal getWeightB() {
- return weightB;
- }
- public void setEfficiencyB(BigDecimal efficiencyB) {
- this.efficiencyB = efficiencyB;
- }
- public BigDecimal getEfficiencyB() {
- return efficiencyB;
- }
- public void setOpenTimeB(BigDecimal openTimeB) {
- this.openTimeB = openTimeB;
- }
- public BigDecimal getOpenTimeB() {
- return openTimeB;
- }
- public void setCloseTimeB(BigDecimal closeTimeB) {
- this.closeTimeB = closeTimeB;
- }
- public BigDecimal getCloseTimeB() {
- return closeTimeB;
- }
- public void setKwhB(BigDecimal kwhB) {
- this.kwhB = kwhB;
- }
- public BigDecimal getKwhB() {
- return kwhB;
- }
- 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;
- }
- @Override
- public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("time", getTime())
- .append("length", getLength())
- .append("weight", getWeight())
- .append("efficiency", getEfficiency())
- .append("kwh", getKwh())
- .append("alarm", getAlarm())
- .append("lengthA", getLengthA())
- .append("weightA", getWeightA())
- .append("efficiencyA", getEfficiencyA())
- .append("openTimeA", getOpenTimeA())
- .append("closeTimeA", getCloseTimeA())
- .append("kwhA", getKwhA())
- .append("stop1A", getStop1A())
- .append("stop2A", getStop2A())
- .append("stop3A", getStop3A())
- .append("lengthB", getLengthB())
- .append("weightB", getWeightB())
- .append("efficiencyB", getEfficiencyB())
- .append("openTimeB", getOpenTimeB())
- .append("closeTimeB", getCloseTimeB())
- .append("kwhB", getKwhB())
- .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();
- }
- }
|