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 FROM
r_stat_harmonic_org_m a r_stat_harmonic_org_m a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -66,7 +69,9 @@
FROM FROM
r_stat_harmonic_org_m a r_stat_harmonic_org_m a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -79,11 +84,13 @@
) chainAccrued , ) chainAccrued ,
( (
SELECT SELECT
over_limit_measurement_accrued over_limit_measurement_average
FROM FROM
r_stat_harmonic_org_m a r_stat_harmonic_org_m a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -100,7 +107,9 @@
FROM FROM
r_stat_harmonic_org_m a r_stat_harmonic_org_m a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(

View File

@@ -48,7 +48,9 @@
FROM FROM
r_stat_harmonic_org_q a r_stat_harmonic_org_q a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -66,7 +68,9 @@
FROM FROM
r_stat_harmonic_org_q a r_stat_harmonic_org_q a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -79,11 +83,13 @@
) chainAccrued , ) chainAccrued ,
( (
SELECT SELECT
over_limit_measurement_accrued over_limit_measurement_average
FROM FROM
r_stat_harmonic_org_q a r_stat_harmonic_org_q a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -100,7 +106,9 @@
FROM FROM
r_stat_harmonic_org_q a r_stat_harmonic_org_q a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(

View File

@@ -48,7 +48,9 @@
FROM FROM
r_stat_harmonic_org_y a r_stat_harmonic_org_y a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -66,7 +68,9 @@
FROM FROM
r_stat_harmonic_org_y a r_stat_harmonic_org_y a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -79,11 +83,13 @@
) chainAccrued , ) chainAccrued ,
( (
SELECT SELECT
over_limit_measurement_accrued over_limit_measurement_average
FROM FROM
r_stat_harmonic_org_y a r_stat_harmonic_org_y a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(
@@ -100,7 +106,9 @@
FROM FROM
r_stat_harmonic_org_y a r_stat_harmonic_org_y a
WHERE 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 a.harmonic_type=c.harmonic_type
<if test="param!=null and param.startTime != null and param.startTime !=''"> <if test="param!=null and param.startTime != null and param.startTime !=''">
AND (data_date >= date( AND (data_date >= date(

View File

@@ -115,10 +115,14 @@ public class RStatHarmonicOrgMServiceImpl extends ServiceImpl<StatHarmonicOrgMMa
if (ObjectUtil.isNotNull(data1)) { if (ObjectUtil.isNotNull(data1)) {
r.setHarmonicName(data1.getName()); r.setHarmonicName(data1.getName());
r.setSort(data1.getSort()); r.setSort(data1.getSort());
DecimalFormat df = new DecimalFormat("###.00"); if(r.getOverDay()!=0){
Float averageOverDay = Float.parseFloat( DecimalFormat df = new DecimalFormat("###.00");
df.format(r.getOverDay() / (r.getOverLimitMeasurementAccrued() * 1.0))); Float averageOverDay = Float.parseFloat(
r.setAverageOverDay(averageOverDay); df.format(r.getOverDay() / (r.getOverLimitMeasurementAccrued() * 1.0)));
r.setAverageOverDay(averageOverDay);
}else{
r.setAverageOverDay(0.0f);
}
b.add(r); b.add(r);
} }
} }