|
@@ -2,6 +2,7 @@ package org.jeecg.modules.gatherData.entity;
|
|
|
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
+import org.jeecg.modules.fpgJob.entity.FpgLeanModel;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
@@ -101,21 +102,59 @@ public class FpgStatiscsModelData{
|
|
|
/**日期*/
|
|
|
@ApiModelProperty(value = "日期")
|
|
|
private String dates;
|
|
|
+ /**统计单位存储对应时间格式*/
|
|
|
+ @ApiModelProperty(value = "日期")
|
|
|
+ private String datestr;
|
|
|
/**创建时间*/
|
|
|
@ApiModelProperty(value = "创建时间")
|
|
|
private Date createTime;
|
|
|
|
|
|
// 峰平谷精益模型数据统计
|
|
|
- public void fpgStatisticsModelData(FpgStatiscsModelData fpgGather, String fpgType, String classs, BigDecimal amount, String dates, Date createTime, Date updateTime) {
|
|
|
+
|
|
|
+ public FpgStatiscsModelData(FpgGatherData fpgGather, FpgLeanModel fpgLeanModel, String datestr, String dates, String classs, Date createTime, Date updateTime) {
|
|
|
+
|
|
|
// 基础信息配置
|
|
|
this.deviceRegionId = fpgGather.getDeviceRegionId(); // 区域id
|
|
|
this.deviceInformationId = fpgGather.getDeviceInformationId(); // 设备id
|
|
|
this.devicePointId = fpgGather.getDevicePointId(); // 采集点id
|
|
|
- this.ingTime = fpgGather.getIngTime(); // 运行时常
|
|
|
- this.power = fpgGather.getPower();
|
|
|
- this.classs = classs;
|
|
|
- this.amount = amount;
|
|
|
+ this.ingTime = new BigDecimal("0.00"); // 累计时长
|
|
|
+ this.power = new BigDecimal("0.00"); // 累计功率
|
|
|
+ this.topsPower = new BigDecimal("0.00"); // 尖功率
|
|
|
+ this.peaksPower = new BigDecimal("0.00"); // 峰功率
|
|
|
+ this.flatPower = new BigDecimal("0.00"); // 平功率
|
|
|
+ this.valleysPower = new BigDecimal("0.00"); // 谷功率
|
|
|
+ if(fpgLeanModel.getClassUnit() == 1){ // 班次统计
|
|
|
+ this.classs = classs;
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getProportion() == 1){ // 占比统计
|
|
|
+ this.topsProportion = new BigDecimal("0.00");
|
|
|
+ this.peaksProportion = new BigDecimal("0.00");
|
|
|
+ this.flatProportion = new BigDecimal("0.00");
|
|
|
+ this.valleysProportion = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getRunTime() == 1){ // 运行时长统计
|
|
|
+ this.topsIngTime = new BigDecimal("0.00");
|
|
|
+ this.peaksIngTime = new BigDecimal("0.00");
|
|
|
+ this.flatIngTime = new BigDecimal("0.00");
|
|
|
+ this.valleysIngTime = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getPeaksPrice() != null){ // 峰单价电费
|
|
|
+ this.peaksPrice = fpgLeanModel.getPeaksPrice();
|
|
|
+ this.topsAmount = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getFlatPrice() != null){ // 平单价电费
|
|
|
+ this.flatPrice = fpgLeanModel.getFlatPrice();
|
|
|
+ this.flatAmount = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getValleysPrice() != null){ // 谷单价电费
|
|
|
+ this.valleysPrice = fpgLeanModel.getValleysPrice();
|
|
|
+ this.valleysAmount = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
+ if(fpgLeanModel.getTopsPrice() != null || fpgLeanModel.getPeaksPrice() != null || fpgLeanModel.getFlatPrice() != null || fpgLeanModel.getValleysPrice() != null){
|
|
|
+ this.amount = new BigDecimal("0.00");
|
|
|
+ }
|
|
|
this.dates = dates;
|
|
|
+ this.datestr = datestr;
|
|
|
this.createTime = createTime;
|
|
|
this.updateTime = updateTime;
|
|
|
}
|