1.国网上送代码调整
2.稳态指标代码调整
This commit is contained in:
@@ -227,14 +227,24 @@ public class MonitorParam {
|
||||
@ApiModelProperty(value = "是否专项分析监测点")
|
||||
private Integer isSpecialMonitor;
|
||||
|
||||
@ApiModelProperty(value = "是否发电用户:0-否;1-是;")
|
||||
private Integer ifPowerUser;
|
||||
|
||||
@ApiModelProperty(value = "场站属性")
|
||||
private String fieldStation;
|
||||
|
||||
@ApiModelProperty(value = "行业分类")
|
||||
@NotBlank(message = "行业分类不能为空")
|
||||
private String tradeCode;
|
||||
|
||||
@Data
|
||||
public static class Info implements Serializable {
|
||||
@ApiModelProperty(name = "monitorTag",value = "监测点对象标签")
|
||||
@NotNull(message = "监测点对象标签不可为空")
|
||||
@NotBlank(message = "监测点对象标签不可为空")
|
||||
private String monitorTag;
|
||||
|
||||
@ApiModelProperty(name = "ids",value = "id集合")
|
||||
@NotEmpty(message = "id集合不能为空")
|
||||
// @NotEmpty(message = "id集合不能为空")
|
||||
private List<String> ids;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,16 @@ public class Monitor extends BaseEntity {
|
||||
*/
|
||||
private String fieldStation;
|
||||
/**
|
||||
* 0.以上送 1.未上送 2.取消上送 3.待重新上送
|
||||
* 0.未上送 1.已上送 2.取消上送 3.待重新上送
|
||||
*/
|
||||
private Integer isUploadHead;
|
||||
/**
|
||||
* 行业分类
|
||||
*/
|
||||
private String tradeCode;
|
||||
|
||||
/**
|
||||
* 牵引站id
|
||||
*/
|
||||
private String tractionId;
|
||||
}
|
||||
|
||||
@@ -117,13 +117,5 @@ public class TractionStation extends BaseEntity {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 监测点状态(字典)
|
||||
*/
|
||||
private String monitorState;
|
||||
|
||||
/**
|
||||
* 0.以上送 1.未上送 2.取消上送 3.待重新上送
|
||||
*/
|
||||
private Integer isUploadHead;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/12/13 16:35
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(30)
|
||||
public class OtherUserDto {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private String id;
|
||||
/**
|
||||
* 省id 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "省id")
|
||||
private String provinceId;
|
||||
/**
|
||||
* 省名称 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "省名称")
|
||||
private String provinceName;
|
||||
/**
|
||||
* 所属地市id 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "所属地市id")
|
||||
private String cityId;
|
||||
/**
|
||||
* 所属地市名称 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "所属地市名称")
|
||||
private String cityName;
|
||||
/**
|
||||
* 运维单位 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "运维单位")
|
||||
private String maintOrg;
|
||||
/**
|
||||
* 运维单位名称 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "运维单位名称")
|
||||
private String maintOrgName;
|
||||
/**
|
||||
* 用户标识 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "用户标识")
|
||||
private String consNo;
|
||||
/**
|
||||
* 用户名称 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "用户名称")
|
||||
private String consName;
|
||||
/**
|
||||
* 并网电压等级 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "并网电压等级")
|
||||
private String gcVoltageLevel;
|
||||
/**
|
||||
* 关联变电站id 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站id")
|
||||
private String substationId;
|
||||
/**
|
||||
* 关联变电站名称 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站名称")
|
||||
private String substationName;
|
||||
/**
|
||||
* 关联变电站电压等级 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站电压等级")
|
||||
private String substationVoltageLevel;
|
||||
/**
|
||||
* 行业分类 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "行业分类")
|
||||
private String tradeCode;
|
||||
/**
|
||||
* 协议容量(MVA) 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "协议容量(MVA)")
|
||||
private Float protocolCapacity;
|
||||
/**
|
||||
* 是否实现在线监测 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "是否实现在线监测")
|
||||
private String isMonitoringOnline;
|
||||
/**
|
||||
* 监测点编号 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "监测点编号")
|
||||
private String monitorId;
|
||||
/**
|
||||
* 是否现场测试 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "是否现场测试")
|
||||
private String isSceneTest;
|
||||
/**
|
||||
* 是否有电能质量治理装置 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "是否有电能质量治理装置")
|
||||
private String haveDevice;
|
||||
/**
|
||||
* 治理装置类型 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "治理装置类型")
|
||||
private String deviceType;
|
||||
/**
|
||||
* 装置电压等级 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "装置电压等级")
|
||||
private String deviceVoltageLevel;
|
||||
/**
|
||||
* 装置额定容量(MVA/Mvar) 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "装置额定容量(MVA/Mvar)")
|
||||
private BigDecimal deviceCapacity;
|
||||
/**
|
||||
* 运行状态 是否必填:是
|
||||
*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private String runStatus;
|
||||
/**
|
||||
* 创建时间 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新时间 是否必填:否
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -11,55 +14,127 @@ import java.time.LocalDateTime;
|
||||
* @date 2023/12/12 9:03
|
||||
*/
|
||||
@Data
|
||||
public class PhotovoltaicDto extends Unit{
|
||||
@ColumnWidth(30)
|
||||
public class PhotovoltaicDto extends Unit {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 是否必填: 是 */
|
||||
/**
|
||||
* 主键 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private String id;
|
||||
/** 新能源场站名称 是否必填: 是 */
|
||||
/**
|
||||
* 新能源场站名称 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "新能源场站名称")
|
||||
private String stationName;
|
||||
/** 总装机容量 是否必填: 否 */
|
||||
/**
|
||||
* 总装机容量 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "总装机容量")
|
||||
private BigDecimal ratedCapacity;
|
||||
/** 装置额定容量 是否必填: 否 */
|
||||
/**
|
||||
* 装置额定容量 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "装置额定容量")
|
||||
private BigDecimal deviceCapacity;
|
||||
/** 治理装置类型 是否必填: 否 */
|
||||
/**
|
||||
* 治理装置类型 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "治理装置类型")
|
||||
private String deviceType;
|
||||
/** 装置电压等级编码 是否必填: 否 */
|
||||
/**
|
||||
* 装置电压等级编码 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "装置电压等级编码")
|
||||
private String deviceVoltageLevel;
|
||||
/** 并网电压等级 是否必填: 否 */
|
||||
/**
|
||||
* 并网电压等级 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "并网电压等级")
|
||||
private String gcVoltageLevel;
|
||||
/** 是否现场测试 是否必填: 否 */
|
||||
/**
|
||||
* 是否现场测试 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "是否现场测试")
|
||||
private String isSceneTest;
|
||||
/** 是否专线供电 是否必填: 否 */
|
||||
/**
|
||||
* 是否专线供电 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "是否专线供电")
|
||||
private String isSpecial;
|
||||
/** 监测点编号 是否必填: 否 */
|
||||
/**
|
||||
* 监测点编号 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "监测点编号")
|
||||
private String monitorId;
|
||||
/** 新能源场站属性 是否必填: 是 */
|
||||
/**
|
||||
* 新能源场站属性 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "新能源场站属性")
|
||||
private String monitorObjectType;
|
||||
/** 新能源场站协议容量 是否必填: 是 */
|
||||
/**
|
||||
* 新能源场站协议容量 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "新能源场站协议容量")
|
||||
private Float stationCapacity;
|
||||
/** 新能源场站id 是否必填: 是 */
|
||||
/**
|
||||
* 新能源场站id 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "新能源场站id")
|
||||
private String stationId;
|
||||
/** 关联变电站的主键 是否必填: */
|
||||
/**
|
||||
* 关联变电站的主键 是否必填:
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站的主键")
|
||||
private String substationId;
|
||||
/** 发电客户标识 是否必填: 否 */
|
||||
/**
|
||||
* 发电客户标识 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "发电客户标识")
|
||||
private String fcId;
|
||||
/** 发电用户编号 是否必填: 否 */
|
||||
/**
|
||||
* 发电用户编号 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "发电用户编号")
|
||||
private String fcNo;
|
||||
/** 站房类型 是否必填: 否 */
|
||||
/**
|
||||
* 站房类型 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "站房类型")
|
||||
private String stationType;
|
||||
/** 关联变电站名称 是否必填: */
|
||||
/**
|
||||
* 关联变电站名称 是否必填:
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站名称")
|
||||
private String substationName;
|
||||
/** 关联变电站电压等级 是否必填: */
|
||||
/**
|
||||
* 关联变电站电压等级 是否必填:
|
||||
*/
|
||||
@ExcelProperty(value = "关联变电站电压等级")
|
||||
private String substationVoltageLevel;
|
||||
/** 逆变器组网方式 是否必填: 否 */
|
||||
/**
|
||||
* 逆变器组网方式 是否必填: 否
|
||||
*/
|
||||
@ExcelProperty(value = "逆变器组网方式")
|
||||
private String inverterNetWorkWay;
|
||||
/** 运行状态 是否必填: 是 */
|
||||
/**
|
||||
* 运行状态 是否必填: 是
|
||||
*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private String runStatus;
|
||||
/** 创建时间 是否必填: */
|
||||
/**
|
||||
* 创建时间 是否必填:
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/** 更新时间 是否必填: */
|
||||
/**
|
||||
* 更新时间 是否必填:
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -12,108 +15,142 @@ import java.util.Date;
|
||||
* @date 2023/12/7 14:29
|
||||
*/
|
||||
@Data
|
||||
public class SensitiveUserDto extends Unit{
|
||||
@ColumnWidth(30)
|
||||
public class SensitiveUserDto extends Unit {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/*主键 是否必填:是*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private String id;
|
||||
/*省id 是否必填:是*/
|
||||
private String provinceId;
|
||||
/*省名称 是否必填:否*/
|
||||
private String provinceName;
|
||||
/*所属地市id 是否必填:是*/
|
||||
private String cityId;
|
||||
/*所属地市名称 是否必填:否*/
|
||||
private String cityName;
|
||||
/*所属区县id 是否必填:否*/
|
||||
private String countyId;
|
||||
/*所属区县名称 是否必填:否*/
|
||||
private String countyName;
|
||||
/*运维班组标识 是否必填:否*/
|
||||
@ExcelProperty(value = "运维班组标识")
|
||||
private String maintGroupId;
|
||||
/*运维班组名称 是否必填:否*/
|
||||
@ExcelProperty(value = "运维班组名称")
|
||||
private String maintGroupName;
|
||||
/*重要、敏感用户名称 是否必填:是*/
|
||||
@ExcelProperty(value = "重要、敏感用户名称")
|
||||
private String sensitiveUserName;
|
||||
/*合同容量 是否必填:是*/
|
||||
@ExcelProperty(value = "合同容量")
|
||||
private Float userProtocolCapacity;
|
||||
/*监测点编号 是否必填:否*/
|
||||
@ExcelProperty(value = "监测点编号")
|
||||
private String monitorId;
|
||||
/*用户标识 是否必填:否*/
|
||||
@ExcelProperty(value = "用户标识")
|
||||
private String consNo;
|
||||
/*通讯地址 是否必填:否*/
|
||||
@ExcelProperty(value = "通讯地址")
|
||||
private String meterAddress;
|
||||
/*用户类型 是否必填:否*/
|
||||
@ExcelProperty(value = "用户类型")
|
||||
private String consSort;
|
||||
/*用电类别 是否必填:否*/
|
||||
@ExcelProperty(value = "用电类别")
|
||||
private String elecTypeCode;
|
||||
/*行业分类 是否必填:否*/
|
||||
@ExcelProperty(value = "行业分类")
|
||||
private String tradeCode;
|
||||
/*用户电压等级 是否必填:是*/
|
||||
@ExcelProperty(value = "用户电压等级")
|
||||
private String consVoltageLevel;
|
||||
/*变电站ID 是否必填:是*/
|
||||
@ExcelProperty(value = "变电站ID")
|
||||
private String stationId;
|
||||
/*变电站名称 是否必填:是*/
|
||||
@ExcelProperty(value = "变电站名称")
|
||||
private String stationName;
|
||||
/*变电站电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "变电站电压等级")
|
||||
private String stationVoltageLevel;
|
||||
/*馈线资源ID 是否必填:否*/
|
||||
@ExcelProperty(value = "馈线资源ID")
|
||||
private String feederId;
|
||||
/*馈线名称 是否必填:否*/
|
||||
@ExcelProperty(value = "馈线名称")
|
||||
private String feederName;
|
||||
/*是否专线用户 是否必填:否*/
|
||||
@ExcelProperty(value = "是否专线用户")
|
||||
private String pubPrivFlag;
|
||||
/*变压器ID 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器ID")
|
||||
private String transId;
|
||||
/*变压器名称 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器名称")
|
||||
private String transName;
|
||||
/*变压器类型 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器类型")
|
||||
private String transType;
|
||||
/*变压器性质 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器性质")
|
||||
private String transNature;
|
||||
/*变压器所属运维单位 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器所属运维单位")
|
||||
private String maintOrg;
|
||||
/*客户重要性等级 是否必填:否*/
|
||||
@ExcelProperty(value = "客户重要性等级")
|
||||
private String custImportance;
|
||||
/*重要客户类别 是否必填:否*/
|
||||
@ExcelProperty(value = "重要客户类别")
|
||||
private String highRkType;
|
||||
/*是否光伏用户 是否必填:否*/
|
||||
@ExcelProperty(value = "是否光伏用户")
|
||||
private String fcGcFlag;
|
||||
/*发电方式 是否必填:否*/
|
||||
@ExcelProperty(value = "发电方式")
|
||||
private String gcTypeCode;
|
||||
/*电能质量问题描述 是否必填:否*/
|
||||
@ExcelProperty(value = "电能质量问题描述")
|
||||
private String problemDesc;
|
||||
/*最后发生日期 是否必填:否*/
|
||||
@ExcelProperty(value = "最后发生日期")
|
||||
private Date ocDate;
|
||||
/*是否已实现在线监测 是否必填:否*/
|
||||
@ExcelProperty(value = "是否已实现在线监测")
|
||||
private String isMonitoringOnline;
|
||||
/*是否有电能质量治理装置 是否必填:否*/
|
||||
@ExcelProperty(value = "是否有电能质量治理装置")
|
||||
private String haveDevice;
|
||||
/*治理装置类型 是否必填:否*/
|
||||
@ExcelProperty(value = "治理装置类型")
|
||||
private String deviceType;
|
||||
/*装置电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "装置电压等级")
|
||||
private String deviceVoltageLevel;
|
||||
/*装置额定容量 是否必填:否*/
|
||||
@ExcelProperty(value = "装置额定容量")
|
||||
private BigDecimal deviceCapacity;
|
||||
/*投诉日期 是否必填:否*/
|
||||
@ExcelProperty(value = "投诉日期")
|
||||
private Date complaintDate;
|
||||
/*投诉内容 是否必填:否*/
|
||||
@ExcelProperty(value = "投诉内容")
|
||||
private String complaintContent;
|
||||
/*整改措施 是否必填:否*/
|
||||
@ExcelProperty(value = "整改措施")
|
||||
private String modifyMethods;
|
||||
/*是否发生投诉 是否必填:否*/
|
||||
@ExcelProperty(value = "是否发生投诉")
|
||||
private String haveComplaint;
|
||||
/*是否发生质量问题 是否必填:否*/
|
||||
@ExcelProperty(value = "是否发生质量问题")
|
||||
private String havePowerQualityProblem;
|
||||
/*站房类型 是否必填:否*/
|
||||
@ExcelProperty(value = "站房类型")
|
||||
private String stationType;
|
||||
/*运行状态 是否必填:是*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private String runStatus;
|
||||
/*创建时间 是否必填:*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/*更新时间 是否必填:*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -11,78 +14,113 @@ import java.time.LocalDateTime;
|
||||
* @date 2023/12/8 9:17
|
||||
*/
|
||||
@Data
|
||||
public class TractionStationDTO extends Unit{
|
||||
@ColumnWidth(30)
|
||||
public class TractionStationDTO extends Unit {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*主键 是否必填:是*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/*副备变电站id 是否必填:否*/
|
||||
@ExcelProperty(value = "副备变电站id")
|
||||
private String auxiliarySubstationId;
|
||||
/*副备变电站名称 是否必填:否*/
|
||||
@ExcelProperty(value = "副备变电站名称")
|
||||
private String auxiliarySubstationName;
|
||||
/*副备变电站电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "副备变电站电压等级")
|
||||
private String auxiliaryVoltageLevel;
|
||||
/*电缆芯数 是否必填:否*/
|
||||
@ExcelProperty(value = "电缆芯数")
|
||||
private String cableCoresNum;
|
||||
/*电缆敷设方式 是否必填:否*/
|
||||
@ExcelProperty(value = "电缆敷设方式")
|
||||
private String cableLayingMethod;
|
||||
/*电缆型号 是否必填:否*/
|
||||
@ExcelProperty(value = "电缆型号")
|
||||
private String cableModel;
|
||||
/*电缆线路长度 是否必填:否*/
|
||||
@ExcelProperty(value = "电缆线路长度")
|
||||
private BigDecimal cableRouteLength;
|
||||
|
||||
/*牵引站变压器接线方式 是否必填:否*/
|
||||
@ExcelProperty(value = "牵引站变压器接线方式")
|
||||
private String connetGroupWay;
|
||||
|
||||
/*创建时间 是否必填:否*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
/*是否专线供电 是否必填:否*/
|
||||
@ExcelProperty(value = "是否专线供电")
|
||||
private String ifSpecial;
|
||||
/*主备变电站id 是否必填:否*/
|
||||
@ExcelProperty(value = "主备变电站id")
|
||||
private String mainSubstationId;
|
||||
/*主备变电站名称 是否必填:否*/
|
||||
@ExcelProperty(value = "主备变电站名称")
|
||||
private String mainSubstationName;
|
||||
/*主备变电站电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "主备变电站电压等级")
|
||||
private String mainVolatageLevel;
|
||||
/*监测点编号 是否必填:否*/
|
||||
@ExcelProperty(value = "监测点编号")
|
||||
private String monitorNumber;
|
||||
/*第二个监测点编号 是否必填:否*/
|
||||
@ExcelProperty(value = "第二个监测点编号")
|
||||
private String monitorNumberTwo;
|
||||
|
||||
/*铁路id 是否必填:否*/
|
||||
@ExcelProperty(value = "铁路id")
|
||||
private String railwayId;
|
||||
/*铁路名称 是否必填:是*/
|
||||
@ExcelProperty(value = "铁路名称")
|
||||
private String railwayName;
|
||||
/*铁路编号 是否必填:否*/
|
||||
@ExcelProperty(value = "铁路编号")
|
||||
private String railwayNumber;
|
||||
/*铁路类型 是否必填:否*/
|
||||
@ExcelProperty(value = "铁路类型")
|
||||
private String railwayType;
|
||||
/*牵引站编号 是否必填:否*/
|
||||
@ExcelProperty(value = "牵引站编号")
|
||||
private String tractionCode;
|
||||
/*牵引站变压器容量 是否必填:否*/
|
||||
@ExcelProperty(value = "牵引站变压器容量")
|
||||
private Float tractionSubstationCapacity;
|
||||
/*所属变电站id 是否必填:否*/
|
||||
@ExcelProperty(value = "所属变电站id")
|
||||
private String tractionSubstationId;
|
||||
/*所属变电站名称 是否必填:否*/
|
||||
@ExcelProperty(value = "所属变电站名称")
|
||||
private String tractionSubstationName;
|
||||
/*供电电压等级 是否必填:是*/
|
||||
@ExcelProperty(value = "供电电压等级")
|
||||
private String tractionVoltageLevel;
|
||||
/*变压器联结组方式 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器联结组方式")
|
||||
private String transformerConnectionGroupMethod;
|
||||
/*变压器额定容量 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器额定容量")
|
||||
private BigDecimal transformerNameplateCapacity;
|
||||
/*变压器一次侧额定电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器一次侧额定电压等级")
|
||||
private String transformerOneVoltageLevel;
|
||||
/*变压器二次侧额定电压等级 是否必填:否*/
|
||||
@ExcelProperty(value = "变压器二次侧额定电压等级")
|
||||
private String transformerTwoVoltageLevel;
|
||||
/*三相vv额定容量 是否必填:否*/
|
||||
@ExcelProperty(value = "三相vv额定容量")
|
||||
private BigDecimal triphaseVvNameplateCapacity;
|
||||
/*上报日期 是否必填:否*/
|
||||
@ExcelProperty(value = "上报日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime uploadDate;
|
||||
/*运行状态 是否必填:是*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private String runStatus;
|
||||
/*更新时间 是否必填:否*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -10,15 +11,21 @@ import lombok.Data;
|
||||
@Data
|
||||
public class Unit {
|
||||
/** 省id 是否必填: 是 */
|
||||
@ExcelProperty(value = "省id")
|
||||
private String provinceId;
|
||||
/** 省名称 是否必填: 否 */
|
||||
@ExcelProperty(value = "省名称")
|
||||
private String provinceName;
|
||||
/** 所属地市id 是否必填: 是 */
|
||||
@ExcelProperty(value = "所属地市id")
|
||||
private String cityId;
|
||||
/** 所属地市名称 是否必填: 否 */
|
||||
@ExcelProperty(value = "所属地市名称")
|
||||
private String cityName;
|
||||
/** 所属区县id 是否必填: 否 */
|
||||
@ExcelProperty(value = "所属区县id")
|
||||
private String countyId;
|
||||
/** 所属区县名称 是否必填: 否 */
|
||||
@ExcelProperty(value = "所属区县名称")
|
||||
private String countyName;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -13,88 +15,114 @@ import java.time.LocalDateTime;
|
||||
* @date 2023/12/7 8:52
|
||||
*/
|
||||
@Data
|
||||
public class WindSourceDto extends Unit{
|
||||
@ColumnWidth(30)
|
||||
public class WindSourceDto extends Unit {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ExcelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "stationName", value = "新能源场站名称")
|
||||
@ExcelProperty(value = "新能源场站名称")
|
||||
private String stationName;
|
||||
|
||||
@ApiModelProperty(name = "ratedCapacity", value = "总装机容量")
|
||||
@ExcelProperty(value = "总装机容量")
|
||||
private BigDecimal ratedCapacity;
|
||||
|
||||
@ApiModelProperty(name = "deviceCapacity", value = "装置额定容量")
|
||||
@ExcelProperty(value = "装置额定容量")
|
||||
private Float deviceCapacity;
|
||||
|
||||
@ApiModelProperty(name = "deviceType", value = "治理装置类型")
|
||||
@ExcelProperty(value = "治理装置类型")
|
||||
private String deviceType;
|
||||
|
||||
@ApiModelProperty(name = "deviceVoltageLevel", value = "装置电压等级编码")
|
||||
@ExcelProperty(value = "装置电压等级编码")
|
||||
private String deviceVoltageLevel;
|
||||
|
||||
@ApiModelProperty(name = "gcVoltageLevel", value = "并网电压等级")
|
||||
@ExcelProperty(value = "并网电压等级")
|
||||
private String gcVoltageLevel;
|
||||
|
||||
@ApiModelProperty(name = "isSceneTest", value = "是否现场测试")
|
||||
@ExcelProperty(value = "是否现场测试")
|
||||
private String isSceneTest;
|
||||
|
||||
@ApiModelProperty(name = "isSpecial", value = "是否专线供电")
|
||||
@ExcelProperty(value = "是否专线供电")
|
||||
private String isSpecial;
|
||||
|
||||
@ApiModelProperty(name = "monitorId", value = "监测点编号")
|
||||
@ExcelProperty(value = "监测点编号")
|
||||
private String monitorId;
|
||||
|
||||
@ApiModelProperty(name = "monitorObjectType", value = "新能源场站属性")
|
||||
@ExcelProperty(value = "新能源场站属性")
|
||||
private String monitorObjectType;
|
||||
|
||||
@ApiModelProperty(name = "stationCapacity", value = "新能源场站协议容量")
|
||||
@ExcelProperty(value = "新能源场站协议容量")
|
||||
private Float stationCapacity;
|
||||
|
||||
@ApiModelProperty(name = "stationId", value = "新能源场站id")
|
||||
@ExcelProperty(value = "新能源场站id")
|
||||
private String stationId;
|
||||
|
||||
@ApiModelProperty(name = "substationId", value = "关联变电站的主键")
|
||||
@ExcelProperty(value = "关联变电站的主键")
|
||||
private String substationId;
|
||||
|
||||
@ApiModelProperty(name = "fcId", value = "发电客户标识")
|
||||
@ExcelProperty(value = "发电客户标识")
|
||||
private String fcId;
|
||||
|
||||
@ApiModelProperty(name = "fcNo", value = "发电用户编号")
|
||||
@ExcelProperty(value = "发电用户编号")
|
||||
private String fcNo;
|
||||
|
||||
@ApiModelProperty(name = "stationType", value = "站房类型")
|
||||
@ExcelProperty(value = "站房类型")
|
||||
private String stationType;
|
||||
|
||||
@ApiModelProperty(name = "substationName", value = "关联变电站名称")
|
||||
@ExcelProperty(value = "关联变电站名称")
|
||||
private String substationName;
|
||||
|
||||
@ApiModelProperty(name = "substationVoltageLevel", value = "关联变电站电压等级")
|
||||
@ExcelProperty(value = "关联变电站电压等级")
|
||||
private String substationVoltageLevel;
|
||||
|
||||
@ApiModelProperty(name = "singleRatedCapacity", value = "单机容量")
|
||||
@ExcelProperty(value = "单机容量")
|
||||
private Float singleRatedCapacity;
|
||||
|
||||
@ApiModelProperty(name = "windNum", value = "风机台数")
|
||||
@ExcelProperty(value = "风机台数")
|
||||
private Integer windNum;
|
||||
|
||||
@ApiModelProperty(name = "windStationType", value = "风电场类型")
|
||||
@ExcelProperty(value = "风电场类型")
|
||||
private String windStationType;
|
||||
|
||||
@ApiModelProperty(name = "windType", value = "风机类型编码")
|
||||
@ExcelProperty(value = "风机类型编码")
|
||||
private String windType;
|
||||
|
||||
@ApiModelProperty(name = "runStatus", value = "运行状态")
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private String runStatus;
|
||||
|
||||
@ApiModelProperty(name = "createTime", value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(name = "updateTime", value = "更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
package com.njcn.device.pms.controller.gwPush;
|
||||
|
||||
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.device.pms.pojo.param.MonitorParam;
|
||||
import com.njcn.device.pms.service.gwPush.MonitorSendService;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/deviceSend")
|
||||
@Api(tags = "台账类国网上送")
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceSendController extends BaseController {
|
||||
|
||||
private final MonitorSendService monitorSendService;
|
||||
|
||||
@PostMapping("/sendType")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("国网上送接口")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<String> windSend(@RequestBody @Validated MonitorParam.Info param){
|
||||
String methodDescribe = getMethodDescribe("sendType");
|
||||
String s = monitorSendService.sendType(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
// @PostMapping("/windSend")
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @ApiOperation("上送电能质量风电场台账数据接口")
|
||||
// @ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
// public HttpResult<String> windSend(@RequestBody List<String> ids){
|
||||
// String methodDescribe = getMethodDescribe("windSend");
|
||||
// String s = deviceSendService.windSend(ids);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/photovoltaicSend")
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @ApiOperation("上送电能质量光伏电站台账数据接口")
|
||||
// @ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
// public HttpResult<String> photovoltaicSend(@RequestBody List<String> ids){
|
||||
// String methodDescribe = getMethodDescribe("photovoltaicSend");
|
||||
// String s = deviceSendService.photovoltaicSend(ids);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/sensitiveUserSend")
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @ApiOperation("上送电能质量重要、敏感用户台账数据接口")
|
||||
// @ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
// public HttpResult<String> sensitiveUserSend(@RequestBody List<String> ids){
|
||||
// String methodDescribe = getMethodDescribe("sensitiveUserSend");
|
||||
// String s = deviceSendService.sensitiveUserSend(ids);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
// }
|
||||
|
||||
@PostMapping("/tractionStationSend")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("上送电能质量牵引站台账数据接口")
|
||||
@ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
public HttpResult<String> tractionStationSend(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("tractionStationSend");
|
||||
String s = monitorSendService.tractionStationSend(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.njcn.device.pms.controller.gwPush;
|
||||
|
||||
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.device.pms.pojo.param.MonitorParam;
|
||||
import com.njcn.device.pms.service.gwPush.MonitorSendService;
|
||||
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.http.MediaType;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitorSend")
|
||||
@Api(tags = "台账类国网上送")
|
||||
@RequiredArgsConstructor
|
||||
public class MonitorSendController extends BaseController {
|
||||
|
||||
private final MonitorSendService monitorSendService;
|
||||
|
||||
@PostMapping("/sendType")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("国网上送接口")
|
||||
@ApiImplicitParam(name = "param",value = "请求体",required = true)
|
||||
public HttpResult<String> windSend(@RequestBody @Validated MonitorParam.Info param){
|
||||
String methodDescribe = getMethodDescribe("sendType");
|
||||
String s = monitorSendService.sendType(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/exportSend")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation(value ="国网上送台账", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public HttpResult<Boolean> tractionStationSend(HttpServletResponse response) throws IOException {
|
||||
String methodDescribe = getMethodDescribe("tractionStationSend");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("国网上送台账", "UTF-8") + ".xlsx");
|
||||
monitorSendService.exportSend(response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.njcn.device.pms.service.gwPush;
|
||||
|
||||
import com.njcn.device.pms.pojo.param.MonitorParam;
|
||||
import com.njcn.device.pms.pojo.vo.gw.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -23,7 +26,7 @@ public interface MonitorSendService {
|
||||
* @Author: wr
|
||||
* @Date: 2023/12/7 9:00
|
||||
*/
|
||||
String windSend(List<String> ids);
|
||||
List<WindSourceDto> windSend(List<String> ids, List<String> id);
|
||||
|
||||
/**
|
||||
* @Description: 电能质量光伏电站台账数据接口
|
||||
@@ -32,7 +35,7 @@ public interface MonitorSendService {
|
||||
* @Author: wr
|
||||
* @Date: 2023/12/7 14:18
|
||||
*/
|
||||
String photovoltaicSend(List<String> ids);
|
||||
List<PhotovoltaicDto> photovoltaicSend(List<String> ids, List<String> id);
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,7 +45,7 @@ public interface MonitorSendService {
|
||||
* @Author: wr
|
||||
* @Date: 2023/12/7 14:18
|
||||
*/
|
||||
String sensitiveUserSend(List<String> ids);
|
||||
List<SensitiveUserDto> sensitiveUserSend(List<String> ids, List<String> id);
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,5 +55,19 @@ public interface MonitorSendService {
|
||||
* @Author: wr
|
||||
* @Date: 2023/12/7 14:18
|
||||
*/
|
||||
String tractionStationSend(List<String> ids);
|
||||
List<TractionStationDTO> tractionStationSend(List<String> ids, List<String> id);
|
||||
|
||||
/**
|
||||
* @Description: 其他干扰用户台账数据接口
|
||||
* @param ids
|
||||
* @return: java.lang.String
|
||||
* @Author: wr
|
||||
* @Date: 2023/12/7 14:18
|
||||
*/
|
||||
List<OtherUserDto> otherUserSend(List<String> ids, List<String> id);
|
||||
|
||||
/**
|
||||
* 导出国网上送信息
|
||||
*/
|
||||
void exportSend(HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.ExcelWriter;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@@ -27,7 +30,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@@ -56,38 +62,82 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
DictData data = dicDataFeignClient.getDicDataById(param.getMonitorTag()).getData();
|
||||
DicDataEnum enumValue = DicDataEnum.getDicDataEnumValue(data.getCode());
|
||||
String msg;
|
||||
switch (enumValue){
|
||||
switch (enumValue) {
|
||||
case WIND_FARM:
|
||||
msg=this.windSend(param.getIds());
|
||||
List<WindSourceDto> info = this.windSend(param.getIds(), Arrays.asList(data.getId()));
|
||||
if (info.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam sendParam = new SendParam();
|
||||
sendParam.setStats(info);
|
||||
Map<String, String> send = GwSendUtil.send(sendParam, GWSendEnum.WIND_CREATE);
|
||||
List<String> wiIds = info.stream().map(WindSourceDto::getId).distinct().collect(Collectors.toList());
|
||||
msg = returnInformation(1, wiIds, send);
|
||||
break;
|
||||
case POWER_STATION:
|
||||
msg= this.photovoltaicSend(param.getIds());
|
||||
List<PhotovoltaicDto> photovoltaic = this.photovoltaicSend(param.getIds(), Arrays.asList(data.getId()));
|
||||
if (photovoltaic.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam phSend = new SendParam();
|
||||
phSend.setStats(photovoltaic);
|
||||
Map<String, String> phMap = GwSendUtil.send(phSend, GWSendEnum.PHOTOVOLTAIC_CREATE);
|
||||
List<String> phIds = photovoltaic.stream().map(PhotovoltaicDto::getId).distinct().collect(Collectors.toList());
|
||||
msg = returnInformation(1, phIds, phMap);
|
||||
break;
|
||||
case SENSITIVE_USERS:
|
||||
msg= this.sensitiveUserSend(param.getIds());
|
||||
List<SensitiveUserDto> sensitive = this.sensitiveUserSend(param.getIds(), Arrays.asList(data.getId()));
|
||||
if (sensitive.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam seSend = new SendParam();
|
||||
seSend.setStats(sensitive);
|
||||
Map<String, String> seMap = GwSendUtil.send(seSend, GWSendEnum.SENSITIVE_USER_CREATE);
|
||||
List<String> seIds = sensitive.stream().map(SensitiveUserDto::getId).distinct().collect(Collectors.toList());
|
||||
msg = returnInformation(1, seIds, seMap);
|
||||
break;
|
||||
case ELECTRIFIED_RAILWAYS:
|
||||
List<TractionStationDTO> traction = this.tractionStationSend(param.getIds(), Arrays.asList(data.getId()));
|
||||
if (traction.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam trSend = new SendParam();
|
||||
trSend.setStats(traction);
|
||||
Map<String, String> trMap = GwSendUtil.send(trSend, GWSendEnum.TRACTION_STATION);
|
||||
List<String> trIds = traction.stream().map(TractionStationDTO::getId).distinct().collect(Collectors.toList());
|
||||
msg = returnInformation(1, trIds, trMap);
|
||||
break;
|
||||
case LINEAR_LOADS:
|
||||
List<OtherUserDto> other = this.otherUserSend(param.getIds(), Arrays.asList(data.getId()));
|
||||
if (other.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam otSend = new SendParam();
|
||||
otSend.setStats(other);
|
||||
Map<String, String> otMap = GwSendUtil.send(otSend, GWSendEnum.OTHER_USER_CREATE);
|
||||
List<String> otIds = other.stream().map(OtherUserDto::getId).distinct().collect(Collectors.toList());
|
||||
msg = returnInformation(1, otIds, otMap);
|
||||
break;
|
||||
default:
|
||||
throw new BusinessException("请选择国网上送的监测点对象标签上送!");
|
||||
throw new BusinessException("请选择国网上送的监测点标签上送");
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String windSend(List<String> ids) {
|
||||
public List<WindSourceDto> windSend(List<String> ids,List<String> id) {
|
||||
//获取监测点信息
|
||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
||||
.in(Monitor::getId, ids)
|
||||
.eq(Monitor::getMonitorTag, id)
|
||||
.in(CollUtil.isNotEmpty(ids),Monitor::getId, ids)
|
||||
);
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
return "为查询数据,请查询数据是否存在!";
|
||||
new BusinessException("为查询数据,请查询数据是否存在!");
|
||||
}
|
||||
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||
Map<String, PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));
|
||||
//治理装置类型
|
||||
List<DictData> deviceType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_TYPE.getCode()).getData();
|
||||
Map<String, DictData> mapDeviceType = deviceType.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//电压等级
|
||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
@@ -110,10 +160,10 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
}
|
||||
sendVO.setId(monitor.getId());
|
||||
sendVO.setIsSpecial(monitor.getIsSpecialSupplyElectricity().toString());
|
||||
sendVO.setMonitorId(monitor.getId());
|
||||
// sendVO.setMonitorId(monitor.getId());
|
||||
sendVO.setStationCapacity(monitor.getUserAgreementCapacity());
|
||||
sendVO.setStationId(monitor.getId());
|
||||
sendVO.setSubstationId(monitor.getPowerrId());
|
||||
// sendVO.setSubstationId(monitor.getPowerrId());
|
||||
sendVO.setSubstationName(monitor.getPowerrName());
|
||||
sendVO.setFcId(monitor.getMonitorObjectId());
|
||||
sendVO.setFcNo(monitor.getMonitorObjectId());
|
||||
@@ -136,35 +186,25 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
// sendVO.setWindNum();
|
||||
// sendVO.setWindStationType();
|
||||
// sendVO.setWindType();
|
||||
//
|
||||
info.add(sendVO);
|
||||
}
|
||||
if (info.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(info);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.WIND_CREATE);
|
||||
List<String> trIds = info.stream().map(WindSourceDto::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(1, trIds, send);
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String photovoltaicSend(List<String> ids) {
|
||||
public List<PhotovoltaicDto> photovoltaicSend(List<String> ids,List<String> id) {
|
||||
//获取监测点信息
|
||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
||||
.in(Monitor::getId, ids)
|
||||
.eq(Monitor::getMonitorTag, id)
|
||||
.in(CollUtil.isNotEmpty(ids),Monitor::getId, ids)
|
||||
);
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
return "为查询数据,请查询数据是否存在!";
|
||||
throw new BusinessException("为查询数据,请查询数据是否存在!");
|
||||
}
|
||||
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||
Map<String, PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));
|
||||
//治理装置类型
|
||||
List<DictData> deviceType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEVICE_TYPE.getCode()).getData();
|
||||
Map<String, DictData> mapDeviceType = deviceType.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//电压等级
|
||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
@@ -187,10 +227,10 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
}
|
||||
sendVO.setId(monitor.getId());
|
||||
sendVO.setIsSpecial(monitor.getIsSpecialSupplyElectricity().toString());
|
||||
sendVO.setMonitorId(monitor.getId());
|
||||
// sendVO.setMonitorId(monitor.getId());
|
||||
sendVO.setStationCapacity(monitor.getUserAgreementCapacity());
|
||||
sendVO.setStationId(monitor.getId());
|
||||
sendVO.setSubstationId(monitor.getPowerrId());
|
||||
// sendVO.setSubstationId(monitor.getPowerrId());
|
||||
sendVO.setSubstationName(monitor.getPowerrName());
|
||||
sendVO.setFcId(monitor.getMonitorObjectId());
|
||||
sendVO.setFcNo(monitor.getMonitorObjectId());
|
||||
@@ -213,22 +253,19 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
|
||||
info.add(sendVO);
|
||||
}
|
||||
if (info.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(info);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.PHOTOVOLTAIC_CREATE);
|
||||
List<String> trIds = info.stream().map(PhotovoltaicDto::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(1, trIds, send);
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String sensitiveUserSend(List<String> ids) {
|
||||
public List<SensitiveUserDto> sensitiveUserSend(List<String> ids,List<String> id) {
|
||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
||||
.in(Monitor::getId, ids)
|
||||
.eq(Monitor::getMonitorTag, id)
|
||||
.in(CollUtil.isNotEmpty(ids),Monitor::getId, ids)
|
||||
);
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
throw new BusinessException("为查询数据,请查询数据是否存在!");
|
||||
}
|
||||
//根据用户类型进行分组
|
||||
Map<Integer, List<String>> userMonitor = monitorList.stream().filter(x -> ObjectUtil.isNotNull(x.getIfPowerUser()))
|
||||
.collect(Collectors.groupingBy(Monitor::getIfPowerUser,
|
||||
@@ -240,14 +277,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
.in(PowerClient::getId, userMonitor.get(0)));
|
||||
}
|
||||
//获取发电用户
|
||||
List<PowerGenerationUser> powerGenerationUsers =new ArrayList<>();
|
||||
if(userMonitor.containsKey(1)){
|
||||
List<PowerGenerationUser> powerGenerationUsers = new ArrayList<>();
|
||||
if (userMonitor.containsKey(1)) {
|
||||
powerGenerationUsers = iPowerGenerationUserService.list(new LambdaQueryWrapper<PowerGenerationUser>()
|
||||
.in(PowerGenerationUser::getId, userMonitor.get(1)));
|
||||
}
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
return "为查询数据,请查询数据是否存在!";
|
||||
}
|
||||
//用户分类
|
||||
List<DictData> userClass = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.USER_CLASS.getCode()).getData();
|
||||
Map<String, DictData> mapUserClass = userClass.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
@@ -281,19 +315,19 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
PvTerminalTreeVO pvTerminalTreeVO;
|
||||
//添加部门信息
|
||||
BeanUtil.copyProperties(setOrgProvince(mapCode, mapList, monitor.getOrgId()), sendVO);
|
||||
|
||||
sendVO.setId(monitor.getId());
|
||||
if (mapList.containsKey(monitor.getOperationId())) {
|
||||
pvTerminalTreeVO = mapList.get(monitor.getOperationId());
|
||||
|
||||
if (mapCode.containsKey(monitor.getOperationId())) {
|
||||
pvTerminalTreeVO = mapCode.get(monitor.getOperationId());
|
||||
sendVO.setMaintGroupName(pvTerminalTreeVO.getName());
|
||||
sendVO.setMaintGroupId(pvTerminalTreeVO.getCode());
|
||||
}
|
||||
sendVO.setSensitiveUserName(monitor.getName());
|
||||
sendVO.setUserProtocolCapacity(monitor.getUserAgreementCapacity());
|
||||
sendVO.setMonitorId(monitor.getId());
|
||||
sendVO.setStationId(monitor.getPowerrId());
|
||||
// sendVO.setMonitorId(monitor.getId());
|
||||
// sendVO.setStationId(monitor.getPowerrId());
|
||||
sendVO.setStationName(monitor.getPowerrName());
|
||||
sendVO.setPubPrivFlag(monitor.getIsSpecialMonitor()+"");
|
||||
sendVO.setPubPrivFlag(monitor.getIsSpecialMonitor() + "");
|
||||
//运行状态
|
||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||
@@ -302,15 +336,20 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
sendVO.setUpdateTime(monitor.getUpdateTime());
|
||||
if (mapVoltage.containsKey(monitor.getVoltageLevel())) {
|
||||
sendVO.setStationVoltageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
sendVO.setConsVoltageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
}
|
||||
//行业分类
|
||||
if (mapIndustryType.containsKey(monitor.getTradeCode())) {
|
||||
DictData dictData = mapIndustryType.get(monitor.getTradeCode());
|
||||
sendVO.setTradeCode(dictData.getValue());
|
||||
}
|
||||
if (ObjectUtil.isNotNull(monitor.getIfPowerUser())) {
|
||||
setSensitiveUser(powerClients,powerGenerationUsers,mapVoltage, mapUserClass, mapEleClass, mapIndustryType, mapImportanceLevel, sendVO, monitor);
|
||||
setSensitiveUser(powerClients, powerGenerationUsers, mapVoltage, mapUserClass, mapEleClass, mapImportanceLevel, sendVO, monitor);
|
||||
}
|
||||
|
||||
|
||||
// sendVO.setMeterAddress();
|
||||
// sendVO.setTradeCode();
|
||||
// sendVO.setConsVoltageLevel();
|
||||
//
|
||||
// sendVO.setFeederId();
|
||||
// sendVO.setFeederName();
|
||||
@@ -339,27 +378,27 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
|
||||
info.add(sendVO);
|
||||
}
|
||||
if (info.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(info);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.SENSITIVE_USER_CREATE);
|
||||
List<String> trIds = info.stream().map(SensitiveUserDto::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(1, trIds, send);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String tractionStationSend(List<String> ids) {
|
||||
public List<TractionStationDTO> tractionStationSend(List<String> ids,List<String> id) {
|
||||
//获取牵引站信息
|
||||
List<TractionStation> tractionStationList = tractionStationService.list(new LambdaQueryWrapper<TractionStation>()
|
||||
.in(TractionStation::getId, ids)
|
||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
||||
.eq(Monitor::getMonitorTag, id)
|
||||
.in(CollUtil.isNotEmpty(ids),Monitor::getId, ids)
|
||||
);
|
||||
if (CollUtil.isEmpty(tractionStationList)) {
|
||||
return "为查询数据,请查询数据是否存在!";
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
throw new BusinessException("为查询数据,请查询数据是否存在!");
|
||||
}
|
||||
//获取已存在牵引站的信息
|
||||
List<String> tractionIds = monitorList.stream().map(Monitor::getTractionId).collect(Collectors.toList());
|
||||
List<TractionStation> tractionStationList = tractionStationService.list(new LambdaQueryWrapper<TractionStation>()
|
||||
.in(TractionStation::getId, tractionIds));
|
||||
Map<String, TractionStation> tractionMap = tractionStationList.stream().collect(Collectors.toMap(TractionStation::getId, Function.identity()));
|
||||
|
||||
List<TractionStationDTO> info = new ArrayList<>();
|
||||
TractionStationDTO sendVO;
|
||||
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||
@@ -368,36 +407,61 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
//牵引站变压器接线方式
|
||||
List<DictData> connetGroupWay = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.CONNET_GROUP_WAY.getCode()).getData();
|
||||
Map<String, DictData> mapConnetGroupWay = connetGroupWay.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//运行状态
|
||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//电压等级
|
||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
|
||||
|
||||
for (TractionStation traction : tractionStationList) {
|
||||
TractionStation traction;
|
||||
for (Monitor monitor : monitorList) {
|
||||
sendVO = new TractionStationDTO();
|
||||
DictData dictData;
|
||||
//添加部门信息
|
||||
BeanUtil.copyProperties(setOrgProvince(mapCode, mapList, traction.getOrgId()), sendVO);
|
||||
//牵引站变压器接线方式
|
||||
if (mapConnetGroupWay.containsKey(traction.getConnetGroupWay())) {
|
||||
dictData = mapConnetGroupWay.get(traction.getConnetGroupWay());
|
||||
sendVO.setConnetGroupWay(dictData.getValue());
|
||||
BeanUtil.copyProperties(setOrgProvince(mapCode, mapList, monitor.getOrgId()), sendVO);
|
||||
if(tractionMap.containsKey(monitor.getTractionId())){
|
||||
traction = tractionMap.get(monitor.getTractionId());
|
||||
//牵引站变压器接线方式
|
||||
if (mapConnetGroupWay.containsKey(traction.getConnetGroupWay())) {
|
||||
dictData = mapConnetGroupWay.get(traction.getConnetGroupWay());
|
||||
sendVO.setConnetGroupWay(dictData.getValue());
|
||||
}
|
||||
sendVO.setIfSpecial(traction.getIfSpecial() + "");
|
||||
sendVO.setRailwayId(traction.getRailwayLineId());
|
||||
sendVO.setRailwayNumber(traction.getRailwayLineId());
|
||||
sendVO.setRailwayName(traction.getName());
|
||||
sendVO.setTractionCode(traction.getId());
|
||||
sendVO.setTractionSubstationCapacity(traction.getRatedCapacity());
|
||||
// sendVO.setTractionSubstationId(traction.getPowerId());
|
||||
sendVO.setTractionSubstationName(traction.getPowerName());
|
||||
// sendVO.setMainSubstationId(traction.getPowerId());
|
||||
sendVO.setMainSubstationName(traction.getPowerName());
|
||||
//电压等级
|
||||
if (mapVoltage.containsKey(traction.getVoltageLevel())) {
|
||||
sendVO.setTractionVoltageLevel(String.format("%02d", mapVoltage.get(traction.getVoltageLevel()).getAlgoDescribe()));
|
||||
sendVO.setMainVolatageLevel(String.format("%02d", mapVoltage.get(traction.getVoltageLevel()).getAlgoDescribe()));
|
||||
}
|
||||
}else{
|
||||
if (mapVoltage.containsKey(monitor.getVoltageLevel())) {
|
||||
sendVO.setTractionVoltageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
sendVO.setMainVolatageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
}
|
||||
// sendVO.setTractionSubstationId(monitor.getPowerrId());
|
||||
sendVO.setTractionSubstationName(monitor.getPowerrName());
|
||||
// sendVO.setMainSubstationId(monitor.getPowerId());
|
||||
sendVO.setMainSubstationName(monitor.getPowerrName());
|
||||
}
|
||||
sendVO.setCreateTime(traction.getCreateTime());
|
||||
sendVO.setIfSpecial(traction.getIfSpecial() + "");
|
||||
sendVO.setRailwayId(traction.getRailwayLineId());
|
||||
sendVO.setRailwayNumber(traction.getRailwayLineId());
|
||||
sendVO.setRailwayName(traction.getName());
|
||||
sendVO.setTractionCode(traction.getId());
|
||||
sendVO.setTractionSubstationCapacity(traction.getRatedCapacity());
|
||||
sendVO.setTractionSubstationId(traction.getPowerId());
|
||||
sendVO.setTractionSubstationName(traction.getPowerName());
|
||||
//电压等级
|
||||
if (mapVoltage.containsKey(traction.getVoltageLevel())) {
|
||||
sendVO.setTractionVoltageLevel(String.format("%02d", mapVoltage.get(traction.getVoltageLevel()).getAlgoDescribe()));
|
||||
sendVO.setCreateTime(monitor.getCreateTime());
|
||||
sendVO.setUpdateTime(monitor.getUpdateTime());
|
||||
sendVO.setId(monitor.getId());
|
||||
// sendVO.setMonitorNumber(monitor);
|
||||
|
||||
//运行状态
|
||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||
}
|
||||
sendVO.setUpdateTime(traction.getUpdateTime());
|
||||
sendVO.setId(traction.getId());
|
||||
|
||||
|
||||
// sendVO.setAuxiliarySubstationId();
|
||||
// sendVO.setAuxiliarySubstationName();
|
||||
@@ -406,10 +470,7 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
// sendVO.setCableLayingMethod();
|
||||
// sendVO.setCableModel();
|
||||
// sendVO.setCableRouteLength();
|
||||
// sendVO.setMainSubstationId();
|
||||
// sendVO.setMainSubstationName();
|
||||
// sendVO.setMainVolatageLevel();
|
||||
// sendVO.setMonitorNumber();
|
||||
|
||||
// sendVO.setMonitorNumberTwo();
|
||||
// sendVO.setRailwayType();
|
||||
// sendVO.setTransformerConnectionGroupMethod();
|
||||
@@ -418,18 +479,101 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
// sendVO.setTransformerTwoVoltageLevel();
|
||||
// sendVO.setTriphaseVvNameplateCapacity();
|
||||
// sendVO.setUploadDate();
|
||||
// sendVO.setRunStatus();
|
||||
|
||||
info.add(sendVO);
|
||||
}
|
||||
if (info.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OtherUserDto> otherUserSend(List<String> ids,List<String> id) {
|
||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
||||
.eq(Monitor::getMonitorTag, id)
|
||||
.in(CollUtil.isNotEmpty(ids),Monitor::getId, ids)
|
||||
);
|
||||
if (CollUtil.isEmpty(monitorList)) {
|
||||
throw new BusinessException("为查询数据,请查询数据是否存在!");
|
||||
}
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(info);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.TRACTION_STATION);
|
||||
List<String> trIds = info.stream().map(TractionStationDTO::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(2, trIds, send);
|
||||
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||
Map<String, PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));
|
||||
//电压等级
|
||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//运行状态
|
||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
//行业分类
|
||||
List<DictData> industryType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE.getCode()).getData();
|
||||
Map<String, DictData> mapIndustryType = industryType.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||
List<OtherUserDto> info = new ArrayList<>();
|
||||
OtherUserDto dto;
|
||||
for (Monitor monitor : monitorList) {
|
||||
dto = new OtherUserDto();
|
||||
PvTerminalTreeVO pvTerminalTreeVO;
|
||||
BeanUtil.copyProperties(setOrgProvince(mapCode, mapList, monitor.getOrgId()), dto);
|
||||
dto.setId(monitor.getId());
|
||||
if (mapCode.containsKey(monitor.getOperationId())) {
|
||||
pvTerminalTreeVO = mapCode.get(monitor.getOperationId());
|
||||
dto.setMaintOrgName(pvTerminalTreeVO.getName());
|
||||
dto.setMaintOrg(pvTerminalTreeVO.getCode());
|
||||
}
|
||||
dto.setConsNo(monitor.getId());
|
||||
dto.setConsName(monitor.getName());
|
||||
//电压等级
|
||||
if (mapVoltage.containsKey(monitor.getVoltageLevel())) {
|
||||
dto.setGcVoltageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
dto.setSubstationVoltageLevel(String.format("%02d", mapVoltage.get(monitor.getVoltageLevel()).getAlgoDescribe()));
|
||||
}
|
||||
// dto.setSubstationId(monitor.getPowerrId());
|
||||
dto.setSubstationName(monitor.getPowerrName());
|
||||
//行业分类
|
||||
if (mapIndustryType.containsKey(monitor.getTradeCode())) {
|
||||
dto.setTradeCode(mapIndustryType.get(monitor.getTradeCode()).getValue());
|
||||
}
|
||||
dto.setProtocolCapacity(monitor.getUserAgreementCapacity());
|
||||
// dto.setMonitorId(monitor.getId());
|
||||
// dto.setIsMonitoringOnline();
|
||||
// dto.setIsSceneTest();
|
||||
// dto.setHaveDevice();
|
||||
// dto.setDeviceType();
|
||||
// dto.setDeviceVoltageLevel();
|
||||
// dto.setDeviceCapacity();
|
||||
|
||||
//运行状态
|
||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||
dto.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||
}
|
||||
dto.setCreateTime(monitor.getCreateTime());
|
||||
dto.setUpdateTime(monitor.getUpdateTime());
|
||||
info.add(dto);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportSend(HttpServletResponse response) throws IOException {
|
||||
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), WindSourceDto.class).build();
|
||||
|
||||
List<WindSourceDto> wind = this.windSend(new ArrayList<>(), Arrays.asList("1adebade8821a18e4dbb5039fdf00326"));
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet(0, "风电厂" ).head(WindSourceDto.class).build();
|
||||
excelWriter.write(wind, writeSheet);
|
||||
|
||||
List<PhotovoltaicDto> photovoltaic = this.photovoltaicSend(new ArrayList<>(), Arrays.asList("c5af15b871a5dd880dace02b8f669e2f"));
|
||||
WriteSheet writeSheet2 = EasyExcel.writerSheet(1, "光伏电站" ).head(PhotovoltaicDto.class).build();
|
||||
excelWriter.write(photovoltaic, writeSheet2);
|
||||
|
||||
List<SensitiveUserDto> sensitive = this.sensitiveUserSend(new ArrayList<>(), Arrays.asList("4e9559adbe3fd935fb6ea43e79b704c0"));
|
||||
WriteSheet writeSheet3 = EasyExcel.writerSheet(2, "重或敏感用户" ).head(SensitiveUserDto.class).build();
|
||||
excelWriter.write(sensitive, writeSheet3);
|
||||
|
||||
List<TractionStationDTO> traction = this.tractionStationSend(new ArrayList<>(), Arrays.asList("2990ed905876f2964393ca64f9bd8d40"));
|
||||
WriteSheet writeSheet4 = EasyExcel.writerSheet(3, "牵引站" ).head(TractionStationDTO.class).build();
|
||||
excelWriter.write(traction, writeSheet4);
|
||||
|
||||
List<OtherUserDto> other = this.otherUserSend(new ArrayList<>(), Arrays.asList("08a039a9e3fd4e5038435dfbaa88a8e3"));
|
||||
WriteSheet writeSheet5 = EasyExcel.writerSheet(4, "干扰用户" ).head(OtherUserDto.class).build();
|
||||
excelWriter.write(other, writeSheet5);
|
||||
excelWriter.finish();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,13 +624,12 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
* @param powerClients 发电用户
|
||||
* @param mapUserClass
|
||||
* @param mapEleClass
|
||||
* @param mapIndustryType
|
||||
* @param mapImportanceLevel
|
||||
* @param mapImportanceLevel
|
||||
* @param sendVO
|
||||
* @param monitor
|
||||
*/
|
||||
private void setSensitiveUser(List<PowerClient> powerClients,List<PowerGenerationUser> powerGenerationUsers, Map<String, DictData> mapVoltage, Map<String, DictData> mapUserClass, Map<String, DictData> mapEleClass, Map<String, DictData> mapIndustryType, Map<String, DictData> mapImportanceLevel, SensitiveUserDto sendVO, Monitor monitor) {
|
||||
private void setSensitiveUser(List<PowerClient> powerClients, List<PowerGenerationUser> powerGenerationUsers, Map<String, DictData> mapVoltage, Map<String, DictData> mapUserClass, Map<String, DictData> mapEleClass, Map<String, DictData> mapImportanceLevel, SensitiveUserDto sendVO, Monitor monitor) {
|
||||
DictData dictData;
|
||||
if (1 == monitor.getIfPowerUser()) {
|
||||
List<PowerClient> powerClientList = powerClients.stream()
|
||||
@@ -505,11 +648,6 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
dictData = mapEleClass.get(powerClient.getElectricityType());
|
||||
sendVO.setElecTypeCode(dictData.getValue());
|
||||
}
|
||||
//行业分类
|
||||
if (mapIndustryType.containsKey(powerClient.getIndustryType())) {
|
||||
dictData = mapIndustryType.get(powerClient.getIndustryType());
|
||||
sendVO.setTradeCode(dictData.getValue());
|
||||
}
|
||||
//重要性等级
|
||||
if (mapImportanceLevel.containsKey(powerClient.getImportanceLevel())) {
|
||||
dictData = mapImportanceLevel.get(powerClient.getImportanceLevel());
|
||||
@@ -521,7 +659,7 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
sendVO.setConsVoltageLevel(dictData.getValue());
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
List<PowerGenerationUser> powerGenerationUserList = powerGenerationUsers.stream()
|
||||
.filter(x -> x.getId().equals(monitor.getMonitorObjectId()))
|
||||
.collect(Collectors.toList());
|
||||
@@ -564,9 +702,7 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
throw new BusinessException("操作失败:" + status + "_" + errors);
|
||||
}
|
||||
} else {
|
||||
// updateIsUploadHead(num, ids);
|
||||
throw new BusinessException("当前时间段国网上送请求过多,请稍后再试");
|
||||
// return "当前时间段国网上送请求过多,请稍后再试";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,12 +720,6 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
||||
.in(Monitor::getId, ids)
|
||||
);
|
||||
break;
|
||||
case 2:
|
||||
tractionStationService.update(new LambdaUpdateWrapper<TractionStation>()
|
||||
.set(TractionStation::getIsUploadHead, 1)
|
||||
.in(TractionStation::getId, ids)
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -36,4 +36,13 @@ public class RStatOrgParam extends StatisticsBizBaseParam {
|
||||
|
||||
|
||||
}
|
||||
@Data
|
||||
public static class Info extends StatisticsBizBaseParam {
|
||||
|
||||
@ApiModelProperty(name="measurementTypeClass",value="监测点对象标签")
|
||||
private List<String> measurementTypeClass;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ public class RStatOrgVO {
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "监测点类别ID、监测对象类型ID")
|
||||
private String measurementTypeClass;
|
||||
|
||||
@ApiModelProperty(value = "日均有效接入监测点数")
|
||||
private Float effectiveMeasurementAverage;
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ public class RStatOrgController extends BaseController {
|
||||
/**
|
||||
* 查询区域超标统计
|
||||
*/
|
||||
@GetMapping("/getAllRStatHarmonicOrg")
|
||||
@PostMapping("/getAllRStatHarmonicOrg")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("区域超标统计")
|
||||
public HttpResult<List<RStatOrgVO>> getAllRStatHarmonicOrg(StatisticsBizBaseParam param) {
|
||||
public HttpResult<List<RStatOrgVO>> getAllRStatHarmonicOrg(@RequestBody RStatOrgParam.Info param) {
|
||||
String methodDescribe = getMethodDescribe("getAllRStatHarmonicOrg");
|
||||
List<RStatOrgVO> rStatHarmonicOrgMAll = null;
|
||||
String string = param.getType().toString();
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.harmonic.service.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgM;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
@@ -25,7 +26,7 @@ public interface RStatOrgMService extends IService<RStatOrgM> {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgVO> getRStatHarmonicMAll(StatisticsBizBaseParam param);
|
||||
List<RStatOrgVO> getRStatHarmonicMAll(RStatOrgParam.Info param);
|
||||
|
||||
/**
|
||||
* 分布式光伏概览-超标监测点数量
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.harmonic.service.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgQ;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgVO;
|
||||
@@ -23,5 +24,5 @@ public interface RStatOrgQService extends IService<RStatOrgQ> {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgVO> getRStatHarmonicQAll(StatisticsBizBaseParam param);
|
||||
List<RStatOrgVO> getRStatHarmonicQAll(RStatOrgParam.Info param);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.harmonic.service.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgY;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@@ -24,7 +25,7 @@ public interface RStatOrgYService extends IService<RStatOrgY> {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgVO> getRStatHarmonicYAll(StatisticsBizBaseParam param);
|
||||
List<RStatOrgVO> getRStatHarmonicYAll(RStatOrgParam.Info param);
|
||||
|
||||
/**
|
||||
* 区域稳态指标超标分类统计表
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package com.njcn.harmonic.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.OverviewParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgM;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RStatOrgMMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgY;
|
||||
import com.njcn.harmonic.pojo.vo.OverviewVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgVO;
|
||||
import com.njcn.harmonic.service.majornetwork.RStatOrgMService;
|
||||
@@ -49,7 +52,7 @@ public class RStatOrgMServiceImpl extends ServiceImpl<RStatOrgMMapper, RStatOrgM
|
||||
private static final String XIONG_AN_CITY="雄安新区";
|
||||
|
||||
@Override
|
||||
public List<RStatOrgVO> getRStatHarmonicMAll(StatisticsBizBaseParam param) {
|
||||
public List<RStatOrgVO> getRStatHarmonicMAll(RStatOrgParam.Info param) {
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
@@ -61,6 +64,7 @@ public class RStatOrgMServiceImpl extends ServiceImpl<RStatOrgMMapper, RStatOrgM
|
||||
List<RStatOrgM> list = rStatOrgMMapper.selectList(new LambdaQueryWrapper<RStatOrgM>()
|
||||
.eq(RStatOrgM::getDataType, mainnetData.getId())
|
||||
.in(RStatOrgM::getOrgNo, deptIds)
|
||||
.in(CollUtil.isNotEmpty(param.getMeasurementTypeClass()), RStatOrgM::getMeasurementTypeClass, param.getMeasurementTypeClass())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatOrgM::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatOrgM::getDataDate, param.getEndTime()));
|
||||
Map<String, List<RStatOrgM>> collect = list.stream().collect(Collectors.groupingBy(RStatOrgM::getOrgNo));
|
||||
@@ -81,7 +85,7 @@ public class RStatOrgMServiceImpl extends ServiceImpl<RStatOrgMMapper, RStatOrgM
|
||||
}else{
|
||||
rStatOrgVO.setAverageOverDay(0.0f);
|
||||
}
|
||||
|
||||
rStatOrgVO.setMeasurementTypeClass(rStatOrgM.getMeasurementTypeClass());
|
||||
rStatOrgVO.setEffectiveMeasurementAverage(rStatOrgM.getEffectiveMeasurementAverage());
|
||||
rStatOrgVO.setEffectiveMeasurementAccrued(rStatOrgM.getEffectiveMeasurementAccrued());
|
||||
rStatOrgVO.setOverLimitMeasurementAverage(rStatOrgM.getHarmonicMeasurementAverage());
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.njcn.harmonic.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgM;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgQ;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RStatOrgQMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgY;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgVO;
|
||||
import com.njcn.harmonic.service.majornetwork.RStatOrgQService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -42,7 +46,7 @@ public class RStatOrgQServiceImpl extends ServiceImpl<RStatOrgQMapper, RStatOrgQ
|
||||
private final RStatOrgQMapper rStatOrgQMapper;
|
||||
|
||||
@Override
|
||||
public List<RStatOrgVO> getRStatHarmonicQAll(StatisticsBizBaseParam param) {
|
||||
public List<RStatOrgVO> getRStatHarmonicQAll(RStatOrgParam.Info param) {
|
||||
//获取部门信息
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
@@ -57,6 +61,7 @@ public class RStatOrgQServiceImpl extends ServiceImpl<RStatOrgQMapper, RStatOrgQ
|
||||
List<RStatOrgQ> list = rStatOrgQMapper.selectList(new LambdaQueryWrapper<RStatOrgQ>()
|
||||
.eq(RStatOrgQ::getDataType, mainnetData.getId())
|
||||
.in(RStatOrgQ::getOrgNo, deptIds)
|
||||
.in(CollUtil.isNotEmpty(param.getMeasurementTypeClass()), RStatOrgQ::getMeasurementTypeClass, param.getMeasurementTypeClass())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatOrgQ::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatOrgQ::getDataDate, param.getEndTime()));
|
||||
Map<String, List<RStatOrgQ>> collect = list.stream().collect(Collectors.groupingBy(RStatOrgQ::getOrgNo));
|
||||
@@ -69,6 +74,7 @@ public class RStatOrgQServiceImpl extends ServiceImpl<RStatOrgQMapper, RStatOrgQ
|
||||
RStatOrgVO rStatOrgVO = new RStatOrgVO();
|
||||
rStatOrgVO.setOrgName(deptDTO.getName());
|
||||
rStatOrgVO.setAverageOverDay(rStatOrgQ.getAverageOverDay());
|
||||
rStatOrgVO.setMeasurementTypeClass(rStatOrgQ.getMeasurementTypeClass());
|
||||
rStatOrgVO.setEffectiveMeasurementAverage(rStatOrgQ.getEffectiveMeasurementAverage());
|
||||
rStatOrgVO.setEffectiveMeasurementAccrued(rStatOrgQ.getEffectiveMeasurementAccrued());
|
||||
rStatOrgVO.setOverLimitMeasurementAverage(rStatOrgQ.getHarmonicMeasurementAverage());
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.njcn.harmonic.mapper.majornetwork.RStatOrgYMapper;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RStatSubstationMMapper;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RStatSubstationQMapper;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RStatSubstationYMapper;
|
||||
import com.njcn.harmonic.pojo.param.RStatOrgParam;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgY;
|
||||
import com.njcn.harmonic.pojo.vo.*;
|
||||
@@ -67,7 +68,7 @@ public class RStatOrgYServiceImpl extends ServiceImpl<RStatOrgYMapper, RStatOrgY
|
||||
private final PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
||||
|
||||
@Override
|
||||
public List<RStatOrgVO> getRStatHarmonicYAll(StatisticsBizBaseParam param) {
|
||||
public List<RStatOrgVO> getRStatHarmonicYAll(RStatOrgParam.Info param) {
|
||||
//获取部门信息
|
||||
List<DeptDTO> deptList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
List<DeptDTO> deptDTOList = DeptUtil.getDeptSubsetVOList(deptList, param.getId());
|
||||
@@ -82,6 +83,7 @@ public class RStatOrgYServiceImpl extends ServiceImpl<RStatOrgYMapper, RStatOrgY
|
||||
List<RStatOrgY> list = rStatOrgYMapper.selectList(new LambdaQueryWrapper<RStatOrgY>()
|
||||
.eq(RStatOrgY::getDataType, mainnetData.getId())
|
||||
.in(RStatOrgY::getOrgNo, deptIds)
|
||||
.in(CollUtil.isNotEmpty(param.getMeasurementTypeClass()),RStatOrgY::getMeasurementTypeClass, param.getMeasurementTypeClass())
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatOrgY::getDataDate, param.getStartTime())
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatOrgY::getDataDate, param.getEndTime()));
|
||||
Map<String, List<RStatOrgY>> collect = list.stream().collect(Collectors.groupingBy(RStatOrgY::getOrgNo));
|
||||
@@ -94,6 +96,7 @@ public class RStatOrgYServiceImpl extends ServiceImpl<RStatOrgYMapper, RStatOrgY
|
||||
RStatOrgVO rStatOrgVO = new RStatOrgVO();
|
||||
rStatOrgVO.setOrgName(deptDTO.getName());
|
||||
rStatOrgVO.setAverageOverDay(rStatOrgY.getAverageOverDay());
|
||||
rStatOrgVO.setMeasurementTypeClass(rStatOrgY.getMeasurementTypeClass());
|
||||
rStatOrgVO.setEffectiveMeasurementAverage(rStatOrgY.getEffectiveMeasurementAverage());
|
||||
rStatOrgVO.setEffectiveMeasurementAccrued(rStatOrgY.getEffectiveMeasurementAccrued());
|
||||
rStatOrgVO.setOverLimitMeasurementAverage(rStatOrgY.getOverLimitMeasurementAverage());
|
||||
|
||||
@@ -223,7 +223,9 @@ public enum DicDataEnum {
|
||||
WIND_FARM("风电场", "Wind_Farm"),
|
||||
SENSITIVE_USERS("重要敏感用户", "Sensitive_Users"),
|
||||
IMPORTANT_USERS("重要用户", "Important_Users"),
|
||||
//废弃字段
|
||||
TRACTION_STATION("牵引站", "Traction_Station"),
|
||||
LINEAR_LOADS("其他非线性负荷", "Linear_Loads"),
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -118,7 +118,7 @@ public enum DicDataTypeEnum {
|
||||
INDUSTRY_TYPE("行业分类","industry_type"),
|
||||
PLAN_STATUS("计划状态","plan_status"),
|
||||
APP_EVENT("APP暂态事件类型","app_event"),
|
||||
DEVICE_TYPE("设备类型","Device_Type")
|
||||
DEVICE_TYPE("治理装置类型编码","Device_Type")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user