新能源专项分析功能优化
This commit is contained in:
@@ -21,7 +21,7 @@ public interface DeptLineFeignClient {
|
|||||||
HttpResult<List<String>> getLineByDeptId(@RequestParam("id")String id);
|
HttpResult<List<String>> getLineByDeptId(@RequestParam("id")String id);
|
||||||
|
|
||||||
@PostMapping("/getLineByDeptIdAndNewStation")
|
@PostMapping("/getLineByDeptIdAndNewStation")
|
||||||
HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id")String id);
|
HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam(value = "id",required = false)String id);
|
||||||
|
|
||||||
@PostMapping("/selectDeptBindLines")
|
@PostMapping("/selectDeptBindLines")
|
||||||
HttpResult<Boolean> selectDeptBindLines(@RequestParam("ids") List<String> ids);
|
HttpResult<Boolean> selectDeptBindLines(@RequestParam("ids") List<String> ids);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class DeptLineController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
@PostMapping("/getLineByDeptIdAndNewStation")
|
@PostMapping("/getLineByDeptIdAndNewStation")
|
||||||
@ApiOperation("根据部门id获取绑定的监测点且再根据(监测点详情进行过滤)")
|
@ApiOperation("根据部门id获取绑定的监测点且再根据(监测点详情进行过滤)")
|
||||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id") String id) {
|
public HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam(value = "id",required = false) String id) {
|
||||||
String methodDescribe = getMethodDescribe("getLineByDeptIdAndNewStation");
|
String methodDescribe = getMethodDescribe("getLineByDeptIdAndNewStation");
|
||||||
List<String> list = deptLineService.getLineByDeptIdAndNewStation(id);
|
List<String> list = deptLineService.getLineByDeptIdAndNewStation(id);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public interface LineDetailMapper extends BaseMapper<LineDetail> {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<LineDetailDataVO> getLineDetailInfo(@Param("lineIds") List<String> lineIds);
|
List<LineDetailDataVO> getLineDetailInfo(@Param("lineIds") List<String> lineIds);
|
||||||
|
|
||||||
|
|
||||||
@Select ("select count(1) from pq_line a where a.Level=4 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
@Select ("select count(1) from pq_line a where a.Level=4 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||||
Integer getDeviceCountBySubstation(@Param("subIndex")String subIndex);
|
Integer getDeviceCountBySubstation(@Param("subIndex")String subIndex);
|
||||||
|
|
||||||
|
|||||||
@@ -204,9 +204,10 @@
|
|||||||
FROM
|
FROM
|
||||||
pq_dept_line pdl
|
pq_dept_line pdl
|
||||||
INNER JOIN pq_line_detail pld ON pdl.Line_Id = pld.Id
|
INNER JOIN pq_line_detail pld ON pdl.Line_Id = pld.Id
|
||||||
WHERE
|
<where>
|
||||||
|
pld.Obj_Id IS NOT NULL and pld.Obj_Id !=''
|
||||||
<if test="id !=null and id !='' ">
|
<if test="id !=null and id !='' ">
|
||||||
pdl.Id = #{id}
|
and pdl.Id = #{id}
|
||||||
</if>
|
</if>
|
||||||
<if test="dictTree!=null and dictTree.size!=0">
|
<if test="dictTree!=null and dictTree.size!=0">
|
||||||
and pld.Big_Obj_Type in
|
and pld.Big_Obj_Type in
|
||||||
@@ -214,6 +215,6 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
and pld.Obj_Id IS NOT NULL and pld.Obj_Id !=''
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -42,10 +42,9 @@
|
|||||||
c.id lineId,
|
c.id lineId,
|
||||||
a.name lineName,
|
a.name lineName,
|
||||||
c.Time_Interval,
|
c.Time_Interval,
|
||||||
e.name scale,
|
d.Scale AS scale,
|
||||||
c.Obj_Id obyId,
|
c.Obj_Id obyId,
|
||||||
c.Big_Obj_Type bigObjType,
|
c.Big_Obj_Type bigObjType
|
||||||
d.Scale AS scale
|
|
||||||
from pq_line a
|
from pq_line a
|
||||||
inner join pq_line b on a.pid = b.id
|
inner join pq_line b on a.pid = b.id
|
||||||
inner join pq_line_detail c on a.id = c.id
|
inner join pq_line_detail c on a.id = c.id
|
||||||
|
|||||||
@@ -1466,7 +1466,8 @@
|
|||||||
pqd.Run_Flag as runFlag,
|
pqd.Run_Flag as runFlag,
|
||||||
detail.PT_Type AS ptType,
|
detail.PT_Type AS ptType,
|
||||||
detail.PT_Phase_Type AS ptPhaseType,
|
detail.PT_Phase_Type AS ptPhaseType,
|
||||||
detail.Obj_Id AS objId
|
detail.Obj_Id AS objId,
|
||||||
|
detail.Big_Obj_Type AS bigObjType
|
||||||
FROM
|
FROM
|
||||||
pq_line line,
|
pq_line line,
|
||||||
pq_line_detail detail,
|
pq_line_detail detail,
|
||||||
|
|||||||
@@ -903,7 +903,6 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return lineDetailInfo;
|
return lineDetailInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ public class SpThroughServiceImpl extends MppServiceImpl<SpThroughMapper, SpThro
|
|||||||
private final EventDetailFeignClient eventDetailFeignClient;
|
private final EventDetailFeignClient eventDetailFeignClient;
|
||||||
private final TransientFeignClient transientFeignClient;
|
private final TransientFeignClient transientFeignClient;
|
||||||
private final DeptLineFeignClient deptLineFeignClient;
|
private final DeptLineFeignClient deptLineFeignClient;
|
||||||
private final UserLedgerFeignClient userLedgerFeignClient;
|
|
||||||
private final LineFeignClient lineFeignClient;
|
private final LineFeignClient lineFeignClient;
|
||||||
private final DictTreeFeignClient dictTreeFeignClient;
|
private final DictTreeFeignClient dictTreeFeignClient;
|
||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
@@ -72,15 +71,14 @@ public class SpThroughServiceImpl extends MppServiceImpl<SpThroughMapper, SpThro
|
|||||||
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(null).getData();
|
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(null).getData();
|
||||||
if (CollUtil.isNotEmpty(lineIds)) {
|
if (CollUtil.isNotEmpty(lineIds)) {
|
||||||
List<LineDetailDataVO> lineDetailDataVOS = lineFeignClient.getLineDetailList(lineIds).getData();
|
List<LineDetailDataVO> lineDetailDataVOS = lineFeignClient.getLineDetailList(lineIds).getData();
|
||||||
|
if (CollUtil.isNotEmpty(lineDetailDataVOS)) {
|
||||||
Map<String, LineDetailDataVO> lineDetailDataMap = lineDetailDataVOS.stream().collect(Collectors.toMap(LineDetailDataVO::getLineId, Function.identity()));
|
Map<String, LineDetailDataVO> lineDetailDataMap = lineDetailDataVOS.stream().collect(Collectors.toMap(LineDetailDataVO::getLineId, Function.identity()));
|
||||||
List<String> objIds = lineDetailDataVOS.stream().map(LineDetailDataVO::getObyId).distinct().collect(Collectors.toList());
|
|
||||||
List<NewUserReportVO> userReportVOS = userLedgerFeignClient.getUserReportByIds(objIds).getData();
|
|
||||||
Map<String, Double> userReportMap = userReportVOS.stream().collect(Collectors.toMap(NewUserReportVO::getId, NewUserReportVO::getRatePower));
|
|
||||||
|
|
||||||
|
|
||||||
EventCountParam param = new EventCountParam();
|
EventCountParam param = new EventCountParam();
|
||||||
param.setIds(lineIds);
|
param.setIds(new ArrayList<>(lineDetailDataMap.keySet()));
|
||||||
param.setStartTime(getLastTime().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
|
LocalDateTime lastTime = getLastTime();
|
||||||
|
if (ObjectUtil.isNotNull(getLastTime())) {
|
||||||
|
param.setStartTime(lastTime.format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
|
||||||
|
}
|
||||||
param.setEndTime(currentTime.format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
|
param.setEndTime(currentTime.format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN)));
|
||||||
List<RmpEventDetailPO> evenStDetailPOS = eventDetailFeignClient.getNewEventDetailByTime(param).getData();
|
List<RmpEventDetailPO> evenStDetailPOS = eventDetailFeignClient.getNewEventDetailByTime(param).getData();
|
||||||
MonitorTerminalParam monitorTerminalParam = new MonitorTerminalParam();
|
MonitorTerminalParam monitorTerminalParam = new MonitorTerminalParam();
|
||||||
@@ -167,6 +165,7 @@ public class SpThroughServiceImpl extends MppServiceImpl<SpThroughMapper, SpThro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isThrough(int start, int end, int ms, float voltageLevel, List<List<Float>> newListRmsData) {
|
private boolean isThrough(int start, int end, int ms, float voltageLevel, List<List<Float>> newListRmsData) {
|
||||||
boolean isThrough = false;
|
boolean isThrough = false;
|
||||||
@@ -233,7 +232,7 @@ public class SpThroughServiceImpl extends MppServiceImpl<SpThroughMapper, SpThro
|
|||||||
List<Integer> indexs = new ArrayList<>();
|
List<Integer> indexs = new ArrayList<>();
|
||||||
//根据channelNames取出电压对应listRmsData数据中的数据索引
|
//根据channelNames取出电压对应listRmsData数据中的数据索引
|
||||||
for (int i = 0; i < waveDataDTO.getChannelNames().size(); i++) {
|
for (int i = 0; i < waveDataDTO.getChannelNames().size(); i++) {
|
||||||
if (waveDataDTO.getChannelNames().get(i).indexOf("电压") != -1) {
|
if (waveDataDTO.getChannelNames().get(i).indexOf("U") != -1) {
|
||||||
indexs.add(i);
|
indexs.add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,6 @@ public class NewUserReportVO {
|
|||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 监测点id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "lineId")
|
|
||||||
private String lineId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程名称
|
* 工程名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user