pms bug修改
This commit is contained in:
@@ -48,7 +48,10 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_m a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -66,7 +69,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_m a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -79,11 +84,13 @@
|
||||
) chainAccrued ,
|
||||
(
|
||||
SELECT
|
||||
over_limit_measurement_accrued
|
||||
over_limit_measurement_average
|
||||
FROM
|
||||
r_stat_harmonic_org_m a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -100,7 +107,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_m a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
|
||||
@@ -48,7 +48,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_q a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -66,7 +68,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_q a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -79,11 +83,13 @@
|
||||
) chainAccrued ,
|
||||
(
|
||||
SELECT
|
||||
over_limit_measurement_accrued
|
||||
over_limit_measurement_average
|
||||
FROM
|
||||
r_stat_harmonic_org_q a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -100,7 +106,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_q a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
|
||||
@@ -48,7 +48,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_y a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -66,7 +68,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_y a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -79,11 +83,13 @@
|
||||
) chainAccrued ,
|
||||
(
|
||||
SELECT
|
||||
over_limit_measurement_accrued
|
||||
over_limit_measurement_average
|
||||
FROM
|
||||
r_stat_harmonic_org_y a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
@@ -100,7 +106,9 @@
|
||||
FROM
|
||||
r_stat_harmonic_org_y a
|
||||
WHERE
|
||||
a.org_no=c.org_no and
|
||||
a.org_no=c.org_no
|
||||
and a.data_Type = #{dataType}
|
||||
and
|
||||
a.harmonic_type=c.harmonic_type
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (data_date >= date(
|
||||
|
||||
@@ -115,10 +115,14 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
|
||||
if (ObjectUtil.isNotNull(data1)) {
|
||||
r.setHarmonicName(data1.getName());
|
||||
r.setSort(data1.getSort());
|
||||
if(r.getOverDay()!=0){
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
Float averageOverDay = Float.parseFloat(
|
||||
df.format(r.getOverDay() / (r.getOverLimitMeasurementAccrued() * 1.0)));
|
||||
r.setAverageOverDay(averageOverDay);
|
||||
}else{
|
||||
r.setAverageOverDay(0.0f);
|
||||
}
|
||||
b.add(r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user