1.解决变电站数量不统一问题
2.替换最新污染值 3.解决终端数量不一致问题
This commit is contained in:
@@ -428,7 +428,7 @@ public class GeneralDeviceService {
|
||||
//2.筛选出终端id,理论上监测点的pids中第五个id为终端id
|
||||
List<String> devIds = voltages.stream().map(Line::getPid).distinct().collect(Collectors.toList());
|
||||
// 再根据终端条件筛选合法终端信息 联查:pq_line t1,pq_device t2
|
||||
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds, deviceType, deviceInfoParam.getManufacturer());
|
||||
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds, deviceType, deviceInfoParam);
|
||||
|
||||
//3.筛选出变电站id,理论上监测点的pids中第四个id为变电站id 联查: pq_line t1 ,pq_substation t2
|
||||
List<String> subIds = devices.stream().map(Line::getPid).distinct().collect(Collectors.toList());
|
||||
|
||||
@@ -129,7 +129,7 @@ public interface TerminalBaseService {
|
||||
* @param deviceType 终端筛选条件
|
||||
* @param manufacturer 终端厂家
|
||||
*/
|
||||
List<Line> getDeviceByCondition(List<String> devIds, DeviceType deviceType, List<SimpleDTO> manufacturer);
|
||||
List<Line> getDeviceByCondition(List<String> devIds, DeviceType deviceType, DeviceInfoParam manufacturer);
|
||||
|
||||
/**
|
||||
* 查询母线信息
|
||||
|
||||
@@ -1627,7 +1627,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Line> getDeviceByCondition(List<String> devIds, DeviceType deviceType, List<SimpleDTO> manufacturer) {
|
||||
public List<Line> getDeviceByCondition(List<String> devIds, DeviceType deviceType, DeviceInfoParam manufacturer) {
|
||||
return this.baseMapper.getDeviceByCondition(devIds, deviceType, manufacturer);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ public class OnLineRateController extends BaseController {
|
||||
@ApiOperation("终端在线率列表(冀北)")
|
||||
public HttpResult<DeviceOnlineRate> deviceOnlineRateInfo(@RequestBody DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("deviceOnlineRateInfo");
|
||||
deviceInfoParam.setLineOrDevice(1);
|
||||
DeviceOnlineRate rate = onLineRateService.deviceOnlineRateInfo(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rate, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -355,6 +355,7 @@
|
||||
line.id lineId,
|
||||
line.name lineName,
|
||||
gdinfo.NAME AS gdName,
|
||||
substation.id AS subStationId,
|
||||
substation.NAME AS subStationName,
|
||||
device.NAME AS devName,
|
||||
deviceDetail.Com_Flag AS comFlag,
|
||||
|
||||
@@ -76,9 +76,17 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
||||
|
||||
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
||||
|
||||
List<TerminalGetBase.Extend> orgSubStationInfoGet(@Param("list")List<Integer> devType,@Param("powerFlag")Integer powerFlag,@Param("lineRunFlag") Integer lineRunFlag);
|
||||
List<TerminalGetBase.Extend> orgSubStationInfoGet(@Param("list")List<Integer> devType,
|
||||
@Param("powerFlag")Integer powerFlag,
|
||||
@Param("lineRunFlag") Integer lineRunFlag,
|
||||
@Param("monitorFlag") Integer monitorFlag
|
||||
);
|
||||
|
||||
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,@Param("manufacturer")String manufacturer,@Param("runFlag")List<Integer> runFlag,@Param("dataType")List<Integer> dataType,@Param("objType")String objType);
|
||||
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,
|
||||
@Param("manufacturer")String manufacturer,
|
||||
@Param("runFlag")List<Integer> runFlag,
|
||||
@Param("dataType")List<Integer> dataType,
|
||||
@Param("objType")String objType);
|
||||
|
||||
|
||||
List<SubGetBase> selectSubStationList(@Param("param") SubstationParam substationParam);
|
||||
|
||||
@@ -155,7 +155,7 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
* @param deviceType 终端筛选条件
|
||||
* @param manufacturer 终端厂家
|
||||
*/
|
||||
List<Line> getDeviceByCondition(@Param("devIds") List<String> devIds, @Param("deviceType") DeviceType deviceType, @Param("manufacturer") List<SimpleDTO> manufacturer);
|
||||
List<Line> getDeviceByCondition(@Param("devIds") List<String> devIds, @Param("deviceType") DeviceType deviceType, @Param("deviceInfoParam") DeviceInfoParam manufacturer);
|
||||
|
||||
/**
|
||||
* 查询母线信息
|
||||
|
||||
@@ -124,7 +124,10 @@
|
||||
and lineDetail.Power_Flag = #{powerFlag}
|
||||
</if>
|
||||
<if test="lineRunFlag!=null ">
|
||||
and device.Run_Flag = 0 and lineDetail.Run_Flag = #{lineRunFlag}
|
||||
and lineDetail.Run_Flag = #{lineRunFlag}
|
||||
</if>
|
||||
<if test="monitorFlag!=null ">
|
||||
and lineDetail.Monitor_Flag = #{monitorFlag}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLineIdByDeptIds" resultType="string">
|
||||
@@ -142,8 +145,8 @@
|
||||
<foreach collection="dataType" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="runFlag!=null and runFlag!=''">
|
||||
and device.run_flag in
|
||||
<if test="runFlag!=null and runFlag.size() > 0">
|
||||
and lineDetail.run_flag in
|
||||
<foreach collection="runFlag" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
@@ -294,6 +294,9 @@
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceInfoParam.searchValue!=null and deviceInfoParam.lineOrDevice==0">
|
||||
AND t1.name like CONCAT(CONCAT('%', #{deviceInfoParam.searchValue}), '%')
|
||||
</if>
|
||||
<!-- xy -->
|
||||
<choose>
|
||||
<when test="deviceInfoParam.statFlag">
|
||||
@@ -335,12 +338,15 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="manufacturer!=null and manufacturer.size()!=0">
|
||||
<if test="deviceInfoParam.manufacturer!=null and deviceInfoParam.manufacturer.size()!=0">
|
||||
AND t2.manufacturer in
|
||||
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
||||
<foreach collection="deviceInfoParam.manufacturer" open="(" close=")" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceInfoParam.searchValue!=null and deviceInfoParam.lineOrDevice==1">
|
||||
AND t1.name like CONCAT(CONCAT('%', #{deviceInfoParam.searchValue}), '%')
|
||||
</if>
|
||||
<if test="devIds!=null and devIds.size()!=0">
|
||||
AND t1.id IN
|
||||
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
||||
|
||||
@@ -115,7 +115,7 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
Map<String, List<TerminalGetBase>> orgSubStationGet(List<Integer> devType);
|
||||
|
||||
|
||||
List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType,Integer powerFlag,Integer lineRunFlag);
|
||||
List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType,Integer powerFlag,Integer lineRunFlag,Integer monitorFlag);
|
||||
|
||||
List<SubGetBase> getSubStationList(SubstationParam substationParam);
|
||||
|
||||
|
||||
@@ -176,8 +176,8 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType, Integer powerFlag, Integer lineRunFlag) {
|
||||
return deptLineMapper.orgSubStationInfoGet(devType, powerFlag, lineRunFlag);
|
||||
public List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType, Integer powerFlag, Integer lineRunFlag,Integer monitorFlag) {
|
||||
return deptLineMapper.orgSubStationInfoGet(devType, powerFlag, lineRunFlag,monitorFlag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user