pms bug修改

This commit is contained in:
wr
2023-04-18 09:33:21 +08:00
parent a00dbfbe37
commit 913349c0ed
4 changed files with 48 additions and 19 deletions

View File

@@ -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(

View File

@@ -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(

View File

@@ -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(

View File

@@ -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);
}
}