终端运行统计bug修改
This commit is contained in:
@@ -32,4 +32,7 @@ public interface SubstationMapper extends BaseMapper<Substation> {
|
|||||||
* @return 变电站信息
|
* @return 变电站信息
|
||||||
*/
|
*/
|
||||||
List<SubstationDTO> getSubstationById(@Param("id")List<String> subId);
|
List<SubstationDTO> getSubstationById(@Param("id")List<String> subId);
|
||||||
|
|
||||||
|
|
||||||
|
List<Substation> test();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -803,40 +803,36 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getNewDeviceRunStatistics" resultType="LineFlowMealDetailVO">
|
<select id="getNewDeviceRunStatistics" resultType="LineFlowMealDetailVO">
|
||||||
select t.*
|
select id,pid,pids,name,level,updateTime,runFlag,comFlag,deviceId,substation,flowMeal,round(statisValue,2) statisValue,statisValue/flowMeal as flowProportion from
|
||||||
from (SELECT
|
(
|
||||||
|
select
|
||||||
a.id,
|
a.id,
|
||||||
a.pid,
|
a.pid,
|
||||||
a.pids,
|
a.pids,
|
||||||
a.NAME name,
|
a.NAME name,
|
||||||
a.level,
|
a.level,
|
||||||
a.update_Time updateTime,
|
b.update_Time updateTime,
|
||||||
b.run_flag runFlag,
|
b.run_flag runFlag,
|
||||||
b.com_flag comFlag,
|
b.com_flag comFlag,
|
||||||
b.id deviceId,
|
b.id deviceId,
|
||||||
dev.name deviceName,
|
|
||||||
sub.name substation,
|
sub.name substation,
|
||||||
elc.name electricPowerCompany,
|
|
||||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) + ifnull(d1.flow, 0) flowMeal,
|
||||||
ifnull(m.Actual_Value,0) statisValue
|
ifnull(m.Actual_Value/1024/1024,0) statisValue
|
||||||
FROM pq_line a
|
FROM pq_line a
|
||||||
INNER JOIN pq_line vol ON a.pid = vol.id
|
INNER JOIN pq_device b ON a.id = b.id
|
||||||
INNER JOIN pq_line dev ON vol.pid = dev.id
|
INNER JOIN pq_line sub ON a.pid = sub.id
|
||||||
INNER JOIN pq_device b ON vol.pid = b.id
|
|
||||||
INNER JOIN pq_line sub ON dev.pid = sub.id
|
|
||||||
INNER JOIN pq_line elc ON sub.pid = elc.id
|
|
||||||
LEFT JOIN cld_month_flow m ON b.id = m.Dev_Id
|
|
||||||
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
||||||
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
||||||
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
||||||
LEFT JOIN sys_dict_data e ON b.dev_type = e.id
|
LEFT JOIN cld_month_flow m ON b.id = m.Dev_Id and m.time_id between #{startTime} and #{endTime}
|
||||||
where a.id in
|
where a.id in
|
||||||
<foreach item="item" collection="devs" separator="," open="(" close=")">
|
<foreach item="item" collection="devs" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
and
|
|
||||||
a.Create_Time between #{startTime} and #{endTime}
|
|
||||||
) t
|
) t
|
||||||
|
order by flowProportion desc
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getNewDeviceFlowStatistics" resultType="LineFlowMealDetailVO">
|
<select id="getNewDeviceFlowStatistics" resultType="LineFlowMealDetailVO">
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
line.id ,
|
line.id ,
|
||||||
line.NAME ,
|
line.NAME ,
|
||||||
line.sort ,
|
line.sort ,
|
||||||
sub.Lng scale,
|
sub.scale scale,
|
||||||
sub.Lng Lng,
|
sub.Lng Lng,
|
||||||
sub.Lat Lat
|
sub.Lat Lat
|
||||||
FROM
|
FROM
|
||||||
@@ -43,4 +43,18 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="test" resultType="Substation">
|
||||||
|
SELECT
|
||||||
|
line.id ,
|
||||||
|
line.NAME scale,
|
||||||
|
sub.Lng Lng,
|
||||||
|
sub.Lat Lat
|
||||||
|
FROM
|
||||||
|
pq_line line,
|
||||||
|
pq_substation sub
|
||||||
|
WHERE
|
||||||
|
line.Id = sub.Id
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
List<String> deviceIndexes = new ArrayList<>();
|
List<String> deviceIndexes = new ArrayList<>();
|
||||||
List<GeneralDeviceDTO> deviceInfoList = generalDeviceService.getDeviceInfo(deviceInfoParam, null, Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> deviceInfoList = generalDeviceService.getDeviceInfo(deviceInfoParam, null, Stream.of(1).collect(Collectors.toList()));
|
||||||
deviceInfoList.stream().map(GeneralDeviceDTO::getDeviceIndexes).forEach(deviceIndexes::addAll);
|
deviceInfoList.stream().map(GeneralDeviceDTO::getDeviceIndexes).forEach(deviceIndexes::addAll);
|
||||||
Page<LineFlowMealDetailVO> page = lineMapper.getNewDeviceFlowStatistics(
|
Page<LineFlowMealDetailVO> page = lineMapper.getNewDeviceRunStatistics(
|
||||||
new Page(deviceInfoParam.getPageNum(), deviceInfoParam.getPageSize()),
|
new Page(deviceInfoParam.getPageNum(), deviceInfoParam.getPageSize()),
|
||||||
deviceIndexes,
|
deviceIndexes,
|
||||||
DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())),
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class NormLimitServiceImpl implements NormLimitService {
|
|||||||
simpleDTO.setCode("Power_Network");
|
simpleDTO.setCode("Power_Network");
|
||||||
deviceInfoParam.setStatisticalType(simpleDTO);
|
deviceInfoParam.setStatisticalType(simpleDTO);
|
||||||
//处理监测点
|
//处理监测点
|
||||||
List<GeneralDeviceDTO> deviceDataList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
|
List<GeneralDeviceDTO> deviceDataList = generalDeviceInfoClient.getPracticalRunDeviceInfo(deviceInfoParam).getData();
|
||||||
for (GeneralDeviceDTO generalDeviceDTO : deviceDataList) {
|
for (GeneralDeviceDTO generalDeviceDTO : deviceDataList) {
|
||||||
lineIds.addAll(generalDeviceDTO.getLineIndexes());
|
lineIds.addAll(generalDeviceDTO.getLineIndexes());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user