切换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

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

View File

@@ -15,7 +15,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
Org_Id, Statis_Date, `Station Id`, Target_type, `Level`, Monitor_Tag, Voltage_level,
Org_Id, Statis_Date, Station Id, Target_type, Level, Monitor_Tag, Voltage_level,
limit_count, Statis_count
</sql>
</mapper>

View File

@@ -7,7 +7,7 @@
rshom.org_no "id",
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
from r_stat_harmonic_org_m rshom
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.`Code` = 'Mainnet_Point'
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.Code = 'Mainnet_Point'
WHERE
rshom.org_no IN
<foreach collection="indexIds" item="item" open="(" close=")" separator=",">
@@ -27,7 +27,7 @@
rshom.measurement_type_class "id",
round(avg(rshom.over_limit_measurement_ratio_accrued),2) avg
from r_stat_harmonic_m rshom
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.`Code` = 'Mainnet_Point'
left join sys_dict_data sdd on rshom.data_type = sdd.Id and sdd.Code = 'Mainnet_Point'
WHERE
rshom.measurement_type_class IN
<foreach collection="indexIds" item="item" open="(" close=")" separator=",">
@@ -43,7 +43,7 @@
</select>
<select id="getPowerOrder" resultType="com.njcn.device.pq.pojo.vo.PowerOrderVO">
select t.*, pl.`Name` "name"
select t.*, pl.Name "name"
from (
SELECT rsdhpd.line_id "id", round(max(rsdhpd.p), 0) "max"
FROM r_stat_data_harmpower_p_d rsdhpd

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -189,7 +189,7 @@
IFNULL(TRUNCATE ((1- (
sum( flicker_overtime )+ sum( flicker_all_time )+ sum( freq_dev_overtime )+ sum( voltage_dev_overtime )+ sum( ubalance_overtime )+ sum( uaberrance_overtime )+ sum( i_neg_overtime )+ sum( uharm_2_overtime )+ sum( uharm_3_overtime )+ sum( uharm_4_overtime )+ sum( uharm_5_overtime )+ sum( uharm_6_overtime )+ sum( uharm_7_overtime )+ sum( uharm_8_overtime )+ sum( uharm_9_overtime )+ sum( uharm_10_overtime )+ sum( uharm_11_overtime )+ sum( uharm_12_overtime )+ sum( uharm_13_overtime )+ sum( uharm_14_overtime )+ sum( uharm_15_overtime )+ sum( uharm_16_overtime )+ sum( uharm_17_overtime )+ sum( uharm_18_overtime )+ sum( uharm_19_overtime )+ sum( uharm_20_overtime )+ sum( uharm_21_overtime )+ sum( uharm_22_overtime )+ sum( uharm_23_overtime )+ sum( uharm_24_overtime )+ sum( uharm_25_overtime )+ sum( iharm_2_overtime )+ sum( iharm_3_overtime )+ sum( iharm_4_overtime )+ sum( iharm_5_overtime )+ sum( iharm_6_overtime )+ sum( iharm_7_overtime )+ sum( iharm_8_overtime )+ sum( iharm_9_overtime )+ sum( iharm_10_overtime )+ sum( iharm_11_overtime )+ sum( iharm_12_overtime )+ sum( iharm_13_overtime )+ sum( iharm_14_overtime )+ sum( iharm_15_overtime )+ sum( iharm_16_overtime )+ sum( iharm_17_overtime )+ sum( iharm_18_overtime )+ sum( iharm_19_overtime )+ sum( iharm_20_overtime )+ sum( iharm_21_overtime )+ sum( iharm_22_overtime )+ sum( iharm_23_overtime )+ sum( iharm_24_overtime )+ sum( iharm_25_overtime )+ sum( inuharm_1_overtime )+ sum( inuharm_2_overtime )+ sum( inuharm_3_overtime )+ sum( inuharm_4_overtime )+ sum( inuharm_5_overtime )+ sum( inuharm_6_overtime )+ sum( inuharm_7_overtime )+ sum( inuharm_8_overtime )+ sum( inuharm_9_overtime )+ sum( inuharm_10_overtime )+ sum( inuharm_11_overtime )+ sum( inuharm_12_overtime )+ sum( inuharm_13_overtime )+ sum( inuharm_14_overtime )+ sum( inuharm_15_overtime )+ sum( inuharm_16_overtime )) /(
SUM( all_time )* 71 )
)* 100,2),0) `data`
)* 100,2),0) data
FROM
r_stat_limit_rate_d
<where>
@@ -208,7 +208,7 @@
</if>
</where>
GROUP BY
`time`
time
</select>
<select id="getSumPassRateList" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
SELECT
@@ -303,7 +303,7 @@
</if>
</where>
GROUP BY
`my_index`
my_index
</select>
<select id="getAssessTargetRate" resultType="com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO">
@@ -409,7 +409,7 @@
+ inuharm_1_overtime + inuharm_2_overtime + inuharm_3_overtime + inuharm_4_overtime + inuharm_5_overtime + inuharm_6_overtime + inuharm_7_overtime + inuharm_8_overtime + inuharm_9_overtime + inuharm_10_overtime + inuharm_11_overtime + inuharm_12_overtime + inuharm_13_overtime + inuharm_14_overtime + inuharm_15_overtime + inuharm_16_overtime
) as allTime
from
`r_stat_limit_rate_d`
r_stat_limit_rate_d
<where>
and time_id between #{statTime} and #{endTime}
<if test=" ids != null and ids.size > 0">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -25,10 +25,10 @@
SELECT
org_no as orgId,
monitoring_object as monitoringObject,
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_u}, total_monitor_num, 0)) as streamNum,
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_a}, total_monitor_num, 0)) as streamReloadNum,
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_s}, total_monitor_num, 0)) as streamOverloadNum,
SUM(IF(`area_pq_event_type` = #{condMap.Event_Type_u}, total_monitor_num / monitor_valid_num, 0)) as streamRate
SUM(IF(area_pq_event_type = #{condMap.Event_Type_u}, total_monitor_num, 0)) as streamNum,
SUM(IF(area_pq_event_type = #{condMap.Event_Type_a}, total_monitor_num, 0)) as streamReloadNum,
SUM(IF(area_pq_event_type = #{condMap.Event_Type_s}, total_monitor_num, 0)) as streamOverloadNum,
SUM(IF(area_pq_event_type = #{condMap.Event_Type_u}, total_monitor_num / monitor_valid_num, 0)) as streamRate
FROM r_stat_org_pv_power_quality_m
where org_no in
<foreach collection="condMap.orgIdList" item="id" open="(" close=")" separator=",">

View File

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