国网推送
This commit is contained in:
@@ -6,88 +6,83 @@ import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/12/6 15:22【需求编号】
|
||||
* Date: 2023/12/6 15:30【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class ConverterDetailStatisticsDTO {
|
||||
/*主键 是否必填:是*/
|
||||
private String id;
|
||||
|
||||
/*统计日期 是否必填:是*/
|
||||
private String statisticalDate;
|
||||
/*统计类型 是否必填:是*/
|
||||
private String statisticalType;
|
||||
|
||||
/*主键 是否必填:是*/
|
||||
private String id;
|
||||
/*省级单位id 是否必填:是*/
|
||||
private String provinceId;
|
||||
/*省级单位名称 是否必填:否*/
|
||||
private String provinceName;
|
||||
/*市级单位id 是否必填:是*/
|
||||
private String cityId;
|
||||
/*市级单位名称 是否必填:否*/
|
||||
private String cityName;
|
||||
/*县级单位id 是否必填:否*/
|
||||
private String countyId;
|
||||
/*县级单位名称 是否必填:否*/
|
||||
private String countyName;
|
||||
|
||||
/*省级单位名称 是否必填:否*/
|
||||
private String provinceName;
|
||||
/*省级单位id 是否必填:是*/
|
||||
private String provinceId;
|
||||
/*换流站id 是否必填:是*/
|
||||
private String converterId;
|
||||
/*换流站名称 是否必填:是*/
|
||||
private String converterName;
|
||||
/*电压等级 是否必填:是*/
|
||||
private String voltageLevel;
|
||||
|
||||
/*市级单位id 是否必填:是*/
|
||||
private String cityId;
|
||||
/*市级单位名称 是否必填:否*/
|
||||
private String cityName;
|
||||
/*母线id 是否必填:否*/
|
||||
private String busId;
|
||||
/*母线名称 是否必填:否*/
|
||||
private String busName;
|
||||
/*母线电压等级 是否必填:否*/
|
||||
private String busVoltageLevel;
|
||||
|
||||
/*监测点id 是否必填:否*/
|
||||
private String monitorId;
|
||||
|
||||
/*站内有效监测点数量(个) 是否必填:是*/
|
||||
private Integer effectiveMonitorNum;
|
||||
/*谐波电压超标天数 是否必填:否*/
|
||||
private Integer harmvOvDay;
|
||||
/*当年累计月数 是否必填:否*/
|
||||
private Integer monthsCount;
|
||||
/*月均超标天数 是否必填:否*/
|
||||
private BigDecimal monthOvDays;
|
||||
|
||||
/*统计日期 是否必填:是*/
|
||||
private String statisticalDate;
|
||||
/*统计类型 是否必填:是*/
|
||||
private String statisticalType;
|
||||
|
||||
/*统计层级 是否必填:是*/
|
||||
private String statisticalLevel;
|
||||
|
||||
|
||||
/*在运交流母线数量(条) 是否必填:是*/
|
||||
private Integer onlineAlternatingBusNum;
|
||||
/*在运换流站数量(座) 是否必填:是*/
|
||||
private Integer onlineConverterNum;
|
||||
|
||||
/*发生超标或暂态母线数量(条) 是否必填:是*/
|
||||
private Integer abnormalBusNum;
|
||||
|
||||
|
||||
/*监测换流站数量(座) 是否必填:是*/
|
||||
private Integer monitorConverterNum;
|
||||
/*监测交流母线数量(条) 是否必填:否*/
|
||||
private Integer monitorAlternatingBusNum;
|
||||
|
||||
/*累计发生超标或暂态换流站数量(座) 是否必填:否*/
|
||||
private Integer abnormalConverterCount;
|
||||
/*累计监测换流站数量(座) 是否必填:否*/
|
||||
private Integer monitorConverterCount;
|
||||
/*累计发生超标或暂态母线数量(座) 是否必填:否*/
|
||||
private Integer abnormalBusCount;
|
||||
/*累计监测交流母线数量(座) 是否必填:否*/
|
||||
private Integer monitorAlternatingBusCount;
|
||||
|
||||
|
||||
|
||||
|
||||
/*发生超标或暂态换流站数量(条) 是否必填:否*/
|
||||
private Integer abnormalConverterNum;
|
||||
|
||||
/*发生超标或暂态母线日均占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalBusAvgRate;
|
||||
|
||||
/*发生超标或暂态母线占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalBusRate;
|
||||
/*发生超标或暂态换流站日均占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalConverterAvgRate;
|
||||
|
||||
/*发生超标或暂态换流站占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalConverterRate;
|
||||
|
||||
|
||||
/*交流母线监测率(%) 是否必填:否*/
|
||||
private BigDecimal monitorAlternatingBusRate;
|
||||
|
||||
/*换流站监测率(%) 是否必填:*/
|
||||
private BigDecimal monitorConverterRate;
|
||||
|
||||
|
||||
/*奇次谐波电压限值(%) 是否必填:是*/
|
||||
private BigDecimal oddVoltLimit;
|
||||
/*累计超标天数 是否必填:否*/
|
||||
private Integer totalOvDays;
|
||||
/*11次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v11;
|
||||
/*13次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v13;
|
||||
/*23次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v23;
|
||||
/*25次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v25;
|
||||
/*3次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v3;
|
||||
/*5次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v5;
|
||||
/*7次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/*电压总谐波畸变率95%概率值统计值(%) 是否必填:否*/
|
||||
private BigDecimal vthd;
|
||||
/*电压总谐波畸变率95%概率值限值(%) 是否必填:是*/
|
||||
private BigDecimal vthdLimit;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.njcn.harmonic.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/12/6 15:22【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class ConverterIndexStatisticsDTO {
|
||||
|
||||
|
||||
/*主键 是否必填:是*/
|
||||
private String id;
|
||||
|
||||
/*省级单位名称 是否必填:否*/
|
||||
private String provinceName;
|
||||
/*省级单位id 是否必填:是*/
|
||||
private String provinceId;
|
||||
|
||||
/*市级单位id 是否必填:是*/
|
||||
private String cityId;
|
||||
/*市级单位名称 是否必填:否*/
|
||||
private String cityName;
|
||||
|
||||
|
||||
|
||||
/*统计日期 是否必填:是*/
|
||||
private String statisticalDate;
|
||||
/*统计类型 是否必填:是*/
|
||||
private String statisticalType;
|
||||
|
||||
/*统计层级 是否必填:是*/
|
||||
private String statisticalLevel;
|
||||
|
||||
|
||||
/*在运交流母线数量(条) 是否必填:是*/
|
||||
private Integer onlineAlternatingBusNum;
|
||||
/*在运换流站数量(座) 是否必填:是*/
|
||||
private Integer onlineConverterNum;
|
||||
|
||||
/*发生超标或暂态母线数量(条) 是否必填:是*/
|
||||
private Integer abnormalBusNum;
|
||||
|
||||
|
||||
/*监测换流站数量(座) 是否必填:是*/
|
||||
private Integer monitorConverterNum;
|
||||
/*监测交流母线数量(条) 是否必填:否*/
|
||||
private Integer monitorAlternatingBusNum;
|
||||
|
||||
/*累计发生超标或暂态换流站数量(座) 是否必填:否*/
|
||||
private Integer abnormalConverterCount;
|
||||
/*累计监测换流站数量(座) 是否必填:否*/
|
||||
private Integer monitorConverterCount;
|
||||
/*累计发生超标或暂态母线数量(座) 是否必填:否*/
|
||||
private Integer abnormalBusCount;
|
||||
/*累计监测交流母线数量(座) 是否必填:否*/
|
||||
private Integer monitorAlternatingBusCount;
|
||||
|
||||
|
||||
|
||||
|
||||
/*发生超标或暂态换流站数量(条) 是否必填:否*/
|
||||
private Integer abnormalConverterNum;
|
||||
|
||||
/*发生超标或暂态母线日均占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalBusAvgRate;
|
||||
|
||||
/*发生超标或暂态母线占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalBusRate;
|
||||
/*发生超标或暂态换流站日均占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalConverterAvgRate;
|
||||
|
||||
/*发生超标或暂态换流站占比(%) 是否必填:否*/
|
||||
private BigDecimal abnormalConverterRate;
|
||||
|
||||
|
||||
/*交流母线监测率(%) 是否必填:否*/
|
||||
private BigDecimal monitorAlternatingBusRate;
|
||||
|
||||
/*换流站监测率(%) 是否必填:*/
|
||||
private BigDecimal monitorConverterRate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.njcn.harmonic.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/12/6 15:30【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class SubstationQualityStatisticsDTO {
|
||||
/*主键 是否必填:是*/
|
||||
private String id;
|
||||
|
||||
/*统计日期 是否必填:是*/
|
||||
private String statisticalDate;
|
||||
/*统计类型 是否必填:是*/
|
||||
private String statisticalType;
|
||||
|
||||
/*省级单位id 是否必填:是*/
|
||||
private String provinceId;
|
||||
/*省级单位名称 是否必填:否*/
|
||||
private String provinceName;
|
||||
/*市级单位id 是否必填:是*/
|
||||
private String cityId;
|
||||
/*市级单位名称 是否必填:否*/
|
||||
private String cityName;
|
||||
/*县级单位id 是否必填:否*/
|
||||
private String countyId;
|
||||
/*县级单位名称 是否必填:否*/
|
||||
private String countyName;
|
||||
|
||||
/*换流站id 是否必填:是*/
|
||||
private String converterId;
|
||||
/*换流站名称 是否必填:是*/
|
||||
private String converterName;
|
||||
/*电压等级 是否必填:是*/
|
||||
private String voltageLevel;
|
||||
|
||||
/*母线id 是否必填:否*/
|
||||
private String busId;
|
||||
/*母线名称 是否必填:否*/
|
||||
private String busName;
|
||||
/*母线电压等级 是否必填:否*/
|
||||
private String busVoltageLevel;
|
||||
|
||||
/*监测点id 是否必填:否*/
|
||||
private String monitorId;
|
||||
|
||||
/*站内有效监测点数量(个) 是否必填:是*/
|
||||
private Integer effectiveMonitorNum;
|
||||
/*谐波电压超标天数 是否必填:否*/
|
||||
private Integer harmvOvDay;
|
||||
/*当年累计月数 是否必填:否*/
|
||||
private Integer monthsCount;
|
||||
/*月均超标天数 是否必填:否*/
|
||||
private BigDecimal monthOvDays;
|
||||
|
||||
/*奇次谐波电压限值(%) 是否必填:是*/
|
||||
private BigDecimal oddVoltLimit;
|
||||
/*累计超标天数 是否必填:否*/
|
||||
private Integer totalOvDays;
|
||||
/*11次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v11;
|
||||
/*13次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v13;
|
||||
/*23次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v23;
|
||||
/*25次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v25;
|
||||
/*3次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v3;
|
||||
/*5次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v5;
|
||||
/*7次谐波电压95%概率值(%) 是否必填:否*/
|
||||
private BigDecimal v7;
|
||||
|
||||
/*电压总谐波畸变率95%概率值统计值(%) 是否必填:否*/
|
||||
private BigDecimal vthd;
|
||||
/*电压总谐波畸变率95%概率值限值(%) 是否必填:是*/
|
||||
private BigDecimal vthdLimit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -17,8 +17,8 @@ import java.math.BigDecimal;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "substation_quality_statistics")
|
||||
public class SubstationQualityStatisticsPO {
|
||||
@TableName(value = "converter_detail_statistics")
|
||||
public class ConverterDetailStatisticsPO {
|
||||
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private String id;
|
||||
@@ -17,8 +17,8 @@ import java.math.BigDecimal;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "converterdetailstatistics")
|
||||
public class ConverterdetailstatisticsPO {
|
||||
@TableName(value = "converter_index_statistics")
|
||||
public class ConverterIndexStatisticsPO {
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private String id;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.harmonic.utils;
|
||||
|
||||
import com.njcn.harmonic.pojo.dto.PqTypicalSourceCreateDTO;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/12/7 16:12【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public class PotoSqlUtil {
|
||||
public static String generateCreateTableSql(Class<?> entityClass) {
|
||||
StringBuilder sql = new StringBuilder("CREATE TABLE ");
|
||||
sql.append(entityClass.getSimpleName()).append(" (");
|
||||
|
||||
Field[] fields = entityClass.getDeclaredFields();
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
Field field = fields[i];
|
||||
if (!Modifier.isStatic(field.getModifiers())) {
|
||||
sql.append(field.getName()).append(" ");
|
||||
Class<?> fieldType = field.getType();
|
||||
if (fieldType == int.class || fieldType == Integer.class) {
|
||||
sql.append("INT");
|
||||
} else if (fieldType == String.class) {
|
||||
sql.append("VARCHAR(255)");
|
||||
} else if (fieldType == double.class || fieldType == Double.class) {
|
||||
sql.append("DOUBLE");
|
||||
} else if (fieldType == float.class || fieldType == Float.class) {
|
||||
sql.append("FLOAT");
|
||||
} else if (fieldType == boolean.class || fieldType == Boolean.class) {
|
||||
sql.append("BOOLEAN");
|
||||
} else if (fieldType == java.util.Date.class) {
|
||||
sql.append("DATE");
|
||||
} else if (fieldType == java.math.BigDecimal.class) {
|
||||
sql.append("decimal");
|
||||
}
|
||||
else {
|
||||
// 其他类型暂不支持,可以根据需要添加
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i < fields.length - 1) {
|
||||
sql.append(", ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sql.append(");");
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String createTableSql = generateCreateTableSql(PqTypicalSourceCreateDTO.class);
|
||||
System.out.println(createTableSql);
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterdetailstatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterdetailstatisticsPOService;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterIndexStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterIndexStatisticsPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -37,17 +37,17 @@ import java.util.List;
|
||||
@RequestMapping("/Converterdetail")
|
||||
@Api(tags = "换流站指标统计明细汇总数据")
|
||||
@RequiredArgsConstructor
|
||||
public class ConverterdetailstatisticsController extends BaseController {
|
||||
public class ConverterIndexStatisticsController extends BaseController {
|
||||
|
||||
private final ConverterdetailstatisticsPOService converterdetailstatisticsPOService;
|
||||
private final ConverterIndexStatisticsPOService converterIndexStatisticsPOService;
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPage")
|
||||
@ApiOperation("数据查询")
|
||||
@ApiImplicitParam(name = "param", value = "实体参数", required = true)
|
||||
public HttpResult<Page<ConverterdetailstatisticsPO>> queryPage(@Validated @RequestBody SendQueryParam.SendPageParam param) {
|
||||
public HttpResult<Page<ConverterIndexStatisticsPO>> queryPage(@Validated @RequestBody SendQueryParam.SendPageParam param) {
|
||||
String methodDescribe = getMethodDescribe("queryPage");
|
||||
LogUtil.njcnDebug(log, "{},实体参数:{}", methodDescribe, param);
|
||||
Page<ConverterdetailstatisticsPO> list = converterdetailstatisticsPOService.queryPage(param);
|
||||
Page<ConverterIndexStatisticsPO> list = converterIndexStatisticsPOService.queryPage(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ConverterdetailstatisticsController extends BaseController {
|
||||
@ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
public HttpResult<String> send(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("send");
|
||||
String s = converterdetailstatisticsPOService.send(ids);
|
||||
String s = converterIndexStatisticsPOService.send(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.SubstationQualityStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.SubstationQualityStatisticsPOService;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterDetailStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterDetailStatisticsPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -42,16 +42,16 @@ import java.util.List;
|
||||
public class SubstationQualityStatisticsController extends BaseController {
|
||||
|
||||
|
||||
private final SubstationQualityStatisticsPOService substationQualityStatisticsPOService;
|
||||
private final ConverterDetailStatisticsPOService converterDetailStatisticsPOService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPage")
|
||||
@ApiOperation("数据查询")
|
||||
@ApiImplicitParam(name = "param", value = "实体参数", required = true)
|
||||
public HttpResult<Page<SubstationQualityStatisticsPO>> queryPage(@Validated @RequestBody SendQueryParam.SendPageParam param) {
|
||||
public HttpResult<Page<ConverterDetailStatisticsPO>> queryPage(@Validated @RequestBody SendQueryParam.SendPageParam param) {
|
||||
String methodDescribe = getMethodDescribe("queryPage");
|
||||
LogUtil.njcnDebug(log, "{},实体参数:{}", methodDescribe, param);
|
||||
Page<SubstationQualityStatisticsPO> list = substationQualityStatisticsPOService.queryPage(param);
|
||||
Page<ConverterDetailStatisticsPO> list = converterDetailStatisticsPOService.queryPage(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SubstationQualityStatisticsController extends BaseController {
|
||||
@ApiImplicitParam(name = "ids",value = "请求体",required = true)
|
||||
public HttpResult<String> send(@RequestBody List<String> ids){
|
||||
String methodDescribe = getMethodDescribe("send");
|
||||
String s = substationQualityStatisticsPOService.send(ids);
|
||||
String s = converterDetailStatisticsPOService.send(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, s, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.harmonic.mapper.send;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.po.send.SubstationQualityStatisticsPO;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterDetailStatisticsPO;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -11,5 +11,5 @@ import com.njcn.harmonic.pojo.po.send.SubstationQualityStatisticsPO;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface SubstationQualityStatisticsPOMapper extends BaseMapper<SubstationQualityStatisticsPO> {
|
||||
public interface ConverterDetailStatisticsPOMapper extends BaseMapper<ConverterDetailStatisticsPO> {
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.harmonic.mapper.send;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterdetailstatisticsPO;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterIndexStatisticsPO;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -11,5 +11,5 @@ import com.njcn.harmonic.pojo.po.send.ConverterdetailstatisticsPO;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface ConverterdetailstatisticsPOMapper extends BaseMapper<ConverterdetailstatisticsPO> {
|
||||
public interface ConverterIndexStatisticsPOMapper extends BaseMapper<ConverterIndexStatisticsPO> {
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.send.ConverterdetailstatisticsPOMapper">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table converterdetailstatistics-->
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, abnormalBusAvgRate, abnormalBusNum, abnormalBusRate, abnormalConverterAvgRate,
|
||||
abnormalConverterNum, abnormalConverterRate, cityId, cityName, monitorAlternatingBusNum,
|
||||
monitorAlternatingBusRate, monitorConverterNum, monitorConverterRate, onlineAlternatingBusNum,
|
||||
onlineConverterNum, provinceName, provinceId, statisticalDate, statisticalType, statisticalLevel,
|
||||
abnormalConverterCount, monitorConverterCount, abnormalBusCount, monitorAlternatingBusCount
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.send.PqTypicalSourceCreatePOMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, statisticalDate, statisticalLevel, statisticalType, indexType, provinceId, provinceName,
|
||||
cityId, cityName, countyId, countyName, industryType, interferenceSourceNum, averageOvDays,
|
||||
flickerAvgOvRate, flickerOvNum, flickerOvRate, iAvgOvRate, iOvNum, iOvRate, inseqAvgOvRate,
|
||||
inseqOvNum, inseqOvRate, monitorNum, monitoringRate, ovNum, ovRate, unbanOvNum, unbanOvRate,
|
||||
vAvgOvRate, vOvNum, vOvRate, unbanAvgOvRate, ovDayCount
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.send.SubstationQualityStatisticsPOMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, statisticalDate, statisticalType, provinceId, provinceName, cityId, cityName,
|
||||
countyId, countyName, converterId, converterName, voltageLevel, busId, busName, busVoltageLevel,
|
||||
monitorId, effectiveMonitorNum, harmvOvDay, monthsCount, monthOvDays, oddVoltLimit,
|
||||
totalOvDays, v11, v13, v23, v25, v3, v5, v7, vthd, vthdLimit
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -3,7 +3,7 @@ package com.njcn.harmonic.service.send;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.SubstationQualityStatisticsPO;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterDetailStatisticsPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,10 +15,10 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface SubstationQualityStatisticsPOService extends IService<SubstationQualityStatisticsPO>{
|
||||
public interface ConverterDetailStatisticsPOService extends IService<ConverterDetailStatisticsPO>{
|
||||
|
||||
|
||||
Page<SubstationQualityStatisticsPO> queryPage(SendQueryParam.SendPageParam param);
|
||||
Page<ConverterDetailStatisticsPO> queryPage(SendQueryParam.SendPageParam param);
|
||||
|
||||
String send(List<String> ids);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.njcn.harmonic.service.send;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterdetailstatisticsPO;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterIndexStatisticsPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,10 +15,10 @@ import java.util.List;
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface ConverterdetailstatisticsPOService extends IService<ConverterdetailstatisticsPO>{
|
||||
public interface ConverterIndexStatisticsPOService extends IService<ConverterIndexStatisticsPO>{
|
||||
|
||||
|
||||
Page<ConverterdetailstatisticsPO> queryPage(SendQueryParam.SendPageParam param);
|
||||
Page<ConverterIndexStatisticsPO> queryPage(SendQueryParam.SendPageParam param);
|
||||
|
||||
String send(List<String> ids);
|
||||
}
|
||||
@@ -7,11 +7,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.harmonic.mapper.send.ConverterdetailstatisticsPOMapper;
|
||||
import com.njcn.harmonic.mapper.send.ConverterDetailStatisticsPOMapper;
|
||||
import com.njcn.harmonic.pojo.dto.ConverterDetailStatisticsDTO;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterdetailstatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterdetailstatisticsPOService;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterDetailStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterDetailStatisticsPOService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.web.enums.GWSendEnum;
|
||||
import com.njcn.web.pojo.param.SendParam;
|
||||
@@ -27,7 +27,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/12/11 11:35【需求编号】
|
||||
* Date: 2023/12/7 16:21【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
@@ -35,38 +35,42 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ConverterdetailstatisticsPOServiceImpl extends ServiceImpl<ConverterdetailstatisticsPOMapper, ConverterdetailstatisticsPO> implements ConverterdetailstatisticsPOService {
|
||||
public class ConverterDetailStatisticsPOServiceImpl extends ServiceImpl<ConverterDetailStatisticsPOMapper, ConverterDetailStatisticsPO> implements ConverterDetailStatisticsPOService {
|
||||
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
|
||||
@Override
|
||||
public Page<ConverterdetailstatisticsPO> queryPage(SendQueryParam.SendPageParam param) {
|
||||
Page<ConverterdetailstatisticsPO> page = new Page<> (param.getPageNum ( ), param.getPageSize ( ));
|
||||
public Page<ConverterDetailStatisticsPO> queryPage(SendQueryParam.SendPageParam param) {
|
||||
Page<ConverterDetailStatisticsPO> page = new Page<> (param.getPageNum ( ), param.getPageSize ( ));
|
||||
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getDeptIndex()).getData();
|
||||
QueryWrapper<ConverterdetailstatisticsPO> wrapper = new QueryWrapper<>();
|
||||
wrapper.lambda().in(ConverterdetailstatisticsPO::getProvinceId,deptIds).
|
||||
between(ConverterdetailstatisticsPO::getStatisticalDate,param.getSearchBeginTime(),param.getSearchEndTime());
|
||||
Page<ConverterdetailstatisticsPO> converterdetailstatisticsPOPage = this.getBaseMapper().selectPage(page, wrapper);
|
||||
QueryWrapper<ConverterDetailStatisticsPO> wrapper = new QueryWrapper<>();
|
||||
wrapper.lambda().in(ConverterDetailStatisticsPO::getProvinceId,deptIds).
|
||||
between(ConverterDetailStatisticsPO::getStatisticalDate,param.getSearchBeginTime(),param.getSearchEndTime());
|
||||
Page<ConverterDetailStatisticsPO> substationQualityStatisticsPOPage = this.getBaseMapper().selectPage(page, wrapper);
|
||||
|
||||
return converterdetailstatisticsPOPage;
|
||||
return substationQualityStatisticsPOPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String send(List<String> ids) {
|
||||
List<ConverterdetailstatisticsPO> list = this.lambdaQuery().eq(ConverterdetailstatisticsPO::getId, ids).list();
|
||||
|
||||
List<ConverterDetailStatisticsPO> list = this.lambdaQuery().eq(ConverterDetailStatisticsPO::getId, ids).list();
|
||||
|
||||
if (list.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
List<ConverterDetailStatisticsDTO> converterDetailStatisticsDTOS = BeanUtil.copyToList(list, ConverterDetailStatisticsDTO.class);
|
||||
List<ConverterDetailStatisticsDTO> converterDetailStatisticsDTOList = BeanUtil.copyToList(list, ConverterDetailStatisticsDTO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(converterDetailStatisticsDTOS);
|
||||
param.setStats(converterDetailStatisticsDTOList);
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 换流站指标统计明细数据接口数据:" + s + "开始----!");
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.DETAIL_CREATE);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.SUBSTATION_MONITOR);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体换流站指标统计明细数据接口响应结果:" + send + "结束----!");
|
||||
|
||||
List<String> trIds = converterDetailStatisticsDTOS.stream().map(ConverterDetailStatisticsDTO::getId).distinct().collect(Collectors.toList());
|
||||
List<String> trIds = converterDetailStatisticsDTOList.stream().map(ConverterDetailStatisticsDTO::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(1, trIds, send);
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.harmonic.mapper.send.SubstationQualityStatisticsPOMapper;
|
||||
import com.njcn.harmonic.pojo.dto.SubstationQualityStatisticsDTO;
|
||||
import com.njcn.harmonic.mapper.send.ConverterIndexStatisticsPOMapper;
|
||||
import com.njcn.harmonic.pojo.dto.ConverterIndexStatisticsDTO;
|
||||
import com.njcn.harmonic.pojo.param.SendQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.send.SubstationQualityStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.SubstationQualityStatisticsPOService;
|
||||
import com.njcn.harmonic.pojo.po.send.ConverterIndexStatisticsPO;
|
||||
import com.njcn.harmonic.service.send.ConverterIndexStatisticsPOService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.web.enums.GWSendEnum;
|
||||
import com.njcn.web.pojo.param.SendParam;
|
||||
@@ -27,7 +27,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/12/7 16:21【需求编号】
|
||||
* Date: 2023/12/11 11:35【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
@@ -35,42 +35,38 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class SubstationQualityStatisticsPOServiceImpl extends ServiceImpl<SubstationQualityStatisticsPOMapper, SubstationQualityStatisticsPO> implements SubstationQualityStatisticsPOService {
|
||||
|
||||
public class ConverterIndexStatisticsPOServiceImpl extends ServiceImpl<ConverterIndexStatisticsPOMapper, ConverterIndexStatisticsPO> implements ConverterIndexStatisticsPOService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
|
||||
@Override
|
||||
public Page<SubstationQualityStatisticsPO> queryPage(SendQueryParam.SendPageParam param) {
|
||||
Page<SubstationQualityStatisticsPO> page = new Page<> (param.getPageNum ( ), param.getPageSize ( ));
|
||||
public Page<ConverterIndexStatisticsPO> queryPage(SendQueryParam.SendPageParam param) {
|
||||
Page<ConverterIndexStatisticsPO> page = new Page<> (param.getPageNum ( ), param.getPageSize ( ));
|
||||
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(param.getDeptIndex()).getData();
|
||||
QueryWrapper<SubstationQualityStatisticsPO> wrapper = new QueryWrapper<>();
|
||||
wrapper.lambda().in(SubstationQualityStatisticsPO::getProvinceId,deptIds).
|
||||
between(SubstationQualityStatisticsPO::getStatisticalDate,param.getSearchBeginTime(),param.getSearchEndTime());
|
||||
Page<SubstationQualityStatisticsPO> substationQualityStatisticsPOPage = this.getBaseMapper().selectPage(page, wrapper);
|
||||
QueryWrapper<ConverterIndexStatisticsPO> wrapper = new QueryWrapper<>();
|
||||
wrapper.lambda().in(ConverterIndexStatisticsPO::getProvinceId,deptIds).
|
||||
between(ConverterIndexStatisticsPO::getStatisticalDate,param.getSearchBeginTime(),param.getSearchEndTime());
|
||||
Page<ConverterIndexStatisticsPO> converterdetailstatisticsPOPage = this.getBaseMapper().selectPage(page, wrapper);
|
||||
|
||||
return substationQualityStatisticsPOPage;
|
||||
return converterdetailstatisticsPOPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String send(List<String> ids) {
|
||||
|
||||
List<SubstationQualityStatisticsPO> list = this.lambdaQuery().eq(SubstationQualityStatisticsPO::getId, ids).list();
|
||||
List<ConverterIndexStatisticsPO> list = this.lambdaQuery().eq(ConverterIndexStatisticsPO::getId, ids).list();
|
||||
|
||||
if (list.size() > 100) {
|
||||
throw new BusinessException("一次最多上送100条数据");
|
||||
}
|
||||
List<SubstationQualityStatisticsDTO> substationQualityStatisticsDTOList = BeanUtil.copyToList(list, SubstationQualityStatisticsDTO.class);
|
||||
List<ConverterIndexStatisticsDTO> converterIndexStatisticsDTOS = BeanUtil.copyToList(list, ConverterIndexStatisticsDTO.class);
|
||||
SendParam param = new SendParam();
|
||||
param.setStats(substationQualityStatisticsDTOList);
|
||||
param.setStats(converterIndexStatisticsDTOS);
|
||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体 换流站指标统计明细数据接口数据:" + s + "开始----!");
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.SUBSTATION_MONITOR);
|
||||
Map<String, String> send = GwSendUtil.send(param, GWSendEnum.DETAIL_CREATE);
|
||||
log.info(Thread.currentThread().getName() + "获取返回体换流站指标统计明细数据接口响应结果:" + send + "结束----!");
|
||||
|
||||
List<String> trIds = substationQualityStatisticsDTOList.stream().map(SubstationQualityStatisticsDTO::getId).distinct().collect(Collectors.toList());
|
||||
List<String> trIds = converterIndexStatisticsDTOS.stream().map(ConverterIndexStatisticsDTO::getId).distinct().collect(Collectors.toList());
|
||||
return returnInformation(1, trIds, send);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user