pms算法调整

This commit is contained in:
2023-09-28 15:53:13 +08:00
parent 5523c4b1be
commit d38557765c
9 changed files with 33 additions and 23 deletions

View File

@@ -150,10 +150,10 @@
<select id="getMonthRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.RStatOrgIndexVO$RStatOrgIndexInfoVO">
select
org_no,
effective_measurement_accrued as allCount,
freq_pass_rate,
v_dev_pass_rate,
flicker_pass_rate
sum(effective_measurement_accrued) as allCount,
avg(freq_pass_rate) freq_pass_rate,
avg(v_dev_pass_rate) v_dev_pass_rate,
avg(flicker_pass_rate) flicker_pass_rate
from
r_stat_org_m rso
<where>
@@ -170,6 +170,7 @@
<if test="param!=null and param.endTime != null and param.endTime != ''">
AND rso.data_date &lt;= #{param.endTime}
</if>
group by org_no
</where>
</select>
<select id="getPwMonthRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.PwRStatOrgVO">

View File

@@ -148,11 +148,11 @@
</select>
<select id="getQuarterRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.RStatOrgIndexVO$RStatOrgIndexInfoVO">
select
org_no,
effective_measurement_accrued as allCount,
freq_pass_rate,
v_dev_pass_rate,
flicker_pass_rate
org_no,
sum(effective_measurement_accrued) as allCount,
avg(freq_pass_rate) freq_pass_rate,
avg(v_dev_pass_rate) v_dev_pass_rate,
avg(flicker_pass_rate) flicker_pass_rate
from
r_stat_org_q rso
<where>
@@ -169,6 +169,7 @@
<if test="param!=null and param.endTime != null and param.endTime != ''">
AND rso.data_date &lt;= #{param.endTime}
</if>
group by org_no
</where>
</select>
<select id="getPwQuarterRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.PwRStatOrgVO">

View File

@@ -149,11 +149,11 @@
</select>
<select id="getYearRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.RStatOrgIndexVO$RStatOrgIndexInfoVO">
select
org_no,
effective_measurement_accrued as allCount,
freq_pass_rate,
v_dev_pass_rate,
flicker_pass_rate
org_no,
sum(effective_measurement_accrued) as allCount,
avg(freq_pass_rate) freq_pass_rate,
avg(v_dev_pass_rate) v_dev_pass_rate,
avg(flicker_pass_rate) flicker_pass_rate
from
r_stat_org_y rso
<where>
@@ -170,6 +170,7 @@
<if test="param!=null and param.endTime != null and param.endTime != ''">
AND rso.data_date &lt;= #{param.endTime}
</if>
group by org_no
</where>
</select>
<select id="getPwYearRStatOrgIndex" resultType="com.njcn.harmonic.pojo.vo.PwRStatOrgVO">

View File

@@ -184,15 +184,15 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
//获取统计类型
pmsDeviceInfoParam.setStatisticalType(harmonicPublicParam.getStatisticalType());
//获取主网台账信息
List<PmsGeneralDeviceDTO> deviceList = pmsGeneralDeviceInfoClient.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam).getData();
deviceList.forEach(temp -> {
List<PmsGeneralDeviceDTO> orgList = pmsGeneralDeviceInfoClient.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam).getData();
orgList.forEach(temp -> {
PollutionVO pollutionVO = new PollutionVO ();
String detpid = temp.getIndex ();
String name =temp.getName ();
List<String> powers = temp.getPowerrIdList ( );
pollutionVO.setId (detpid);
pollutionVO.setName (name+"\n("+temp.getMonitorIdList().size()+")");
pollutionVO.setData (-1.0);
pollutionVO.setData (3.14159);
setData(harmonicPublicParam, pollutionType, searchBeginTime,harmonicPublicParam.getSearchEndTime(), pollutionVO, detpid);
if(CollectionUtil.isNotEmpty(powers)) {
//子集变电站