切换mysql为达梦数据库-代码审查

1.supervision-boot模块
This commit is contained in:
2024-09-27 10:28:01 +08:00
parent 64187da4fb
commit a4c17a4ac1
205 changed files with 1180 additions and 1722 deletions

View File

@@ -92,7 +92,7 @@ public class CarryCapacityResultPO extends BaseEntity {
/** /**
* 是否删除0无效1有效 * 是否删除0无效1有效
*/ */
@TableField(value = "`status`") @TableField(value = "status")
private Integer status; private Integer status;
@TableField(value = "evaluate_type") @TableField(value = "evaluate_type")

View File

@@ -31,7 +31,7 @@ public class CarryCapacityStrategyDhlPO extends BaseEntity {
/** /**
* 充电桩,电弧炉,电气化铁路 * 充电桩,电弧炉,电气化铁路
*/ */
@TableField(value = "`type`") @TableField(value = "type")
private String type; private String type;
/** /**

View File

@@ -22,7 +22,7 @@ public class CarryCapacityStrategyPO extends BaseEntity {
/** /**
* 总承载能力评估结果1-安全2-III级预警3-II级预警4-I 级预警) * 总承载能力评估结果1-安全2-III级预警3-II级预警4-I 级预警)
*/ */
@TableField(value = "`result`") @TableField(value = "result")
private Integer result; private Integer result;
/** /**
@@ -40,7 +40,7 @@ public class CarryCapacityStrategyPO extends BaseEntity {
/** /**
* 数量 * 数量
*/ */
@TableField(value = "`count`") @TableField(value = "count")
private Integer count; private Integer count;
/** /**

View File

@@ -38,7 +38,7 @@ public class RedisConfig {
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class); Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
// 指定要序列化的域(field,get,set),访问修饰符(public,private,protected) // 指定要序列化的域(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.registerModule(new JavaTimeModule());
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.registerModule(new SimpleModule().addDeserializer(Instant.class, new InstantDateDeserializer())); objectMapper.registerModule(new SimpleModule().addDeserializer(Instant.class, new InstantDateDeserializer()));

View File

@@ -3,16 +3,11 @@ package com.njcn.device.biz.commApi;
import com.njcn.common.pojo.constant.ServerInfo; import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.biz.commApi.fallback.CommLedgerDeptClientFallbackFactory; 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 com.njcn.user.pojo.po.Dept;
import org.springframework.cloud.openfeign.FeignClient; 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.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;

View File

@@ -27,7 +27,7 @@ import java.util.List;
public interface CommLineClient { public interface CommLineClient {
/** /**
* @param id * @param id id
* @Description: 获取监测点信息 * @Description: 获取监测点信息
* @Author: wr * @Author: wr
* @Date: 2023/9/22 11:11 * @Date: 2023/9/22 11:11

View File

@@ -1,8 +1,6 @@
package com.njcn.device.biz.commApi; 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.constant.ServerInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.param.StatisticsBizBaseParam; import com.njcn.common.pojo.param.StatisticsBizBaseParam;
import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory; 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.param.SubstationParam;
import com.njcn.device.biz.pojo.po.Overlimit; import com.njcn.device.biz.pojo.po.Overlimit;
import com.njcn.device.biz.pojo.po.PqsDeviceUnit; 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.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -4,6 +4,10 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
/**
* @author hongawen
*/
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
public enum RunFlagEnum { public enum RunFlagEnum {

View File

@@ -14,10 +14,8 @@ import com.njcn.device.pms.pojo.param.*;
import com.njcn.device.pms.pojo.po.*; import com.njcn.device.pms.pojo.po.*;
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService; import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
import com.njcn.device.pms.service.majornetwork.ITerminalLogService; import com.njcn.device.pms.service.majornetwork.ITerminalLogService;
import com.njcn.device.pms.service.majornetwork.ITerminalService;
import com.njcn.web.utils.RequestUtil; import com.njcn.web.utils.RequestUtil;
import io.netty.util.concurrent.FastThreadLocal; import io.netty.util.concurrent.FastThreadLocal;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
@@ -25,11 +23,8 @@ import org.aspectj.lang.annotation.*;
import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.validation.BindingResult; 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 org.springframework.web.multipart.MultipartFile;
import javax.security.auth.Subject;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method; import java.lang.reflect.Method;

View File

@@ -7,10 +7,10 @@
SELECT DISTINCT SELECT DISTINCT
monitor.Org_Id AS orgId, monitor.Org_Id AS orgId,
monitor.Org_Name AS orgName, monitor.Org_Name AS orgName,
monitor.`Powerr_Id` AS powerId, monitor.Powerr_Id AS powerId,
monitor.`Powerr_Name` AS powerName, monitor.Powerr_Name AS powerName,
monitor.id AS monitorId, monitor.id AS monitorId,
monitor.`Name` AS monitorName, monitor.Name AS monitorName,
monitor.Line_Id, monitor.Line_Id,
monitor.Line_Name, monitor.Line_Name,
pdm.Monitor_Sort AS monitorSort, pdm.Monitor_Sort AS monitorSort,
@@ -29,8 +29,8 @@
(( ((
SELECT SELECT
pm.id, pm.id,
pm.`Name`, pm.Name,
pm.`Status`, pm.Status,
pm.Org_Id, pm.Org_Id,
pm.Org_Name, pm.Org_Name,
pm.Powerr_Id, pm.Powerr_Id,
@@ -52,8 +52,8 @@
( (
SELECT SELECT
ppd.id, ppd.id,
ppd.`Name`, ppd.Name,
ppd.`Status`, ppd.Status,
ppd.Org_Id, ppd.Org_Id,
ppd.Org_Name, ppd.Org_Name,
ppd.Power_Station_Id, ppd.Power_Station_Id,
@@ -66,8 +66,8 @@
( (
SELECT SELECT
ppc.id, ppc.id,
ppc.`Name`, ppc.Name,
ppc.`Status`, ppc.Status,
ppc.Org_Id, ppc.Org_Id,
ppc.Org_Name, ppc.Org_Name,
ppc.Power_Station_Id, ppc.Power_Station_Id,
@@ -82,8 +82,8 @@
( (
SELECT SELECT
ppgu.id, ppgu.id,
ppgu.`Name`, ppgu.Name,
ppgu.`Status`, ppgu.Status,
ppgu.Org_Id, ppgu.Org_Id,
ppgu.Org_Name, ppgu.Org_Name,
ppgu.Power_Station_Id, ppgu.Power_Station_Id,
@@ -97,8 +97,8 @@
)) AS monitor )) AS monitor
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
WHERE WHERE
monitor.`Status` = 1 monitor.Status = 1
AND pdm.`Status` = 1 AND pdm.Status = 1
AND monitor.Org_Id IN AND monitor.Org_Id IN
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=","> <foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
#{orgId} #{orgId}
@@ -131,17 +131,17 @@
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser} AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
</if> </if>
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''"> <if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%') AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
</if> </if>
</select> </select>
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO"> <select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
SELECT DISTINCT SELECT DISTINCT
monitor.Org_Id AS orgId, monitor.Org_Id AS orgId,
monitor.Org_Name AS orgName, monitor.Org_Name AS orgName,
monitor.`Powerr_Id` AS powerId, monitor.Powerr_Id AS powerId,
monitor.`Powerr_Name` AS powerName, monitor.Powerr_Name AS powerName,
monitor.id AS monitorId, monitor.id AS monitorId,
monitor.`Name` AS monitorName, monitor.Name AS monitorName,
monitor.Line_Id, monitor.Line_Id,
monitor.Line_Name, monitor.Line_Name,
pdm.Monitor_Sort AS monitorSort, pdm.Monitor_Sort AS monitorSort,
@@ -158,8 +158,8 @@
(( ((
SELECT SELECT
pm.id, pm.id,
pm.`Name`, pm.Name,
pm.`Status`, pm.Status,
pm.Org_Id, pm.Org_Id,
pm.Org_Name, pm.Org_Name,
pm.Powerr_Id, pm.Powerr_Id,
@@ -180,8 +180,8 @@
( (
SELECT SELECT
ppd.id, ppd.id,
ppd.`Name`, ppd.Name,
ppd.`Status`, ppd.Status,
ppd.Org_Id, ppd.Org_Id,
ppd.Org_Name, ppd.Org_Name,
ppd.Power_Station_Id, ppd.Power_Station_Id,
@@ -194,8 +194,8 @@
) AS monitor ) AS monitor
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
WHERE WHERE
monitor.`Status` = 1 monitor.Status = 1
AND pdm.`Status` = 1 AND pdm.Status = 1
AND monitor.Org_Id IN AND monitor.Org_Id IN
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=","> <foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
#{orgId} #{orgId}
@@ -228,7 +228,7 @@
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser} AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
</if> </if>
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''"> <if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%') AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
</if> </if>
</select> </select>
@@ -239,26 +239,26 @@
<select id="getPwMonitorName" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO"> <select id="getPwMonitorName" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
select select
id as monitorId, id as monitorId,
`Name` as monitorName Name as monitorName
from from
(( ((
SELECT SELECT
pm.id, pm.id,
pm.`Name` pm.Name
FROM FROM
pms_monitor AS pm pms_monitor AS pm
) UNION ALL ) UNION ALL
( (
SELECT SELECT
ppd.id, ppd.id,
ppd.`Name` ppd.Name
FROM FROM
pms_power_distributionarea AS ppd pms_power_distributionarea AS ppd
) UNION ALL ) UNION ALL
( (
SELECT SELECT
ppc.id, ppc.id,
ppc.`Name` ppc.Name
FROM FROM
pms_power_client as ppc pms_power_client as ppc
@@ -266,7 +266,7 @@
( (
SELECT SELECT
ppgu.id, ppgu.id,
ppgu.`Name` ppgu.Name
FROM FROM
pms_power_generation_user AS ppgu pms_power_generation_user AS ppgu
) )
@@ -280,15 +280,15 @@
</if> </if>
</where> </where>
<if test="name !=null and name != ''"> <if test="name !=null and name != ''">
AND `Name` LIKE CONCAT('%',#{name},'%') AND Name LIKE CONCAT('%',#{name},'%')
</if> </if>
</select> </select>
<select id="getPwMonitorDataNewList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO"> <select id="getPwMonitorDataNewList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
SELECT SELECT
pdm.Org_Id AS orgId, pdm.Org_Id AS orgId,
ps.Org_Name AS orgName, ps.Org_Name AS orgName,
pdm.`Power_Station_Id` AS powerId, pdm.Power_Station_Id AS powerId,
ps.`Power_Name` AS powerName, ps.Power_Name AS powerName,
pdm.Monitor_Id AS monitorId, pdm.Monitor_Id AS monitorId,
pdm.Line_Id, pdm.Line_Id,
pdm.Monitor_Sort AS monitorSort, pdm.Monitor_Sort AS monitorSort,

View File

@@ -23,7 +23,7 @@
Org_Id as Org_Id , Org_Id as Org_Id ,
Voltage_Level as Voltage_Level, Voltage_Level as Voltage_Level,
1 as If_Power_User, 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, now() as Created_Date,
1 as Status, 1 as Status,
now() as Create_Time, now() as Create_Time,
@@ -58,7 +58,7 @@
Org_Id as Org_Id , Org_Id as Org_Id ,
Voltage_Level as Voltage_Level, Voltage_Level as Voltage_Level,
1 as If_Power_User, 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, now() as Created_Date,
1 as Status, 1 as Status,
now() as Create_Time, now() as Create_Time,

View File

@@ -95,14 +95,14 @@
pm.Powerr_Id AS powerId, pm.Powerr_Id AS powerId,
pm.Powerr_Name AS powerName, pm.Powerr_Name AS powerName,
pm.Id AS monitorId, pm.Id AS monitorId,
pm.`Name` AS monitorName, pm.Name AS monitorName,
pm.Voltage_Level AS monitorVoltageLevel, pm.Voltage_Level AS monitorVoltageLevel,
pm.Monitor_Type AS monitorType, pm.Monitor_Type AS monitorType,
pm.Monitor_State AS monitorState pm.Monitor_State AS monitorState
FROM FROM
pms_monitor AS pm pms_monitor AS pm
WHERE WHERE
pm.`Status` = 1 pm.Status = 1
AND pm.Id IN AND pm.Id IN
<foreach collection="pmsMonitorInfoParam.monitorIds" item="item" open="(" close=")" separator=","> <foreach collection="pmsMonitorInfoParam.monitorIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
@@ -126,7 +126,7 @@
</foreach> </foreach>
</if> </if>
<if test="pmsMonitorInfoParam.monitorName != null and pmsMonitorInfoParam.monitorName != ''"> <if test="pmsMonitorInfoParam.monitorName != null and pmsMonitorInfoParam.monitorName != ''">
AND pm.`Name` LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%') AND pm.Name LIKE CONCAT('%',#{pmsMonitorInfoParam.monitorName},'%')
</if> </if>
</select> </select>
<select id="getMonitorTerminal" resultType="com.njcn.device.pms.pojo.vo.MonitorVO"> <select id="getMonitorTerminal" resultType="com.njcn.device.pms.pojo.vo.MonitorVO">

View File

@@ -13,14 +13,14 @@
pg.id AS generatrixId, pg.id AS generatrixId,
pm.Line_Name AS generatrixName, pm.Line_Name AS generatrixName,
pm.Id AS monitorId, pm.Id AS monitorId,
pm.`Name` AS monitorName, pm.Name AS monitorName,
pg.Scale AS generatrixVoltageLevel pg.Scale AS generatrixVoltageLevel
FROM FROM
pms_generatrix_wire AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_monitor AS pm ON pm.line_id = pg.id LEFT JOIN pms_monitor AS pm ON pm.line_id = pg.id
WHERE WHERE
pm.`Status` = 1 pm.Status = 1
AND pg.`Status` =1 AND pg.Status =1
AND pg.id IN AND pg.id IN
<foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=","> <foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
@@ -54,8 +54,8 @@
pms_generatrix_wire AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
WHERE WHERE
pg.`Status` = 1 pg.Status = 1
AND pss.`Status` = 1 AND pss.Status = 1
<if test="param.powerStationId != null and param.powerStationId !=''"> <if test="param.powerStationId != null and param.powerStationId !=''">
AND pss.Power_Id = #{param.powerStationId} AND pss.Power_Id = #{param.powerStationId}
</if> </if>
@@ -83,8 +83,8 @@
pms_generatrix_wire AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
WHERE WHERE
pg.`Status` = 1 pg.Status = 1
AND pss.`Status` = 1 AND pss.Status = 1
<if test="param.generatrixIds != null and param.generatrixIds.size() >0 "> <if test="param.generatrixIds != null and param.generatrixIds.size() >0 ">
AND pg.id IN AND pg.id IN
<foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=","> <foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=",">

View File

@@ -6,7 +6,7 @@
<select id="selectPVCapacity" resultType="com.njcn.device.pms.pojo.vo.PVCapacity"> <select id="selectPVCapacity" resultType="com.njcn.device.pms.pojo.vo.PVCapacity">
SELECT SELECT
sum( P_Capacity ) AS sumCount, sum( P_Capacity ) AS sumCount,
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea ( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
<where> <where>
org_id IN org_id IN
<foreach collection="orgIds" item="item" open="(" close=")" separator=","> <foreach collection="orgIds" item="item" open="(" close=")" separator=",">
@@ -15,7 +15,7 @@
AND STATUS = 1 AND STATUS = 1
</where> </where>
) AS sumOrgCount, ) AS sumOrgCount,
( SELECT sum( `Photovoltaic_Capacity` ) FROM pms_power_distributionarea ( SELECT sum( Photovoltaic_Capacity ) FROM pms_power_distributionarea
<where> <where>
org_id IN org_id IN
<foreach collection="orgIds" item="item" open="(" close=")" separator=","> <foreach collection="orgIds" item="item" open="(" close=")" separator=",">

View File

@@ -6,7 +6,7 @@
<select id="getMonitorInfo" resultType="com.njcn.device.pms.pojo.po.PmsMonitorPO"> <select id="getMonitorInfo" resultType="com.njcn.device.pms.pojo.po.PmsMonitorPO">
SELECT SELECT
id, id,
`Name`, Name,
Org_Name AS orgName, Org_Name AS orgName,
Org_Id AS orgId, Org_Id AS orgId,
Operation_Name AS operationName, Operation_Name AS operationName,

View File

@@ -5,7 +5,7 @@
<select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO"> <select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
SELECT SELECT
pm.Id, pm.Id,
pm.`Name`, pm.Name,
pm.Org_Name, pm.Org_Name,
pm.Org_Id, pm.Org_Id,
pm.Powerr_Name, pm.Powerr_Name,
@@ -20,9 +20,9 @@
LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id
LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id
<where> <where>
pm.`Status` = 1 pm.Status = 1
AND ps.`Status` = 1 AND ps.Status = 1
AND pm.`Monitor_State` = #{status} AND pm.Monitor_State = #{status}
<if test="deptIdList != null and deptIdList.size > 0"> <if test="deptIdList != null and deptIdList.size > 0">
AND pm.Org_Id IN AND pm.Org_Id IN
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'> <foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
@@ -99,7 +99,7 @@
sum(t.Smelting_Load_Capacity) as capacity4 sum(t.Smelting_Load_Capacity) as capacity4
FROM pms_statistics_special_monitor t FROM pms_statistics_special_monitor t
<where> <where>
AND t.`Status` = 1 AND t.Status = 1
<if test="deptIdList != null and deptIdList.size > 0"> <if test="deptIdList != null and deptIdList.size > 0">
AND t.Org_Id IN AND t.Org_Id IN
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'> <foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
@@ -126,7 +126,7 @@
sum(t.Smelting_Load_Capacity) as capacity4 sum(t.Smelting_Load_Capacity) as capacity4
FROM pms_statistics_special_monitor t FROM pms_statistics_special_monitor t
<where> <where>
AND t.`Status` = 1 AND t.Status = 1
<if test="deptIdList != null and deptIdList.size > 0"> <if test="deptIdList != null and deptIdList.size > 0">
AND t.Org_Id IN AND t.Org_Id IN
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'> <foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
@@ -154,7 +154,7 @@
sum(t.Smelting_Load_Capacity) as capacity4 sum(t.Smelting_Load_Capacity) as capacity4
FROM pms_statistics_special_monitor t FROM pms_statistics_special_monitor t
<where> <where>
AND t.`Status` = 1 AND t.Status = 1
<if test="deptIdList != null and deptIdList.size > 0"> <if test="deptIdList != null and deptIdList.size > 0">
AND t.Org_Id IN AND t.Org_Id IN
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'> <foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
@@ -185,7 +185,7 @@
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisRailwayVO"> resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisRailwayVO">
SELECT SELECT
DISTINCT pts.Id, DISTINCT pts.Id,
pts.`Name`, pts.Name,
pts.Org_Name, pts.Org_Name,
pts.Railway_Line_Name, pts.Railway_Line_Name,
pts.Org_Id, pts.Org_Id,
@@ -200,8 +200,8 @@
LEFT JOIN pms_statation_stat ps ON pts.Power_Id = ps.Power_Id 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 LEFT JOIN pms_traction_station_expand ptse ON ptse.traction_Station_Id = pts.Id
<where> <where>
pts.`Status` = 1 pts.Status = 1
AND ps.`Status` = 1 AND ps.Status = 1
<if test="deptIdList != null and deptIdList.size > 0"> <if test="deptIdList != null and deptIdList.size > 0">
AND pts.Org_Id IN AND pts.Org_Id IN
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'> <foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>

View File

@@ -11,7 +11,7 @@
pm.Powerr_Name AS powerName, pm.Powerr_Name AS powerName,
pgw.name AS busBarName, pgw.name AS busBarName,
pm.Id AS monitorId, pm.Id AS monitorId,
pm.`Name` AS monitorName, pm.Name AS monitorName,
pss.Voltage_Level AS powerVoltageLevel pss.Voltage_Level AS powerVoltageLevel
FROM FROM
pms_monitor AS pm pms_monitor AS pm

View File

@@ -6,8 +6,8 @@
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO"> <select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
SELECT SELECT
pts.Id AS id, pts.Id AS id,
pts.`NAME` AS name, pts.NAME AS name,
ptse.`railway_type` AS railwayType, ptse.railway_type AS railwayType,
pts.Org_Name AS orgName, pts.Org_Name AS orgName,
pts.Org_Id AS orgId, pts.Org_Id AS orgId,
pts.Operation_Name AS operationName, pts.Operation_Name AS operationName,
@@ -24,7 +24,7 @@
pts.Created_Date AS createdDate, pts.Created_Date AS createdDate,
pts.User_Tag AS userTag, pts.User_Tag AS userTag,
pts.Is_Up_To_Grid AS isUpToGrid, pts.Is_Up_To_Grid AS isUpToGrid,
pts.`STATUS` AS `status`, pts.STATUS AS status,
pts.Create_By AS createBy, pts.Create_By AS createBy,
pts.Create_Time AS createTime, pts.Create_Time AS createTime,
pts.Update_By AS updateBy, pts.Update_By AS updateBy,

View File

@@ -6,7 +6,7 @@
SELECT SELECT
dev.id as id, dev.id as id,
dev.pid as pid, dev.pid as pid,
dev.NAME as `name`, dev.NAME as name,
pd.Run_Flag as devFlag, pd.Run_Flag as devFlag,
b.* b.*
FROM FROM

View File

@@ -37,7 +37,7 @@
CONVERT ( CONVERT (
SUM( real_time )* 100 / SUM( due_time ), SUM( real_time )* 100 / SUM( due_time ),
DECIMAL ( 15, 2 )) AS integrityRate, DECIMAL ( 15, 2 )) AS integrityRate,
sum( real_time ) `realTime`, sum( real_time ) realTime,
sum( due_time ) dueTime sum( due_time ) dueTime
FROM FROM
r_stat_integrity_d r_stat_integrity_d

View File

@@ -43,10 +43,10 @@ public interface LineDetailMapper extends BaseMapper<LineDetail> {
* @return 结果 * @return 结果
*/ */
List<LineDetailDataVO> getLineDetailInfo(@Param("lineIds") List<String> lineIds); 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); 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); Integer getLineCountBySubstation(@Param("subIndex")String subIndex);

View File

@@ -389,7 +389,7 @@ public interface LineMapper extends BaseMapper<Line> {
"\tpq_line,\n" + "\tpq_line,\n" +
"\tpq_device\n" + "\tpq_device\n" +
"WHERE\n" + "WHERE\n" +
"\tpq_line.`Level` = 6\n" + "\tpq_line.Level = 6\n" +
"AND SUBSTRING_INDEX(\n" + "AND SUBSTRING_INDEX(\n" +
"\tSUBSTRING_INDEX(pq_line.Pids, ',', 5),\n" + "\tSUBSTRING_INDEX(pq_line.Pids, ',', 5),\n" +
"\t',' ,- 1\n" + "\t',' ,- 1\n" +

View File

@@ -10,7 +10,7 @@ FROM
SELECT SELECT
d.NAME type, d.NAME type,
d.id typeId, d.id typeId,
d.`Level`, d.Level,
max( a.Occurred_Time ) occurredTime, max( a.Occurred_Time ) occurredTime,
c.NAME subName, c.NAME subName,
b.NAME devLineName, b.NAME devLineName,
@@ -63,7 +63,7 @@ FROM
SELECT SELECT
f.NAME type, f.NAME type,
f.id typeId, f.id typeId,
f.`Level`, f.Level,
max(a.Occurred_Time) occurredTime, max(a.Occurred_Time) occurredTime,
e.NAME subName, e.NAME subName,
b.NAME devLineName, b.NAME devLineName,
@@ -125,7 +125,7 @@ ORDER BY
SELECT SELECT
a.id, a.id,
a.occurred_time, a.occurred_time,
b.`level`, b.level,
a.Remark, a.Remark,
a.flag, a.flag,
b.name type, b.name type,

View File

@@ -5,14 +5,14 @@
<select id="getAlarmStrategyData" resultType="AlarmStrategyVO"> <select id="getAlarmStrategyData" resultType="AlarmStrategyVO">
SELECT SELECT
A.`Id` id, A.Id id,
B.`Name` name, B.Name name,
A.`Integrity_Value` integrityValue, A.Integrity_Value integrityValue,
A.`Online_Value` onlineValue, A.Online_Value onlineValue,
A.`Offtime_Value` offTimeValue, A.Offtime_Value offTimeValue,
A.`Warn_Value` warnValue, A.Warn_Value warnValue,
A.`Update_Time` updateTime, A.Update_Time updateTime,
C.`Name` updateBy C.Name updateBy
FROM FROM
pqs_alarm_strategy A, pqs_alarm_strategy A,
sys_dict_data B, sys_dict_data B,

View File

@@ -24,7 +24,7 @@
<if test="type == 1"> <if test="type == 1">
pq_dept_line.id unitId, pq_dept_line.id unitId,
point.id pointId, point.id pointId,
lineDetail.Time_Interval as `interval`, lineDetail.Time_Interval as interval,
lineDetail.load_type lineTag, lineDetail.load_type lineTag,
dic.id voltageLevel, dic.id voltageLevel,
dev.id devId, dev.id devId,

View File

@@ -13,11 +13,11 @@
<select id="selectLineTable" resultType="com.njcn.device.pq.pojo.po.DevFuction"> <select id="selectLineTable" resultType="com.njcn.device.pq.pojo.po.DevFuction">
SELECT pd.id "lineId" FROM pq_device pd SELECT pd.id "lineId" FROM pq_device pd
inner join pq_line pl on pd.id = pl.id inner join pq_line pl on pd.id = pl.id
where pl.`Level` = 4 where pl.Level = 4
</select> </select>
<select id="selectDictTable" resultType="com.njcn.device.pq.pojo.po.DevFuction"> <select id="selectDictTable" resultType="com.njcn.device.pq.pojo.po.DevFuction">
select sdd.id "fucName" from sys_dict_type sdt select sdd.id "fucName" from sys_dict_type sdt
inner join sys_dict_data sdd on sdd.Type_Id = sdt.Id inner join sys_dict_data sdd on sdd.Type_Id = sdt.Id
where sdt.`Code` = 'Dev_Fun' where sdt.Code = 'Dev_Fun'
</select> </select>
</mapper> </mapper>

View File

@@ -5,9 +5,9 @@
<select id="getMinDeviceLevel" resultType="DeviceOnlineDataDTO"> <select id="getMinDeviceLevel" resultType="DeviceOnlineDataDTO">
SELECT SELECT
a.`Id` deviceId, a.Id deviceId,
e.`Line_Grade` lineGrade, e.Line_Grade lineGrade,
f.`Name` levelName, f.Name levelName,
MIN(f.Algo_Describe) MIN(f.Algo_Describe)
FROM FROM
pq_line a, pq_line a,
@@ -32,7 +32,7 @@
<select id="getMinDeviceLevelById" resultType="DeviceOnlineDataDTO"> <select id="getMinDeviceLevelById" resultType="DeviceOnlineDataDTO">
SELECT 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 FROM
pq_line a, pq_line a,
pq_line b, pq_line b,
@@ -50,11 +50,11 @@
<select id="getDeviceFatherData" resultType="DeviceOnlineTabVO"> <select id="getDeviceFatherData" resultType="DeviceOnlineTabVO">
SELECT SELECT
a.`Id` deviceId, a.Id deviceId,
a.`Name` deviceName, a.Name deviceName,
b.`Name` subName, b.Name subName,
c.`Name` gdName, c.Name gdName,
e.`Name` provinceName e.Name provinceName
FROM FROM
pq_line a, pq_line a,
pq_line b, pq_line b,

View File

@@ -32,7 +32,7 @@
</foreach> </foreach>
AND AND
</if> </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 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 C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0 AND A1.Id = D.Id
</select> </select>
@@ -56,7 +56,7 @@
<select id="getMonitorDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO"> <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 from pq_line a
inner join pq_line_detail b on a.id=b.id inner join pq_line_detail b on a.id=b.id
where a.id = #{monitorId} where a.id = #{monitorId}

View File

@@ -46,10 +46,10 @@
DISTINCT DISTINCT
sub.id, sub.id,
sub.pid, sub.pid,
sub.`Level`, sub.Level,
sub.sort, sub.sort,
sub.`Name`, sub.Name,
sdd.`Name` AS subScale sdd.Name AS subScale
FROM FROM
pq_line line pq_line line
INNER JOIN pq_line wire ON line.pid = wire.id INNER JOIN pq_line wire ON line.pid = wire.id
@@ -70,18 +70,18 @@
line.Id as 'id', line.Id as 'id',
line.pid as 'pid', line.pid as 'pid',
line.Pids as 'pids', line.Pids as 'pids',
line.`Name` AS 'name', line.Name AS 'name',
line.`Level`as 'Level', line.Levelas 'Level',
pd.Update_Time AS 'updateTime', pd.Update_Time AS 'updateTime',
line.Sort as 'sort', line.Sort as 'sort',
pd.Com_Flag as 'ComFlag', pd.Com_Flag as 'ComFlag',
sdd.`Name` AS 'LineScale', sdd.Name AS 'LineScale',
device.`Name` AS 'deviceName', device.Name AS 'deviceName',
pd.IP AS 'ip', pd.IP AS 'ip',
msdd.`Name` AS 'manufacturer', msdd.Name AS 'manufacturer',
pldsdd.`Name` AS 'lineGradeName', pldsdd.Name AS 'lineGradeName',
pldsdd.`id` AS 'lineGrade', pldsdd.id AS 'lineGrade',
pldsdd.Algo_Describe AS `algoDescribe`, pldsdd.Algo_Describe AS algoDescribe,
pld.Load_Type AS 'loadType' pld.Load_Type AS 'loadType'
FROM FROM
pq_line AS line pq_line AS line
@@ -92,9 +92,9 @@
LEFT JOIN sys_dict_data AS sdd ON sdd.id = pv.Scale 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 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 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 WHERE
line.`Level` = 6 line.Level = 6
AND AND
line.id in line.id in
<foreach collection="lineIndexes" item="item" open="(" close=")" separator=","> <foreach collection="lineIndexes" item="item" open="(" close=")" separator=",">

View File

@@ -448,18 +448,18 @@
<select id="getBaseLineInfo" resultType="BaseLineInfo"> <select id="getBaseLineInfo" resultType="BaseLineInfo">
<!-- SELECT--> <!-- SELECT-->
<!-- line.Id,--> <!-- line.Id,-->
<!-- area.`Name` provincialName,--> <!-- area.Name provincialName,-->
<!-- gd.`Name` gdName,--> <!-- gd.Name gdName,-->
<!-- substation.`Name` subName,--> <!-- substation.Name subName,-->
<!-- subscale.`Name` subScale,--> <!-- subscale.Name subScale,-->
<!-- device.`Name` deviceName,--> <!-- device.Name deviceName,-->
<!-- pqdevice.IP networkParam,--> <!-- pqdevice.IP networkParam,-->
<!-- pqdevice.Com_Flag comState,--> <!-- pqdevice.Com_Flag comState,-->
<!-- factory.`Name` factoryName,--> <!-- factory.Name factoryName,-->
<!-- pqdevice.Update_Time time,--> <!-- pqdevice.Update_Time time,-->
<!-- voltage.`Name` subvName,--> <!-- voltage.Name subvName,-->
<!-- scale.`Name` subvScale,--> <!-- scale.Name subvScale,-->
<!-- line.`Name` lineName,--> <!-- line.Name lineName,-->
<!-- line.Sort--> <!-- line.Sort-->
<!-- FROM--> <!-- FROM-->
<!-- pq_line line,--> <!-- pq_line line,-->
@@ -497,18 +497,18 @@
select select
line.Id, line.Id,
line.`Name` lineName, line.Name lineName,
area.`Name` provincialName, area.Name provincialName,
gd.`Name` gdName, gd.Name gdName,
substation.`Name` subName, substation.Name subName,
subscale.`Name` subScale, subscale.Name subScale,
device.`Name` deviceName, device.Name deviceName,
voltage.Name subvName, voltage.Name subvName,
subvscale.Name subvScale, subvscale.Name subvScale,
pqdevice.IP networkParam, pqdevice.IP networkParam,
pqdevice.Com_Flag comState, pqdevice.Com_Flag comState,
pqdevice.Update_Time time, pqdevice.Update_Time time,
factory.`Name` factoryName factory.Name factoryName
from from
pq_line line, pq_line line,
pq_line voltage, pq_line voltage,
@@ -537,25 +537,25 @@
and device.Id = pqdevice.Id and device.Id = pqdevice.Id
and pqdevice.Manufacturer = factory.id and pqdevice.Manufacturer = factory.id
and substation.Id = pqsubstation.Id and substation.Id = pqsubstation.Id
and pqsubstation.`Scale` = subscale.Id and pqsubstation.Scale = subscale.Id
and voltage.Id = pqvoltage.Id and voltage.Id = pqvoltage.Id
and pqvoltage.`Scale` = subvscale.Id and pqvoltage.Scale = subvscale.Id
</select> </select>
<select id="getBaseLineAreaInfo" resultType="AreaLineInfoVO"> <select id="getBaseLineAreaInfo" resultType="AreaLineInfoVO">
SELECT SELECT
line.Id lineId, line.Id lineId,
line.`Name` lineName, line.Name lineName,
gd.`Name` gdName, gd.Name gdName,
substation.id subId, substation.id subId,
substation.`Name` subName, substation.Name subName,
subscale.name subScale, subscale.name subScale,
pqdevice.IP ip, pqdevice.IP ip,
factory.`Name` manufacturer, factory.Name manufacturer,
voltage.id voltageId, voltage.id voltageId,
voltage.`Name` voltageName, voltage.Name voltageName,
scale.`Name` voltageScale, scale.Name voltageScale,
pqdevice.run_flag, pqdevice.run_flag,
pqdevice.com_flag, pqdevice.com_flag,
pqsubstation.Lng, pqsubstation.Lng,
@@ -649,8 +649,8 @@
<select id="getSubstationInfo" resultType="PollutionSubstationDTO"> <select id="getSubstationInfo" resultType="PollutionSubstationDTO">
SELECT A.id, SELECT A.id,
A.`Name` name, A.Name name,
C.`Name` voltageLevel C.Name voltageLevel
FROM pq_line A, FROM pq_line A,
pq_substation B, pq_substation B,
sys_dict_data C sys_dict_data C
@@ -662,7 +662,7 @@
<select id="getLineInfo" resultType="PollutionLineDTO"> <select id="getLineInfo" resultType="PollutionLineDTO">
SELECT SELECT
A.Id, A.Id,
A.`Name`, A.Name,
A1.Name busBar, A1.Name busBar,
A3.Name substation, A3.Name substation,
A3.Id substationId, A3.Id substationId,
@@ -707,10 +707,10 @@
<select id="getWarningSub" resultType="WarningSubstationDTO"> <select id="getWarningSub" resultType="WarningSubstationDTO">
SELECT SELECT
A1.Id, A1.Id,
A1.`Name` subName, A1.Name subName,
B.`Name` scale, B.Name scale,
A2.`Name` city, A2.Name city,
D.`Name` province D.Name province
FROM FROM
pq_line A1, pq_line A1,
pq_line A2, pq_line A2,
@@ -723,21 +723,21 @@
<foreach item="item" collection="list" separator="," open="(" close=")"> <foreach item="item" collection="list" separator="," open="(" close=")">
#{item} #{item}
</foreach> </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>
<select id="getOverLimitLineInfo" resultType="OverLimitLineDTO"> <select id="getOverLimitLineInfo" resultType="OverLimitLineDTO">
SELECT SELECT
A1.id, A1.id,
A1.`Name` lineName, A1.Name lineName,
C1.`Name` lineScale, C1.Name lineScale,
C2.`Name` loadType, C2.Name loadType,
D.Obj_Name lineObjectName, D.Obj_Name lineObjectName,
D.Monitor_Id monitorNumber, D.Monitor_Id monitorNumber,
A4.`Name` subName, A4.Name subName,
C3.`Name` subScale, C3.Name subScale,
A5.`Name` cityCompany, A5.Name cityCompany,
F.`Name` provinceCompany, F.Name provinceCompany,
dev.Manufacturer dev.Manufacturer
FROM FROM
pq_line A1, pq_line A1,
@@ -761,7 +761,7 @@
</foreach> </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 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 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>
<select id="getDeviceStatus" resultType="LineStateVO"> <select id="getDeviceStatus" resultType="LineStateVO">
@@ -802,7 +802,7 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`Name` Name
FROM FROM
pq_line pq_line
WHERE WHERE
@@ -817,7 +817,7 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name` name, A.Name name,
D.run_flag runFlag, D.run_flag runFlag,
D.com_flag comFlag D.com_flag comFlag
FROM FROM
@@ -972,8 +972,8 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`level`, level,
`Name` Name
FROM FROM
pq_line pq_line
WHERE WHERE
@@ -1018,7 +1018,7 @@
pq_line_detail B, pq_line_detail B,
pq_device C pq_device C
WHERE 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 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 C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0
</select> </select>
@@ -1156,7 +1156,7 @@
<select id="getLineBySubStation" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO"> <select id="getLineBySubStation" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
SELECT SELECT
pq_line.id pointId, pq_line.id pointId,
lineDetail.Time_Interval `interval`, lineDetail.Time_Interval interval,
dev.id devId, dev.id devId,
device.com_flag device.com_flag
FROM FROM
@@ -1177,7 +1177,7 @@
</select> </select>
<select id="getMonitorListDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO"> <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 from pq_line line
inner join pq_line_detail lineDetail on line.id = lineDetail.id inner join pq_line_detail lineDetail on line.id = lineDetail.id
inner join pq_line subv on line.pid = subv.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_line pl6 on pl5.pId = pl6.Id
left join pq_voltage pv on pv.Id = pl2.Id left join pq_voltage pv on pv.Id = pl2.Id
left join pq_device pd on pl3.Id = pd.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> <where>
<if test="ids!=null and ids.size() > 0"> <if test="ids!=null and ids.size() > 0">
pl.Id IN pl.Id IN

View File

@@ -5,9 +5,9 @@
<select id="getDeviceLogData" resultType="DeviceLogVO"> <select id="getDeviceLogData" resultType="DeviceLogVO">
SELECT SELECT
A.`Name` name, A.Name name,
B.`Name` type, B.Name type,
C.`Name` updateBy C.Name updateBy
FROM FROM
pq_line A, pq_line A,
sys_dict_data B, sys_dict_data B,
@@ -18,9 +18,9 @@
AND C.Id = #{updateBys} AND C.Id = #{updateBys}
</select> </select>
<!-- SELECT--> <!-- SELECT-->
<!-- A.`Name` name,--> <!-- A.Name name,-->
<!-- B.`Name` type,--> <!-- B.Name type,-->
<!-- C.`Name` updateBy--> <!-- C.Name updateBy-->
<!-- FROM--> <!-- FROM-->
<!-- pq_line A,--> <!-- pq_line A,-->
<!-- sys_dict_data B,--> <!-- sys_dict_data B,-->
@@ -40,9 +40,9 @@
<select id="getEventLogData" resultType="EventLogVO"> <select id="getEventLogData" resultType="EventLogVO">
SELECT SELECT
A.`Name` line, A.Name line,
A3.`Name` substation, A3.Name substation,
A4.`Name` powerCompany A4.Name powerCompany
FROM FROM
pq_line A, pq_line A,
pq_line A1, pq_line A1,

View File

@@ -6,7 +6,7 @@
SELECT SELECT
dev.id as id, dev.id as id,
dev.pid as pid, dev.pid as pid,
dev.NAME as `name`, dev.NAME as name,
pd.Run_Flag as devFlag, pd.Run_Flag as devFlag,
b.* b.*
FROM FROM

View File

@@ -4,13 +4,13 @@
<!--<select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO"> <!--<select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO">
SELECT SELECT
sdd.`Name` "type", sdd.Name "type",
ptl.Create_By "updateBy", ptl.Create_By "updateBy",
ptl.Create_Time "updateTime", ptl.Create_Time "updateTime",
ptl.`Terminal_Describe` "remark" ptl.Terminal_Describe "remark"
FROM FROM
pqs_terminal_logs ptl 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> <where>
<if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''"> <if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''">
and date_format(ptl.Create_Time,'%y%m%d') &gt;= date_format(#{logsListParam.searchBeginTime},'%y%m%d') and date_format(ptl.Create_Time,'%y%m%d') &gt;= date_format(#{logsListParam.searchBeginTime},'%y%m%d')
@@ -30,13 +30,13 @@
</select>--> </select>-->
<select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO"> <select id="getList" resultType="com.njcn.device.pq.pojo.vo.LogsListVO">
SELECT SELECT
sdd.`Name` "type", sdd.Name "type",
ptl.Create_By "updateBy", ptl.Create_By "updateBy",
ptl.Create_Time "updateTime", ptl.Create_Time "updateTime",
ptl.`Terminal_Describe` "remark" ptl.Terminal_Describe "remark"
FROM FROM
pqs_terminal_logs ptl 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> <where>
<if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''"> <if test="logsListParam.searchBeginTime != null and logsListParam.searchBeginTime != ''">
and date_format(ptl.Create_Time,'%y%m%d') &gt;= date_format(#{logsListParam.searchBeginTime},'%y%m%d') and date_format(ptl.Create_Time,'%y%m%d') &gt;= date_format(#{logsListParam.searchBeginTime},'%y%m%d')

View File

@@ -5,17 +5,17 @@
<select id="getVersion" resultType="VersionVO"> <select id="getVersion" resultType="VersionVO">
SELECT SELECT
A.`Id` id, A.Id id,
B.`Name` devType, B.Name devType,
A.`Name` name, A.Name name,
A.`Protocol` protocol, A.Protocol protocol,
A.`Date` date, A.Date date,
C.`Name` updateBy, C.Name updateBy,
A.`Update_Time` updateTime, A.Update_Time updateTime,
A.`Remark` remark, A.Remark remark,
A.`Version_Type` versionType, A.Version_Type versionType,
A.`Version_Flag` versionFlag, A.Version_Flag versionFlag,
A.`File_Name` fileName A.File_Name fileName
FROM FROM
cld_version A, cld_version A,
sys_dict_data B, sys_dict_data B,
@@ -27,13 +27,13 @@
AND A.Dev_Type = #{devType} AND A.Dev_Type = #{devType}
</if> </if>
<if test="searchValue != null and searchValue != ''"> <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> </if>
</select> </select>
<select id="getProgramVersionById" resultType="ShowVersionVO"> <select id="getProgramVersionById" resultType="ShowVersionVO">
SELECT SELECT
`File` file File file
FROM FROM
cld_version cld_version
WHERE Id = #{id} WHERE Id = #{id}

View File

@@ -5,7 +5,7 @@
<select id="getLineIntegrityRate" resultType="LineDataIntegrity"> <select id="getLineIntegrityRate" resultType="LineDataIntegrity">
select line_index lineId, select line_index lineId,
avg(real_time/due_time)*100 integrityData, avg(real_time/due_time)*100 integrityData,
sum(real_time) `real`, sum(real_time) real,
sum(due_time) due sum(due_time) due
from r_stat_integrity_d from r_stat_integrity_d
where line_index in where line_index in

View File

@@ -5,14 +5,14 @@
<select id="getRateOfFlowData" resultType="RateOfFlowVO"> <select id="getRateOfFlowData" resultType="RateOfFlowVO">
SELECT SELECT
A.`Id` id, A.Id id,
A.`Name` name, A.Name name,
A.`Type` type, A.Type type,
A.`Flag` flag, A.Flag flag,
A.`Combo_Type` comboType, A.Combo_Type comboType,
A.`Flow` flow, A.Flow flow,
B.`Name` updateBy, B.Name updateBy,
A.`Update_Time` updateTime A.Update_Time updateTime
FROM FROM
cld_flow_meal A, cld_flow_meal A,
sys_user B sys_user B
@@ -28,14 +28,14 @@
<select id="getRateOfFlowFlag" resultType="RateOfFlowVO"> <select id="getRateOfFlowFlag" resultType="RateOfFlowVO">
SELECT SELECT
`Id` id, Id id,
`Name` name, Name name,
`Type` type, Type type,
`Flag` flag, Flag flag,
`Combo_Type` comboType, Combo_Type comboType,
`Flow` flow, Flow flow,
`Update_By` updateBy, Update_By updateBy,
`Update_Time` updateTime Update_Time updateTime
FROM FROM
cld_flow_meal cld_flow_meal
WHERE Type =0 AND Flag =1 WHERE Type =0 AND Flag =1
@@ -51,14 +51,14 @@
<select id="getFlowStrategy" resultType="FlowStrategyVO"> <select id="getFlowStrategy" resultType="FlowStrategyVO">
SELECT SELECT
A.`Id` id, A.Id id,
A.`Name` name, A.Name name,
A.`Flag` flag, A.Flag flag,
C.`Name` updateBy, C.Name updateBy,
A.`Update_Time` updateTime, A.Update_Time updateTime,
B1.`Value` comPerData, B1.Value comPerData,
B2.`Value` warnPerData, B2.Value warnPerData,
B3.`Value` alertPerData B3.Value alertPerData
FROM FROM
cld_flow_strategy A, cld_flow_strategy A,
cld_flow_strategy_dic B1, cld_flow_strategy_dic B1,
@@ -74,11 +74,11 @@
<select id="getStrategyFlag" resultType="FlowStrategyVO"> <select id="getStrategyFlag" resultType="FlowStrategyVO">
SELECT SELECT
`Id` id, Id id,
`Name` name, Name name,
`Flag` flag, Flag flag,
`Update_By` updateBy, Update_By updateBy,
`Update_Time` updateTime Update_Time updateTime
FROM FROM
cld_flow_strategy cld_flow_strategy
WHERE Flag =1 WHERE Flag =1
@@ -94,17 +94,17 @@
<select id="getFlowStrategyById" resultType="ShowFlowStrategyVO"> <select id="getFlowStrategyById" resultType="ShowFlowStrategyVO">
SELECT SELECT
A.`Id` id, A.Id id,
A.`Name` name, A.Name name,
A.`Flag` flag, A.Flag flag,
C.`Name` updateBy, C.Name updateBy,
A.`Update_Time` updateTime, A.Update_Time updateTime,
A.`Com_Per` com, A.Com_Per com,
A.`Warn_Per` warn, A.Warn_Per warn,
A.`Alert_Per` alert, A.Alert_Per alert,
B1.`Value` comPerData, B1.Value comPerData,
B2.`Value` warnPerData, B2.Value warnPerData,
B3.`Value` alertPerData B3.Value alertPerData
FROM FROM
cld_flow_strategy A, cld_flow_strategy A,
cld_flow_strategy_dic B1, cld_flow_strategy_dic B1,

View File

@@ -75,7 +75,7 @@
line.id AS lineId, line.id AS lineId,
line.NAME AS lineName, line.NAME AS lineName,
lineDetail.Power_Substation_Name AS powerSubstationName, 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 FROM
pq_line line, pq_line line,
pq_line voltage, pq_line voltage,
@@ -96,7 +96,7 @@
AND line.id = lineDetail.id AND line.id = lineDetail.id
AND vg.Id = voltage.id AND vg.Id = voltage.id
ORDER BY ORDER BY
substation.`Name` substation.Name
) cc ) cc
WHERE WHERE
Power_Substation_id IS NULL; Power_Substation_id IS NULL;

View File

@@ -4,11 +4,11 @@
<select id="getPointSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam"> <select id="getPointSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam">
SELECT pl.`Name` AS "mName", SELECT pl.Name AS "mName",
pl1.`Name` AS "pName", pl1.Name AS "pName",
pl2.`Name` AS "devName", pl2.Name AS "devName",
pl3.`Name` AS "subName", pl3.Name AS "subName",
pl4.`Name` AS "urbanName" pl4.Name AS "urbanName"
FROM pq_line pl FROM pq_line pl
LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id
LEFT JOIN pq_line pl2 ON pl1.Pid = pl2.Id LEFT JOIN pq_line pl2 ON pl1.Pid = pl2.Id
@@ -18,9 +18,9 @@
</select> </select>
<select id="getDeviceSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam"> <select id="getDeviceSuper" resultType="com.njcn.device.pq.pojo.param.SuperDataParam">
SELECT SELECT
pl.`Name` AS "devName", pl.Name AS "devName",
pl1.`Name` AS "subName", pl1.Name AS "subName",
pl2.`Name` AS "urbanName" pl2.Name AS "urbanName"
FROM FROM
pq_line pl pq_line pl
LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id LEFT JOIN pq_line pl1 ON pl.Pid = pl1.Id
@@ -30,7 +30,7 @@
</select> </select>
<select id="getBaseReam" resultType="com.njcn.device.pq.pojo.param.BaseReamParam"> <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 FROM cld_dev_meal cdm
left join cld_flow_meal cfm on cdm.Base_Meal_Id = cfm.Id left join cld_flow_meal cfm on cdm.Base_Meal_Id = cfm.Id

View File

@@ -29,13 +29,13 @@
SELECT SELECT
device.id, device.id,
device.pid, device.pid,
device.`Name`, device.Name,
device.`Name` AS dataName, device.Name AS dataName,
device.`Level`, device.Level,
device.Sort, device.Sort,
pdevice.ip, pdevice.ip,
pdevice.Com_Flag AS comFlag, pdevice.Com_Flag AS comFlag,
sddManufacturer.`Name` AS manufacturer, sddManufacturer.Name AS manufacturer,
pdevice.Update_Time AS updateTime, pdevice.Update_Time AS updateTime,
min(sddLineGrade.Algo_Describe) as algoDescribe min(sddLineGrade.Algo_Describe) as algoDescribe
FROM FROM
@@ -47,7 +47,7 @@
LEFT JOIN pq_device AS pdevice ON device.id = pdevice.id LEFT JOIN pq_device AS pdevice ON device.id = pdevice.id
LEFT JOIN sys_dict_data AS sddManufacturer ON pdevice.Manufacturer = sddManufacturer.id LEFT JOIN sys_dict_data AS sddManufacturer ON pdevice.Manufacturer = sddManufacturer.id
WHERE WHERE
device.`Level` = 4 device.Level = 4
AND device.id in AND device.id in
<foreach collection="devIds" item="item" open="(" close=")" separator=","> <foreach collection="devIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
@@ -58,12 +58,12 @@
group by group by
device.id, device.id,
device.pid, device.pid,
device.`Name`, device.Name,
device.`Level`, device.Level,
device.Sort, device.Sort,
pdevice.ip, pdevice.ip,
pdevice.Com_Flag, pdevice.Com_Flag,
sddManufacturer.`Name`, sddManufacturer.Name,
pdevice.Update_Time pdevice.Update_Time
</select> </select>
@@ -111,10 +111,10 @@
SELECT SELECT
sub.id, sub.id,
sub.pid, sub.pid,
sub.`Level`, sub.Level,
sub.sort, sub.sort,
sub.`Name`, sub.Name,
sdd.`Name` AS subScale sdd.Name AS subScale
FROM FROM
pq_line sub pq_line sub
LEFT JOIN pq_substation AS psub ON sub.id = psub.id LEFT JOIN pq_substation AS psub ON sub.id = psub.id
@@ -132,16 +132,16 @@
line.Id as 'id', line.Id as 'id',
line.pid as 'pid', line.pid as 'pid',
line.Pids as 'pids', line.Pids as 'pids',
line.`Name` AS 'name', line.Name AS 'name',
line.`Level`as 'Level', line.Levelas 'Level',
line.Update_Time AS 'updateTime', line.Update_Time AS 'updateTime',
line.Sort as 'sort', line.Sort as 'sort',
pd.Call_Flag as 'ComFlag', pd.Call_Flag as 'ComFlag',
sdd.`Name` AS 'LineScale', sdd.Name AS 'LineScale',
device.`Name` AS 'deviceName', device.Name AS 'deviceName',
pd.IP AS 'ip', pd.IP AS 'ip',
msdd.`Name` AS 'manufacturer', msdd.Name AS 'manufacturer',
pldsdd.`Name` AS 'lineGrade', pldsdd.Name AS 'lineGrade',
pld.Load_Type AS 'loadType' pld.Load_Type AS 'loadType'
FROM FROM
pq_line AS line pq_line AS line
@@ -152,9 +152,9 @@
LEFT JOIN sys_dict_data AS sdd ON sdd.id = pv.Scale 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 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 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 WHERE
line.`Level` = 6 line.Level = 6
AND AND
line.id in line.id in
<foreach collection="lineIndexes" item="item" open="(" close=")" separator=","> <foreach collection="lineIndexes" item="item" open="(" close=")" separator=",">

View File

@@ -93,9 +93,9 @@ public class GridDiagramServiceImpl implements GridDiagramService {
List<RStatIntegrityD> onIntegrityByIds = new ArrayList<>(); List<RStatIntegrityD> onIntegrityByIds = new ArrayList<>();
if (CollUtil.isNotEmpty(lineIdsAll)) { 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())); 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<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<String> devIDs = generalDeviceDTOList.stream().flatMap(x -> x.getDeviceIndexes().stream()).distinct().collect(Collectors.toList());
List<RStatOnlinerateD> onlinerateDS = onLineRateDMapper.selectList(new QueryWrapper<RStatOnlinerateD>() 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) .in(CollUtil.isNotEmpty(devIDs), "dev_index", devIDs)
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime()))) .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()))) .le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))

View File

@@ -207,7 +207,7 @@
duration AS duration, duration AS duration,
feature_amplitude AS featureAmplitude feature_amplitude AS featureAmplitude
FROM FROM
`r_mp_event_detail` r_mp_event_detail
where start_time between #{startTime} and #{endTime} where start_time between #{startTime} and #{endTime}
</select> </select>

View File

@@ -12,7 +12,7 @@
duration AS duration, duration AS duration,
feature_amplitude AS featureAmplitude feature_amplitude AS featureAmplitude
FROM FROM
`r_mp_event_detail` r_mp_event_detail
</select> </select>
<!--获取监测点电压暂降和短时中断分布情况--> <!--获取监测点电压暂降和短时中断分布情况-->

View File

@@ -34,7 +34,7 @@
SELECT SELECT
<include refid="query_field"></include> <include refid="query_field"></include>
FROM FROM
`r_stat_org_y` r_stat_org_y
WHERE WHERE
<include refid="query_where"></include> <include refid="query_where"></include>
</select> </select>
@@ -44,7 +44,7 @@
SELECT SELECT
<include refid="query_field"></include> <include refid="query_field"></include>
FROM FROM
`r_stat_org_q` r_stat_org_q
WHERE WHERE
<include refid="query_where"></include> <include refid="query_where"></include>
</select> </select>
@@ -54,7 +54,7 @@
SELECT SELECT
<include refid="query_field"></include> <include refid="query_field"></include>
FROM FROM
`r_stat_org_m` r_stat_org_m
WHERE WHERE
<include refid="query_where"></include> <include refid="query_where"></include>
</select> </select>

View File

@@ -89,12 +89,12 @@
SELECT SELECT
rmed.measurement_point_id AS lineId, rmed.measurement_point_id AS lineId,
rmed.start_time AS startTime, rmed.start_time AS startTime,
line.`Name` AS lineName, line.Name AS lineName,
gd.`Name` AS gdName, gd.Name AS gdName,
substation.id AS subId, substation.id AS subId,
substation.`Name` AS subName, substation.Name AS subName,
pqdevice.IP AS ip, pqdevice.IP AS ip,
scale.`Name` AS scale, scale.Name AS scale,
typeDict.name AS advanceType, typeDict.name AS advanceType,
reasonDict.name AS advanceReason, reasonDict.name AS advanceReason,
rmed.event_type AS eventType, rmed.event_type AS eventType,

View File

@@ -18,9 +18,9 @@
<select id="ListEventType" resultType="com.njcn.event.pojo.vo.GeneralVO"> <select id="ListEventType" resultType="com.njcn.event.pojo.vo.GeneralVO">
SELECT SELECT
id, id,
sum(IF(`event_type` =#{condMap.Voltage_Dip}, num, 0)) as sagsCount, 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.Short_Interruptions}, num, 0)) as breakCount,
sum(IF(`event_type` = #{condMap.Voltage_Rise}, num, 0)) as upCount sum(IF(event_type = #{condMap.Voltage_Rise}, num, 0)) as upCount
from( from(
SELECT SELECT
measurement_point_id AS id, measurement_point_id AS id,

View File

@@ -209,7 +209,7 @@
duration*1000 AS duration, duration*1000 AS duration,
feature_amplitude*100 AS featureAmplitude feature_amplitude*100 AS featureAmplitude
FROM FROM
`r_mp_event_detail` r_mp_event_detail
WHERE WHERE
measurement_point_id IN measurement_point_id IN
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=","> <foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">

View File

@@ -102,7 +102,7 @@
<select id="getMiddleDown" resultType="com.njcn.device.pq.pojo.vo.EventVO"> <select id="getMiddleDown" resultType="com.njcn.device.pq.pojo.vo.EventVO">
SELECT SELECT
ed.start_time "time", ed.start_time "time",
pl.`Name` "name", pl.Name "name",
ed.advance_reason reason, ed.advance_reason reason,
ed.advance_type "type", ed.advance_type "type",
ed.feature_amplitude amplitude, ed.feature_amplitude amplitude,
@@ -141,9 +141,9 @@
)) base, )) base,
IFNULL( cfm2.flow, 0 ) ream, IFNULL( cfm2.flow, 0 ) ream,
IFNULL( cmf.Actual_Value, 0 ) statusValue, IFNULL( cmf.Actual_Value, 0 ) statusValue,
pl1.`Name` "name", pl1.Name "name",
pd.IP ip, pd.IP ip,
pd.`Port` "port", pd.Port "port",
case case
when pd.Com_Flag = '0' then '通讯中断' when pd.Com_Flag = '0' then '通讯中断'
when pd.Com_Flag = '1' then '通讯正常' when pd.Com_Flag = '1' then '通讯正常'
@@ -171,8 +171,8 @@
</select> </select>
<select id="getMiddleLimitRate" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO"> <select id="getMiddleLimitRate" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO">
select pl.`Name` mName, select pl.Name mName,
pl3.`Name` subName, pl3.Name subName,
t.count from pq_line pl t.count from pq_line pl
inner join(select rslr.my_index, inner join(select rslr.my_index,
sum(rslr.all_time) count sum(rslr.all_time) count
@@ -201,7 +201,7 @@
rshom.org_no "id", rshom.org_no "id",
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
from r_stat_harmonic_org_m rshom 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 WHERE
rshom.org_no IN rshom.org_no IN
<foreach collection="indexIds" item="item" open="(" close=")" separator=","> <foreach collection="indexIds" item="item" open="(" close=")" separator=",">
@@ -272,7 +272,7 @@
<select id="getMiddleDownChind" resultType="com.njcn.device.pq.pojo.vo.EventVO"> <select id="getMiddleDownChind" resultType="com.njcn.device.pq.pojo.vo.EventVO">
SELECT SELECT
ed.start_time "time", ed.start_time "time",
pl.`Name` "name", pl.Name "name",
ed.advance_reason reason, ed.advance_reason reason,
ed.advance_type "type", ed.advance_type "type",
ed.feature_amplitude amplitude, ed.feature_amplitude amplitude,
@@ -294,8 +294,8 @@
</select> </select>
<select id="getMiddleLimitRateChild" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO"> <select id="getMiddleLimitRateChild" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO">
select pl.`Name` mName, select pl.Name mName,
pl3.`Name` subName, pl3.Name subName,
t.count from pq_line pl t.count from pq_line pl
inner join(select rslr.my_index, inner join(select rslr.my_index,
sum(rslr.all_time) count sum(rslr.all_time) count
@@ -333,9 +333,9 @@
)) base, )) base,
IFNULL( cfm2.flow, 0 ) ream, IFNULL( cfm2.flow, 0 ) ream,
IFNULL( cmf.Actual_Value, 0 ) statusValue, IFNULL( cmf.Actual_Value, 0 ) statusValue,
pl1.`Name` "name", pl1.Name "name",
pd.IP ip, pd.IP ip,
pd.`Port` "port", pd.Port "port",
case case
when pd.Com_Flag = '0' then '通讯中断' when pd.Com_Flag = '0' then '通讯中断'
when pd.Com_Flag = '1' then '通讯正常' when pd.Com_Flag = '1' then '通讯正常'
@@ -363,7 +363,7 @@
<select id="eventLists" resultType="com.njcn.device.pq.pojo.vo.EventVO"> <select id="eventLists" resultType="com.njcn.device.pq.pojo.vo.EventVO">
SELECT 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 from pq_line pl
left join r_mp_event_detail ed on pl.id = ed.measurement_point_id left join r_mp_event_detail ed on pl.id = ed.measurement_point_id
<where> <where>

View File

@@ -6,7 +6,7 @@
<select id="getMonitorInfo" resultType="com.njcn.event.pojo.po.PmsMonitorPO"> <select id="getMonitorInfo" resultType="com.njcn.event.pojo.po.PmsMonitorPO">
SELECT SELECT
id, id,
`Name`, Name,
Org_Name AS orgName, Org_Name AS orgName,
Org_Id AS orgId, Org_Id AS orgId,
Operation_Name AS operationName, Operation_Name AS operationName,

View File

@@ -51,9 +51,9 @@
SELECT SELECT
org_no as orgId, org_no as orgId,
measurement_type_class as eventType, measurement_type_class as eventType,
SUM(IF(`event_type`=#{map.dip},event_count,0)) as eventCount, 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.rise},event_count,0)) as riseCount,
SUM(IF(`event_type`=#{map.interrupt},event_count,0)) as interruptCount SUM(IF(event_type=#{map.interrupt},event_count,0)) as interruptCount
FROM FROM
<if test="param != null and param.type == 1"> <if test="param != null and param.type == 1">
r_stat_event_y r_stat_event_y

View File

@@ -5,12 +5,12 @@
<select id="getTransientData" resultType="TransientVO"> <select id="getTransientData" resultType="TransientVO">
SELECT SELECT
B.`Id` id, B.Id id,
B.`Name` name, B.Name name,
B4.`Name` powerCompany, B4.Name powerCompany,
B3.`Name` substation, B3.Name substation,
D.`Name` voltageLevel, D.Name voltageLevel,
E.`IP` networkParam E.IP networkParam
FROM FROM
pq_line B, pq_line B,
pq_voltage C, pq_voltage C,
@@ -36,8 +36,8 @@
<!-- <select id="getTransientDataById" resultType="TransientVO">--> <!-- <select id="getTransientDataById" resultType="TransientVO">-->
<!-- SELECT--> <!-- SELECT-->
<!-- A.`Name` name,--> <!-- A.Name name,-->
<!-- A3.`Name` substation--> <!-- A3.Name substation-->
<!-- FROM--> <!-- FROM-->
<!-- pq_line A,--> <!-- pq_line A,-->
<!-- pq_line A1,--> <!-- pq_line A1,-->

View File

@@ -63,13 +63,13 @@ public class RDimBusbarHarmnicDPO {
/** /**
* 0稳态指标1.暂态指标' * 0稳态指标1.暂态指标'
*/ */
@MppMultiId(value = "`Level`") @MppMultiId(value = "Level")
private Integer level; private Integer level;
/** /**
* 超标次数) * 超标次数)
*/ */
@TableField(value = "`limit_count`") @TableField(value = "limit_count")
private Integer limitCount; private Integer limitCount;
/** /**

View File

@@ -93,8 +93,8 @@ public class ClearPathUtil {
return '<'; return '<';
case '>': case '>':
return '>'; return '>';
case '`': case '':
return '`'; return '';
case '\\': case '\\':
return '/'; return '/';
case 'I': case 'I':

View File

@@ -20,7 +20,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, `Level`, `limit count`, Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, Level, limit count,
Statis_count, `State`, Create_By, Create_Time, Update_By, Update_Time Statis_count, State, Create_By, Create_Time, Update_By, Update_Time
</sql> </sql>
</mapper> </mapper>

View File

@@ -15,7 +15,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@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 limit_count, Statis_count
</sql> </sql>
</mapper> </mapper>

View File

@@ -7,7 +7,7 @@
rshom.org_no "id", rshom.org_no "id",
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
from r_stat_harmonic_org_m rshom 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 WHERE
rshom.org_no IN rshom.org_no IN
<foreach collection="indexIds" item="item" open="(" close=")" separator=","> <foreach collection="indexIds" item="item" open="(" close=")" separator=",">
@@ -27,7 +27,7 @@
rshom.measurement_type_class "id", rshom.measurement_type_class "id",
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
from r_stat_harmonic_m rshom 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 WHERE
rshom.measurement_type_class IN rshom.measurement_type_class IN
<foreach collection="indexIds" item="item" open="(" close=")" separator=","> <foreach collection="indexIds" item="item" open="(" close=")" separator=",">
@@ -43,7 +43,7 @@
</select> </select>
<select id="getPowerOrder" resultType="com.njcn.device.pq.pojo.vo.PowerOrderVO"> <select id="getPowerOrder" resultType="com.njcn.device.pq.pojo.vo.PowerOrderVO">
select t.*, pl.`Name` "name" select t.*, pl.Name "name"
from ( from (
SELECT rsdhpd.line_id "id", round(max(rsdhpd.p), 0) "max" SELECT rsdhpd.line_id "id", round(max(rsdhpd.p), 0) "max"
FROM r_stat_data_harmpower_p_d rsdhpd FROM r_stat_data_harmpower_p_d rsdhpd

View File

@@ -23,7 +23,7 @@
<select id="getDeptTempByTempId" resultType="SysDeptTempVO"> <select id="getDeptTempByTempId" resultType="SysDeptTempVO">
SELECT SELECT
a.*, a.*,
b.`Name` deptName b.Name deptName
FROM FROM
sys_dept_temp a sys_dept_temp a
LEFT JOIN sys_dept b ON a.dept_id = b.id LEFT JOIN sys_dept b ON a.dept_id = b.id

View File

@@ -7,16 +7,16 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name` name, A.Name name,
A.State, A.State,
A.Sort, A.Sort,
A.Level, A.Level,
D.`Name` voltageLevel, D.Name voltageLevel,
D1.`Name` factoryName, D1.Name factoryName,
C.IP networkParam, C.IP networkParam,
C.Update_Time time, C.Update_Time time,
A2.`Name` deviceName, A2.Name deviceName,
D2.`Name` loadType D2.Name loadType
FROM FROM
pq_line A, pq_line A,
pq_voltage B, pq_voltage B,
@@ -68,7 +68,7 @@
A.id, A.id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name`, A.Name,
A.Sort, A.Sort,
A.Level level A.Level level
FROM FROM
@@ -86,10 +86,10 @@
A.id, A.id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name`, A.Name,
A.Sort, A.Sort,
A.Level level, A.Level level,
C.`Name` voltageLevel C.Name voltageLevel
FROM FROM
pq_line A, pq_line A,
pq_substation B, pq_substation B,

View File

@@ -8,16 +8,16 @@
line.Id, line.Id,
line.Pid, line.Pid,
line.Pids, line.Pids,
line.`Name` NAME, line.Name NAME,
line.Sort, line.Sort,
line.LEVEL, line.LEVEL,
scale.`Name` voltageLevel, scale.Name voltageLevel,
factory.`Name` factoryName, factory.Name factoryName,
pqdevice.IP networkParam, pqdevice.IP networkParam,
pqdevice.Update_Time time, pqdevice.Update_Time time,
pqdevice.Com_Flag state, pqdevice.Com_Flag state,
device.`Name` deviceName, device.Name deviceName,
loadtype.`Name` loadType loadtype.Name loadType
FROM FROM
pq_line line, pq_line line,
pq_line_detail lineDetail, pq_line_detail lineDetail,
@@ -48,7 +48,7 @@
A.id, A.id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name`, A.Name,
A.Sort, A.Sort,
A.Level level A.Level level
FROM FROM
@@ -65,10 +65,10 @@
A.id, A.id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name`, A.Name,
A.Sort, A.Sort,
A.Level level, A.Level level,
C.`Name` voltageLevel C.Name voltageLevel
FROM FROM
pq_line A, pq_line A,
pq_substation B, pq_substation B,
@@ -88,7 +88,7 @@
A.Pids, A.Pids,
A.Sort, A.Sort,
A.Level level, A.Level level,
B.`Name` name B.Name name
FROM FROM
pq_line A, pq_line A,
sys_area B sys_area B

View File

@@ -11,10 +11,10 @@
A.State, A.State,
A.Sort, A.Sort,
A.Level, A.Level,
B.`IP` networkParam, B.IP networkParam,
B.`Update_Time` time, B.Update_Time time,
D.`Name` factoryName, D.Name factoryName,
A.`Name` deviceName A.Name deviceName
FROM FROM
pq_line A, pq_line A,
pq_device B, pq_device B,
@@ -50,9 +50,9 @@
<!-- A.Id,--> <!-- A.Id,-->
<!-- A.Pid,--> <!-- A.Pid,-->
<!-- A.Pids,--> <!-- A.Pids,-->
<!-- A.`Name` name,--> <!-- A.Name name,-->
<!-- A.Sort,--> <!-- A.Sort,-->
<!-- A.`Level` level,--> <!-- A.Level level,-->
<!-- FROM--> <!-- FROM-->
<!-- pq_line A,--> <!-- pq_line A,-->
<!-- pq_line A1,--> <!-- pq_line A1,-->

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
line_id, data_date, pollution_type, `value` line_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_mp_pollution_d update r_mp_pollution_d
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when line_id = #{item.lineId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when line_id = #{item.lineId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -72,7 +72,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_mp_pollution_d insert into r_mp_pollution_d
(line_id, data_date, pollution_type, `value`) (line_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.lineId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_mp_pollution_d insert into r_mp_pollution_d
(line_id, data_date, pollution_type, `value`) (line_id, data_date, pollution_type, value)
values values
(#{lineId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{lineId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -90,7 +90,7 @@
line_id = #{lineId,jdbcType=VARCHAR}, line_id = #{lineId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -106,7 +106,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -136,7 +136,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -4,13 +4,13 @@
<select id="getINeg" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO"> <select id="getINeg" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(i_neg) iNeg avg(i_neg) iNeg
from from
r_stat_data_i_d r_stat_data_i_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -19,17 +19,17 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
<select id="getI" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO"> <select id="getI" resultType="com.njcn.harmonic.pojo.po.day.RStatDataIDPO">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(i_neg) iNeg avg(i_neg) iNeg
from from
r_stat_data_i_d r_stat_data_i_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -38,6 +38,6 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
</mapper> </mapper>

View File

@@ -5,13 +5,13 @@
<select id="getV" resultType="com.njcn.harmonic.pojo.po.day.RStatDataInharmVDPO"> <select id="getV" resultType="com.njcn.harmonic.pojo.po.day.RStatDataInharmVDPO">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(v_1) v1 avg(v_1) v1
from from
r_stat_data_inharm_v_d r_stat_data_inharm_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -20,6 +20,6 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
</mapper> </mapper>

View File

@@ -4,13 +4,13 @@
<select id="getPlt" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO"> <select id="getPlt" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(plt) plt avg(plt) plt
from from
r_stat_data_plt_d r_stat_data_plt_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -19,7 +19,7 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
</mapper> </mapper>

View File

@@ -4,14 +4,14 @@
<select id="getFreqDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD"> <select id="getFreqDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(abs(freq_dev)) freqDev, avg(abs(freq_dev)) freqDev,
avg(v_unbalance) vUnbalance avg(v_unbalance) vUnbalance
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type = 'T' and phasic_type = 'T'
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -20,18 +20,18 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
<select id="getVuDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD"> <select id="getVuDev" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(vu_dev) vuDev avg(vu_dev) vuDev
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'MAX' and value_type = 'MAX'
and line_id IN and line_id IN
@@ -40,18 +40,18 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
<select id="getVthd" resultType="com.njcn.harmonic.pojo.po.RStatDataVD"> <select id="getVthd" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(v_thd) vThd avg(v_thd) vThd
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
and value_type = 'CP95' and value_type = 'CP95'
and line_id IN and line_id IN
@@ -60,18 +60,18 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
<select id="getUnbalance" resultType="com.njcn.harmonic.pojo.po.RStatDataVD"> <select id="getUnbalance" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(v_unbalance) vUnbalance avg(v_unbalance) vUnbalance
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type = 'T' and phasic_type = 'T'
and value_type = 'CP95' and value_type = 'CP95'
and line_id IN and line_id IN
@@ -80,17 +80,17 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
<select id="getV" resultType="com.njcn.harmonic.pojo.po.RStatDataVD"> <select id="getV" resultType="com.njcn.harmonic.pojo.po.RStatDataVD">
select select
`time` time, time time,
line_id lineId, line_id lineId,
avg(v_1) v1 avg(v_1) v1
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type = 'T' and phasic_type = 'T'
and value_type = 'CP95' and value_type = 'CP95'
and line_id IN and line_id IN
@@ -99,7 +99,7 @@
</foreach> </foreach>
and quality_flag = 0 and quality_flag = 0
group by group by
`time`,line_id time,line_id
</select> </select>
</mapper> </mapper>

View File

@@ -189,7 +189,7 @@
IFNULL(TRUNCATE ((1- ( 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( 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 ) SUM( all_time )* 71 )
)* 100,2),0) `data` )* 100,2),0) data
FROM FROM
r_stat_limit_rate_d r_stat_limit_rate_d
<where> <where>
@@ -208,7 +208,7 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
`time` time
</select> </select>
<select id="getSumPassRateList" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO"> <select id="getSumPassRateList" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
SELECT SELECT
@@ -303,7 +303,7 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
`my_index` my_index
</select> </select>
<select id="getAssessTargetRate" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO"> <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 + 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 ) as allTime
from from
`r_stat_limit_rate_d` r_stat_limit_rate_d
<where> <where>
and time_id between #{statTime} and #{endTime} and time_id between #{statTime} and #{endTime}
<if test=" ids != null and ids.size > 0"> <if test=" ids != null and ids.size > 0">

View File

@@ -471,7 +471,7 @@
) )
) AS allOvertime ) AS allOvertime
FROM FROM
`r_stat_limit_rate_d` r_stat_limit_rate_d
<where> <where>
and time_id between #{startTime} and #{endTime} and time_id between #{startTime} and #{endTime}
<if test=" ids != null and ids.size > 0"> <if test=" ids != null and ids.size > 0">

View File

@@ -161,6 +161,6 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
`my_index` my_index
</select> </select>
</mapper> </mapper>

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
org_id, data_date, pollution_type, `value` org_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_org_d update r_stat_pollution_org_d
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_d insert into r_stat_pollution_org_d
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_d insert into r_stat_pollution_org_d
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
org_id = #{orgId,jdbcType=VARCHAR}, org_id = #{orgId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgDPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,7 +11,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
org_id, data_date, pollution_type, `value` org_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -22,7 +22,7 @@
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR} when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR}
</foreach> </foreach>
</trim> </trim>
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -36,7 +36,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_m insert into r_stat_pollution_org_m
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_m insert into r_stat_pollution_org_m
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -54,7 +54,7 @@
org_id = #{orgId,jdbcType=VARCHAR}, org_id = #{orgId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -70,7 +70,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -100,7 +100,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
org_id, data_date, pollution_type, `value` org_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_org_q update r_stat_pollution_org_q
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_q insert into r_stat_pollution_org_q
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgQPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_q insert into r_stat_pollution_org_q
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
org_id = #{orgId,jdbcType=VARCHAR}, org_id = #{orgId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgQPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgQPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
org_id, data_date, pollution_type, `value` org_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_org_y update r_stat_pollution_org_y
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_y insert into r_stat_pollution_org_y
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgYPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_org_y insert into r_stat_pollution_org_y
(org_id, data_date, pollution_type, `value`) (org_id, data_date, pollution_type, value)
values values
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
org_id = #{orgId,jdbcType=VARCHAR}, org_id = #{orgId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgYPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgYPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
substation_id, data_date, pollution_type, `value` substation_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_substation_d update r_stat_pollution_substation_d
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_d insert into r_stat_pollution_substation_d
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_d insert into r_stat_pollution_substation_d
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
substation_id = #{substationId,jdbcType=VARCHAR}, substation_id = #{substationId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationDPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationDPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,7 +11,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
substation_id, data_date, pollution_type, `value` substation_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -22,7 +22,7 @@
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR} when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR}
</foreach> </foreach>
</trim> </trim>
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -36,7 +36,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_m insert into r_stat_pollution_substation_m
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationM">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_m insert into r_stat_pollution_substation_m
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -54,7 +54,7 @@
substation_id = #{substationId,jdbcType=VARCHAR}, substation_id = #{substationId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationM"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationM">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -70,7 +70,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -100,15 +100,15 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="selectBySubstationPage" resultType="com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO"> <select id="selectBySubstationPage" resultType="com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO">
<!-- SELECT--> <!-- SELECT-->
<!-- substation_id as id,--> <!-- substation_id as id,-->
<!-- IF(`pollution_type`=#{typeMapId.I,javaType=string},value,3.14159) as `data`,--> <!-- 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.V,javaType=string},value,3.14159) as dataV-->
<!-- FROM--> <!-- FROM-->
<!-- r_stat_pollution_substation_m--> <!-- r_stat_pollution_substation_m-->
<!-- <where>--> <!-- <where>-->
@@ -127,7 +127,7 @@
<!-- </where>--> <!-- </where>-->
<!-- GROUP BY--> <!-- GROUP BY-->
<!-- substation_id--> <!-- substation_id-->
<!-- ORDER BY `data` DESC,dataV DESC--> <!-- ORDER BY data DESC,dataV DESC-->
select select
substation_id as id, substation_id as id,
SUM(case when pollution_type = #{typeMapId.I,javaType=string} then value else null end) as data , SUM(case when pollution_type = #{typeMapId.I,javaType=string} then value else null end) as data ,

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
substation_id, data_date, pollution_type, `value` substation_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_substation_q update r_stat_pollution_substation_q
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_q insert into r_stat_pollution_substation_q
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationQPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_q insert into r_stat_pollution_substation_q
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
substation_id = #{substationId,jdbcType=VARCHAR}, substation_id = #{substationId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationQPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationQPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -11,13 +11,13 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
substation_id, data_date, pollution_type, `value` substation_id, data_date, pollution_type, value
</sql> </sql>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated--> <!--@mbg.generated-->
update r_stat_pollution_substation_y update r_stat_pollution_substation_y
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="`value` = case" suffix="end,"> <trim prefix="value = case" suffix="end,">
<foreach collection="list" index="index" item="item"> <foreach collection="list" index="index" item="item">
when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT} when substation_id = #{item.substationId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
</foreach> </foreach>
@@ -31,7 +31,7 @@
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_y insert into r_stat_pollution_substation_y
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.substationId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR}, (#{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"> <insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationYPO">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into r_stat_pollution_substation_y insert into r_stat_pollution_substation_y
(substation_id, data_date, pollution_type, `value`) (substation_id, data_date, pollution_type, value)
values values
(#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR}, (#{substationId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
#{value,jdbcType=FLOAT}) #{value,jdbcType=FLOAT})
@@ -49,7 +49,7 @@
substation_id = #{substationId,jdbcType=VARCHAR}, substation_id = #{substationId,jdbcType=VARCHAR},
data_date = #{dataDate,jdbcType=TIMESTAMP}, data_date = #{dataDate,jdbcType=TIMESTAMP},
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
`value` = #{value,jdbcType=FLOAT} value = #{value,jdbcType=FLOAT}
</insert> </insert>
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationYPO"> <insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionSubstationYPO">
<!--@mbg.generated--> <!--@mbg.generated-->
@@ -65,7 +65,7 @@
pollution_type, pollution_type,
</if> </if>
<if test="value != null"> <if test="value != null">
`value`, value,
</if> </if>
</trim> </trim>
values values
@@ -95,7 +95,7 @@
pollution_type = #{pollutionType,jdbcType=VARCHAR}, pollution_type = #{pollutionType,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="value != null">
`value` = #{value,jdbcType=FLOAT}, value = #{value,jdbcType=FLOAT},
</if> </if>
</trim> </trim>
</insert> </insert>

View File

@@ -3,7 +3,7 @@
<mapper namespace="com.njcn.harmonic.mapper.ReportMapper"> <mapper namespace="com.njcn.harmonic.mapper.ReportMapper">
<select id="getVirtualDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getVirtualDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -29,10 +29,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -53,11 +53,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getVirtualDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getVirtualDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -83,10 +83,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -107,7 +107,7 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getTotalCP95Day" resultType="java.lang.Integer"> <select id="getTotalCP95Day" resultType="java.lang.Integer">
SELECT SELECT
@@ -119,10 +119,10 @@
AND value_type = "CP95" AND value_type = "CP95"
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -139,10 +139,10 @@
AND value_type = "CP95" AND value_type = "CP95"
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -159,10 +159,10 @@
AND value_type = "CP95" AND value_type = "CP95"
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -171,7 +171,7 @@
</select> </select>
<select id="getVVirtualData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getVVirtualData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -197,10 +197,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -221,11 +221,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getPowerP" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getPowerP" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -253,10 +253,10 @@
phasic_type IN ( 'A', 'B', 'C' ,'T') phasic_type IN ( 'A', 'B', 'C' ,'T')
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -280,11 +280,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getPF" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getPF" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -312,10 +312,10 @@
phasic_type IN ( 'A', 'B', 'C' ,'T') phasic_type IN ( 'A', 'B', 'C' ,'T')
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -339,11 +339,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getPowerQ" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getPowerQ" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -371,10 +371,10 @@
phasic_type IN ( 'A', 'B', 'C' ,'T') phasic_type IN ( 'A', 'B', 'C' ,'T')
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -398,11 +398,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getPowerS" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getPowerS" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -430,10 +430,10 @@
phasic_type IN ( 'A', 'B', 'C' ,'T') phasic_type IN ( 'A', 'B', 'C' ,'T')
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -457,11 +457,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -489,10 +489,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -516,11 +516,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getLFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getLFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -548,10 +548,10 @@
phasic_type IN ( 'A', 'B', 'C') phasic_type IN ( 'A', 'B', 'C')
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -575,11 +575,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type` phasic_type
</select> </select>
<select id="getUVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getUVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -605,10 +605,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -629,11 +629,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getLVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getLVdeviationData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -659,10 +659,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -683,11 +683,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getDistortionDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getDistortionDataV" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -713,10 +713,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -737,11 +737,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getDistortionDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getDistortionDataI" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -767,10 +767,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -791,11 +791,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -821,10 +821,10 @@
phasic_type = 'T' phasic_type = 'T'
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -845,11 +845,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getDEVFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getDEVFrequencyData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -875,10 +875,10 @@
phasic_type = 'T' phasic_type = 'T'
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -899,11 +899,11 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
<select id="getINegData" resultType="com.njcn.harmonic.pojo.vo.ReportValue"> <select id="getINegData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
SELECT SELECT
`phasic_type` AS phaseType, phasic_type AS phaseType,
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue, AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue, MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue, MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
@@ -929,10 +929,10 @@
phasic_type IN ( 'A', 'B', 'C' ) phasic_type IN ( 'A', 'B', 'C' )
and quality_flag = 0 and quality_flag = 0
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and `time` >= #{param.startTime} and time >= #{param.startTime}
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and `time` &lt;= #{param.endTime} and time &lt;= #{param.endTime}
</if> </if>
<if test="param.lineId != null and param.lineId != ''"> <if test="param.lineId != null and param.lineId != ''">
and line_id = #{param.lineId} and line_id = #{param.lineId}
@@ -953,7 +953,7 @@
) AS t1 ) AS t1
) a ) a
GROUP BY GROUP BY
`phasic_type`; phasic_type;
</select> </select>
</mapper> </mapper>

View File

@@ -4,9 +4,9 @@
<select id="listDayRatio" resultType="StatHarmonicOrgVO"> <select id="listDayRatio" resultType="StatHarmonicOrgVO">
SELECT SELECT
r.`org_no` `id`, r.org_no id,
r.over_limit_measurement_ratio_average `ratio`, r.over_limit_measurement_ratio_average ratio,
r.over_limit_measurement_average `count` r.over_limit_measurement_average count
FROM FROM
r_stat_harmonic_org_d r r_stat_harmonic_org_d r
where 1=1 where 1=1

View File

@@ -4,9 +4,9 @@
<select id="listMonthRatio" resultType="StatHarmonicOrgVO"> <select id="listMonthRatio" resultType="StatHarmonicOrgVO">
SELECT SELECT
r.`org_no` `id`, r.org_no id,
r.over_limit_measurement_ratio_average `ratio`, r.over_limit_measurement_ratio_average ratio,
r.over_limit_measurement_average `count` r.over_limit_measurement_average count
FROM FROM
r_stat_harmonic_org_m r r_stat_harmonic_org_m r
where 1=1 where 1=1

View File

@@ -4,9 +4,9 @@
<select id="listQuarterRatio" resultType="StatHarmonicOrgVO"> <select id="listQuarterRatio" resultType="StatHarmonicOrgVO">
SELECT SELECT
r.`org_no` `id`, r.org_no id,
r.over_limit_measurement_ratio_average `ratio`, r.over_limit_measurement_ratio_average ratio,
r.over_limit_measurement_average `count` r.over_limit_measurement_average count
FROM FROM
r_stat_harmonic_org_q r r_stat_harmonic_org_q r
where 1=1 where 1=1

View File

@@ -4,9 +4,9 @@
<select id="listYearRatio" resultType="StatHarmonicOrgVO"> <select id="listYearRatio" resultType="StatHarmonicOrgVO">
SELECT SELECT
r.`org_no` `id`, r.org_no id,
r.over_limit_measurement_ratio_average `ratio`, r.over_limit_measurement_ratio_average ratio,
r.over_limit_measurement_average `count` r.over_limit_measurement_average count
FROM FROM
r_stat_harmonic_org_y r r_stat_harmonic_org_y r
where 1=1 where 1=1

View File

@@ -8,11 +8,11 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name` name, A.Name name,
C.`Name` voltageLevel, C.Name voltageLevel,
D.`IP` networkParam, D.IP networkParam,
C1.`Name` factoryName, C1.Name factoryName,
A.`Name` lineName A.Name lineName
FROM FROM
pq_line A, pq_line A,
pq_voltage B, pq_voltage B,
@@ -37,7 +37,7 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`Name` Name
FROM FROM
pq_line pq_line
WHERE WHERE
@@ -52,7 +52,7 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
C.`Name` voltageLevel C.Name voltageLevel
FROM FROM
pq_line A, pq_line A,
pq_substation B, pq_substation B,

View File

@@ -8,11 +8,11 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name` name, A.Name name,
C.`Name` voltageLevel, C.Name voltageLevel,
D.`IP` networkParam, D.IP networkParam,
C1.`Name` factoryName, C1.Name factoryName,
A.`Name` lineName A.Name lineName
FROM FROM
pq_line A, pq_line A,
pq_voltage B, pq_voltage B,
@@ -37,7 +37,7 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`Name` Name
FROM FROM
pq_line pq_line
WHERE WHERE

View File

@@ -8,10 +8,10 @@
A.Id, A.Id,
A.Pid, A.Pid,
A.Pids, A.Pids,
A.`Name` name, A.Name name,
C.`IP` networkParam, C.IP networkParam,
D.`Name` voltageLevel, D.Name voltageLevel,
A.`Name` lineName A.Name lineName
FROM FROM
pq_line A, pq_line A,
pq_voltage B, pq_voltage B,
@@ -34,7 +34,7 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`Name` Name
FROM FROM
pq_line pq_line
WHERE WHERE

View File

@@ -10,7 +10,7 @@
A.Pids, A.Pids,
A.Name, A.Name,
A.Level, A.Level,
B.`Run_Flag` flag B.Run_Flag flag
FROM FROM
pq_line A, pq_line A,
pq_device B pq_device B
@@ -26,8 +26,8 @@
Id, Id,
Pid, Pid,
Pids, Pids,
`Name` name, Name name,
`Level` level Level level
FROM FROM
pq_line pq_line
WHERE WHERE
@@ -41,7 +41,7 @@
<!-- SELECT--> <!-- SELECT-->
<!-- A.Id,--> <!-- A.Id,-->
<!-- A.`Run_Flag` flag--> <!-- A.Run_Flag flag-->
<!-- FROM--> <!-- FROM-->
<!-- pq_device A,--> <!-- pq_device A,-->
<!-- pq_voltage B,--> <!-- pq_voltage B,-->

View File

@@ -25,10 +25,10 @@
SELECT SELECT
org_no as orgId, org_no as orgId,
monitoring_object as monitoringObject, 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_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_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_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 / monitor_valid_num, 0)) as streamRate
FROM r_stat_org_pv_power_quality_m FROM r_stat_org_pv_power_quality_m
where org_no in where org_no in
<foreach collection="condMap.orgIdList" item="id" open="(" close=")" separator=","> <foreach collection="condMap.orgIdList" item="id" open="(" close=")" separator=",">

View File

@@ -27,10 +27,10 @@
SELECT SELECT
org_no, org_no,
monitoring_object, 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.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.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, 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 IF(monitoring_object=monitoring_object,TRUNCATE(SUM(total_monitor_num)/SUM(monitor_valid_num),2),0) as lowPowerFactorRatio
FROM FROM
<if test="param != null and param.type == 1"> <if test="param != null and param.type == 1">
r_stat_org_pv_power_quality_y r_stat_org_pv_power_quality_y
@@ -42,7 +42,7 @@
r_stat_org_pv_power_quality_m r_stat_org_pv_power_quality_m
</if> </if>
<where> <where>
`area_pq_event_type` in ( area_pq_event_type in (
#{param.mapId.eventTypeL,javaType=string}, #{param.mapId.eventTypeL,javaType=string},
#{param.mapId.eventTypeP,javaType=string}, #{param.mapId.eventTypeP,javaType=string},
#{param.mapId.eventTypeO,javaType=string} #{param.mapId.eventTypeO,javaType=string}

View File

@@ -63,7 +63,7 @@ public class RDimStationTargetDPO extends BaseEntity {
@TableField(value = "Pass_Avg_Rate") @TableField(value = "Pass_Avg_Rate")
private Double passAvgRate; private Double passAvgRate;
@TableField(value = "`State`") @TableField(value = "State")
private String state; private String state;
} }

View File

@@ -64,7 +64,7 @@ public class RDimStationTargetMPO extends BaseEntity {
@TableField(value = "Pass_Avg_Rate") @TableField(value = "Pass_Avg_Rate")
private Double passAvgRate; private Double passAvgRate;
@TableField(value = "`State`") @TableField(value = "State")
private String state; private String state;

View File

@@ -64,7 +64,7 @@ public class RDimStationTargetYPO extends BaseEntity {
@TableField(value = "Pass_Avg_Rate") @TableField(value = "Pass_Avg_Rate")
private Double passAvgRate; private Double passAvgRate;
@TableField(value = "`State`") @TableField(value = "State")
private String state; private String state;
} }

View File

@@ -20,6 +20,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -20,6 +20,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -20,6 +20,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Limit_Rate, Limit_Avg_Rate, Pass_Rate, Pass_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -21,6 +21,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -21,6 +21,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -21,6 +21,6 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, Target_Type, Voltage_Level, Limit_Rate, Pass_Rate, Limit_Avg_Rate, 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> </sql>
</mapper> </mapper>

View File

@@ -4,13 +4,13 @@
<select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO"> <select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataPltDPO">
select select
`time`, time,
line_id, line_id,
max(plt) plt max(plt) plt
from from
r_stat_data_plt_d r_stat_data_plt_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and value_type = 'MAX' and value_type = 'MAX'
and phasic_type in ('A','B','C') and phasic_type in ('A','B','C')
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
@@ -19,7 +19,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
group by `time`,line_id group by time,line_id
</select> </select>
</mapper> </mapper>

View File

@@ -16,49 +16,49 @@
from from
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(v_unbalance) vUnbalance, 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 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 from
r_stat_data_v_d t0 r_stat_data_v_d t0
where where
`time` = #{time} time = #{time}
and value_type = 'CP95' and value_type = 'CP95'
group by group by
`time`, time,
line_id line_id
) A ) A
left join left join
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(abs(vl_dev)) vlDev, max(abs(vl_dev)) vlDev,
max(abs(freq_dev)) freqDev max(abs(freq_dev)) freqDev
from from
r_stat_data_v_d t0 r_stat_data_v_d t0
where where
`time` = #{time} time = #{time}
and value_type = 'MAX' and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) B ) B
on A.lineId = B.lineId on A.lineId = B.lineId
left join left join
( (
select select
`time` , time ,
line_id lineId, line_id lineId,
max(plt) plt max(plt) plt
from from
r_stat_data_plt_d r_stat_data_plt_d
where where
`time` = #{time} time = #{time}
and value_type = 'MAX' and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) C ) C
on A.lineId = C.lineId on A.lineId = C.lineId
@@ -104,17 +104,17 @@
from from
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(v_unbalance) vUnbalance, 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 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 from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and value_type = 'CP95' and value_type = 'CP95'
group by group by
`time`, time,
line_id line_id
) A ) A
group by group by
@@ -129,17 +129,17 @@
from from
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(abs(vl_dev)) vlDev, max(abs(vl_dev)) vlDev,
max(abs(freq_dev)) freqDev max(abs(freq_dev)) freqDev
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and value_type = 'MAX' and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) B ) B
group by group by
@@ -154,16 +154,16 @@
from from
( (
select select
`time` , time ,
line_id lineId, line_id lineId,
max(plt) plt max(plt) plt
from from
r_stat_data_plt_d r_stat_data_plt_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and value_type = 'MAX' and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) C ) C
group by group by
@@ -211,31 +211,31 @@
from from
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(v_unbalance) vUnbalance, 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 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 from
r_stat_data_v_d t0 r_stat_data_v_d t0
where where
`time` = #{time} and value_type = 'CP95' time = #{time} and value_type = 'CP95'
group by group by
`time`, time,
line_id line_id
) A ) A
left join left join
( (
select select
`time`, time,
line_id lineId, line_id lineId,
max(abs(vl_dev)) vlDev, max(abs(vl_dev)) vlDev,
max(abs(freq_dev)) freqDev max(abs(freq_dev)) freqDev
from from
r_stat_data_v_d t0 r_stat_data_v_d t0
where where
`time` = #{time} and value_type = 'MAX' time = #{time} and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) B ) B
on on
@@ -243,15 +243,15 @@
left join left join
( (
select select
`time` , time ,
line_id lineId, line_id lineId,
max(plt) plt max(plt) plt
from from
r_stat_data_plt_d r_stat_data_plt_d
where where
`time` = #{time} and value_type = 'MAX' time = #{time} and value_type = 'MAX'
group by group by
`time`, time,
line_id line_id
) C ) C
on on
@@ -319,7 +319,7 @@
<select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataVDPO"> <select id="getBenchmarkLevel" resultType="com.njcn.harmonic.pojo.po.day.RStatDataVDPO">
select select
A.`time`, A.time,
A.line_id lineId, A.line_id lineId,
A.rms, A.rms,
C.vUnbalance, C.vUnbalance,
@@ -327,13 +327,13 @@
from from
( (
select select
`time`, time,
line_id, line_id,
max(rms) rms max(rms) rms
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A', 'B', 'C') and phasic_type in ('A', 'B', 'C')
and value_type in ('AVG') and value_type in ('AVG')
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
@@ -342,18 +342,18 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
group by `time`, line_id group by time, line_id
) A ) A
inner join inner join
( (
select select
`time`, time,
line_id, line_id,
max(v_thd) vThd max(v_thd) vThd
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type in ('A', 'B', 'C') and phasic_type in ('A', 'B', 'C')
and value_type in ('CP95') and value_type in ('CP95')
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
@@ -362,19 +362,19 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
group by `time`,line_id group by time,line_id
) B ) 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 inner join
( (
select select
`time`, time,
line_id, line_id,
max(v_unbalance) vUnbalance max(v_unbalance) vUnbalance
from from
r_stat_data_v_d r_stat_data_v_d
where where
`time` between #{startTime} and #{endTime} time between #{startTime} and #{endTime}
and phasic_type = 'T' and phasic_type = 'T'
and value_type in ('CP95') and value_type in ('CP95')
<if test="list != null and list.size() > 0"> <if test="list != null and list.size() > 0">
@@ -383,8 +383,8 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
group by `time`,line_id group by time,line_id
) C ) 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> </select>
</mapper> </mapper>

View File

@@ -3,19 +3,19 @@
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.device.DeviceAbnormaStatisticsMapper"> <mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.device.DeviceAbnormaStatisticsMapper">
<insert id="insertTopMsg"> <insert id="insertTopMsg">
INSERT INTO pqs_top_msg( INSERT INTO pqs_top_msg(
`Time_Id`, Time_Id,
`Dev_Id`, Dev_Id,
`Comout_Count`, Comout_Count,
`Comout_Desc`, Comout_Desc,
`Integrity_Flag`, Integrity_Flag,
`Integrity_Value`, Integrity_Value,
`Alarm_Count`, Alarm_Count,
`Alarm_Desc`, Alarm_Desc,
`Flow_Flag`, Flow_Flag,
`Flow_Value`, Flow_Value,
`OnlineRate_Flag`, OnlineRate_Flag,
`OnlineRate_Value`, OnlineRate_Value,
`State` State
) VALUES ) VALUES
<foreach collection="list" separator="," item="item"> <foreach collection="list" separator="," item="item">
( (
@@ -82,7 +82,7 @@
SELECT SELECT
device.id AS deviceId, device.id AS deviceId,
IFNULL(SUM(integrity.due_time),3.14159) AS due, 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 CONVERT(SUM(integrity.real_time)*100/SUM(integrity.due_time),DECIMAL(15,2)) AS integrity
FROM r_stat_integrity_d integrity FROM r_stat_integrity_d integrity
INNER JOIN pq_line line ON integrity.line_index = line.id 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 id="selectAlarmStrategy" resultType="com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmStrategyVO">
SELECT SELECT
A.`Id` id, A.Id id,
B.`Name` name, B.Name name,
A.`Integrity_Value` integrityValue, A.Integrity_Value integrityValue,
A.`Online_Value` onlineValue, A.Online_Value onlineValue,
A.`Offtime_Value` offTimeValue, A.Offtime_Value offTimeValue,
A.`Warn_Value` warnValue, A.Warn_Value warnValue,
A.`Update_Time` updateTime, A.Update_Time updateTime,
B.Algo_Describe algoDesc B.Algo_Describe algoDesc
FROM FROM
pqs_alarm_strategy A pqs_alarm_strategy A

View File

@@ -20,7 +20,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, `Level`, `limit count`, Org_Id, Statis_Date, BusBar_Id, Target_type, Voltage_level, Level, limit count,
Statis_count, `State`, Create_By, Create_Time, Update_By, Update_Time Statis_count, State, Create_By, Create_Time, Update_By, Update_Time
</sql> </sql>
</mapper> </mapper>

View File

@@ -15,7 +15,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@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 limit_count, Statis_count
</sql> </sql>
</mapper> </mapper>

Some files were not shown because too many files have changed in this diff Show More