切换mysql为达梦数据库-代码审查
1.supervision-boot模块
This commit is contained in:
@@ -92,7 +92,7 @@ public class CarryCapacityResultPO extends BaseEntity {
|
||||
/**
|
||||
* 是否删除(0,无效,1有效)
|
||||
*/
|
||||
@TableField(value = "`status`")
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "evaluate_type")
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CarryCapacityStrategyDhlPO extends BaseEntity {
|
||||
/**
|
||||
* 充电桩,电弧炉,电气化铁路
|
||||
*/
|
||||
@TableField(value = "`type`")
|
||||
@TableField(value = "type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ public class CarryCapacityStrategyPO extends BaseEntity {
|
||||
/**
|
||||
* 总承载能力评估结果(1-安全,2-III级预警,3-II级预警,4-I 级预警)
|
||||
*/
|
||||
@TableField(value = "`result`")
|
||||
@TableField(value = "result")
|
||||
private Integer result;
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ public class CarryCapacityStrategyPO extends BaseEntity {
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@TableField(value = "`count`")
|
||||
@TableField(value = "count")
|
||||
private Integer count;
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RedisConfig {
|
||||
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
// 指定要序列化的域(field,get,set),访问修饰符(public,private,protected)
|
||||
//解决Java 8 date/time type `java.time.Instant` not supported
|
||||
//解决Java 8 date/time type java.time.Instant not supported
|
||||
objectMapper.registerModule(new JavaTimeModule());
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.registerModule(new SimpleModule().addDeserializer(Instant.class, new InstantDateDeserializer()));
|
||||
|
||||
@@ -3,16 +3,11 @@ package com.njcn.device.biz.commApi;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.fallback.CommLedgerDeptClientFallbackFactory;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
public interface CommLineClient {
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* @param id id
|
||||
* @Description: 获取监测点信息
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/22 11:11
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.njcn.device.biz.commApi;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
@@ -12,8 +10,6 @@ import com.njcn.device.biz.pojo.param.MonitorGetParam;
|
||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@@ -4,6 +4,10 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
*/
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RunFlagEnum {
|
||||
|
||||
@@ -14,10 +14,8 @@ import com.njcn.device.pms.pojo.param.*;
|
||||
import com.njcn.device.pms.pojo.po.*;
|
||||
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
||||
import com.njcn.device.pms.service.majornetwork.ITerminalLogService;
|
||||
import com.njcn.device.pms.service.majornetwork.ITerminalService;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
@@ -25,11 +23,8 @@ import org.aspectj.lang.annotation.*;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.security.auth.Subject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
SELECT DISTINCT
|
||||
monitor.Org_Id AS orgId,
|
||||
monitor.Org_Name AS orgName,
|
||||
monitor.`Powerr_Id` AS powerId,
|
||||
monitor.`Powerr_Name` AS powerName,
|
||||
monitor.Powerr_Id AS powerId,
|
||||
monitor.Powerr_Name AS powerName,
|
||||
monitor.id AS monitorId,
|
||||
monitor.`Name` AS monitorName,
|
||||
monitor.Name AS monitorName,
|
||||
monitor.Line_Id,
|
||||
monitor.Line_Name,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
@@ -29,8 +29,8 @@
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`,
|
||||
pm.`Status`,
|
||||
pm.Name,
|
||||
pm.Status,
|
||||
pm.Org_Id,
|
||||
pm.Org_Name,
|
||||
pm.Powerr_Id,
|
||||
@@ -52,8 +52,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`,
|
||||
ppd.`Status`,
|
||||
ppd.Name,
|
||||
ppd.Status,
|
||||
ppd.Org_Id,
|
||||
ppd.Org_Name,
|
||||
ppd.Power_Station_Id,
|
||||
@@ -66,8 +66,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppc.id,
|
||||
ppc.`Name`,
|
||||
ppc.`Status`,
|
||||
ppc.Name,
|
||||
ppc.Status,
|
||||
ppc.Org_Id,
|
||||
ppc.Org_Name,
|
||||
ppc.Power_Station_Id,
|
||||
@@ -82,8 +82,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppgu.id,
|
||||
ppgu.`Name`,
|
||||
ppgu.`Status`,
|
||||
ppgu.Name,
|
||||
ppgu.Status,
|
||||
ppgu.Org_Id,
|
||||
ppgu.Org_Name,
|
||||
ppgu.Power_Station_Id,
|
||||
@@ -97,8 +97,8 @@
|
||||
)) AS monitor
|
||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||
WHERE
|
||||
monitor.`Status` = 1
|
||||
AND pdm.`Status` = 1
|
||||
monitor.Status = 1
|
||||
AND pdm.Status = 1
|
||||
AND monitor.Org_Id IN
|
||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||
#{orgId}
|
||||
@@ -131,17 +131,17 @@
|
||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
SELECT DISTINCT
|
||||
monitor.Org_Id AS orgId,
|
||||
monitor.Org_Name AS orgName,
|
||||
monitor.`Powerr_Id` AS powerId,
|
||||
monitor.`Powerr_Name` AS powerName,
|
||||
monitor.Powerr_Id AS powerId,
|
||||
monitor.Powerr_Name AS powerName,
|
||||
monitor.id AS monitorId,
|
||||
monitor.`Name` AS monitorName,
|
||||
monitor.Name AS monitorName,
|
||||
monitor.Line_Id,
|
||||
monitor.Line_Name,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
@@ -158,8 +158,8 @@
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`,
|
||||
pm.`Status`,
|
||||
pm.Name,
|
||||
pm.Status,
|
||||
pm.Org_Id,
|
||||
pm.Org_Name,
|
||||
pm.Powerr_Id,
|
||||
@@ -180,8 +180,8 @@
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`,
|
||||
ppd.`Status`,
|
||||
ppd.Name,
|
||||
ppd.Status,
|
||||
ppd.Org_Id,
|
||||
ppd.Org_Name,
|
||||
ppd.Power_Station_Id,
|
||||
@@ -194,8 +194,8 @@
|
||||
) AS monitor
|
||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||
WHERE
|
||||
monitor.`Status` = 1
|
||||
AND pdm.`Status` = 1
|
||||
monitor.Status = 1
|
||||
AND pdm.Status = 1
|
||||
AND monitor.Org_Id IN
|
||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||
#{orgId}
|
||||
@@ -228,7 +228,7 @@
|
||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -239,26 +239,26 @@
|
||||
<select id="getPwMonitorName" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
select
|
||||
id as monitorId,
|
||||
`Name` as monitorName
|
||||
Name as monitorName
|
||||
from
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`
|
||||
pm.Name
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
) UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`
|
||||
ppd.Name
|
||||
FROM
|
||||
pms_power_distributionarea AS ppd
|
||||
) UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ppc.id,
|
||||
ppc.`Name`
|
||||
ppc.Name
|
||||
FROM
|
||||
pms_power_client as ppc
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
(
|
||||
SELECT
|
||||
ppgu.id,
|
||||
ppgu.`Name`
|
||||
ppgu.Name
|
||||
FROM
|
||||
pms_power_generation_user AS ppgu
|
||||
)
|
||||
@@ -280,15 +280,15 @@
|
||||
</if>
|
||||
</where>
|
||||
<if test="name !=null and name != ''">
|
||||
AND `Name` LIKE CONCAT('%',#{name},'%')
|
||||
AND Name LIKE CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPwMonitorDataNewList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
SELECT
|
||||
pdm.Org_Id AS orgId,
|
||||
ps.Org_Name AS orgName,
|
||||
pdm.`Power_Station_Id` AS powerId,
|
||||
ps.`Power_Name` AS powerName,
|
||||
pdm.Power_Station_Id AS powerId,
|
||||
ps.Power_Name AS powerName,
|
||||
pdm.Monitor_Id AS monitorId,
|
||||
pdm.Line_Id,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
Org_Id as Org_Id ,
|
||||
Voltage_Level as Voltage_Level,
|
||||
1 as If_Power_User,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.`Code`="Run" and st.`Code`="Line_State") as Monitor_State,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.Code="Run" and st.Code="Line_State") as Monitor_State,
|
||||
now() as Created_Date,
|
||||
1 as Status,
|
||||
now() as Create_Time,
|
||||
@@ -58,7 +58,7 @@
|
||||
Org_Id as Org_Id ,
|
||||
Voltage_Level as Voltage_Level,
|
||||
1 as If_Power_User,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.`Code`="Run" and st.`Code`="Line_State") as Monitor_State,
|
||||
(select sd.id from sys_dict_data sd INNER JOIN sys_dict_type st on st.id=sd.Type_Id where sd.Code="Run" and st.Code="Line_State") as Monitor_State,
|
||||
now() as Created_Date,
|
||||
1 as Status,
|
||||
now() as Create_Time,
|
||||
|
||||
@@ -95,14 +95,14 @@
|
||||
pm.Powerr_Id AS powerId,
|
||||
pm.Powerr_Name AS powerName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pm.Voltage_Level AS monitorVoltageLevel,
|
||||
pm.Monitor_Type AS monitorType,
|
||||
pm.Monitor_State AS monitorState
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
WHERE
|
||||
pm.`Status` = 1
|
||||
pm.Status = 1
|
||||
AND pm.Id IN
|
||||
<foreach collection="pmsMonitorInfoParam.monitorIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
@@ -126,7 +126,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pmsMonitorInfoParam.monitorName != null and pmsMonitorInfoParam.monitorName != ''">
|
||||
AND pm.`Name` LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%')
|
||||
AND pm.Name LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getMonitorTerminal" resultType="com.njcn.device.pms.pojo.vo.MonitorVO">
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
pg.id AS generatrixId,
|
||||
pm.Line_Name AS generatrixName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pg.Scale AS generatrixVoltageLevel
|
||||
FROM
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_monitor AS pm ON pm.line_id = pg.id
|
||||
WHERE
|
||||
pm.`Status` = 1
|
||||
AND pg.`Status` =1
|
||||
pm.Status = 1
|
||||
AND pg.Status =1
|
||||
AND pg.id IN
|
||||
<foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
@@ -54,8 +54,8 @@
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
|
||||
WHERE
|
||||
pg.`Status` = 1
|
||||
AND pss.`Status` = 1
|
||||
pg.Status = 1
|
||||
AND pss.Status = 1
|
||||
<if test="param.powerStationId != null and param.powerStationId !=''">
|
||||
AND pss.Power_Id = #{param.powerStationId}
|
||||
</if>
|
||||
@@ -83,8 +83,8 @@
|
||||
pms_generatrix_wire AS pg
|
||||
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
|
||||
WHERE
|
||||
pg.`Status` = 1
|
||||
AND pss.`Status` = 1
|
||||
pg.Status = 1
|
||||
AND pss.Status = 1
|
||||
<if test="param.generatrixIds != null and param.generatrixIds.size() >0 ">
|
||||
AND pg.id IN
|
||||
<foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<select id="selectPVCapacity" resultType="com.njcn.device.pms.pojo.vo.PVCapacity">
|
||||
SELECT
|
||||
sum( P_Capacity ) AS sumCount,
|
||||
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea
|
||||
( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
|
||||
<where>
|
||||
org_id IN
|
||||
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||
@@ -15,7 +15,7 @@
|
||||
AND STATUS = 1
|
||||
</where>
|
||||
) AS sumOrgCount,
|
||||
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea
|
||||
( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
|
||||
<where>
|
||||
org_id IN
|
||||
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<select id="getMonitorInfo" resultType="com.njcn.device.pms.pojo.po.PmsMonitorPO">
|
||||
SELECT
|
||||
id,
|
||||
`Name`,
|
||||
Name,
|
||||
Org_Name AS orgName,
|
||||
Org_Id AS orgId,
|
||||
Operation_Name AS operationName,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||
SELECT
|
||||
pm.Id,
|
||||
pm.`Name`,
|
||||
pm.Name,
|
||||
pm.Org_Name,
|
||||
pm.Org_Id,
|
||||
pm.Powerr_Name,
|
||||
@@ -20,9 +20,9 @@
|
||||
LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id
|
||||
LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id
|
||||
<where>
|
||||
pm.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
AND pm.`Monitor_State` = #{status}
|
||||
pm.Status = 1
|
||||
AND ps.Status = 1
|
||||
AND pm.Monitor_State = #{status}
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pm.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -99,7 +99,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -126,7 +126,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -154,7 +154,7 @@
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
AND t.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
@@ -185,7 +185,7 @@
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisRailwayVO">
|
||||
SELECT
|
||||
DISTINCT pts.Id,
|
||||
pts.`Name`,
|
||||
pts.Name,
|
||||
pts.Org_Name,
|
||||
pts.Railway_Line_Name,
|
||||
pts.Org_Id,
|
||||
@@ -200,8 +200,8 @@
|
||||
LEFT JOIN pms_statation_stat ps ON pts.Power_Id = ps.Power_Id
|
||||
LEFT JOIN pms_traction_station_expand ptse ON ptse.traction_Station_Id = pts.Id
|
||||
<where>
|
||||
pts.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
pts.Status = 1
|
||||
AND ps.Status = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pts.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
pm.Powerr_Name AS powerName,
|
||||
pgw.name AS busBarName,
|
||||
pm.Id AS monitorId,
|
||||
pm.`Name` AS monitorName,
|
||||
pm.Name AS monitorName,
|
||||
pss.Voltage_Level AS powerVoltageLevel
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
|
||||
SELECT
|
||||
pts.Id AS id,
|
||||
pts.`NAME` AS name,
|
||||
ptse.`railway_type` AS railwayType,
|
||||
pts.NAME AS name,
|
||||
ptse.railway_type AS railwayType,
|
||||
pts.Org_Name AS orgName,
|
||||
pts.Org_Id AS orgId,
|
||||
pts.Operation_Name AS operationName,
|
||||
@@ -24,7 +24,7 @@
|
||||
pts.Created_Date AS createdDate,
|
||||
pts.User_Tag AS userTag,
|
||||
pts.Is_Up_To_Grid AS isUpToGrid,
|
||||
pts.`STATUS` AS `status`,
|
||||
pts.STATUS AS status,
|
||||
pts.Create_By AS createBy,
|
||||
pts.Create_Time AS createTime,
|
||||
pts.Update_By AS updateBy,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
SELECT
|
||||
dev.id as id,
|
||||
dev.pid as pid,
|
||||
dev.NAME as `name`,
|
||||
dev.NAME as name,
|
||||
pd.Run_Flag as devFlag,
|
||||
b.*
|
||||
FROM
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
CONVERT (
|
||||
SUM( real_time )* 100 / SUM( due_time ),
|
||||
DECIMAL ( 15, 2 )) AS integrityRate,
|
||||
sum( real_time ) `realTime`,
|
||||
sum( real_time ) realTime,
|
||||
sum( due_time ) dueTime
|
||||
FROM
|
||||
r_stat_integrity_d
|
||||
|
||||
@@ -43,10 +43,10 @@ public interface LineDetailMapper extends BaseMapper<LineDetail> {
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineDetailDataVO> getLineDetailInfo(@Param("lineIds") List<String> lineIds);
|
||||
@Select ("select count(1) from pq_line a where a.`Level`=4 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
@Select ("select count(1) from pq_line a where a.Level=4 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
Integer getDeviceCountBySubstation(@Param("subIndex")String subIndex);
|
||||
|
||||
@Select ("select count(1) from pq_line a where a.`Level`=6 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
@Select ("select count(1) from pq_line a where a.Level=6 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
Integer getLineCountBySubstation(@Param("subIndex")String subIndex);
|
||||
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
"\tpq_line,\n" +
|
||||
"\tpq_device\n" +
|
||||
"WHERE\n" +
|
||||
"\tpq_line.`Level` = 6\n" +
|
||||
"\tpq_line.Level = 6\n" +
|
||||
"AND SUBSTRING_INDEX(\n" +
|
||||
"\tSUBSTRING_INDEX(pq_line.Pids, ',', 5),\n" +
|
||||
"\t',' ,- 1\n" +
|
||||
|
||||
@@ -10,7 +10,7 @@ FROM
|
||||
SELECT
|
||||
d.NAME type,
|
||||
d.id typeId,
|
||||
d.`Level`,
|
||||
d.Level,
|
||||
max( a.Occurred_Time ) occurredTime,
|
||||
c.NAME subName,
|
||||
b.NAME devLineName,
|
||||
@@ -63,7 +63,7 @@ FROM
|
||||
SELECT
|
||||
f.NAME type,
|
||||
f.id typeId,
|
||||
f.`Level`,
|
||||
f.Level,
|
||||
max(a.Occurred_Time) occurredTime,
|
||||
e.NAME subName,
|
||||
b.NAME devLineName,
|
||||
@@ -125,7 +125,7 @@ ORDER BY
|
||||
SELECT
|
||||
a.id,
|
||||
a.occurred_time,
|
||||
b.`level`,
|
||||
b.level,
|
||||
a.Remark,
|
||||
a.flag,
|
||||
b.name type,
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
<select id="getAlarmStrategyData" resultType="AlarmStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
B.`Name` name,
|
||||
A.`Integrity_Value` integrityValue,
|
||||
A.`Online_Value` onlineValue,
|
||||
A.`Offtime_Value` offTimeValue,
|
||||
A.`Warn_Value` warnValue,
|
||||
A.`Update_Time` updateTime,
|
||||
C.`Name` updateBy
|
||||
A.Id id,
|
||||
B.Name name,
|
||||
A.Integrity_Value integrityValue,
|
||||
A.Online_Value onlineValue,
|
||||
A.Offtime_Value offTimeValue,
|
||||
A.Warn_Value warnValue,
|
||||
A.Update_Time updateTime,
|
||||
C.Name updateBy
|
||||
FROM
|
||||
pqs_alarm_strategy A,
|
||||
sys_dict_data B,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<if test="type == 1">
|
||||
pq_dept_line.id unitId,
|
||||
point.id pointId,
|
||||
lineDetail.Time_Interval as `interval`,
|
||||
lineDetail.Time_Interval as interval,
|
||||
lineDetail.load_type lineTag,
|
||||
dic.id voltageLevel,
|
||||
dev.id devId,
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
<select id="selectLineTable" resultType="com.njcn.device.pq.pojo.po.DevFuction">
|
||||
SELECT pd.id "lineId" FROM pq_device pd
|
||||
inner join pq_line pl on pd.id = pl.id
|
||||
where pl.`Level` = 4
|
||||
where pl.Level = 4
|
||||
</select>
|
||||
<select id="selectDictTable" resultType="com.njcn.device.pq.pojo.po.DevFuction">
|
||||
select sdd.id "fucName" from sys_dict_type sdt
|
||||
inner join sys_dict_data sdd on sdd.Type_Id = sdt.Id
|
||||
where sdt.`Code` = 'Dev_Fun'
|
||||
where sdt.Code = 'Dev_Fun'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
<select id="getMinDeviceLevel" resultType="DeviceOnlineDataDTO">
|
||||
SELECT
|
||||
a.`Id` deviceId,
|
||||
e.`Line_Grade` lineGrade,
|
||||
f.`Name` levelName,
|
||||
a.Id deviceId,
|
||||
e.Line_Grade lineGrade,
|
||||
f.Name levelName,
|
||||
MIN(f.Algo_Describe)
|
||||
FROM
|
||||
pq_line a,
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<select id="getMinDeviceLevelById" resultType="DeviceOnlineDataDTO">
|
||||
SELECT
|
||||
a.`Id` deviceId,e.`Line_Grade` lineGrade,f.`Name` levelName,MIN(f.Algo_Describe)
|
||||
a.Id deviceId,e.Line_Grade lineGrade,f.Name levelName,MIN(f.Algo_Describe)
|
||||
FROM
|
||||
pq_line a,
|
||||
pq_line b,
|
||||
@@ -50,11 +50,11 @@
|
||||
|
||||
<select id="getDeviceFatherData" resultType="DeviceOnlineTabVO">
|
||||
SELECT
|
||||
a.`Id` deviceId,
|
||||
a.`Name` deviceName,
|
||||
b.`Name` subName,
|
||||
c.`Name` gdName,
|
||||
e.`Name` provinceName
|
||||
a.Id deviceId,
|
||||
a.Name deviceName,
|
||||
b.Name subName,
|
||||
c.Name gdName,
|
||||
e.Name provinceName
|
||||
FROM
|
||||
pq_line a,
|
||||
pq_line b,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</foreach>
|
||||
AND
|
||||
</if>
|
||||
A1.`Level` = 6 AND A1.Id = B.Id AND
|
||||
A1.Level = 6 AND A1.Id = B.Id AND
|
||||
A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.Id = C.Id AND
|
||||
C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0 AND A1.Id = D.Id
|
||||
</select>
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
|
||||
<select id="getMonitorDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
select a.id pointId,a.name pointName,b.Time_Interval `interval`
|
||||
select a.id pointId,a.name pointName,b.Time_Interval interval
|
||||
from pq_line a
|
||||
inner join pq_line_detail b on a.id=b.id
|
||||
where a.id = #{monitorId}
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
DISTINCT
|
||||
sub.id,
|
||||
sub.pid,
|
||||
sub.`Level`,
|
||||
sub.Level,
|
||||
sub.sort,
|
||||
sub.`Name`,
|
||||
sdd.`Name` AS subScale
|
||||
sub.Name,
|
||||
sdd.Name AS subScale
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line wire ON line.pid = wire.id
|
||||
@@ -70,18 +70,18 @@
|
||||
line.Id as 'id',
|
||||
line.pid as 'pid',
|
||||
line.Pids as 'pids',
|
||||
line.`Name` AS 'name',
|
||||
line.`Level`as 'Level',
|
||||
line.Name AS 'name',
|
||||
line.Levelas 'Level',
|
||||
pd.Update_Time AS 'updateTime',
|
||||
line.Sort as 'sort',
|
||||
pd.Com_Flag as 'ComFlag',
|
||||
sdd.`Name` AS 'LineScale',
|
||||
device.`Name` AS 'deviceName',
|
||||
sdd.Name AS 'LineScale',
|
||||
device.Name AS 'deviceName',
|
||||
pd.IP AS 'ip',
|
||||
msdd.`Name` AS 'manufacturer',
|
||||
pldsdd.`Name` AS 'lineGradeName',
|
||||
pldsdd.`id` AS 'lineGrade',
|
||||
pldsdd.Algo_Describe AS `algoDescribe`,
|
||||
msdd.Name AS 'manufacturer',
|
||||
pldsdd.Name AS 'lineGradeName',
|
||||
pldsdd.id AS 'lineGrade',
|
||||
pldsdd.Algo_Describe AS algoDescribe,
|
||||
pld.Load_Type AS 'loadType'
|
||||
FROM
|
||||
pq_line AS line
|
||||
@@ -92,9 +92,9 @@
|
||||
LEFT JOIN sys_dict_data AS sdd ON sdd.id = pv.Scale
|
||||
LEFT JOIN pq_line_detail AS pld ON line.id = pld.Id
|
||||
LEFT JOIN sys_dict_data AS pldsdd ON pld.Line_Grade = pldsdd.id
|
||||
LEFT JOIN sys_dict_data AS msdd ON pd.Manufacturer = msdd.`id`
|
||||
LEFT JOIN sys_dict_data AS msdd ON pd.Manufacturer = msdd.id
|
||||
WHERE
|
||||
line.`Level` = 6
|
||||
line.Level = 6
|
||||
AND
|
||||
line.id in
|
||||
<foreach collection="lineIndexes" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -448,18 +448,18 @@
|
||||
<select id="getBaseLineInfo" resultType="BaseLineInfo">
|
||||
<!-- SELECT-->
|
||||
<!-- line.Id,-->
|
||||
<!-- area.`Name` provincialName,-->
|
||||
<!-- gd.`Name` gdName,-->
|
||||
<!-- substation.`Name` subName,-->
|
||||
<!-- subscale.`Name` subScale,-->
|
||||
<!-- device.`Name` deviceName,-->
|
||||
<!-- area.Name provincialName,-->
|
||||
<!-- gd.Name gdName,-->
|
||||
<!-- substation.Name subName,-->
|
||||
<!-- subscale.Name subScale,-->
|
||||
<!-- device.Name deviceName,-->
|
||||
<!-- pqdevice.IP networkParam,-->
|
||||
<!-- pqdevice.Com_Flag comState,-->
|
||||
<!-- factory.`Name` factoryName,-->
|
||||
<!-- factory.Name factoryName,-->
|
||||
<!-- pqdevice.Update_Time time,-->
|
||||
<!-- voltage.`Name` subvName,-->
|
||||
<!-- scale.`Name` subvScale,-->
|
||||
<!-- line.`Name` lineName,-->
|
||||
<!-- voltage.Name subvName,-->
|
||||
<!-- scale.Name subvScale,-->
|
||||
<!-- line.Name lineName,-->
|
||||
<!-- line.Sort-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_line line,-->
|
||||
@@ -497,18 +497,18 @@
|
||||
|
||||
select
|
||||
line.Id,
|
||||
line.`Name` lineName,
|
||||
area.`Name` provincialName,
|
||||
gd.`Name` gdName,
|
||||
substation.`Name` subName,
|
||||
subscale.`Name` subScale,
|
||||
device.`Name` deviceName,
|
||||
line.Name lineName,
|
||||
area.Name provincialName,
|
||||
gd.Name gdName,
|
||||
substation.Name subName,
|
||||
subscale.Name subScale,
|
||||
device.Name deviceName,
|
||||
voltage.Name subvName,
|
||||
subvscale.Name subvScale,
|
||||
pqdevice.IP networkParam,
|
||||
pqdevice.Com_Flag comState,
|
||||
pqdevice.Update_Time time,
|
||||
factory.`Name` factoryName
|
||||
factory.Name factoryName
|
||||
from
|
||||
pq_line line,
|
||||
pq_line voltage,
|
||||
@@ -537,25 +537,25 @@
|
||||
and device.Id = pqdevice.Id
|
||||
and pqdevice.Manufacturer = factory.id
|
||||
and substation.Id = pqsubstation.Id
|
||||
and pqsubstation.`Scale` = subscale.Id
|
||||
and pqsubstation.Scale = subscale.Id
|
||||
and voltage.Id = pqvoltage.Id
|
||||
and pqvoltage.`Scale` = subvscale.Id
|
||||
and pqvoltage.Scale = subvscale.Id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getBaseLineAreaInfo" resultType="AreaLineInfoVO">
|
||||
SELECT
|
||||
line.Id lineId,
|
||||
line.`Name` lineName,
|
||||
gd.`Name` gdName,
|
||||
line.Name lineName,
|
||||
gd.Name gdName,
|
||||
substation.id subId,
|
||||
substation.`Name` subName,
|
||||
substation.Name subName,
|
||||
subscale.name subScale,
|
||||
pqdevice.IP ip,
|
||||
factory.`Name` manufacturer,
|
||||
factory.Name manufacturer,
|
||||
voltage.id voltageId,
|
||||
voltage.`Name` voltageName,
|
||||
scale.`Name` voltageScale,
|
||||
voltage.Name voltageName,
|
||||
scale.Name voltageScale,
|
||||
pqdevice.run_flag,
|
||||
pqdevice.com_flag,
|
||||
pqsubstation.Lng,
|
||||
@@ -649,8 +649,8 @@
|
||||
|
||||
<select id="getSubstationInfo" resultType="PollutionSubstationDTO">
|
||||
SELECT A.id,
|
||||
A.`Name` name,
|
||||
C.`Name` voltageLevel
|
||||
A.Name name,
|
||||
C.Name voltageLevel
|
||||
FROM pq_line A,
|
||||
pq_substation B,
|
||||
sys_dict_data C
|
||||
@@ -662,7 +662,7 @@
|
||||
<select id="getLineInfo" resultType="PollutionLineDTO">
|
||||
SELECT
|
||||
A.Id,
|
||||
A.`Name`,
|
||||
A.Name,
|
||||
A1.Name busBar,
|
||||
A3.Name substation,
|
||||
A3.Id substationId,
|
||||
@@ -707,10 +707,10 @@
|
||||
<select id="getWarningSub" resultType="WarningSubstationDTO">
|
||||
SELECT
|
||||
A1.Id,
|
||||
A1.`Name` subName,
|
||||
B.`Name` scale,
|
||||
A2.`Name` city,
|
||||
D.`Name` province
|
||||
A1.Name subName,
|
||||
B.Name scale,
|
||||
A2.Name city,
|
||||
D.Name province
|
||||
FROM
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
@@ -723,21 +723,21 @@
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.`Name` = D.Area_Code AND A1.Id = C.Id AND C.Scale = B.Id
|
||||
AND A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.Name = D.Area_Code AND A1.Id = C.Id AND C.Scale = B.Id
|
||||
</select>
|
||||
|
||||
<select id="getOverLimitLineInfo" resultType="OverLimitLineDTO">
|
||||
SELECT
|
||||
A1.id,
|
||||
A1.`Name` lineName,
|
||||
C1.`Name` lineScale,
|
||||
C2.`Name` loadType,
|
||||
A1.Name lineName,
|
||||
C1.Name lineScale,
|
||||
C2.Name loadType,
|
||||
D.Obj_Name lineObjectName,
|
||||
D.Monitor_Id monitorNumber,
|
||||
A4.`Name` subName,
|
||||
C3.`Name` subScale,
|
||||
A5.`Name` cityCompany,
|
||||
F.`Name` provinceCompany,
|
||||
A4.Name subName,
|
||||
C3.Name subScale,
|
||||
A5.Name cityCompany,
|
||||
F.Name provinceCompany,
|
||||
dev.Manufacturer
|
||||
FROM
|
||||
pq_line A1,
|
||||
@@ -761,7 +761,7 @@
|
||||
</foreach>
|
||||
AND A1.Pid = A2.Id AND A2.Id = B.Id AND B.Scale = C1.Id AND A1.Id = D.Id AND D.Load_Type = C2.Id
|
||||
AND A2.Pid = A3.Id AND A3.Pid = A4.Id AND A4.Pid = A5.Id AND A4.Id = E.Id AND E.Scale = C3.Id
|
||||
AND A5.Pid = A6.Id AND A6.`Name` = F.Area_Code and A3.id = dev.id
|
||||
AND A5.Pid = A6.Id AND A6.Name = F.Area_Code and A3.id = dev.id
|
||||
</select>
|
||||
|
||||
<select id="getDeviceStatus" resultType="LineStateVO">
|
||||
@@ -802,7 +802,7 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name`
|
||||
Name
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
@@ -817,7 +817,7 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
A.Name name,
|
||||
D.run_flag runFlag,
|
||||
D.com_flag comFlag
|
||||
FROM
|
||||
@@ -972,8 +972,8 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`level`,
|
||||
`Name`
|
||||
level,
|
||||
Name
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
@@ -1018,7 +1018,7 @@
|
||||
pq_line_detail B,
|
||||
pq_device C
|
||||
WHERE
|
||||
A1.`Level` = 6 AND A1.Id = B.Id AND
|
||||
A1.Level = 6 AND A1.Id = B.Id AND
|
||||
A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.Id = C.Id AND
|
||||
C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0
|
||||
</select>
|
||||
@@ -1156,7 +1156,7 @@
|
||||
<select id="getLineBySubStation" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
SELECT
|
||||
pq_line.id pointId,
|
||||
lineDetail.Time_Interval `interval`,
|
||||
lineDetail.Time_Interval interval,
|
||||
dev.id devId,
|
||||
device.com_flag
|
||||
FROM
|
||||
@@ -1177,7 +1177,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getMonitorListDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
select line.id pointId,dev.id devId,0 type,1 lineType,lineDetail.Time_Interval as `interval`
|
||||
select line.id pointId,dev.id devId,0 type,1 lineType,lineDetail.Time_Interval as interval
|
||||
from pq_line line
|
||||
inner join pq_line_detail lineDetail on line.id = lineDetail.id
|
||||
inner join pq_line subv on line.pid = subv.id
|
||||
@@ -1726,7 +1726,7 @@
|
||||
left join pq_line pl6 on pl5.pId = pl6.Id
|
||||
left join pq_voltage pv on pv.Id = pl2.Id
|
||||
left join pq_device pd on pl3.Id = pd.Id
|
||||
left join sys_dict_data sdd on pv.`Scale` = sdd.Id
|
||||
left join sys_dict_data sdd on pv.Scale = sdd.Id
|
||||
<where>
|
||||
<if test="ids!=null and ids.size() > 0">
|
||||
pl.Id IN
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
<select id="getDeviceLogData" resultType="DeviceLogVO">
|
||||
SELECT
|
||||
A.`Name` name,
|
||||
B.`Name` type,
|
||||
C.`Name` updateBy
|
||||
A.Name name,
|
||||
B.Name type,
|
||||
C.Name updateBy
|
||||
FROM
|
||||
pq_line A,
|
||||
sys_dict_data B,
|
||||
@@ -18,9 +18,9 @@
|
||||
AND C.Id = #{updateBys}
|
||||
</select>
|
||||
<!-- SELECT-->
|
||||
<!-- A.`Name` name,-->
|
||||
<!-- B.`Name` type,-->
|
||||
<!-- C.`Name` updateBy-->
|
||||
<!-- A.Name name,-->
|
||||
<!-- B.Name type,-->
|
||||
<!-- C.Name updateBy-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_line A,-->
|
||||
<!-- sys_dict_data B,-->
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
<select id="getEventLogData" resultType="EventLogVO">
|
||||
SELECT
|
||||
A.`Name` line,
|
||||
A3.`Name` substation,
|
||||
A4.`Name` powerCompany
|
||||
A.Name line,
|
||||
A3.Name substation,
|
||||
A4.Name powerCompany
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_line A1,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
SELECT
|
||||
dev.id as id,
|
||||
dev.pid as pid,
|
||||
dev.NAME as `name`,
|
||||
dev.NAME as name,
|
||||
pd.Run_Flag as devFlag,
|
||||
b.*
|
||||
FROM
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<!--<select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO">
|
||||
SELECT
|
||||
sdd.`Name` "type",
|
||||
sdd.Name "type",
|
||||
ptl.Create_By "updateBy",
|
||||
ptl.Create_Time "updateTime",
|
||||
ptl.`Terminal_Describe` "remark"
|
||||
ptl.Terminal_Describe "remark"
|
||||
FROM
|
||||
pqs_terminal_logs ptl
|
||||
LEFT JOIN sys_dict_data sdd ON sdd.Id = ptl.`Terminal_Type`
|
||||
LEFT JOIN sys_dict_data sdd ON sdd.Id = ptl.Terminal_Type
|
||||
<where>
|
||||
<if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''">
|
||||
and date_format(ptl.Create_Time,'%y%m%d') >= date_format(#{logsListParam.searchBeginTime},'%y%m%d')
|
||||
@@ -30,13 +30,13 @@
|
||||
</select>-->
|
||||
<select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO">
|
||||
SELECT
|
||||
sdd.`Name` "type",
|
||||
sdd.Name "type",
|
||||
ptl.Create_By "updateBy",
|
||||
ptl.Create_Time "updateTime",
|
||||
ptl.`Terminal_Describe` "remark"
|
||||
ptl.Terminal_Describe "remark"
|
||||
FROM
|
||||
pqs_terminal_logs ptl
|
||||
LEFT JOIN sys_dict_data sdd ON sdd.Id = ptl.`Terminal_Type`
|
||||
LEFT JOIN sys_dict_data sdd ON sdd.Id = ptl.Terminal_Type
|
||||
<where>
|
||||
<if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''">
|
||||
and date_format(ptl.Create_Time,'%y%m%d') >= date_format(#{logsListParam.searchBeginTime},'%y%m%d')
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
|
||||
<select id="getVersion" resultType="VersionVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
B.`Name` devType,
|
||||
A.`Name` name,
|
||||
A.`Protocol` protocol,
|
||||
A.`Date` date,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
A.`Remark` remark,
|
||||
A.`Version_Type` versionType,
|
||||
A.`Version_Flag` versionFlag,
|
||||
A.`File_Name` fileName
|
||||
A.Id id,
|
||||
B.Name devType,
|
||||
A.Name name,
|
||||
A.Protocol protocol,
|
||||
A.Date date,
|
||||
C.Name updateBy,
|
||||
A.Update_Time updateTime,
|
||||
A.Remark remark,
|
||||
A.Version_Type versionType,
|
||||
A.Version_Flag versionFlag,
|
||||
A.File_Name fileName
|
||||
FROM
|
||||
cld_version A,
|
||||
sys_dict_data B,
|
||||
@@ -27,13 +27,13 @@
|
||||
AND A.Dev_Type = #{devType}
|
||||
</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND (A.`Name` like concat('%',#{searchValue},'%') or A.`Protocol` like concat('%',#{searchValue},'%') or A.`Remark` like concat('%',#{searchValue},'%'))
|
||||
AND (A.Name like concat('%',#{searchValue},'%') or A.Protocol like concat('%',#{searchValue},'%') or A.Remark like concat('%',#{searchValue},'%'))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getProgramVersionById" resultType="ShowVersionVO">
|
||||
SELECT
|
||||
`File` file
|
||||
File file
|
||||
FROM
|
||||
cld_version
|
||||
WHERE Id = #{id}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<select id="getLineIntegrityRate" resultType="LineDataIntegrity">
|
||||
select line_index lineId,
|
||||
avg(real_time/due_time)*100 integrityData,
|
||||
sum(real_time) `real`,
|
||||
sum(real_time) real,
|
||||
sum(due_time) due
|
||||
from r_stat_integrity_d
|
||||
where line_index in
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
<select id="getRateOfFlowData" resultType="RateOfFlowVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Type` type,
|
||||
A.`Flag` flag,
|
||||
A.`Combo_Type` comboType,
|
||||
A.`Flow` flow,
|
||||
B.`Name` updateBy,
|
||||
A.`Update_Time` updateTime
|
||||
A.Id id,
|
||||
A.Name name,
|
||||
A.Type type,
|
||||
A.Flag flag,
|
||||
A.Combo_Type comboType,
|
||||
A.Flow flow,
|
||||
B.Name updateBy,
|
||||
A.Update_Time updateTime
|
||||
FROM
|
||||
cld_flow_meal A,
|
||||
sys_user B
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
<select id="getRateOfFlowFlag" resultType="RateOfFlowVO">
|
||||
SELECT
|
||||
`Id` id,
|
||||
`Name` name,
|
||||
`Type` type,
|
||||
`Flag` flag,
|
||||
`Combo_Type` comboType,
|
||||
`Flow` flow,
|
||||
`Update_By` updateBy,
|
||||
`Update_Time` updateTime
|
||||
Id id,
|
||||
Name name,
|
||||
Type type,
|
||||
Flag flag,
|
||||
Combo_Type comboType,
|
||||
Flow flow,
|
||||
Update_By updateBy,
|
||||
Update_Time updateTime
|
||||
FROM
|
||||
cld_flow_meal
|
||||
WHERE Type =0 AND Flag =1
|
||||
@@ -51,14 +51,14 @@
|
||||
|
||||
<select id="getFlowStrategy" resultType="FlowStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Flag` flag,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
B1.`Value` comPerData,
|
||||
B2.`Value` warnPerData,
|
||||
B3.`Value` alertPerData
|
||||
A.Id id,
|
||||
A.Name name,
|
||||
A.Flag flag,
|
||||
C.Name updateBy,
|
||||
A.Update_Time updateTime,
|
||||
B1.Value comPerData,
|
||||
B2.Value warnPerData,
|
||||
B3.Value alertPerData
|
||||
FROM
|
||||
cld_flow_strategy A,
|
||||
cld_flow_strategy_dic B1,
|
||||
@@ -74,11 +74,11 @@
|
||||
|
||||
<select id="getStrategyFlag" resultType="FlowStrategyVO">
|
||||
SELECT
|
||||
`Id` id,
|
||||
`Name` name,
|
||||
`Flag` flag,
|
||||
`Update_By` updateBy,
|
||||
`Update_Time` updateTime
|
||||
Id id,
|
||||
Name name,
|
||||
Flag flag,
|
||||
Update_By updateBy,
|
||||
Update_Time updateTime
|
||||
FROM
|
||||
cld_flow_strategy
|
||||
WHERE Flag =1
|
||||
@@ -94,17 +94,17 @@
|
||||
|
||||
<select id="getFlowStrategyById" resultType="ShowFlowStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Flag` flag,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
A.`Com_Per` com,
|
||||
A.`Warn_Per` warn,
|
||||
A.`Alert_Per` alert,
|
||||
B1.`Value` comPerData,
|
||||
B2.`Value` warnPerData,
|
||||
B3.`Value` alertPerData
|
||||
A.Id id,
|
||||
A.Name name,
|
||||
A.Flag flag,
|
||||
C.Name updateBy,
|
||||
A.Update_Time updateTime,
|
||||
A.Com_Per com,
|
||||
A.Warn_Per warn,
|
||||
A.Alert_Per alert,
|
||||
B1.Value comPerData,
|
||||
B2.Value warnPerData,
|
||||
B3.Value alertPerData
|
||||
FROM
|
||||
cld_flow_strategy A,
|
||||
cld_flow_strategy_dic B1,
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
line.id AS lineId,
|
||||
line.NAME AS lineName,
|
||||
lineDetail.Power_Substation_Name AS powerSubstationName,
|
||||
( SELECT id FROM pq_line WHERE `Name` = lineDetail.Power_Substation_Name ) AS Power_Substation_id
|
||||
( SELECT id FROM pq_line WHERE Name = lineDetail.Power_Substation_Name ) AS Power_Substation_id
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line voltage,
|
||||
@@ -96,7 +96,7 @@
|
||||
AND line.id = lineDetail.id
|
||||
AND vg.Id = voltage.id
|
||||
ORDER BY
|
||||
substation.`Name`
|
||||
substation.Name
|
||||
) cc
|
||||
WHERE
|
||||
Power_Substation_id IS NULL;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
|
||||
<select id="getPointSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam">
|
||||
SELECT pl.`Name` AS "mName",
|
||||
pl1.`Name` AS "pName",
|
||||
pl2.`Name` AS "devName",
|
||||
pl3.`Name` AS "subName",
|
||||
pl4.`Name` AS "urbanName"
|
||||
SELECT pl.Name AS "mName",
|
||||
pl1.Name AS "pName",
|
||||
pl2.Name AS "devName",
|
||||
pl3.Name AS "subName",
|
||||
pl4.Name AS "urbanName"
|
||||
FROM pq_line pl
|
||||
LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id
|
||||
LEFT JOIN pq_line pl2 ON pl1.Pid = pl2.Id
|
||||
@@ -18,9 +18,9 @@
|
||||
</select>
|
||||
<select id="getDeviceSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam">
|
||||
SELECT
|
||||
pl.`Name` AS "devName",
|
||||
pl1.`Name` AS "subName",
|
||||
pl2.`Name` AS "urbanName"
|
||||
pl.Name AS "devName",
|
||||
pl1.Name AS "subName",
|
||||
pl2.Name AS "urbanName"
|
||||
FROM
|
||||
pq_line pl
|
||||
LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id
|
||||
@@ -30,7 +30,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getBaseReam" resultType="com.njcn.device.pq.pojo.param.BaseReamParam">
|
||||
SELECT cdm.Line_Id "id",cdm.Base_Meal_Id "baseMealId",cdm.Ream_Meal_Id "extendMealId",cfm.`Name` "baseMealName",cfm1.`Name` "extendMealName",cfm.Flow "baseMealFlow",cfm1.Flow "extendMealFlow"
|
||||
SELECT cdm.Line_Id "id",cdm.Base_Meal_Id "baseMealId",cdm.Ream_Meal_Id "extendMealId",cfm.Name "baseMealName",cfm1.Name "extendMealName",cfm.Flow "baseMealFlow",cfm1.Flow "extendMealFlow"
|
||||
FROM cld_dev_meal cdm
|
||||
|
||||
left join cld_flow_meal cfm on cdm.Base_Meal_Id = cfm.Id
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
SELECT
|
||||
device.id,
|
||||
device.pid,
|
||||
device.`Name`,
|
||||
device.`Name` AS dataName,
|
||||
device.`Level`,
|
||||
device.Name,
|
||||
device.Name AS dataName,
|
||||
device.Level,
|
||||
device.Sort,
|
||||
pdevice.ip,
|
||||
pdevice.Com_Flag AS comFlag,
|
||||
sddManufacturer.`Name` AS manufacturer,
|
||||
sddManufacturer.Name AS manufacturer,
|
||||
pdevice.Update_Time AS updateTime,
|
||||
min(sddLineGrade.Algo_Describe) as algoDescribe
|
||||
FROM
|
||||
@@ -47,7 +47,7 @@
|
||||
LEFT JOIN pq_device AS pdevice ON device.id = pdevice.id
|
||||
LEFT JOIN sys_dict_data AS sddManufacturer ON pdevice.Manufacturer = sddManufacturer.id
|
||||
WHERE
|
||||
device.`Level` = 4
|
||||
device.Level = 4
|
||||
AND device.id in
|
||||
<foreach collection="devIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
@@ -58,12 +58,12 @@
|
||||
group by
|
||||
device.id,
|
||||
device.pid,
|
||||
device.`Name`,
|
||||
device.`Level`,
|
||||
device.Name,
|
||||
device.Level,
|
||||
device.Sort,
|
||||
pdevice.ip,
|
||||
pdevice.Com_Flag,
|
||||
sddManufacturer.`Name`,
|
||||
sddManufacturer.Name,
|
||||
pdevice.Update_Time
|
||||
|
||||
</select>
|
||||
@@ -111,10 +111,10 @@
|
||||
SELECT
|
||||
sub.id,
|
||||
sub.pid,
|
||||
sub.`Level`,
|
||||
sub.Level,
|
||||
sub.sort,
|
||||
sub.`Name`,
|
||||
sdd.`Name` AS subScale
|
||||
sub.Name,
|
||||
sdd.Name AS subScale
|
||||
FROM
|
||||
pq_line sub
|
||||
LEFT JOIN pq_substation AS psub ON sub.id = psub.id
|
||||
@@ -132,16 +132,16 @@
|
||||
line.Id as 'id',
|
||||
line.pid as 'pid',
|
||||
line.Pids as 'pids',
|
||||
line.`Name` AS 'name',
|
||||
line.`Level`as 'Level',
|
||||
line.Name AS 'name',
|
||||
line.Levelas 'Level',
|
||||
line.Update_Time AS 'updateTime',
|
||||
line.Sort as 'sort',
|
||||
pd.Call_Flag as 'ComFlag',
|
||||
sdd.`Name` AS 'LineScale',
|
||||
device.`Name` AS 'deviceName',
|
||||
sdd.Name AS 'LineScale',
|
||||
device.Name AS 'deviceName',
|
||||
pd.IP AS 'ip',
|
||||
msdd.`Name` AS 'manufacturer',
|
||||
pldsdd.`Name` AS 'lineGrade',
|
||||
msdd.Name AS 'manufacturer',
|
||||
pldsdd.Name AS 'lineGrade',
|
||||
pld.Load_Type AS 'loadType'
|
||||
FROM
|
||||
pq_line AS line
|
||||
@@ -152,9 +152,9 @@
|
||||
LEFT JOIN sys_dict_data AS sdd ON sdd.id = pv.Scale
|
||||
LEFT JOIN pq_line_detail AS pld ON line.id = pld.Id
|
||||
LEFT JOIN sys_dict_data AS pldsdd ON pld.Line_Grade = pldsdd.id
|
||||
LEFT JOIN sys_dict_data AS msdd ON pd.Manufacturer = msdd.`id`
|
||||
LEFT JOIN sys_dict_data AS msdd ON pd.Manufacturer = msdd.id
|
||||
WHERE
|
||||
line.`Level` = 6
|
||||
line.Level = 6
|
||||
AND
|
||||
line.id in
|
||||
<foreach collection="lineIndexes" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -93,9 +93,9 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
List<RStatIntegrityD> onIntegrityByIds = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(lineIdsAll)) {
|
||||
//监测点完整性
|
||||
onIntegrityByIds.addAll(integrityDMapper.selectList(new QueryWrapper<RStatIntegrityD>().select("sum(real_time) as `realTime`,sum(due_time) as dueTime,line_index as lineIndex").in(CollUtil.isNotEmpty(lineIdsAll), "line_index", lineIdsAll).ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime()))).le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))).groupBy("line_index")));
|
||||
onIntegrityByIds.addAll(integrityDMapper.selectList(new QueryWrapper<RStatIntegrityD>().select("sum(real_time) as realTime,sum(due_time) as dueTime,line_index as lineIndex").in(CollUtil.isNotEmpty(lineIdsAll), "line_index", lineIdsAll).ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime()))).le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))).groupBy("line_index")));
|
||||
//终端在线率
|
||||
onlineRateByDevIds.addAll(onLineRateDMapper.selectList(new QueryWrapper<RStatOnlinerateD>().select("sum(online_min) as `onlineMin`,sum(offline_min) as offlineMin,dev_index as devIndex").in(CollUtil.isNotEmpty(devIdsAll), "dev_index", devIdsAll).ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime()))).le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))).groupBy("dev_index")));
|
||||
onlineRateByDevIds.addAll(onLineRateDMapper.selectList(new QueryWrapper<RStatOnlinerateD>().select("sum(online_min) as onlineMin,sum(offline_min) as offlineMin,dev_index as devIndex").in(CollUtil.isNotEmpty(devIdsAll), "dev_index", devIdsAll).ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime()))).le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime()))).groupBy("dev_index")));
|
||||
}
|
||||
|
||||
Map<String, DeptGetChildrenMoreDTO> deptLineMap = deptGetChildrenMoreDTOS.stream().collect(Collectors.toMap(DeptGetChildrenMoreDTO::getUnitId, Function.identity()));
|
||||
@@ -350,7 +350,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(param.getDeviceInfoParam(), Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||
List<String> devIDs = generalDeviceDTOList.stream().flatMap(x -> x.getDeviceIndexes().stream()).distinct().collect(Collectors.toList());
|
||||
List<RStatOnlinerateD> onlinerateDS = onLineRateDMapper.selectList(new QueryWrapper<RStatOnlinerateD>()
|
||||
.select("sum(online_min) as `onlineMin`,sum(offline_min) as offlineMin,dev_index as devIndex")
|
||||
.select("sum(online_min) as onlineMin,sum(offline_min) as offlineMin,dev_index as devIndex")
|
||||
.in(CollUtil.isNotEmpty(devIDs), "dev_index", devIDs)
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
duration AS duration,
|
||||
feature_amplitude AS featureAmplitude
|
||||
FROM
|
||||
`r_mp_event_detail`
|
||||
r_mp_event_detail
|
||||
where start_time between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
duration AS duration,
|
||||
feature_amplitude AS featureAmplitude
|
||||
FROM
|
||||
`r_mp_event_detail`
|
||||
r_mp_event_detail
|
||||
</select>
|
||||
|
||||
<!--获取监测点电压暂降和短时中断分布情况-->
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_y`
|
||||
r_stat_org_y
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
@@ -44,7 +44,7 @@
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_q`
|
||||
r_stat_org_q
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
@@ -54,7 +54,7 @@
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
`r_stat_org_m`
|
||||
r_stat_org_m
|
||||
WHERE
|
||||
<include refid="query_where"></include>
|
||||
</select>
|
||||
|
||||
@@ -89,12 +89,12 @@
|
||||
SELECT
|
||||
rmed.measurement_point_id AS lineId,
|
||||
rmed.start_time AS startTime,
|
||||
line.`Name` AS lineName,
|
||||
gd.`Name` AS gdName,
|
||||
line.Name AS lineName,
|
||||
gd.Name AS gdName,
|
||||
substation.id AS subId,
|
||||
substation.`Name` AS subName,
|
||||
substation.Name AS subName,
|
||||
pqdevice.IP AS ip,
|
||||
scale.`Name` AS scale,
|
||||
scale.Name AS scale,
|
||||
typeDict.name AS advanceType,
|
||||
reasonDict.name AS advanceReason,
|
||||
rmed.event_type AS eventType,
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
<select id="ListEventType" resultType="com.njcn.event.pojo.vo.GeneralVO">
|
||||
SELECT
|
||||
id,
|
||||
sum(IF(`event_type` =#{condMap.Voltage_Dip}, num, 0)) as sagsCount,
|
||||
sum(IF(`event_type` = #{condMap.Short_Interruptions}, num, 0)) as breakCount,
|
||||
sum(IF(`event_type` = #{condMap.Voltage_Rise}, num, 0)) as upCount
|
||||
sum(IF(event_type =#{condMap.Voltage_Dip}, num, 0)) as sagsCount,
|
||||
sum(IF(event_type = #{condMap.Short_Interruptions}, num, 0)) as breakCount,
|
||||
sum(IF(event_type = #{condMap.Voltage_Rise}, num, 0)) as upCount
|
||||
from(
|
||||
SELECT
|
||||
measurement_point_id AS id,
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
duration*1000 AS duration,
|
||||
feature_amplitude*100 AS featureAmplitude
|
||||
FROM
|
||||
`r_mp_event_detail`
|
||||
r_mp_event_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<select id="getMiddleDown" resultType="com.njcn.device.pq.pojo.vo.EventVO">
|
||||
SELECT
|
||||
ed.start_time "time",
|
||||
pl.`Name` "name",
|
||||
pl.Name "name",
|
||||
ed.advance_reason reason,
|
||||
ed.advance_type "type",
|
||||
ed.feature_amplitude amplitude,
|
||||
@@ -141,9 +141,9 @@
|
||||
)) base,
|
||||
IFNULL( cfm2.flow, 0 ) ream,
|
||||
IFNULL( cmf.Actual_Value, 0 ) statusValue,
|
||||
pl1.`Name` "name",
|
||||
pl1.Name "name",
|
||||
pd.IP ip,
|
||||
pd.`Port` "port",
|
||||
pd.Port "port",
|
||||
case
|
||||
when pd.Com_Flag = '0' then '通讯中断'
|
||||
when pd.Com_Flag = '1' then '通讯正常'
|
||||
@@ -171,8 +171,8 @@
|
||||
</select>
|
||||
|
||||
<select id="getMiddleLimitRate" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO">
|
||||
select pl.`Name` mName,
|
||||
pl3.`Name` subName,
|
||||
select pl.Name mName,
|
||||
pl3.Name subName,
|
||||
t.count from pq_line pl
|
||||
inner join(select rslr.my_index,
|
||||
sum(rslr.all_time) count
|
||||
@@ -201,7 +201,7 @@
|
||||
rshom.org_no "id",
|
||||
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
|
||||
from r_stat_harmonic_org_m rshom
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.`Code` = 'Mainnet_Point'
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.Code = 'Mainnet_Point'
|
||||
WHERE
|
||||
rshom.org_no IN
|
||||
<foreach collection="indexIds" item="item" open="(" close=")" separator=",">
|
||||
@@ -272,7 +272,7 @@
|
||||
<select id="getMiddleDownChind" resultType="com.njcn.device.pq.pojo.vo.EventVO">
|
||||
SELECT
|
||||
ed.start_time "time",
|
||||
pl.`Name` "name",
|
||||
pl.Name "name",
|
||||
ed.advance_reason reason,
|
||||
ed.advance_type "type",
|
||||
ed.feature_amplitude amplitude,
|
||||
@@ -294,8 +294,8 @@
|
||||
</select>
|
||||
|
||||
<select id="getMiddleLimitRateChild" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO">
|
||||
select pl.`Name` mName,
|
||||
pl3.`Name` subName,
|
||||
select pl.Name mName,
|
||||
pl3.Name subName,
|
||||
t.count from pq_line pl
|
||||
inner join(select rslr.my_index,
|
||||
sum(rslr.all_time) count
|
||||
@@ -333,9 +333,9 @@
|
||||
)) base,
|
||||
IFNULL( cfm2.flow, 0 ) ream,
|
||||
IFNULL( cmf.Actual_Value, 0 ) statusValue,
|
||||
pl1.`Name` "name",
|
||||
pl1.Name "name",
|
||||
pd.IP ip,
|
||||
pd.`Port` "port",
|
||||
pd.Port "port",
|
||||
case
|
||||
when pd.Com_Flag = '0' then '通讯中断'
|
||||
when pd.Com_Flag = '1' then '通讯正常'
|
||||
@@ -363,7 +363,7 @@
|
||||
|
||||
<select id="eventLists" resultType="com.njcn.device.pq.pojo.vo.EventVO">
|
||||
SELECT
|
||||
ed.event_id as eventId, ed.start_time "time",pl.`Name` "name",ed.advance_reason reason,ed.advance_type "type",ed.feature_amplitude amplitude,ed.duration
|
||||
ed.event_id as eventId, ed.start_time "time",pl.Name "name",ed.advance_reason reason,ed.advance_type "type",ed.feature_amplitude amplitude,ed.duration
|
||||
from pq_line pl
|
||||
left join r_mp_event_detail ed on pl.id = ed.measurement_point_id
|
||||
<where>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<select id="getMonitorInfo" resultType="com.njcn.event.pojo.po.PmsMonitorPO">
|
||||
SELECT
|
||||
id,
|
||||
`Name`,
|
||||
Name,
|
||||
Org_Name AS orgName,
|
||||
Org_Id AS orgId,
|
||||
Operation_Name AS operationName,
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
SELECT
|
||||
org_no as orgId,
|
||||
measurement_type_class as eventType,
|
||||
SUM(IF(`event_type`=#{map.dip},event_count,0)) as eventCount,
|
||||
SUM(IF(`event_type`=#{map.rise},event_count,0)) as riseCount,
|
||||
SUM(IF(`event_type`=#{map.interrupt},event_count,0)) as interruptCount
|
||||
SUM(IF(event_type=#{map.dip},event_count,0)) as eventCount,
|
||||
SUM(IF(event_type=#{map.rise},event_count,0)) as riseCount,
|
||||
SUM(IF(event_type=#{map.interrupt},event_count,0)) as interruptCount
|
||||
FROM
|
||||
<if test="param != null and param.type == 1">
|
||||
r_stat_event_y
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
<select id="getTransientData" resultType="TransientVO">
|
||||
SELECT
|
||||
B.`Id` id,
|
||||
B.`Name` name,
|
||||
B4.`Name` powerCompany,
|
||||
B3.`Name` substation,
|
||||
D.`Name` voltageLevel,
|
||||
E.`IP` networkParam
|
||||
B.Id id,
|
||||
B.Name name,
|
||||
B4.Name powerCompany,
|
||||
B3.Name substation,
|
||||
D.Name voltageLevel,
|
||||
E.IP networkParam
|
||||
FROM
|
||||
pq_line B,
|
||||
pq_voltage C,
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
<!-- <select id="getTransientDataById" resultType="TransientVO">-->
|
||||
<!-- SELECT-->
|
||||
<!-- A.`Name` name,-->
|
||||
<!-- A3.`Name` substation-->
|
||||
<!-- A.Name name,-->
|
||||
<!-- A3.Name substation-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_line A,-->
|
||||
<!-- pq_line A1,-->
|
||||
|
||||
@@ -63,13 +63,13 @@ public class RDimBusbarHarmnicDPO {
|
||||
/**
|
||||
* 0稳态指标1.暂态指标'
|
||||
*/
|
||||
@MppMultiId(value = "`Level`")
|
||||
@MppMultiId(value = "Level")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 超标次数)
|
||||
*/
|
||||
@TableField(value = "`limit_count`")
|
||||
@TableField(value = "limit_count")
|
||||
private Integer limitCount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -93,8 +93,8 @@ public class ClearPathUtil {
|
||||
return '<';
|
||||
case '>':
|
||||
return '>';
|
||||
case '`':
|
||||
return '`';
|
||||
case '':
|
||||
return '';
|
||||
case '\\':
|
||||
return '/';
|
||||
case 'I':
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, `Level`, `limit count`,
|
||||
Statis_count, `State`, Create_By, Create_Time, Update_By, Update_Time
|
||||
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, Level, limit count,
|
||||
Statis_count, State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, `Station Id`, Target_type, `Level`, Monitor_Tag, Voltage_level,
|
||||
Org_Id, Statis_Date, Station Id, Target_type, Level, Monitor_Tag, Voltage_level,
|
||||
limit_count, Statis_count
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
rshom.org_no "id",
|
||||
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
|
||||
from r_stat_harmonic_org_m rshom
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.`Code` = 'Mainnet_Point'
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.Code = 'Mainnet_Point'
|
||||
WHERE
|
||||
rshom.org_no IN
|
||||
<foreach collection="indexIds" item="item" open="(" close=")" separator=",">
|
||||
@@ -27,7 +27,7 @@
|
||||
rshom.measurement_type_class "id",
|
||||
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
|
||||
from r_stat_harmonic_m rshom
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.`Code` = 'Mainnet_Point'
|
||||
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.Code = 'Mainnet_Point'
|
||||
WHERE
|
||||
rshom.measurement_type_class IN
|
||||
<foreach collection="indexIds" item="item" open="(" close=")" separator=",">
|
||||
@@ -43,7 +43,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getPowerOrder" resultType="com.njcn.device.pq.pojo.vo.PowerOrderVO">
|
||||
select t.*, pl.`Name` "name"
|
||||
select t.*, pl.Name "name"
|
||||
from (
|
||||
SELECT rsdhpd.line_id "id", round(max(rsdhpd.p), 0) "max"
|
||||
FROM r_stat_data_harmpower_p_d rsdhpd
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<select id="getDeptTempByTempId" resultType="SysDeptTempVO">
|
||||
SELECT
|
||||
a.*,
|
||||
b.`Name` deptName
|
||||
b.Name deptName
|
||||
FROM
|
||||
sys_dept_temp a
|
||||
LEFT JOIN sys_dept b ON a.dept_id = b.id
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
A.Name name,
|
||||
A.State,
|
||||
A.Sort,
|
||||
A.Level,
|
||||
D.`Name` voltageLevel,
|
||||
D1.`Name` factoryName,
|
||||
D.Name voltageLevel,
|
||||
D1.Name factoryName,
|
||||
C.IP networkParam,
|
||||
C.Update_Time time,
|
||||
A2.`Name` deviceName,
|
||||
D2.`Name` loadType
|
||||
A2.Name deviceName,
|
||||
D2.Name loadType
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_voltage B,
|
||||
@@ -68,7 +68,7 @@
|
||||
A.id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name`,
|
||||
A.Name,
|
||||
A.Sort,
|
||||
A.Level level
|
||||
FROM
|
||||
@@ -86,10 +86,10 @@
|
||||
A.id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name`,
|
||||
A.Name,
|
||||
A.Sort,
|
||||
A.Level level,
|
||||
C.`Name` voltageLevel
|
||||
C.Name voltageLevel
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_substation B,
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
line.Id,
|
||||
line.Pid,
|
||||
line.Pids,
|
||||
line.`Name` NAME,
|
||||
line.Name NAME,
|
||||
line.Sort,
|
||||
line.LEVEL,
|
||||
scale.`Name` voltageLevel,
|
||||
factory.`Name` factoryName,
|
||||
scale.Name voltageLevel,
|
||||
factory.Name factoryName,
|
||||
pqdevice.IP networkParam,
|
||||
pqdevice.Update_Time time,
|
||||
pqdevice.Com_Flag state,
|
||||
device.`Name` deviceName,
|
||||
loadtype.`Name` loadType
|
||||
device.Name deviceName,
|
||||
loadtype.Name loadType
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail lineDetail,
|
||||
@@ -48,7 +48,7 @@
|
||||
A.id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name`,
|
||||
A.Name,
|
||||
A.Sort,
|
||||
A.Level level
|
||||
FROM
|
||||
@@ -65,10 +65,10 @@
|
||||
A.id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name`,
|
||||
A.Name,
|
||||
A.Sort,
|
||||
A.Level level,
|
||||
C.`Name` voltageLevel
|
||||
C.Name voltageLevel
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_substation B,
|
||||
@@ -88,7 +88,7 @@
|
||||
A.Pids,
|
||||
A.Sort,
|
||||
A.Level level,
|
||||
B.`Name` name
|
||||
B.Name name
|
||||
FROM
|
||||
pq_line A,
|
||||
sys_area B
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
A.State,
|
||||
A.Sort,
|
||||
A.Level,
|
||||
B.`IP` networkParam,
|
||||
B.`Update_Time` time,
|
||||
D.`Name` factoryName,
|
||||
A.`Name` deviceName
|
||||
B.IP networkParam,
|
||||
B.Update_Time time,
|
||||
D.Name factoryName,
|
||||
A.Name deviceName
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_device B,
|
||||
@@ -50,9 +50,9 @@
|
||||
<!-- A.Id,-->
|
||||
<!-- A.Pid,-->
|
||||
<!-- A.Pids,-->
|
||||
<!-- A.`Name` name,-->
|
||||
<!-- A.Name name,-->
|
||||
<!-- A.Sort,-->
|
||||
<!-- A.`Level` level,-->
|
||||
<!-- A.Level level,-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_line A,-->
|
||||
<!-- pq_line A1,-->
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
line_id, data_date, pollution_type, `value`
|
||||
line_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_mp_pollution_d
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when line_id = #{item.lineId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -72,7 +72,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_mp_pollution_d
|
||||
(line_id, data_date, pollution_type, `value`)
|
||||
(line_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.lineId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -82,7 +82,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_mp_pollution_d
|
||||
(line_id, data_date, pollution_type, `value`)
|
||||
(line_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{lineId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -90,7 +90,7 @@
|
||||
line_id = #{lineId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -106,7 +106,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -136,7 +136,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<select id="getINeg" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(i_neg) iNeg
|
||||
from
|
||||
r_stat_data_i_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -19,17 +19,17 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
<select id="getI" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(i_neg) iNeg
|
||||
from
|
||||
r_stat_data_i_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -38,6 +38,6 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
<select id="getV" resultType="com.njcn.harmonic.pojo.po.day.RStatDataInharmVDPO">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(v_1) v1
|
||||
from
|
||||
r_stat_data_inharm_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -20,6 +20,6 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<select id="getPlt" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(plt) plt
|
||||
from
|
||||
r_stat_data_plt_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -19,7 +19,7 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
<select id="getFreqDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(abs(freq_dev)) freqDev,
|
||||
avg(v_unbalance) vUnbalance
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type = 'T'
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -20,18 +20,18 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
|
||||
<select id="getVuDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(vu_dev) vuDev
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'MAX'
|
||||
and line_id IN
|
||||
@@ -40,18 +40,18 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
|
||||
<select id="getVthd" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(v_thd) vThd
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A','B','C')
|
||||
and value_type = 'CP95'
|
||||
and line_id IN
|
||||
@@ -60,18 +60,18 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
|
||||
<select id="getUnbalance" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(v_unbalance) vUnbalance
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type = 'T'
|
||||
and value_type = 'CP95'
|
||||
and line_id IN
|
||||
@@ -80,17 +80,17 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
<select id="getV" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
|
||||
select
|
||||
`time` time,
|
||||
time time,
|
||||
line_id lineId,
|
||||
avg(v_1) v1
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type = 'T'
|
||||
and value_type = 'CP95'
|
||||
and line_id IN
|
||||
@@ -99,7 +99,7 @@
|
||||
</foreach>
|
||||
and quality_flag = 0
|
||||
group by
|
||||
`time`,line_id
|
||||
time,line_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
IFNULL(TRUNCATE ((1- (
|
||||
sum( flicker_overtime )+ sum( flicker_all_time )+ sum( freq_dev_overtime )+ sum( voltage_dev_overtime )+ sum( ubalance_overtime )+ sum( uaberrance_overtime )+ sum( i_neg_overtime )+ sum( uharm_2_overtime )+ sum( uharm_3_overtime )+ sum( uharm_4_overtime )+ sum( uharm_5_overtime )+ sum( uharm_6_overtime )+ sum( uharm_7_overtime )+ sum( uharm_8_overtime )+ sum( uharm_9_overtime )+ sum( uharm_10_overtime )+ sum( uharm_11_overtime )+ sum( uharm_12_overtime )+ sum( uharm_13_overtime )+ sum( uharm_14_overtime )+ sum( uharm_15_overtime )+ sum( uharm_16_overtime )+ sum( uharm_17_overtime )+ sum( uharm_18_overtime )+ sum( uharm_19_overtime )+ sum( uharm_20_overtime )+ sum( uharm_21_overtime )+ sum( uharm_22_overtime )+ sum( uharm_23_overtime )+ sum( uharm_24_overtime )+ sum( uharm_25_overtime )+ sum( iharm_2_overtime )+ sum( iharm_3_overtime )+ sum( iharm_4_overtime )+ sum( iharm_5_overtime )+ sum( iharm_6_overtime )+ sum( iharm_7_overtime )+ sum( iharm_8_overtime )+ sum( iharm_9_overtime )+ sum( iharm_10_overtime )+ sum( iharm_11_overtime )+ sum( iharm_12_overtime )+ sum( iharm_13_overtime )+ sum( iharm_14_overtime )+ sum( iharm_15_overtime )+ sum( iharm_16_overtime )+ sum( iharm_17_overtime )+ sum( iharm_18_overtime )+ sum( iharm_19_overtime )+ sum( iharm_20_overtime )+ sum( iharm_21_overtime )+ sum( iharm_22_overtime )+ sum( iharm_23_overtime )+ sum( iharm_24_overtime )+ sum( iharm_25_overtime )+ sum( inuharm_1_overtime )+ sum( inuharm_2_overtime )+ sum( inuharm_3_overtime )+ sum( inuharm_4_overtime )+ sum( inuharm_5_overtime )+ sum( inuharm_6_overtime )+ sum( inuharm_7_overtime )+ sum( inuharm_8_overtime )+ sum( inuharm_9_overtime )+ sum( inuharm_10_overtime )+ sum( inuharm_11_overtime )+ sum( inuharm_12_overtime )+ sum( inuharm_13_overtime )+ sum( inuharm_14_overtime )+ sum( inuharm_15_overtime )+ sum( inuharm_16_overtime )) /(
|
||||
SUM( all_time )* 71 )
|
||||
)* 100,2),0) `data`
|
||||
)* 100,2),0) data
|
||||
FROM
|
||||
r_stat_limit_rate_d
|
||||
<where>
|
||||
@@ -208,7 +208,7 @@
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
`time`
|
||||
time
|
||||
</select>
|
||||
<select id="getSumPassRateList" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
|
||||
SELECT
|
||||
@@ -303,7 +303,7 @@
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
`my_index`
|
||||
my_index
|
||||
</select>
|
||||
|
||||
<select id="getAssessTargetRate" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
|
||||
@@ -409,7 +409,7 @@
|
||||
+ inuharm_1_overtime + inuharm_2_overtime + inuharm_3_overtime + inuharm_4_overtime + inuharm_5_overtime + inuharm_6_overtime + inuharm_7_overtime + inuharm_8_overtime + inuharm_9_overtime + inuharm_10_overtime + inuharm_11_overtime + inuharm_12_overtime + inuharm_13_overtime + inuharm_14_overtime + inuharm_15_overtime + inuharm_16_overtime
|
||||
) as allTime
|
||||
from
|
||||
`r_stat_limit_rate_d`
|
||||
r_stat_limit_rate_d
|
||||
<where>
|
||||
and time_id between #{statTime} and #{endTime}
|
||||
<if test=" ids != null and ids.size > 0">
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
)
|
||||
) AS allOvertime
|
||||
FROM
|
||||
`r_stat_limit_rate_d`
|
||||
r_stat_limit_rate_d
|
||||
<where>
|
||||
and time_id between #{startTime} and #{endTime}
|
||||
<if test=" ids != null and ids.size > 0">
|
||||
|
||||
@@ -161,6 +161,6 @@
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
`my_index`
|
||||
my_index
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_id, data_date, pollution_type, `value`
|
||||
org_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_org_d
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_d
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgDPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_d
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgDPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_id, data_date, pollution_type, `value`
|
||||
org_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
@@ -22,7 +22,7 @@
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -36,7 +36,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_m
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -46,7 +46,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_m
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -54,7 +54,7 @@
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -70,7 +70,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -100,7 +100,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_id, data_date, pollution_type, `value`
|
||||
org_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_org_q
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_q
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgQPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_q
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgQPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_id, data_date, pollution_type, `value`
|
||||
org_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_org_y
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_y
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgYPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_y
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
(org_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgYPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
substation_id, data_date, pollution_type, `value`
|
||||
substation_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_substation_d
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_d
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationDPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_d
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
substation_id = #{substationId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationDPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
substation_id, data_date, pollution_type, `value`
|
||||
substation_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
@@ -22,7 +22,7 @@
|
||||
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -36,7 +36,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_m
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -46,7 +46,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationM">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_m
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -54,7 +54,7 @@
|
||||
substation_id = #{substationId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationM">
|
||||
<!--@mbg.generated-->
|
||||
@@ -70,7 +70,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -100,15 +100,15 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="selectBySubstationPage" resultType="com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO">
|
||||
<!-- SELECT-->
|
||||
<!-- substation_id as id,-->
|
||||
<!-- IF(`pollution_type`=#{typeMapId.I,javaType=string},value,3.14159) as `data`,-->
|
||||
<!-- IF(`pollution_type`=#{typeMapId.V,javaType=string},value,3.14159) as `dataV`-->
|
||||
<!-- IF(pollution_type=#{typeMapId.I,javaType=string},value,3.14159) as data,-->
|
||||
<!-- IF(pollution_type=#{typeMapId.V,javaType=string},value,3.14159) as dataV-->
|
||||
<!-- FROM-->
|
||||
<!-- r_stat_pollution_substation_m-->
|
||||
<!-- <where>-->
|
||||
@@ -127,7 +127,7 @@
|
||||
<!-- </where>-->
|
||||
<!-- GROUP BY-->
|
||||
<!-- substation_id-->
|
||||
<!-- ORDER BY `data` DESC,dataV DESC-->
|
||||
<!-- ORDER BY data DESC,dataV DESC-->
|
||||
select
|
||||
substation_id as id,
|
||||
SUM(case when pollution_type = #{typeMapId.I,javaType=string} then value else null end) as data ,
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
substation_id, data_date, pollution_type, `value`
|
||||
substation_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_substation_q
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_q
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationQPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_q
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
substation_id = #{substationId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationQPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
substation_id, data_date, pollution_type, `value`
|
||||
substation_id, data_date, pollution_type, value
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_substation_y
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<trim prefix="value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
@@ -31,7 +31,7 @@
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_y
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
@@ -41,7 +41,7 @@
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationYPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_substation_y
|
||||
(substation_id, data_date, pollution_type, `value`)
|
||||
(substation_id, data_date, pollution_type, value)
|
||||
values
|
||||
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
@@ -49,7 +49,7 @@
|
||||
substation_id = #{substationId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
value = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationYPO">
|
||||
<!--@mbg.generated-->
|
||||
@@ -65,7 +65,7 @@
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
value,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
@@ -95,7 +95,7 @@
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
value = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.njcn.harmonic.mapper.ReportMapper">
|
||||
<select id="getVirtualDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -29,10 +29,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -53,11 +53,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getVirtualDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -83,10 +83,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -107,7 +107,7 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getTotalCP95Day" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
@@ -119,10 +119,10 @@
|
||||
AND value_type = "CP95"
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -139,10 +139,10 @@
|
||||
AND value_type = "CP95"
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -159,10 +159,10 @@
|
||||
AND value_type = "CP95"
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -171,7 +171,7 @@
|
||||
</select>
|
||||
<select id="getVVirtualData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -197,10 +197,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -221,11 +221,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getPowerP" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -253,10 +253,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -280,11 +280,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getPF" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -312,10 +312,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -339,11 +339,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getPowerQ" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -371,10 +371,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -398,11 +398,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getPowerS" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -430,10 +430,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -457,11 +457,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -489,10 +489,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -516,11 +516,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getLFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -548,10 +548,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C')
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -575,11 +575,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`
|
||||
phasic_type
|
||||
</select>
|
||||
<select id="getUVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -605,10 +605,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -629,11 +629,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getLVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -659,10 +659,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -683,11 +683,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getDistortionDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -713,10 +713,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -737,11 +737,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getDistortionDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -767,10 +767,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -791,11 +791,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -821,10 +821,10 @@
|
||||
phasic_type = 'T'
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -845,11 +845,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getDEVFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -875,10 +875,10 @@
|
||||
phasic_type = 'T'
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -899,11 +899,11 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
<select id="getINegData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
`phasic_type` AS phaseType,
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||
@@ -929,10 +929,10 @@
|
||||
phasic_type IN ( 'A', 'B', 'C' )
|
||||
and quality_flag = 0
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
and `time` >= #{param.startTime}
|
||||
and time >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
and `time` <= #{param.endTime}
|
||||
and time <= #{param.endTime}
|
||||
</if>
|
||||
<if test="param.lineId != null and param.lineId != ''">
|
||||
and line_id = #{param.lineId}
|
||||
@@ -953,7 +953,7 @@
|
||||
) AS t1
|
||||
) a
|
||||
GROUP BY
|
||||
`phasic_type`;
|
||||
phasic_type;
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<select id="listDayRatio" resultType="StatHarmonicOrgVO">
|
||||
SELECT
|
||||
r.`org_no` `id`,
|
||||
r.over_limit_measurement_ratio_average `ratio`,
|
||||
r.over_limit_measurement_average `count`
|
||||
r.org_no id,
|
||||
r.over_limit_measurement_ratio_average ratio,
|
||||
r.over_limit_measurement_average count
|
||||
FROM
|
||||
r_stat_harmonic_org_d r
|
||||
where 1=1
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<select id="listMonthRatio" resultType="StatHarmonicOrgVO">
|
||||
SELECT
|
||||
r.`org_no` `id`,
|
||||
r.over_limit_measurement_ratio_average `ratio`,
|
||||
r.over_limit_measurement_average `count`
|
||||
r.org_no id,
|
||||
r.over_limit_measurement_ratio_average ratio,
|
||||
r.over_limit_measurement_average count
|
||||
FROM
|
||||
r_stat_harmonic_org_m r
|
||||
where 1=1
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<select id="listQuarterRatio" resultType="StatHarmonicOrgVO">
|
||||
SELECT
|
||||
r.`org_no` `id`,
|
||||
r.over_limit_measurement_ratio_average `ratio`,
|
||||
r.over_limit_measurement_average `count`
|
||||
r.org_no id,
|
||||
r.over_limit_measurement_ratio_average ratio,
|
||||
r.over_limit_measurement_average count
|
||||
FROM
|
||||
r_stat_harmonic_org_q r
|
||||
where 1=1
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<select id="listYearRatio" resultType="StatHarmonicOrgVO">
|
||||
SELECT
|
||||
r.`org_no` `id`,
|
||||
r.over_limit_measurement_ratio_average `ratio`,
|
||||
r.over_limit_measurement_average `count`
|
||||
r.org_no id,
|
||||
r.over_limit_measurement_ratio_average ratio,
|
||||
r.over_limit_measurement_average count
|
||||
FROM
|
||||
r_stat_harmonic_org_y r
|
||||
where 1=1
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
C.`Name` voltageLevel,
|
||||
D.`IP` networkParam,
|
||||
C1.`Name` factoryName,
|
||||
A.`Name` lineName
|
||||
A.Name name,
|
||||
C.Name voltageLevel,
|
||||
D.IP networkParam,
|
||||
C1.Name factoryName,
|
||||
A.Name lineName
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_voltage B,
|
||||
@@ -37,7 +37,7 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name`
|
||||
Name
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
@@ -52,7 +52,7 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
C.`Name` voltageLevel
|
||||
C.Name voltageLevel
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_substation B,
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
C.`Name` voltageLevel,
|
||||
D.`IP` networkParam,
|
||||
C1.`Name` factoryName,
|
||||
A.`Name` lineName
|
||||
A.Name name,
|
||||
C.Name voltageLevel,
|
||||
D.IP networkParam,
|
||||
C1.Name factoryName,
|
||||
A.Name lineName
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_voltage B,
|
||||
@@ -37,7 +37,7 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name`
|
||||
Name
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
C.`IP` networkParam,
|
||||
D.`Name` voltageLevel,
|
||||
A.`Name` lineName
|
||||
A.Name name,
|
||||
C.IP networkParam,
|
||||
D.Name voltageLevel,
|
||||
A.Name lineName
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_voltage B,
|
||||
@@ -34,7 +34,7 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name`
|
||||
Name
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
A.Pids,
|
||||
A.Name,
|
||||
A.Level,
|
||||
B.`Run_Flag` flag
|
||||
B.Run_Flag flag
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_device B
|
||||
@@ -26,8 +26,8 @@
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name` name,
|
||||
`Level` level
|
||||
Name name,
|
||||
Level level
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<!-- SELECT-->
|
||||
<!-- A.Id,-->
|
||||
<!-- A.`Run_Flag` flag-->
|
||||
<!-- A.Run_Flag flag-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_device A,-->
|
||||
<!-- pq_voltage B,-->
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
SELECT
|
||||
org_no as orgId,
|
||||
monitoring_object as monitoringObject,
|
||||
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_u}, total_monitor_num, 0)) as streamNum,
|
||||
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_a}, total_monitor_num, 0)) as streamReloadNum,
|
||||
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_s}, total_monitor_num, 0)) as streamOverloadNum,
|
||||
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_u}, total_monitor_num / monitor_valid_num, 0)) as streamRate
|
||||
SUM(IF(area_pq_event_type = #{condMap.Event_Type_u}, total_monitor_num, 0)) as streamNum,
|
||||
SUM(IF(area_pq_event_type = #{condMap.Event_Type_a}, total_monitor_num, 0)) as streamReloadNum,
|
||||
SUM(IF(area_pq_event_type = #{condMap.Event_Type_s}, total_monitor_num, 0)) as streamOverloadNum,
|
||||
SUM(IF(area_pq_event_type = #{condMap.Event_Type_u}, total_monitor_num / monitor_valid_num, 0)) as streamRate
|
||||
FROM r_stat_org_pv_power_quality_m
|
||||
where org_no in
|
||||
<foreach collection="condMap.orgIdList" item="id" open="(" close=")" separator=",">
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
SELECT
|
||||
org_no,
|
||||
monitoring_object,
|
||||
SUM(IF(`area_pq_event_type`=#{param.mapId.eventTypeL,javaType=string},total_monitor_num,0)) as lowPowerFactor89,
|
||||
SUM(IF(`area_pq_event_type`=#{param.mapId.eventTypeP,javaType=string},total_monitor_num,0)) as lowPowerFactor78,
|
||||
SUM(IF(`area_pq_event_type`=#{param.mapId.eventTypeO,javaType=string},total_monitor_num,0)) as lowPowerFactor7,
|
||||
IF(`monitoring_object`=`monitoring_object`,TRUNCATE(SUM(total_monitor_num)/SUM(monitor_valid_num),2),0) as lowPowerFactorRatio
|
||||
SUM(IF(area_pq_event_type=#{param.mapId.eventTypeL,javaType=string},total_monitor_num,0)) as lowPowerFactor89,
|
||||
SUM(IF(area_pq_event_type=#{param.mapId.eventTypeP,javaType=string},total_monitor_num,0)) as lowPowerFactor78,
|
||||
SUM(IF(area_pq_event_type=#{param.mapId.eventTypeO,javaType=string},total_monitor_num,0)) as lowPowerFactor7,
|
||||
IF(monitoring_object=monitoring_object,TRUNCATE(SUM(total_monitor_num)/SUM(monitor_valid_num),2),0) as lowPowerFactorRatio
|
||||
FROM
|
||||
<if test="param != null and param.type == 1">
|
||||
r_stat_org_pv_power_quality_y
|
||||
@@ -42,7 +42,7 @@
|
||||
r_stat_org_pv_power_quality_m
|
||||
</if>
|
||||
<where>
|
||||
`area_pq_event_type` in (
|
||||
area_pq_event_type in (
|
||||
#{param.mapId.eventTypeL,javaType=string},
|
||||
#{param.mapId.eventTypeP,javaType=string},
|
||||
#{param.mapId.eventTypeO,javaType=string}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RDimStationTargetDPO extends BaseEntity {
|
||||
@TableField(value = "Pass_Avg_Rate")
|
||||
private Double passAvgRate;
|
||||
|
||||
@TableField(value = "`State`")
|
||||
@TableField(value = "State")
|
||||
private String state;
|
||||
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class RDimStationTargetMPO extends BaseEntity {
|
||||
@TableField(value = "Pass_Avg_Rate")
|
||||
private Double passAvgRate;
|
||||
|
||||
@TableField(value = "`State`")
|
||||
@TableField(value = "State")
|
||||
private String state;
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class RDimStationTargetYPO extends BaseEntity {
|
||||
@TableField(value = "Pass_Avg_Rate")
|
||||
private Double passAvgRate;
|
||||
|
||||
@TableField(value = "`State`")
|
||||
@TableField(value = "State")
|
||||
private String state;
|
||||
|
||||
}
|
||||
@@ -20,6 +20,6 @@
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate,
|
||||
`State`, Create_By, Create_Time, Update_By, Update_Time
|
||||
State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -20,6 +20,6 @@
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate,
|
||||
`State`, Create_By, Create_Time, Update_By, Update_Time
|
||||
State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -20,6 +20,6 @@
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate,
|
||||
`State`, Create_By, Create_Time, Update_By, Update_Time
|
||||
State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -21,6 +21,6 @@
|
||||
<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
|
||||
Pass_Avg_Rate, State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -21,6 +21,6 @@
|
||||
<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
|
||||
Pass_Avg_Rate, State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -21,6 +21,6 @@
|
||||
<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
|
||||
Pass_Avg_Rate, State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO">
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id,
|
||||
max(plt) plt
|
||||
from
|
||||
r_stat_data_plt_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and value_type = 'MAX'
|
||||
and phasic_type in ('A','B','C')
|
||||
<if test="list != null and list.size() > 0">
|
||||
@@ -19,7 +19,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by `time`,line_id
|
||||
group by time,line_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -16,49 +16,49 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(v_unbalance) vUnbalance,
|
||||
max(greatest(v_thd, v_1, v_2, v_3, v_4, v_5, v_6, v_7, v_8, v_9, v_10, v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_19, v_20, v_21, v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_36, v_37, v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_48, v_49, v_50)) v
|
||||
from
|
||||
r_stat_data_v_d t0
|
||||
where
|
||||
`time` = #{time}
|
||||
time = #{time}
|
||||
and value_type = 'CP95'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) A
|
||||
left join
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(abs(vl_dev)) vlDev,
|
||||
max(abs(freq_dev)) freqDev
|
||||
from
|
||||
r_stat_data_v_d t0
|
||||
where
|
||||
`time` = #{time}
|
||||
time = #{time}
|
||||
and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) B
|
||||
on A.lineId = B.lineId
|
||||
left join
|
||||
(
|
||||
select
|
||||
`time` ,
|
||||
time ,
|
||||
line_id lineId,
|
||||
max(plt) plt
|
||||
from
|
||||
r_stat_data_plt_d
|
||||
where
|
||||
`time` = #{time}
|
||||
time = #{time}
|
||||
and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) C
|
||||
on A.lineId = C.lineId
|
||||
@@ -104,17 +104,17 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(v_unbalance) vUnbalance,
|
||||
max(greatest(v_thd, v_1, v_2, v_3, v_4, v_5, v_6, v_7, v_8, v_9, v_10, v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_19, v_20, v_21, v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_36, v_37, v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_48, v_49, v_50)) v
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and value_type = 'CP95'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) A
|
||||
group by
|
||||
@@ -129,17 +129,17 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(abs(vl_dev)) vlDev,
|
||||
max(abs(freq_dev)) freqDev
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) B
|
||||
group by
|
||||
@@ -154,16 +154,16 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time` ,
|
||||
time ,
|
||||
line_id lineId,
|
||||
max(plt) plt
|
||||
from
|
||||
r_stat_data_plt_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) C
|
||||
group by
|
||||
@@ -211,31 +211,31 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(v_unbalance) vUnbalance,
|
||||
max(greatest(v_thd, v_1, v_2, v_3, v_4, v_5, v_6, v_7, v_8, v_9, v_10, v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_19, v_20, v_21, v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_36, v_37, v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_48, v_49, v_50)) v
|
||||
from
|
||||
r_stat_data_v_d t0
|
||||
where
|
||||
`time` = #{time} and value_type = 'CP95'
|
||||
time = #{time} and value_type = 'CP95'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) A
|
||||
left join
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id lineId,
|
||||
max(abs(vl_dev)) vlDev,
|
||||
max(abs(freq_dev)) freqDev
|
||||
from
|
||||
r_stat_data_v_d t0
|
||||
where
|
||||
`time` = #{time} and value_type = 'MAX'
|
||||
time = #{time} and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) B
|
||||
on
|
||||
@@ -243,15 +243,15 @@
|
||||
left join
|
||||
(
|
||||
select
|
||||
`time` ,
|
||||
time ,
|
||||
line_id lineId,
|
||||
max(plt) plt
|
||||
from
|
||||
r_stat_data_plt_d
|
||||
where
|
||||
`time` = #{time} and value_type = 'MAX'
|
||||
time = #{time} and value_type = 'MAX'
|
||||
group by
|
||||
`time`,
|
||||
time,
|
||||
line_id
|
||||
) C
|
||||
on
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
<select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataVDPO">
|
||||
select
|
||||
A.`time`,
|
||||
A.time,
|
||||
A.line_id lineId,
|
||||
A.rms,
|
||||
C.vUnbalance,
|
||||
@@ -327,13 +327,13 @@
|
||||
from
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id,
|
||||
max(rms) rms
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A', 'B', 'C')
|
||||
and value_type in ('AVG')
|
||||
<if test="list != null and list.size() > 0">
|
||||
@@ -342,18 +342,18 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by `time`, line_id
|
||||
group by time, line_id
|
||||
) A
|
||||
inner join
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id,
|
||||
max(v_thd) vThd
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type in ('A', 'B', 'C')
|
||||
and value_type in ('CP95')
|
||||
<if test="list != null and list.size() > 0">
|
||||
@@ -362,19 +362,19 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by `time`,line_id
|
||||
group by time,line_id
|
||||
) B
|
||||
on A.`time` = B.`time` and A.line_id = B.line_id
|
||||
on A.time = B.time and A.line_id = B.line_id
|
||||
inner join
|
||||
(
|
||||
select
|
||||
`time`,
|
||||
time,
|
||||
line_id,
|
||||
max(v_unbalance) vUnbalance
|
||||
from
|
||||
r_stat_data_v_d
|
||||
where
|
||||
`time` between #{startTime} and #{endTime}
|
||||
time between #{startTime} and #{endTime}
|
||||
and phasic_type = 'T'
|
||||
and value_type in ('CP95')
|
||||
<if test="list != null and list.size() > 0">
|
||||
@@ -383,8 +383,8 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by `time`,line_id
|
||||
group by time,line_id
|
||||
) C
|
||||
on A.`time` = C.`time` and A.line_id = C.line_id
|
||||
on A.time = C.time and A.line_id = C.line_id
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,19 +3,19 @@
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.device.DeviceAbnormaStatisticsMapper">
|
||||
<insert id="insertTopMsg">
|
||||
INSERT INTO pqs_top_msg(
|
||||
`Time_Id`,
|
||||
`Dev_Id`,
|
||||
`Comout_Count`,
|
||||
`Comout_Desc`,
|
||||
`Integrity_Flag`,
|
||||
`Integrity_Value`,
|
||||
`Alarm_Count`,
|
||||
`Alarm_Desc`,
|
||||
`Flow_Flag`,
|
||||
`Flow_Value`,
|
||||
`OnlineRate_Flag`,
|
||||
`OnlineRate_Value`,
|
||||
`State`
|
||||
Time_Id,
|
||||
Dev_Id,
|
||||
Comout_Count,
|
||||
Comout_Desc,
|
||||
Integrity_Flag,
|
||||
Integrity_Value,
|
||||
Alarm_Count,
|
||||
Alarm_Desc,
|
||||
Flow_Flag,
|
||||
Flow_Value,
|
||||
OnlineRate_Flag,
|
||||
OnlineRate_Value,
|
||||
State
|
||||
) VALUES
|
||||
<foreach collection="list" separator="," item="item">
|
||||
(
|
||||
@@ -82,7 +82,7 @@
|
||||
SELECT
|
||||
device.id AS deviceId,
|
||||
IFNULL(SUM(integrity.due_time),3.14159) AS due,
|
||||
IFNULL(SUM(integrity.real_time),0) AS `real`,
|
||||
IFNULL(SUM(integrity.real_time),0) AS real,
|
||||
CONVERT(SUM(integrity.real_time)*100/SUM(integrity.due_time),DECIMAL(15,2)) AS integrity
|
||||
FROM r_stat_integrity_d integrity
|
||||
INNER JOIN pq_line line ON integrity.line_index = line.id
|
||||
@@ -158,13 +158,13 @@
|
||||
|
||||
<select id="selectAlarmStrategy" resultType="com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
B.`Name` name,
|
||||
A.`Integrity_Value` integrityValue,
|
||||
A.`Online_Value` onlineValue,
|
||||
A.`Offtime_Value` offTimeValue,
|
||||
A.`Warn_Value` warnValue,
|
||||
A.`Update_Time` updateTime,
|
||||
A.Id id,
|
||||
B.Name name,
|
||||
A.Integrity_Value integrityValue,
|
||||
A.Online_Value onlineValue,
|
||||
A.Offtime_Value offTimeValue,
|
||||
A.Warn_Value warnValue,
|
||||
A.Update_Time updateTime,
|
||||
B.Algo_Describe algoDesc
|
||||
FROM
|
||||
pqs_alarm_strategy A
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, `Level`, `limit count`,
|
||||
Statis_count, `State`, Create_By, Create_Time, Update_By, Update_Time
|
||||
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, Level, limit count,
|
||||
Statis_count, State, Create_By, Create_Time, Update_By, Update_Time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -15,7 +15,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
Org_Id, Statis_Date, `Station Id`, Target_type, `Level`, Monitor_Tag, Voltage_level,
|
||||
Org_Id, Statis_Date, Station Id, Target_type, Level, Monitor_Tag, Voltage_level,
|
||||
limit_count, Statis_count
|
||||
</sql>
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user