海南版本提交
This commit is contained in:
@@ -33,6 +33,11 @@ public enum AdvanceResponseEnum {
|
||||
EVENT_EMPTY("A0102","没有查询到未分析事件"),
|
||||
USER_NAME_EXIST("A0103","用户名已存在"),
|
||||
DATA_NOT_FOUND("A0104","数据缺失,请根据模版上传近两周数据"),
|
||||
DATA_UNDERRUN("A0104","数据量不足,请根据模版上传充足近两周数据"),
|
||||
DOCUMENT_FORMAT_ERROR("A0105","数据缺失,导入失败!请检查导入文档的格式是否正确"),
|
||||
USER_LOST("A0106","干扰源用户缺失")
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -77,7 +77,62 @@ public enum CarryingCapacityEnum {
|
||||
I_INV_32("I_INV_32","0.026","32次典型谐波电流含有率"),
|
||||
I_INV_33("I_INV_33","0.033","33次典型谐波电流含有率"),
|
||||
I_INV_34("I_INV_34","0.018","34次典型谐波电流含有率"),
|
||||
I_INV_35("I_INV_35","0.072","35次典型谐波电流含有率");
|
||||
I_INV_35("I_INV_35","0.072","35次典型谐波电流含有率"),
|
||||
|
||||
//电弧炉谐波电流含有率
|
||||
EAF_I_2("EAF_I_2","0.6112","2次电弧炉谐波电流含有率"),
|
||||
EAF_I_3("EAF_I_3","0.68935","3次电弧炉谐波电流含有率"),
|
||||
EAF_I_4("EAF_I_4","0.9906","4次电弧炉谐波电流含有率"),
|
||||
EAF_I_5("EAF_I_5","6.9575","5次电弧炉谐波电流含有率"),
|
||||
EAF_I_6("EAF_I_6","0.5750","6次电弧炉谐波电流含有率"),
|
||||
EAF_I_7("EAF_I_7","3.2731","7次电弧炉谐波电流含有率"),
|
||||
EAF_I_8("EAF_I_8","0.4782","8次电弧炉谐波电流含有率"),
|
||||
EAF_I_9("EAF_I_9","0.5197","9次电弧炉谐波电流含有率"),
|
||||
EAF_I_10("EAF_I_10","0.6003","10次电弧炉谐波电流含有率"),
|
||||
EAF_I_11("EAF_I_11","4.5631","11次电弧炉谐波电流含有率"),
|
||||
EAF_I_12("EAF_I_12","0.5242","12次电弧炉谐波电流含有率"),
|
||||
EAF_I_13("EAF_I_13","2.9196","13次电弧炉谐波电流含有率"),
|
||||
EAF_I_14("EAF_I_14","0.5720","14次电弧炉谐波电流含有率"),
|
||||
EAF_I_15("EAF_I_15","0.5956","15次电弧炉谐波电流含有率"),
|
||||
EAF_I_16("EAF_I_16","0.8234","16次电弧炉谐波电流含有率"),
|
||||
EAF_I_17("EAF_I_17","5.4185","17次电弧炉谐波电流含有率"),
|
||||
EAF_I_18("EAF_I_18","0.8848","18次电弧炉谐波电流含有率"),
|
||||
EAF_I_19("EAF_I_19","2.3503","19次电弧炉谐波电流含有率"),
|
||||
EAF_I_20("EAF_I_20","0.6789","20次电弧炉谐波电流含有率"),
|
||||
|
||||
//充电桩谐波电流含有率
|
||||
CP_I_2("CP_I_2","5.00","2次电弧炉谐波电流含有率"),
|
||||
CP_I_3("CP_I_3","7.00","3次电弧炉谐波电流含有率"),
|
||||
CP_I_4("CP_I_4","4.00","4次电弧炉谐波电流含有率"),
|
||||
CP_I_5("CP_I_5","5.00","5次电弧炉谐波电流含有率"),
|
||||
CP_I_6("CP_I_6","4.00","6次电弧炉谐波电流含有率"),
|
||||
CP_I_7("CP_I_7","2.00","7次电弧炉谐波电流含有率"),
|
||||
CP_I_8("CP_I_8","2.00","8次电弧炉谐波电流含有率"),
|
||||
CP_I_9("CP_I_9","1.00","9次电弧炉谐波电流含有率"),
|
||||
CP_I_10("CP_I_10","1.50","10次电弧炉谐波电流含有率"),
|
||||
CP_I_11("CP_I_11","1.50","11次电弧炉谐波电流含有率"),
|
||||
CP_I_12("CP_I_12","0.50","12次电弧炉谐波电流含有率"),
|
||||
CP_I_13("CP_I_13","0.50","13次电弧炉谐波电流含有率"),
|
||||
CP_I_14("CP_I_14","0.00","14次电弧炉谐波电流含有率"),
|
||||
CP_I_15("CP_I_15","0.00","15次电弧炉谐波电流含有率"),
|
||||
CP_I_16("CP_I_16","0.00","16次电弧炉谐波电流含有率"),
|
||||
CP_I_17("CP_I_17","0.00","17次电弧炉谐波电流含有率"),
|
||||
CP_I_18("CP_I_18","0.00","18次电弧炉谐波电流含有率"),
|
||||
CP_I_19("CP_I_19","0.00","19次电弧炉谐波电流含有率"),
|
||||
CP_I_20("CP_I_20","0.00","20次电弧炉谐波电流含有率"),
|
||||
|
||||
//电气化铁路典型
|
||||
ER_I_3("ER_I_3","20.11","3次电弧炉谐波电流含有率"),
|
||||
ER_I_5("ER_I_5","10.69","5次电弧炉谐波电流含有率"),
|
||||
ER_I_7("ER_I_7","6.47","7次电弧炉谐波电流含有率"),
|
||||
ER_I_9("ER_I_9","3.76","9次电弧炉谐波电流含有率"),
|
||||
ER_I_11("ER_I_11","2.32","11次电弧炉谐波电流含有率"),
|
||||
ER_I_13("ER_I_13","1.55","13次电弧炉谐波电流含有率"),
|
||||
ER_I_15("ER_I_15","1.17","15次电弧炉谐波电流含有率"),
|
||||
ER_I_17("ER_I_17","0.95","17次电弧炉谐波电流含有率"),
|
||||
ER_I_19("ER_I_19","0.80","19次电弧炉谐波电流含有率"),
|
||||
|
||||
;
|
||||
/**
|
||||
* 字段code
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import com.njcn.influx.pojo.po.DataI;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -18,8 +22,6 @@ import java.time.Instant;
|
||||
@Data
|
||||
public class CarryCapcityDataIEexcel {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
@Excel(name = "时间",width = 30)
|
||||
private Instant time;
|
||||
|
||||
@@ -27,108 +29,396 @@ public class CarryCapcityDataIEexcel {
|
||||
@Excel(name = "监测点id",width = 30)
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
@Excel(name = "项别",width = 30)
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
@Excel(name = "数据类型",width = 30)
|
||||
@Excel(name = "数据类型(CP95)",width = 30)
|
||||
private String valueType;
|
||||
|
||||
|
||||
@Column(name = "i_2")
|
||||
@Excel(name = "2次谐波幅值)",width = 30)
|
||||
private Double i2;
|
||||
@Excel(name = "A项2次谐波幅值",width = 15)
|
||||
private Double i2_a;
|
||||
|
||||
@Column(name = "i_3")
|
||||
@Excel(name = "3次谐波幅值)",width = 30)
|
||||
private Double i3;
|
||||
@Excel(name = "A项3次谐波幅值",width = 15)
|
||||
private Double i3_a;
|
||||
|
||||
@Column(name = "i_4")
|
||||
@Excel(name = "4次谐波幅值)",width = 30)
|
||||
private Double i4;
|
||||
@Excel(name = "A项4次谐波幅值",width = 15)
|
||||
private Double i4_a;
|
||||
|
||||
@Column(name = "i_5")
|
||||
@Excel(name = "5次谐波幅值)",width = 30)
|
||||
private Double i5;
|
||||
@Excel(name = "A项5次谐波幅值",width = 15)
|
||||
private Double i5_a;
|
||||
|
||||
@Column(name = "i_6")
|
||||
@Excel(name = "6次谐波幅值)",width = 30)
|
||||
private Double i6;
|
||||
@Excel(name = "A项6次谐波幅值",width = 15)
|
||||
private Double i6_a;
|
||||
|
||||
@Column(name = "i_7")
|
||||
@Excel(name = "7次谐波幅值)",width = 30)
|
||||
private Double i7;
|
||||
@Excel(name = "A项7次谐波幅值",width = 15)
|
||||
private Double i7_a;
|
||||
|
||||
@Column(name = "i_8")
|
||||
@Excel(name = "8次谐波幅值)",width = 30)
|
||||
private Double i8;
|
||||
@Excel(name = "A项8次谐波幅值",width = 15)
|
||||
private Double i8_a;
|
||||
|
||||
@Column(name = "i_9")
|
||||
@Excel(name = "9次谐波幅值)",width = 30)
|
||||
private Double i9;
|
||||
@Excel(name = "A项9次谐波幅值",width = 15)
|
||||
private Double i9_a;
|
||||
|
||||
@Column(name = "i_10")
|
||||
@Excel(name = "10次谐波幅值)",width = 30)
|
||||
private Double i10;
|
||||
@Excel(name = "A项10次谐波幅值",width = 15)
|
||||
private Double i10_a;
|
||||
|
||||
@Column(name = "i_11")
|
||||
@Excel(name = "11次谐波幅值)",width = 30)
|
||||
private Double i11;
|
||||
@Excel(name = "A项11次谐波幅值",width = 15)
|
||||
private Double i11_a;
|
||||
|
||||
@Column(name = "i_12")
|
||||
@Excel(name = "12次谐波幅值)",width = 30)
|
||||
private Double i12;
|
||||
@Excel(name = "A项12次谐波幅值",width = 15)
|
||||
private Double i12_a;
|
||||
|
||||
@Column(name = "i_13")
|
||||
@Excel(name = "13次谐波幅值)",width = 30)
|
||||
private Double i13;
|
||||
@Excel(name = "A项13次谐波幅值",width = 15)
|
||||
private Double i13_a;
|
||||
|
||||
@Column(name = "i_14")
|
||||
@Excel(name = "14次谐波幅值)",width = 30)
|
||||
private Double i14;
|
||||
@Excel(name = "A项14次谐波幅值",width = 15)
|
||||
private Double i14_a;
|
||||
|
||||
@Column(name = "i_15")
|
||||
@Excel(name = "15次谐波幅值)",width = 30)
|
||||
private Double i15;
|
||||
@Excel(name = "A项15次谐波幅值",width = 15)
|
||||
private Double i15_a;
|
||||
|
||||
@Column(name = "i_16")
|
||||
@Excel(name = "16次谐波幅值)",width = 30)
|
||||
private Double i16;
|
||||
@Excel(name = "A项16次谐波幅值",width = 15)
|
||||
private Double i16_a;
|
||||
|
||||
@Column(name = "i_17")
|
||||
@Excel(name = "17次谐波幅值)",width = 30)
|
||||
private Double i17;
|
||||
@Excel(name = "A项17次谐波幅值",width = 15)
|
||||
private Double i17_a;
|
||||
|
||||
@Column(name = "i_18")
|
||||
@Excel(name = "18次谐波幅值)",width = 30)
|
||||
private Double i18;
|
||||
@Excel(name = "A项18次谐波幅值",width = 15)
|
||||
private Double i18_a;
|
||||
|
||||
@Column(name = "i_19")
|
||||
@Excel(name = "19次谐波幅值)",width = 30)
|
||||
private Double i19;
|
||||
@Excel(name = "A项19次谐波幅值",width = 15)
|
||||
private Double i19_a;
|
||||
|
||||
@Column(name = "i_20")
|
||||
@Excel(name = "20次谐波幅值)",width = 30)
|
||||
private Double i20;
|
||||
@Excel(name = "A项20次谐波幅值",width = 15)
|
||||
private Double i20_a;
|
||||
|
||||
@Column(name = "i_21")
|
||||
@Excel(name = "21次谐波幅值)",width = 30)
|
||||
private Double i21;
|
||||
@Excel(name = "A项21次谐波幅值",width = 15)
|
||||
private Double i21_a;
|
||||
|
||||
@Column(name = "i_22")
|
||||
@Excel(name = "22次谐波幅值)",width = 30)
|
||||
private Double i22;
|
||||
@Excel(name = "A项22次谐波幅值",width = 15)
|
||||
private Double i22_a;
|
||||
|
||||
@Column(name = "i_23")
|
||||
@Excel(name = "23次谐波幅值)",width = 30)
|
||||
private Double i23;
|
||||
@Excel(name = "A项23次谐波幅值",width = 15)
|
||||
private Double i23_a;
|
||||
|
||||
@Column(name = "i_24")
|
||||
@Excel(name = "24次谐波幅值)",width = 30)
|
||||
private Double i24;
|
||||
@Excel(name = "A项24次谐波幅值",width = 15)
|
||||
private Double i24_a;
|
||||
@Column(name = "i_25")
|
||||
@Excel(name = "25次谐波幅值)",width = 30)
|
||||
private Double i25;
|
||||
@Excel(name = "A项25次谐波幅值",width = 15)
|
||||
private Double i25_a;
|
||||
|
||||
@Column(name = "i_2")
|
||||
@Excel(name = "B项2次谐波幅值",width = 15)
|
||||
private Double i2_b;
|
||||
|
||||
@Column(name = "i_3")
|
||||
@Excel(name = "B项3次谐波幅值",width = 15)
|
||||
private Double i3_b;
|
||||
|
||||
@Column(name = "i_4")
|
||||
@Excel(name = "B项4次谐波幅值",width = 15)
|
||||
private Double i4_b;
|
||||
|
||||
@Column(name = "i_5")
|
||||
@Excel(name = "B项5次谐波幅值",width = 15)
|
||||
private Double i5_b;
|
||||
|
||||
@Column(name = "i_6")
|
||||
@Excel(name = "B项6次谐波幅值",width = 15)
|
||||
private Double i6_b;
|
||||
|
||||
@Column(name = "i_7")
|
||||
@Excel(name = "B项7次谐波幅值",width = 15)
|
||||
private Double i7_b;
|
||||
|
||||
@Column(name = "i_8")
|
||||
@Excel(name = "B项8次谐波幅值",width = 15)
|
||||
private Double i8_b;
|
||||
|
||||
@Column(name = "i_9")
|
||||
@Excel(name = "B项9次谐波幅值",width = 15)
|
||||
private Double i9_b;
|
||||
|
||||
@Column(name = "i_10")
|
||||
@Excel(name = "B项10次谐波幅值",width = 15)
|
||||
private Double i10_b;
|
||||
|
||||
@Column(name = "i_11")
|
||||
@Excel(name = "B项11次谐波幅值",width = 15)
|
||||
private Double i11_b;
|
||||
|
||||
@Column(name = "i_12")
|
||||
@Excel(name = "B项12次谐波幅值",width = 15)
|
||||
private Double i12_b;
|
||||
|
||||
@Column(name = "i_13")
|
||||
@Excel(name = "B项13次谐波幅值",width = 15)
|
||||
private Double i13_b;
|
||||
|
||||
@Column(name = "i_14")
|
||||
@Excel(name = "B项14次谐波幅值",width = 15)
|
||||
private Double i14_b;
|
||||
|
||||
@Column(name = "i_15")
|
||||
@Excel(name = "B项15次谐波幅值",width = 15)
|
||||
private Double i15_b;
|
||||
|
||||
@Column(name = "i_16")
|
||||
@Excel(name = "B项16次谐波幅值",width = 15)
|
||||
private Double i16_b;
|
||||
|
||||
@Column(name = "i_17")
|
||||
@Excel(name = "B项17次谐波幅值",width = 15)
|
||||
private Double i17_b;
|
||||
|
||||
@Column(name = "i_18")
|
||||
@Excel(name = "B项18次谐波幅值",width = 15)
|
||||
private Double i18_b;
|
||||
|
||||
@Column(name = "i_19")
|
||||
@Excel(name = "B项19次谐波幅值",width = 15)
|
||||
private Double i19_b;
|
||||
|
||||
@Column(name = "i_20")
|
||||
@Excel(name = "B项20次谐波幅值",width = 15)
|
||||
private Double i20_b;
|
||||
|
||||
@Column(name = "i_21")
|
||||
@Excel(name = "B项21次谐波幅值",width = 15)
|
||||
private Double i21_b;
|
||||
|
||||
@Column(name = "i_22")
|
||||
@Excel(name = "B项22次谐波幅值",width = 15)
|
||||
private Double i22_b;
|
||||
|
||||
@Column(name = "i_23")
|
||||
@Excel(name = "B项23次谐波幅值",width = 15)
|
||||
private Double i23_b;
|
||||
|
||||
@Column(name = "i_24")
|
||||
@Excel(name = "B项24次谐波幅值",width = 15)
|
||||
private Double i24_b;
|
||||
@Column(name = "i_25")
|
||||
@Excel(name = "B项25次谐波幅值",width = 15)
|
||||
private Double i25_b;
|
||||
|
||||
|
||||
|
||||
@Column(name = "i_2")
|
||||
@Excel(name = "C项2次谐波幅值",width = 15)
|
||||
private Double i2_c;
|
||||
|
||||
@Column(name = "i_3")
|
||||
@Excel(name = "C项3次谐波幅值",width = 15)
|
||||
private Double i3_c;
|
||||
|
||||
@Column(name = "i_4")
|
||||
@Excel(name = "C项4次谐波幅值",width = 15)
|
||||
private Double i4_c;
|
||||
|
||||
@Column(name = "i_5")
|
||||
@Excel(name = "C项5次谐波幅值",width = 15)
|
||||
private Double i5_c;
|
||||
|
||||
@Column(name = "i_6")
|
||||
@Excel(name = "C项6次谐波幅值",width = 15)
|
||||
private Double i6_c;
|
||||
|
||||
@Column(name = "i_7")
|
||||
@Excel(name = "C项7次谐波幅值",width = 15)
|
||||
private Double i7_c;
|
||||
|
||||
@Column(name = "i_8")
|
||||
@Excel(name = "C项8次谐波幅值",width = 15)
|
||||
private Double i8_c;
|
||||
|
||||
@Column(name = "i_9")
|
||||
@Excel(name = "C项9次谐波幅值",width = 15)
|
||||
private Double i9_c;
|
||||
|
||||
@Column(name = "i_10")
|
||||
@Excel(name = "C项10次谐波幅值",width = 15)
|
||||
private Double i10_c;
|
||||
|
||||
@Column(name = "i_11")
|
||||
@Excel(name = "C项11次谐波幅值",width = 15)
|
||||
private Double i11_c;
|
||||
|
||||
@Column(name = "i_12")
|
||||
@Excel(name = "C项12次谐波幅值",width = 15)
|
||||
private Double i12_c;
|
||||
|
||||
@Column(name = "i_13")
|
||||
@Excel(name = "C项13次谐波幅值",width = 15)
|
||||
private Double i13_c;
|
||||
|
||||
@Column(name = "i_14")
|
||||
@Excel(name = "C项14次谐波幅值",width = 15)
|
||||
private Double i14_c;
|
||||
|
||||
@Column(name = "i_15")
|
||||
@Excel(name = "C项15次谐波幅值",width = 15)
|
||||
private Double i15_c;
|
||||
|
||||
@Column(name = "i_16")
|
||||
@Excel(name = "C项16次谐波幅值",width = 15)
|
||||
private Double i16_c;
|
||||
|
||||
@Column(name = "i_17")
|
||||
@Excel(name = "C项17次谐波幅值",width = 15)
|
||||
private Double i17_c;
|
||||
|
||||
@Column(name = "i_18")
|
||||
@Excel(name = "C项18次谐波幅值",width = 15)
|
||||
private Double i18_c;
|
||||
|
||||
@Column(name = "i_19")
|
||||
@Excel(name = "C项19次谐波幅值",width = 15)
|
||||
private Double i19_c;
|
||||
|
||||
@Column(name = "i_20")
|
||||
@Excel(name = "C项20次谐波幅值",width = 15)
|
||||
private Double i20_c;
|
||||
|
||||
@Column(name = "i_21")
|
||||
@Excel(name = "C项21次谐波幅值",width = 15)
|
||||
private Double i21_c;
|
||||
|
||||
@Column(name = "i_22")
|
||||
@Excel(name = "C项22次谐波幅值",width = 15)
|
||||
private Double i22_c;
|
||||
|
||||
@Column(name = "i_23")
|
||||
@Excel(name = "C项23次谐波幅值",width = 15)
|
||||
private Double i23_c;
|
||||
|
||||
@Column(name = "i_24")
|
||||
@Excel(name = "C项24次谐波幅值",width = 15)
|
||||
private Double i24_c;
|
||||
@Column(name = "i_25")
|
||||
@Excel(name = "C项25次谐波幅值",width = 15)
|
||||
private Double i25_c;
|
||||
|
||||
//excel对象转DataI
|
||||
public static List<DataI> excelToPO(CarryCapcityDataIEexcel carryCapcityDataIEexcel) {
|
||||
List<DataI> data = new ArrayList<>();
|
||||
if (carryCapcityDataIEexcel == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> phaseList = Stream.of("A", "B", "C").collect(Collectors.toList());
|
||||
for (String phase : phaseList) {
|
||||
DataI dataI = new DataI();
|
||||
BeanUtils.copyProperties(carryCapcityDataIEexcel,dataI);
|
||||
dataI.setPhaseType(phase);
|
||||
dataI.setTime(carryCapcityDataIEexcel.getTime().plusSeconds(8*60*60));
|
||||
|
||||
if (phase.equals("A")) {
|
||||
|
||||
dataI.setI2( carryCapcityDataIEexcel.getI2_a());
|
||||
dataI.setI3( carryCapcityDataIEexcel.getI3_a());
|
||||
dataI.setI4( carryCapcityDataIEexcel.getI4_a());
|
||||
dataI.setI5( carryCapcityDataIEexcel.getI5_a());
|
||||
dataI.setI6( carryCapcityDataIEexcel.getI6_a());
|
||||
dataI.setI7( carryCapcityDataIEexcel.getI7_a());
|
||||
dataI.setI8( carryCapcityDataIEexcel.getI8_a());
|
||||
dataI.setI9( carryCapcityDataIEexcel.getI9_a());
|
||||
dataI.setI10( carryCapcityDataIEexcel.getI10_a());
|
||||
dataI.setI11( carryCapcityDataIEexcel.getI11_a());
|
||||
dataI.setI12( carryCapcityDataIEexcel.getI12_a());
|
||||
dataI.setI13( carryCapcityDataIEexcel.getI13_a());
|
||||
dataI.setI14( carryCapcityDataIEexcel.getI14_a());
|
||||
dataI.setI15( carryCapcityDataIEexcel.getI15_a());
|
||||
dataI.setI16( carryCapcityDataIEexcel.getI16_a());
|
||||
dataI.setI17( carryCapcityDataIEexcel.getI17_a());
|
||||
dataI.setI18( carryCapcityDataIEexcel.getI18_a());
|
||||
dataI.setI19( carryCapcityDataIEexcel.getI19_a());
|
||||
dataI.setI20( carryCapcityDataIEexcel.getI20_a());
|
||||
dataI.setI21( carryCapcityDataIEexcel.getI21_a());
|
||||
dataI.setI22( carryCapcityDataIEexcel.getI22_a());
|
||||
dataI.setI23( carryCapcityDataIEexcel.getI23_a());
|
||||
dataI.setI24( carryCapcityDataIEexcel.getI24_a());
|
||||
dataI.setI25( carryCapcityDataIEexcel.getI25_a());
|
||||
|
||||
|
||||
} else if (phase.equals("B")) {
|
||||
dataI.setI2( carryCapcityDataIEexcel.getI2_b());
|
||||
dataI.setI3( carryCapcityDataIEexcel.getI3_b());
|
||||
dataI.setI4( carryCapcityDataIEexcel.getI4_b());
|
||||
dataI.setI5( carryCapcityDataIEexcel.getI5_b());
|
||||
dataI.setI6( carryCapcityDataIEexcel.getI6_b());
|
||||
dataI.setI7( carryCapcityDataIEexcel.getI7_b());
|
||||
dataI.setI8( carryCapcityDataIEexcel.getI8_b());
|
||||
dataI.setI9( carryCapcityDataIEexcel.getI9_b());
|
||||
dataI.setI10( carryCapcityDataIEexcel.getI10_b());
|
||||
dataI.setI11( carryCapcityDataIEexcel.getI11_b());
|
||||
dataI.setI12( carryCapcityDataIEexcel.getI12_b());
|
||||
dataI.setI13( carryCapcityDataIEexcel.getI13_b());
|
||||
dataI.setI14( carryCapcityDataIEexcel.getI14_b());
|
||||
dataI.setI15( carryCapcityDataIEexcel.getI15_b());
|
||||
dataI.setI16( carryCapcityDataIEexcel.getI16_b());
|
||||
dataI.setI17( carryCapcityDataIEexcel.getI17_b());
|
||||
dataI.setI18( carryCapcityDataIEexcel.getI18_b());
|
||||
dataI.setI19( carryCapcityDataIEexcel.getI19_b());
|
||||
dataI.setI20( carryCapcityDataIEexcel.getI20_b());
|
||||
dataI.setI21( carryCapcityDataIEexcel.getI21_b());
|
||||
dataI.setI22( carryCapcityDataIEexcel.getI22_b());
|
||||
dataI.setI23( carryCapcityDataIEexcel.getI23_b());
|
||||
dataI.setI24( carryCapcityDataIEexcel.getI24_b());
|
||||
dataI.setI25( carryCapcityDataIEexcel.getI25_b());
|
||||
|
||||
}else if (phase.equals("C")){
|
||||
dataI.setI2( carryCapcityDataIEexcel.getI2_c());
|
||||
dataI.setI3( carryCapcityDataIEexcel.getI3_c());
|
||||
dataI.setI4( carryCapcityDataIEexcel.getI4_c());
|
||||
dataI.setI5( carryCapcityDataIEexcel.getI5_c());
|
||||
dataI.setI6( carryCapcityDataIEexcel.getI6_c());
|
||||
dataI.setI7( carryCapcityDataIEexcel.getI7_c());
|
||||
dataI.setI8( carryCapcityDataIEexcel.getI8_c());
|
||||
dataI.setI9( carryCapcityDataIEexcel.getI9_c());
|
||||
dataI.setI10( carryCapcityDataIEexcel.getI10_c());
|
||||
dataI.setI11( carryCapcityDataIEexcel.getI11_c());
|
||||
dataI.setI12( carryCapcityDataIEexcel.getI12_c());
|
||||
dataI.setI13( carryCapcityDataIEexcel.getI13_c());
|
||||
dataI.setI14( carryCapcityDataIEexcel.getI14_c());
|
||||
dataI.setI15( carryCapcityDataIEexcel.getI15_c());
|
||||
dataI.setI16( carryCapcityDataIEexcel.getI16_c());
|
||||
dataI.setI17( carryCapcityDataIEexcel.getI17_c());
|
||||
dataI.setI18( carryCapcityDataIEexcel.getI18_c());
|
||||
dataI.setI19( carryCapcityDataIEexcel.getI19_c());
|
||||
dataI.setI20( carryCapcityDataIEexcel.getI20_c());
|
||||
dataI.setI21( carryCapcityDataIEexcel.getI21_c());
|
||||
dataI.setI22( carryCapcityDataIEexcel.getI22_c());
|
||||
dataI.setI23( carryCapcityDataIEexcel.getI23_c());
|
||||
dataI.setI24( carryCapcityDataIEexcel.getI24_c());
|
||||
dataI.setI25( carryCapcityDataIEexcel.getI25_c());
|
||||
|
||||
}
|
||||
data.add(dataI);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -18,24 +21,45 @@ import java.time.Instant;
|
||||
@Data
|
||||
public class CarryCapcityDataPEexcel {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
@Excel(name = "时间",width = 30)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
@Excel(name = "监测点id",width = 30)
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
@Excel(name = "项别",width = 30)
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
@Excel(name = "数据类型",width = 30)
|
||||
@Excel(name = "数据类型(CP95)",width = 30)
|
||||
private String valueType;
|
||||
|
||||
@Excel(name = "数据(有功功率)",width = 30)
|
||||
private Double value;
|
||||
@Excel(name = "数据(A项有功功率)",width = 30)
|
||||
private Double value_a;
|
||||
@Excel(name = "数据(B项有功功率)",width = 30)
|
||||
private Double value_b;
|
||||
@Excel(name = "数据(C项有功功率)",width = 30)
|
||||
private Double value_c;
|
||||
|
||||
public static List<CarryCapcityData> excelToPO(CarryCapcityDataPEexcel carryCapcityDataPEexcel) {
|
||||
List<CarryCapcityData> data = new ArrayList<>();
|
||||
if (carryCapcityDataPEexcel == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> phaseList = Stream.of("A", "B", "C").collect(Collectors.toList());
|
||||
for (String phase : phaseList) {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataPEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataPEexcel.getTime().plusSeconds(8*60*60));
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataPEexcel.getValue_a());
|
||||
} else if (phase.equals("B")) {
|
||||
carryCapcityData.setValue(carryCapcityDataPEexcel.getValue_b());
|
||||
}else if (phase.equals("C")){
|
||||
carryCapcityData.setValue(carryCapcityDataPEexcel.getValue_c());
|
||||
}
|
||||
data.add(carryCapcityData);
|
||||
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -18,24 +21,47 @@ import java.time.Instant;
|
||||
@Data
|
||||
public class CarryCapcityDataQEexcel {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
@Excel(name = "时间",width = 30)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
@Excel(name = "监测点id",width = 30)
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
@Excel(name = "项别",width = 30)
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
@Excel(name = "数据类型",width = 30)
|
||||
@Excel(name = "数据类型(CP95)",width = 30)
|
||||
private String valueType;
|
||||
|
||||
@Excel(name = "数据(无功功率)",width = 30)
|
||||
private Double value;
|
||||
@Excel(name = "数据(A项无功功率)",width = 30)
|
||||
private Double value_a;
|
||||
@Excel(name = "数据(B项无功功率)",width = 30)
|
||||
private Double value_b;
|
||||
@Excel(name = "数据(C项无功功率)",width = 30)
|
||||
private Double value_c;
|
||||
|
||||
|
||||
public static List<CarryCapcityData> excelToPO(CarryCapcityDataQEexcel carryCapcityDataQEexcel) {
|
||||
List<CarryCapcityData> data = new ArrayList<>();
|
||||
if (carryCapcityDataQEexcel == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> phaseList = Stream.of("A", "B", "C").collect(Collectors.toList());
|
||||
for (String phase : phaseList) {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataQEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataQEexcel.getTime().plusSeconds(8*60*60));
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataQEexcel.getValue_a());
|
||||
} else if (phase.equals("B")) {
|
||||
carryCapcityData.setValue(carryCapcityDataQEexcel.getValue_b());
|
||||
}else if (phase.equals("C")){
|
||||
carryCapcityData.setValue(carryCapcityDataQEexcel.getValue_c());
|
||||
}
|
||||
data.add(carryCapcityData);
|
||||
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
@@ -18,24 +21,45 @@ import java.time.Instant;
|
||||
@Data
|
||||
public class CarryCapcityDataVEexcel {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
@Excel(name = "时间",width = 30)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
@Excel(name = "监测点id",width = 30)
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
@Excel(name = "项别",width = 30)
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
@Excel(name = "数据类型",width = 30)
|
||||
@Excel(name = "数据类型(CP95)",width = 30)
|
||||
private String valueType;
|
||||
|
||||
@Excel(name = "数据(电压)",width = 30)
|
||||
private Double value;
|
||||
|
||||
@Excel(name = "数据(A项电压)",width = 30)
|
||||
private Double value_a;
|
||||
@Excel(name = "数据(B项电压)",width = 30)
|
||||
private Double value_b;
|
||||
@Excel(name = "数据(C项电压)",width = 30)
|
||||
private Double value_c;
|
||||
|
||||
public static List<CarryCapcityData> excelToPO(CarryCapcityDataVEexcel carryCapcityDataVEexcel) {
|
||||
List<CarryCapcityData> data = new ArrayList<>();
|
||||
if (carryCapcityDataVEexcel == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> phaseList = Stream.of("A", "B", "C").collect(Collectors.toList());
|
||||
for (String phase : phaseList) {
|
||||
CarryCapcityData carryCapcityData = new CarryCapcityData();
|
||||
BeanUtils.copyProperties(carryCapcityDataVEexcel,carryCapcityData);
|
||||
carryCapcityData.setPhaseType(phase);
|
||||
carryCapcityData.setTime(carryCapcityDataVEexcel.getTime().plusSeconds(8*60*60));
|
||||
|
||||
if (phase.equals("A")) {
|
||||
carryCapcityData.setValue(carryCapcityDataVEexcel.getValue_a());
|
||||
} else if (phase.equals("B")) {
|
||||
carryCapcityData.setValue(carryCapcityDataVEexcel.getValue_b());
|
||||
}else if (phase.equals("C")){
|
||||
carryCapcityData.setValue(carryCapcityDataVEexcel.getValue_c());
|
||||
}
|
||||
data.add(carryCapcityData);
|
||||
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.excel;
|
||||
|
||||
import com.njcn.influx.pojo.bo.CarryCapcityData;
|
||||
import com.njcn.influx.pojo.po.DataI;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/3/12 14:31【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class ExcelDataDTO {
|
||||
private List<CarryCapcityData> dataHarmPowerPList;
|
||||
private List<CarryCapcityData> dataHarmPowerQList;
|
||||
private List<DataI> dataIList;
|
||||
private List<CarryCapcityData> dataHarmPowerP2List;
|
||||
private List<CarryCapcityData> dataHarmPowerQ2List;
|
||||
private List<CarryCapcityData> dataHarmPowerU2List;
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -26,6 +28,11 @@ public class CarryCapacityCalParam {
|
||||
private String lineId;
|
||||
@ApiModelProperty("用户Id")
|
||||
private String userId;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
|
||||
private LocalDate startTime;
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
|
||||
private LocalDate endTime;
|
||||
@ApiModelProperty(name = "scale",value = "电压等级")
|
||||
private String scale;
|
||||
@ApiModelProperty(name = "S_T",value = "S_T为配变额定容量(监测点基准容量)")
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.param;
|
||||
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityUserVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/2/20 11:15【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CarryCapacityEvaluateParam {
|
||||
@ApiModelProperty(value = "接线类型不可为空\"星型接法_0\", \"三角型接法_1\", \"开口三角型接法_2\"")
|
||||
private String ptType;
|
||||
@ApiModelProperty(value = "变压器连接方式")
|
||||
private String connectionMode;
|
||||
@ApiModelProperty(value = "功率因数(0.95-1之间)")
|
||||
private Double k;
|
||||
|
||||
@ApiModelProperty(value = "专变用户,公变用户")
|
||||
private String userMode;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "scale",value = "电压等级")
|
||||
private String scale;
|
||||
|
||||
@ApiModelProperty(name = "shortCapacity",value = "短路容量")
|
||||
private Float shortCapacity;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "deviceCapacity",value = "设备容量")
|
||||
private Float deviceCapacity;
|
||||
@ApiModelProperty(name = "userList",value = "干扰源用户列表")
|
||||
private List<CarryCapacityUserVO> userList;
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
@@ -25,11 +24,9 @@ import java.time.LocalDate;
|
||||
public class CarryCapacityQueryDataParam {
|
||||
|
||||
|
||||
@NotBlank(message = "监测点索引为空")
|
||||
@ApiModelProperty("监测点索引")
|
||||
private String lineId;
|
||||
@ApiModelProperty("用户Id")
|
||||
@NotBlank(message = "用户ID为空")
|
||||
private String userId;
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/3/8 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CarryCapacityResultParam {
|
||||
/**
|
||||
* 承载能力评估id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
private String evaluateType;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class CarryCapacityResultPageParam extends CarryCapacityResultParam {
|
||||
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "pageNum",dataType ="Integer",required = true)
|
||||
private Integer pageNum;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value="起始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value="结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/3/6 17:30【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class ExcelDataParam {
|
||||
@NotBlank(message = "监测点索引为空")
|
||||
@ApiModelProperty("监测点索引")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startTime;
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "excel文件")
|
||||
private MultipartFile file;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@@ -19,6 +20,7 @@ import java.time.LocalDate;
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "carry_capacity_data")
|
||||
public class CarryCapacityDataPO extends BaseEntity{
|
||||
/**
|
||||
|
||||
@@ -4,29 +4,55 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/3/1 15:38【需求编号】
|
||||
* Date: 2024/3/8 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "carry_capacity_result")
|
||||
public class CarryCapacityResultPO {
|
||||
public class CarryCapacityResultPO extends BaseEntity {
|
||||
/**
|
||||
* 承载能力评估id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
@TableId(value = "id",type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 台区id
|
||||
*/
|
||||
@TableField(value = "line_id")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField(value = "start_time")
|
||||
private LocalDate startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField(value = "end_time")
|
||||
private LocalDate endTime;
|
||||
|
||||
/**
|
||||
* 配变首端电压等级(1-安全,2-III级预警,3-II级预警,4-I 级预警)
|
||||
*/
|
||||
@@ -64,26 +90,19 @@ public class CarryCapacityResultPO {
|
||||
private LocalDate evaluateDate;
|
||||
|
||||
/**
|
||||
* 创建用户
|
||||
* 是否删除(0,无效,1有效)
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
@TableField(value = "`status`")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
@TableField(value = "evaluate_type")
|
||||
private String evaluateType;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
@TableField(value = "first_result")
|
||||
private Double firstResult;
|
||||
|
||||
@TableField(value = "i_result_list")
|
||||
private String iResultList;
|
||||
|
||||
}
|
||||
@@ -2,12 +2,11 @@ package com.njcn.advance.pojo.carrycapacity.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/3/5 10:54【需求编号】
|
||||
@@ -19,7 +18,7 @@ import java.time.LocalDateTime;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "carry_capacity_strategy")
|
||||
public class CarryCapacityStrategyPO {
|
||||
public class CarryCapacityStrategyPO extends BaseEntity {
|
||||
/**
|
||||
* 总承载能力评估结果(1-安全,2-III级预警,3-II级预警,4-I 级预警)
|
||||
*/
|
||||
@@ -56,27 +55,4 @@ public class CarryCapacityStrategyPO {
|
||||
@TableField(value = "user_flag")
|
||||
private Integer userFlag;
|
||||
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.njcn.advance.pojo.carrycapacity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/2/27 11:24【需求编号】
|
||||
@@ -13,6 +17,35 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CarryCapacityDResultVO {
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 台区id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
private String lineName;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDate startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDate endTime;
|
||||
|
||||
|
||||
|
||||
private Integer uTLevel;
|
||||
|
||||
/**
|
||||
@@ -34,4 +67,26 @@ public class CarryCapacityDResultVO {
|
||||
* 总结果等级(1-安全,2-III级预警,3-II级预警,4-I 级预警)
|
||||
*/
|
||||
private Integer reslutLevel;
|
||||
|
||||
private LocalDate evaluateDate;
|
||||
|
||||
|
||||
private String evaluateType;
|
||||
//电弧炉等评估结果
|
||||
|
||||
private double firstResult;
|
||||
|
||||
private List<CarryCapacityDResultVO.CarryCapacityIResult> iResultList;
|
||||
|
||||
|
||||
@Data
|
||||
public static class CarryCapacityIResult {
|
||||
|
||||
@ApiModelProperty("谐波次数")
|
||||
private Integer time=2;
|
||||
|
||||
private Double i;
|
||||
|
||||
private Double i_limit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,11 @@
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -9,11 +9,10 @@ import com.njcn.advance.pojo.carrycapacity.excel.CarryCapcityDataPEexcel;
|
||||
import com.njcn.advance.pojo.carrycapacity.excel.CarryCapcityDataQEexcel;
|
||||
import com.njcn.advance.pojo.carrycapacity.excel.CarryCapcityDataVEexcel;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityCalParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityEvaluateParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityQueryDataParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataIVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataQVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.ExcelDataParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.*;
|
||||
import com.njcn.advance.service.carrycapacity.CarryCapcityService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -62,6 +61,16 @@ public class CarryCapacityController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, carryCapacityDataVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/modelTraining")
|
||||
@ApiOperation("承载能力评估模型训练")
|
||||
@ApiImplicitParam(name = "queryParam", value = "查询参数", required = true)
|
||||
public HttpResult<CarryCapacityDataVO> modelTraining(@RequestBody @Validated CarryCapacityQueryDataParam queryParam) {
|
||||
String methodDescribe = getMethodDescribe("modelTraining");
|
||||
CarryCapacityDataVO carryCapacityDataVO = carryCapcityService.modelTraining(queryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, carryCapacityDataVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryCarryCapacityQData")
|
||||
@ApiOperation("承载能力评估数据查询-无功功率")
|
||||
@@ -102,7 +111,7 @@ public class CarryCapacityController extends BaseController {
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("导出设备模板")
|
||||
@ApiOperation("导出数据集模板")
|
||||
@GetMapping(value = "getExcelTemplate")
|
||||
public HttpResult<String> getExcelTemplate(HttpServletResponse response) {
|
||||
final List<Map<String, Object>> sheetsList = Lists.newArrayList();
|
||||
@@ -116,7 +125,7 @@ public class CarryCapacityController extends BaseController {
|
||||
sheetsList.add(exportMap);
|
||||
|
||||
Map<String, Object> exportMap2 = Maps.newHashMap();
|
||||
final ExportParams exportParams2 = new ExportParams(null, "电压", ExcelType.HSSF);
|
||||
final ExportParams exportParams2 = new ExportParams(null, "电压", ExcelType.XSSF);
|
||||
// 以下3个参数为API中写死的参数名 分别是sheet配置/导出类(注解定义)/数据集
|
||||
exportMap2.put("title", exportParams2);
|
||||
exportMap2.put("entity", CarryCapcityDataVEexcel.class);
|
||||
@@ -125,7 +134,7 @@ public class CarryCapacityController extends BaseController {
|
||||
sheetsList.add(exportMap2);
|
||||
|
||||
Map<String, Object> exportMap3 = Maps.newHashMap();
|
||||
final ExportParams exportParams3 = new ExportParams(null, "有功功率", ExcelType.HSSF);
|
||||
final ExportParams exportParams3 = new ExportParams(null, "有功功率", ExcelType.XSSF);
|
||||
// 以下3个参数为API中写死的参数名 分别是sheet配置/导出类(注解定义)/数据集
|
||||
exportMap3.put("title", exportParams3);
|
||||
exportMap3.put("entity", CarryCapcityDataPEexcel.class);
|
||||
@@ -134,17 +143,17 @@ public class CarryCapacityController extends BaseController {
|
||||
sheetsList.add(exportMap3);
|
||||
|
||||
Map<String, Object> exportMap4 = Maps.newHashMap();
|
||||
final ExportParams exportParams4 = new ExportParams(null, "无功功率", ExcelType.HSSF);
|
||||
final ExportParams exportParams4 = new ExportParams(null, "无功功率", ExcelType.XSSF);
|
||||
// 以下3个参数为API中写死的参数名 分别是sheet配置/导出类(注解定义)/数据集
|
||||
exportMap4.put("title", exportParams4);
|
||||
exportMap4.put("entity", CarryCapcityDataQEexcel.class);
|
||||
exportMap4.put("data", new ArrayList<>());
|
||||
// 加入多sheet配置列表
|
||||
sheetsList.add(exportMap4);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.HSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.XSSF);
|
||||
|
||||
|
||||
String fileName = "数据集.xls";
|
||||
String fileName = "数据集.xlsx";
|
||||
ExportParams exportExcel = new ExportParams("数据集", "数据集");
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
|
||||
@@ -153,5 +162,25 @@ public class CarryCapacityController extends BaseController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/uploadExcel")
|
||||
@ApiOperation("上传数据集")
|
||||
public HttpResult<Boolean> uploadExcel(@Validated ExcelDataParam excelDataParam) throws Exception {
|
||||
String methodDescribe = getMethodDescribe("uploadExcel");
|
||||
|
||||
boolean flag = carryCapcityService.uploadExcel(excelDataParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/carryCapacityEvaluate")
|
||||
@ApiOperation("承载能力评估_充电站、电加热负荷、电气化铁路承载能力评估")
|
||||
@ApiImplicitParam(name = "calParam", value = "计算参数", required = true)
|
||||
public HttpResult<CarryCapacityDResultVO> carryCapacityEvaluate(@RequestBody @Validated CarryCapacityEvaluateParam calParam) {
|
||||
String methodDescribe = getMethodDescribe("carryCapacityEvaluate");
|
||||
CarryCapacityDResultVO vo = carryCapcityService.carryCapacityEvaluate(calParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.advance.controller.carrycapacity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
import com.njcn.advance.service.carrycapacity.CarryCapacityResultPOService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2023年07月21日 10:06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("result")
|
||||
@Api(tags = "承载能力评估结果")
|
||||
@RequiredArgsConstructor
|
||||
public class CarryCapacityResultController extends BaseController {
|
||||
|
||||
|
||||
private final CarryCapacityResultPOService carryCapacityResultPOService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryResultList")
|
||||
@ApiOperation("承载能力评估列表查询")
|
||||
@ApiImplicitParam(name = "queryParam", value = "查询参数", required = true)
|
||||
public HttpResult<IPage<CarryCapacityDResultVO>> queryResultList(@RequestBody @Validated CarryCapacityResultParam.CarryCapacityResultPageParam queryParam) {
|
||||
String methodDescribe = getMethodDescribe("queryResultList");
|
||||
IPage<CarryCapacityDResultVO> vo = carryCapacityResultPOService.queryResultList(queryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -74,6 +74,15 @@ public class CarryCapacityUserController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queyDetailUserById")
|
||||
@ApiOperation("承载能力评估用户查询")
|
||||
public HttpResult<CarryCapacityUserPO> queyDetailUserById(@RequestParam("userId") String userId) {
|
||||
String methodDescribe = getMethodDescribe("queyDetailUserById");
|
||||
CarryCapacityUserPO po = carryCapacityUserPOService.queyDetailUserById(userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.njcn.advance.mapper.carrycapacity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
|
||||
|
||||
/**
|
||||
@@ -11,5 +11,5 @@ import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CarryCapacityDataPOMapper extends BaseMapper<CarryCapacityDataPO> {
|
||||
public interface CarryCapacityDataPOMapper extends MppBaseMapper<CarryCapacityDataPO> {
|
||||
}
|
||||
@@ -4,9 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/3/1 15:38【需求编号】
|
||||
* Date: 2024/3/8 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
|
||||
@@ -5,12 +5,17 @@
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table carry_capacity_result-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="start_time" jdbcType="DATE" property="startTime" />
|
||||
<result column="end_time" jdbcType="DATE" property="endTime" />
|
||||
<result column="u_t_level" jdbcType="INTEGER" property="uTLevel" />
|
||||
<result column="pf_t_level" jdbcType="INTEGER" property="pfTLevel" />
|
||||
<result column="b_t_level" jdbcType="INTEGER" property="bTLevel" />
|
||||
<result column="i_level" jdbcType="INTEGER" property="iLevel" />
|
||||
<result column="reslut_level" jdbcType="INTEGER" property="reslutLevel" />
|
||||
<result column="evaluate_date" jdbcType="DATE" property="evaluateDate" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
@@ -18,7 +23,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, u_t_level, pf_t_level, b_t_level, i_level, reslut_level, evaluate_date, create_by,
|
||||
create_time, update_by, update_time
|
||||
id, line_id, user_id, start_time, end_time, u_t_level, pf_t_level, b_t_level, i_level,
|
||||
reslut_level, evaluate_date, `status`, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.advance.service.carrycapacity;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CarryCapacityDataPOService extends IService<CarryCapacityDataPO>{
|
||||
public interface CarryCapacityDataPOService extends IMppService<CarryCapacityDataPO> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.njcn.advance.service.carrycapacity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/3/1 15:38【需求编号】
|
||||
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
public interface CarryCapacityResultPOService extends IService<CarryCapacityResultPO>{
|
||||
|
||||
|
||||
}
|
||||
IPage<CarryCapacityDResultVO> queryResultList(CarryCapacityResultParam.CarryCapacityResultPageParam queryParam);
|
||||
}
|
||||
|
||||
@@ -20,4 +20,6 @@ public interface CarryCapacityUserPOService extends IService<CarryCapacityUserPO
|
||||
Boolean updateUser(CarryCapacityUserParam.CarryCapacityUserUpdateParam userUpdateParam);
|
||||
|
||||
IPage<CarryCapacityUserPO> queyDetailUser(CarryCapacityUserParam.CarryCapacityUserPageParam pageParm);
|
||||
|
||||
CarryCapacityUserPO queyDetailUserById(String userId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.njcn.advance.service.carrycapacity;
|
||||
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityCalParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityEvaluateParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityQueryDataParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataIVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataQVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDataVO;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.ExcelDataParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.*;
|
||||
import com.njcn.device.pq.pojo.vo.TerminalTree;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,4 +28,10 @@ public interface CarryCapcityService {
|
||||
CarryCapacityDResultVO carryCapacityCal(CarryCapacityCalParam calParam);
|
||||
|
||||
List<TerminalTree> carryCapacityTree();
|
||||
|
||||
boolean uploadExcel(ExcelDataParam excelDataParam) throws Exception;
|
||||
|
||||
CarryCapacityDataVO modelTraining(CarryCapacityQueryDataParam queryParam);
|
||||
|
||||
CarryCapacityDResultVO carryCapacityEvaluate(CarryCapacityEvaluateParam calParam);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.njcn.advance.service.carrycapacity.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.advance.mapper.carrycapacity.CarryCapacityDataPOMapper;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityDataPO;
|
||||
import com.njcn.advance.service.carrycapacity.CarryCapacityDataPOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -16,6 +14,6 @@ import com.njcn.advance.service.carrycapacity.CarryCapacityDataPOService;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class CarryCapacityDataPOServiceImpl extends ServiceImpl<CarryCapacityDataPOMapper, CarryCapacityDataPO> implements CarryCapacityDataPOService{
|
||||
public class CarryCapacityDataPOServiceImpl extends MppServiceImpl<CarryCapacityDataPOMapper, CarryCapacityDataPO> implements CarryCapacityDataPOService{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
package com.njcn.advance.service.carrycapacity.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.advance.mapper.carrycapacity.CarryCapacityResultPOMapper;
|
||||
import com.njcn.advance.pojo.carrycapacity.param.CarryCapacityResultParam;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityResultPO;
|
||||
import com.njcn.advance.pojo.carrycapacity.po.CarryCapacityUserPO;
|
||||
import com.njcn.advance.pojo.carrycapacity.vo.CarryCapacityDResultVO;
|
||||
import com.njcn.advance.service.carrycapacity.CarryCapacityResultPOService;
|
||||
import com.njcn.advance.service.carrycapacity.CarryCapacityUserPOService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -14,6 +29,36 @@ import com.njcn.advance.service.carrycapacity.CarryCapacityResultPOService;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CarryCapacityResultPOServiceImpl extends ServiceImpl<CarryCapacityResultPOMapper, CarryCapacityResultPO> implements CarryCapacityResultPOService{
|
||||
private final CarryCapacityUserPOService carryCapacityUserPOService;
|
||||
|
||||
@Override
|
||||
public IPage<CarryCapacityDResultVO> queryResultList(CarryCapacityResultParam.CarryCapacityResultPageParam queryParam) {
|
||||
Page<CarryCapacityDResultVO> returnpage = new Page<> (queryParam.getPageNum ( ), queryParam.getPageSize ( ));
|
||||
Page<CarryCapacityResultPO> temppage = new Page<> (queryParam.getPageNum ( ), queryParam.getPageSize ( ));
|
||||
|
||||
|
||||
QueryWrapper<CarryCapacityResultPO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(StringUtils.isNotBlank(queryParam.getEvaluateType()) ,CarryCapacityResultPO::getEvaluateType,queryParam.getEvaluateType())
|
||||
.between(StringUtils.isNotBlank(queryParam.getStartTime()) && StringUtils.isNotBlank(queryParam.getEndTime()) ,CarryCapacityResultPO::getEvaluateDate,queryParam.getStartTime(),queryParam.getEndTime())
|
||||
.orderByDesc(CarryCapacityResultPO::getEvaluateDate);
|
||||
|
||||
IPage<CarryCapacityResultPO> page = this.page(temppage, queryWrapper);
|
||||
List<CarryCapacityDResultVO> collect = page.getRecords().stream().map(temp -> {
|
||||
CarryCapacityDResultVO vo = new CarryCapacityDResultVO();
|
||||
BeanUtils.copyProperties(temp, vo);
|
||||
String[] split = temp.getUserId().split(",");
|
||||
List<String> collect1 = Arrays.stream(split).sequential().map(userId -> {
|
||||
CarryCapacityUserPO carryCapacityUserPO = carryCapacityUserPOService.queyDetailUserById(userId);
|
||||
return carryCapacityUserPO.getUserName();
|
||||
}).collect(Collectors.toList());
|
||||
vo.setUserName(collect1.stream().collect(Collectors.joining(",")));
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
returnpage.setRecords(collect);
|
||||
returnpage.setTotal(page.getTotal());
|
||||
|
||||
return returnpage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,9 +61,15 @@ public class CarryCapacityUserPOServiceImpl extends ServiceImpl<CarryCapacityUse
|
||||
QueryWrapper<CarryCapacityUserPO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(StringUtils.isNotBlank(pageParm.getUserId()) ,CarryCapacityUserPO::getUserId,pageParm.getUserId())
|
||||
.eq(StringUtils.isNotBlank(pageParm.getUserType()) ,CarryCapacityUserPO::getUserType,pageParm.getUserType())
|
||||
.between(StringUtils.isNotBlank(pageParm.getStartTime()) && StringUtils.isNotBlank(pageParm.getEndTime()) ,CarryCapacityUserPO::getCreateTime,pageParm.getStartTime(),pageParm.getEndTime());
|
||||
.between(StringUtils.isNotBlank(pageParm.getStartTime()) && StringUtils.isNotBlank(pageParm.getEndTime()) ,CarryCapacityUserPO::getCreateTime,pageParm.getStartTime(),pageParm.getEndTime()).
|
||||
orderByDesc(CarryCapacityUserPO::getCreateTime);
|
||||
|
||||
IPage<CarryCapacityUserPO> page = this.page (returnpage, queryWrapper);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CarryCapacityUserPO queyDetailUserById(String userId) {
|
||||
return this.lambdaQuery().eq(CarryCapacityUserPO::getUserId,userId).one();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,8 @@ package com.njcn.advance.utils;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalTime;
|
||||
import java.time.*;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -102,12 +102,27 @@ public class Utils {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// 辅助方法:检查时间是否在指定范围内
|
||||
public static boolean isTimeInRange(Instant instant, LocalTime startTime, LocalTime endTime) {
|
||||
LocalTime localTime = instant.atZone(Instant.now().atZone(java.time.ZoneId.systemDefault()).getZone()).toLocalTime();
|
||||
return !localTime.isBefore(startTime) && !localTime.isAfter(endTime);
|
||||
}
|
||||
|
||||
//辅助方法:检查时间是否在指定范围内startTime,endTime
|
||||
public static boolean isTimeInRange(Instant instant, LocalDate startTime, LocalDate endTime) {
|
||||
// 将Instant对象转换为LocalDateTime对象
|
||||
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
|
||||
|
||||
// 检查LocalDateTime对象是否在startTime和endTime之间
|
||||
boolean isInRange = !localDateTime.toLocalDate().isBefore(startTime) && !localDateTime.toLocalDate().isAfter(endTime.plus(1, ChronoUnit.DAYS));
|
||||
|
||||
// 返回结果
|
||||
return isInRange;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static <T> List<Double> getAttributeValueByPropertyName(List<T> list, String propertyName) {
|
||||
List<Double> resultList = new ArrayList<>();
|
||||
for (T item : list) {
|
||||
@@ -121,6 +136,7 @@ public class Utils {
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public static <T> Double getAttributeValueByPropertyName(T item, String propertyName) {
|
||||
Double result = null;
|
||||
try {
|
||||
|
||||
@@ -102,6 +102,10 @@ public interface OssPath {
|
||||
* 高级算法责任量化用采数据保存地址
|
||||
*/
|
||||
String RESPONSIBILITY_USER_DATA="advance/responsibility/userData/";
|
||||
/***
|
||||
* 高级算法承载能力评估数据保存地址
|
||||
*/
|
||||
String CARRY_CAPCITY_DATA="advance/carryCapcity/Data/";
|
||||
|
||||
/***
|
||||
* 高级算法责任量化结果数据保存地址
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>influxdb-springboot-starter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ package com.njcn.redis.config;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import com.njcn.influx.utils.InstantDateDeserializer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
@@ -11,6 +15,8 @@ import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
@@ -32,6 +38,11 @@ public class RedisConfig {
|
||||
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
// 指定要序列化的域(field,get,set),访问修饰符(public,private,protected)
|
||||
//解决Java 8 date/time type `java.time.Instant` not supported
|
||||
objectMapper.registerModule(new JavaTimeModule());
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.registerModule(new SimpleModule().addDeserializer(Instant.class, new InstantDateDeserializer()));
|
||||
|
||||
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||
objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL);
|
||||
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
|
||||
|
||||
@@ -552,8 +552,26 @@ public enum DicDataEnum {
|
||||
Imp_Users("重要敏感用户","Imp_Users"),
|
||||
Station_Other("其他","Other"),
|
||||
|
||||
/*承载能力评估用户类型*/
|
||||
Power_Station_Users("光伏电站用户","Power_Station_Users"),
|
||||
Charging_Station_Users("充电站用户","Charging_Station_Users"),
|
||||
Electric_Heating_Load_Users("电加热负荷用户","Electric_Heating_Load_Users"),
|
||||
Electrified_Rail_Users("电气化铁路用户","Electrified_Rail_Users"),
|
||||
|
||||
//变压器连接方式
|
||||
YNd11("YNd11","YNd11"),
|
||||
YNy0("YNy0","YNy0"),
|
||||
Yy0("Yy0","Yy0"),
|
||||
Yyn0("Yyn0","Yyn0"),
|
||||
Yd11("Yd11","Yd11"),
|
||||
Y_yn("Y/yn","Y_yn"),
|
||||
Y_d("Y/d","Y_d"),
|
||||
D_y("D/y","D_y"),
|
||||
YNyn("YNyn","YNyn"),
|
||||
|
||||
//用户模式
|
||||
SPECIAL_USER("专变用户","special_user"),//专变用户
|
||||
PUBLIC_USER("公变用户","public_user"),// ,公变用户
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -120,10 +120,12 @@ public enum DicDataTypeEnum {
|
||||
INDUSTRY_TYPE("行业分类","industry_type"),
|
||||
PLAN_STATUS("计划状态","plan_status"),
|
||||
APP_EVENT("APP暂态事件类型","app_event"),
|
||||
DEVICE_TYPE("治理装置类型编码","Device_Type")
|
||||
|
||||
DEVICE_TYPE("治理装置类型编码","Device_Type"),
|
||||
|
||||
CARRY_CAPCITY_USER_TYPE("承载能力评估用户类型","carry_capcity_user_type"),
|
||||
CARRY_CAPCITY_CONNECTION_MODE("变压器连接方式","carry_capcity_connection_mode"),
|
||||
|
||||
CARRY_CAPCITYUSER_MODE("用户模式","carry_capcity_user_mode"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user