算法提交
This commit is contained in:
@@ -0,0 +1,69 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:52【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_dim_station_target_d")
|
||||||
|
public class RDimStationTargetDPO extends BaseEntity {
|
||||||
|
@MppMultiId(value = "Org_Id")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
@MppMultiId(value = "Statis_Date")
|
||||||
|
private LocalDate statisDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计类型
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Target_Type")
|
||||||
|
private String targetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Voltage_Level")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Rate")
|
||||||
|
private Double limitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Rate")
|
||||||
|
private Double passRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Avg_Rate")
|
||||||
|
private Double limitAvgRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Avg_Rate")
|
||||||
|
private Double passAvgRate;
|
||||||
|
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_dim_station_target_m")
|
||||||
|
public class RDimStationTargetMPO extends BaseEntity {
|
||||||
|
@MppMultiId(value = "Org_Id")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
@MppMultiId(value = "Statis_Date")
|
||||||
|
private LocalDate statisDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计类型
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Target_Type")
|
||||||
|
private String targetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Voltage_Level")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Rate")
|
||||||
|
private Double limitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Rate")
|
||||||
|
private Double passRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Avg_Rate")
|
||||||
|
private Double limitAvgRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Avg_Rate")
|
||||||
|
private Double passAvgRate;
|
||||||
|
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.njcn.prepare.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_dim_station_target_y")
|
||||||
|
public class RDimStationTargetYPO extends BaseEntity {
|
||||||
|
|
||||||
|
@MppMultiId(value = "Org_Id")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
@MppMultiId(value = "Statis_Date")
|
||||||
|
private LocalDate statisDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计类型
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Target_Type")
|
||||||
|
private String targetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级
|
||||||
|
*/
|
||||||
|
@MppMultiId(value = "Voltage_Level")
|
||||||
|
private String voltageLevel;
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Rate")
|
||||||
|
private Double limitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Rate")
|
||||||
|
private Double passRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均超标占比(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Limit_Avg_Rate")
|
||||||
|
private Double limitAvgRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **kV变电站**指标平均合格率(%)
|
||||||
|
*/
|
||||||
|
@TableField(value = "Pass_Avg_Rate")
|
||||||
|
private Double passAvgRate;
|
||||||
|
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,6 +3,9 @@ package com.njcn.prepare.executor;
|
|||||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetDPOService;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetMPOService;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetYPOService;
|
||||||
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicOrgService;
|
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicOrgService;
|
||||||
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicService;
|
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicService;
|
||||||
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicVoltageService;
|
import com.njcn.prepare.harmonic.service.mysql.area.RStatHarmonicVoltageService;
|
||||||
@@ -42,6 +45,12 @@ public class OrgPointExecutor extends BaseExecutor{
|
|||||||
|
|
||||||
private final RAlarmCountService rAlarmCountService;
|
private final RAlarmCountService rAlarmCountService;
|
||||||
|
|
||||||
|
private final RDimStationTargetDPOService rDimStationTargetDPOService;
|
||||||
|
private final RDimStationTargetMPOService rDimStationTargetMPOService;
|
||||||
|
|
||||||
|
private final RDimStationTargetYPOService rDimStationTargetYPOService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -405,4 +414,34 @@ public class OrgPointExecutor extends BaseExecutor{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 河北主网新增算法表r_dim_station_target_d/m/y
|
||||||
|
*/
|
||||||
|
@LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "rDimStationTarget", nodeType = NodeTypeEnum.COMMON)
|
||||||
|
public boolean processRDimStationTargetAccess(NodeComponent bindCmp) {
|
||||||
|
return isAccess(bindCmp);
|
||||||
|
}
|
||||||
|
@LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "rDimStationTarget", nodeType = NodeTypeEnum.COMMON)
|
||||||
|
public void processRDimStationTargetProcess(NodeComponent bindCmp) {
|
||||||
|
String tag = bindCmp.getTag();
|
||||||
|
CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam = bindCmp.getRequestData();
|
||||||
|
if (tag.equalsIgnoreCase("r_dim_station_target_d")) {
|
||||||
|
//日表
|
||||||
|
rDimStationTargetDPOService.handleDay(calculatedParam);
|
||||||
|
} else if (tag.equalsIgnoreCase("r_dim_station_target_m")) {
|
||||||
|
//数据补招不执行非日表算法
|
||||||
|
if (!calculatedParam.isRepair()) {
|
||||||
|
//月表
|
||||||
|
rDimStationTargetMPOService.handleMonth(calculatedParam);
|
||||||
|
}
|
||||||
|
}else if (tag.equalsIgnoreCase("r_dim_station_target_y")) {
|
||||||
|
//数据补招不执行非日表算法
|
||||||
|
if (!calculatedParam.isRepair()) {
|
||||||
|
//年表
|
||||||
|
rDimStationTargetYPOService.handleYear(calculatedParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.njcn.prepare.harmonic.mapper.mysql.area;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetDPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:52【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetDPOMapper extends MppBaseMapper<RDimStationTargetDPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.prepare.harmonic.mapper.mysql.area;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetMPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetMPOMapper extends MppBaseMapper<RDimStationTargetMPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.prepare.harmonic.mapper.mysql.area;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetYPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetYPOMapper extends MppBaseMapper<RDimStationTargetYPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.area.RDimStationTargetDPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.po.RDimStationTargetDPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table r_dim_station_target_d-->
|
||||||
|
<id column="Org_Id" jdbcType="CHAR" property="orgId" />
|
||||||
|
<id column="Statis_Date" jdbcType="DATE" property="statisDate" />
|
||||||
|
<id column="Target_Type" jdbcType="CHAR" property="targetType" />
|
||||||
|
<id column="Voltage_Level" jdbcType="CHAR" property="voltageLevel" />
|
||||||
|
<result column="Limit_Rate" jdbcType="DOUBLE" property="limitRate" />
|
||||||
|
<result column="Pass_Rate" jdbcType="DOUBLE" property="passRate" />
|
||||||
|
<result column="Limit_Avg_Rate" jdbcType="DOUBLE" property="limitAvgRate" />
|
||||||
|
<result column="Pass_Avg_Rate" jdbcType="DOUBLE" property="passAvgRate" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate,
|
||||||
|
Pass_Avg_Rate, `State`, Create_By, Create_Time, Update_By, Update_Time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.area.RDimStationTargetMPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.po.RDimStationTargetMPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table r_dim_station_target_m-->
|
||||||
|
<id column="Org_Id" jdbcType="CHAR" property="orgId" />
|
||||||
|
<id column="Statis_Date" jdbcType="DATE" property="statisDate" />
|
||||||
|
<id column="Target_Type" jdbcType="CHAR" property="targetType" />
|
||||||
|
<id column="Voltage_Level" jdbcType="CHAR" property="voltageLevel" />
|
||||||
|
<result column="Limit_Rate" jdbcType="DOUBLE" property="limitRate" />
|
||||||
|
<result column="Pass_Rate" jdbcType="DOUBLE" property="passRate" />
|
||||||
|
<result column="Limit_Avg_Rate" jdbcType="DOUBLE" property="limitAvgRate" />
|
||||||
|
<result column="Pass_Avg_Rate" jdbcType="DOUBLE" property="passAvgRate" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate,
|
||||||
|
Pass_Avg_Rate, `State`, Create_By, Create_Time, Update_By, Update_Time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.area.RDimStationTargetYPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.po.RDimStationTargetYPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table r_dim_station_target_y-->
|
||||||
|
<id column="Org_Id" jdbcType="CHAR" property="orgId" />
|
||||||
|
<id column="Statis_Date" jdbcType="DATE" property="statisDate" />
|
||||||
|
<id column="Target_Type" jdbcType="CHAR" property="targetType" />
|
||||||
|
<id column="Voltage_Level" jdbcType="CHAR" property="voltageLevel" />
|
||||||
|
<result column="Limit_Rate" jdbcType="DOUBLE" property="limitRate" />
|
||||||
|
<result column="Pass_Rate" jdbcType="DOUBLE" property="passRate" />
|
||||||
|
<result column="Limit_Avg_Rate" jdbcType="DOUBLE" property="limitAvgRate" />
|
||||||
|
<result column="Pass_Avg_Rate" jdbcType="DOUBLE" property="passAvgRate" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate,
|
||||||
|
Pass_Avg_Rate, `State`, Create_By, Create_Time, Update_By, Update_Time
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql.Impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RStatEventVoltageDPO;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetDPO;
|
||||||
|
import com.njcn.prepare.harmonic.mapper.mysql.area.RDimStationTargetDPOMapper;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetDPOService;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RDimStationTargetDPOServiceImpl extends MppServiceImpl<RDimStationTargetDPOMapper, RDimStationTargetDPO> implements RDimStationTargetDPOService{
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleDay(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam) {
|
||||||
|
List<RStatEventVoltageDPO> rStatEventVoltageDPOS = new ArrayList<>();
|
||||||
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
LocalDate localDate = LocalDateTimeUtil.parseDate(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN);
|
||||||
|
|
||||||
|
|
||||||
|
/*获取暂态统计指标*/
|
||||||
|
List<DictData> eventStatis = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
|
|
||||||
|
/*获取数据类型*/
|
||||||
|
List<DictData> dataTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DATA_TYPE.getCode()).getData();
|
||||||
|
Map<String, DictData> dataTypeMap = dataTypeList.stream().collect(Collectors.toMap(DictData::getCode, dictData -> dictData));
|
||||||
|
|
||||||
|
/*获取监测点类型类型*/
|
||||||
|
List<DictData> lineSortList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_SORT.getCode()).getData();
|
||||||
|
Map<String, DictData> lineSortMap = lineSortList.stream().collect(Collectors.toMap(DictData::getCode, dictData -> dictData));
|
||||||
|
|
||||||
|
/*获取监测点电压等级*/
|
||||||
|
List<DictData> voltageList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||||
|
Map<String, DictData> voltageMap = voltageList.stream().collect(Collectors.toMap(DictData::getValue, dictData -> dictData));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql.Impl;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetMPO;
|
||||||
|
import com.njcn.prepare.harmonic.mapper.mysql.area.RDimStationTargetMPOMapper;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetMPOService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RDimStationTargetMPOServiceImpl extends MppServiceImpl<RDimStationTargetMPOMapper, RDimStationTargetMPO> implements RDimStationTargetMPOService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMonth(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql.Impl;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetYPO;
|
||||||
|
import com.njcn.prepare.harmonic.mapper.mysql.area.RDimStationTargetYPOMapper;
|
||||||
|
import com.njcn.prepare.harmonic.service.mysql.RDimStationTargetYPOService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RDimStationTargetYPOServiceImpl extends MppServiceImpl<RDimStationTargetYPOMapper, RDimStationTargetYPO> implements RDimStationTargetYPOService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleYear(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetDPO;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:49【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetDPOService extends IMppService<RDimStationTargetDPO> {
|
||||||
|
|
||||||
|
|
||||||
|
void handleDay(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetMPO;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetMPOService extends IMppService<RDimStationTargetMPO> {
|
||||||
|
|
||||||
|
|
||||||
|
void handleMonth(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.prepare.harmonic.service.mysql;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.bo.CalculatedParam;
|
||||||
|
import com.njcn.prepare.harmonic.pojo.po.RDimStationTargetYPO;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/11/20 9:56【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface RDimStationTargetYPOService extends IMppService<RDimStationTargetYPO> {
|
||||||
|
|
||||||
|
|
||||||
|
void handleYear(CalculatedParam<DeptGetChildrenMoreDTO> calculatedParam);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user