监测点台账信息优化
This commit is contained in:
@@ -37,10 +37,12 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
|||||||
* 获取监测点台账信息
|
* 获取监测点台账信息
|
||||||
* @param list 监测点集合
|
* @param list 监测点集合
|
||||||
* @param comFlag 状态
|
* @param comFlag 状态
|
||||||
* @param runFlag 状态
|
* @param searchValue
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<RunManageVO> getRunManageList(@Param("list") List<String> list, @Param("comFlag")List<Integer> comFlag, @Param("runFlag")List<Integer> runFlag);
|
List<RunManageVO> getRunManageList(@Param("list") List<String> list,
|
||||||
|
@Param("comFlag") List<Integer> comFlag,
|
||||||
|
@Param("searchValue") String searchValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取监测点台账信息
|
* 获取监测点台账信息
|
||||||
@@ -57,12 +59,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
|||||||
@Param("manufacturers") List<String> manufacturer,
|
@Param("manufacturers") List<String> manufacturer,
|
||||||
@Param("searchValue") String searchValue);
|
@Param("searchValue") String searchValue);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取指定等级的装置
|
|
||||||
* @author cdf
|
|
||||||
* @date 2023/2/10
|
|
||||||
*/
|
|
||||||
List<String> getDevByGrade(@Param("devId")List<String> devIds,@Param("lineGrade") String lineGrade);
|
|
||||||
|
|
||||||
List<LineInfluxDbOnlineVO> getOnlineEvaluate(@Param("list") List<String> devIndexes,
|
List<LineInfluxDbOnlineVO> getOnlineEvaluate(@Param("list") List<String> devIndexes,
|
||||||
@Param("begin") String searchBeginTime,
|
@Param("begin") String searchBeginTime,
|
||||||
|
|||||||
@@ -18,72 +18,71 @@
|
|||||||
|
|
||||||
<select id="getRunManageList" resultType="com.njcn.device.pq.pojo.vo.RunManageVO">
|
<select id="getRunManageList" resultType="com.njcn.device.pq.pojo.vo.RunManageVO">
|
||||||
SELECT
|
SELECT
|
||||||
linedetail.Num AS id,
|
linedetail.Num AS id,
|
||||||
line.NAME AS lineName,
|
line.NAME AS lineName,
|
||||||
area.NAME AS areaName,
|
area.NAME AS areaName,
|
||||||
gd.NAME AS gdName,
|
gd.NAME AS gdName,
|
||||||
sub.NAME AS bdName,
|
sub.NAME AS bdName,
|
||||||
scaleId.Name as scale,
|
scaleId.Name as scale,
|
||||||
manufacturerId.name as manufacturer,
|
manufacturerId.name as manufacturer,
|
||||||
dev.name as devName,
|
dev.name as devName,
|
||||||
device.IP as ip,
|
device.IP as ip,
|
||||||
case device.Run_Flag when 0 then "投运"
|
case device.Run_Flag when 0 then "投运"
|
||||||
when 1 then "热备用"
|
when 1 then "热备用"
|
||||||
when 2 then "停运"
|
when 2 then "停运"
|
||||||
end as runFlag,
|
end as runFlag,
|
||||||
case device.Com_Flag when 0 then "中断"
|
case device.Com_Flag when 0 then "中断"
|
||||||
when 1 then "正常"
|
when 1 then "正常"
|
||||||
end as comFlag,
|
end as comFlag,
|
||||||
loadtypeId.Name as loadType,
|
loadtypeId.Name as loadType,
|
||||||
businesstypeId.name as businessType,
|
businesstypeId.name as businessType,
|
||||||
IFNULL(linedetail.Obj_Name,"/") as objName,
|
IFNULL(linedetail.Obj_Name,"/") as objName,
|
||||||
case linedetail.PT_Type when 0 then "星型接线"
|
case linedetail.PT_Type when 0 then "星型接线"
|
||||||
when 1 then "三角型接线"
|
when 1 then "三角型接线"
|
||||||
when 2 then "开口三角型接线"
|
when 2 then "开口三角型接线"
|
||||||
end as ptType,
|
end as ptType,
|
||||||
CONCAT(linedetail.PT1,"/", linedetail.PT2) as pt,
|
CONCAT(linedetail.PT1,"/", linedetail.PT2) as pt,
|
||||||
CONCAT(linedetail.CT1,"/", linedetail.CT2) as ct,
|
CONCAT(linedetail.CT1,"/", linedetail.CT2) as ct,
|
||||||
linedetail.Standard_Capacity as standardCapacity,
|
linedetail.Standard_Capacity as standardCapacity,
|
||||||
linedetail.Short_Capacity as shortCapacity,
|
linedetail.Short_Capacity as shortCapacity,
|
||||||
linedetail.Dev_Capacity as devCapacity,
|
linedetail.Dev_Capacity as devCapacity,
|
||||||
linedetail.Deal_Capacity as dealCapacity,
|
linedetail.Deal_Capacity as dealCapacity,
|
||||||
over.Freq_Dev as freqDev,
|
over.Freq_Dev as freqDev,
|
||||||
over.Voltage_Dev as voltageDev,
|
over.Voltage_Dev as voltageDev,
|
||||||
over.Uvoltage_Dev as uvoltageDev,
|
over.Uvoltage_Dev as uvoltageDev,
|
||||||
over.Ubalance as ubalance,
|
over.Ubalance as ubalance,
|
||||||
over.I_Neg as iNeg,
|
over.I_Neg as iNeg,
|
||||||
over.Flicker as flicker,
|
over.Flicker as flicker,
|
||||||
over.Uaberrance as uaberrance,
|
over.Uaberrance as uaberrance,
|
||||||
over.Uharm_3 as oddHarm,
|
over.Uharm_3 as oddHarm,
|
||||||
over.Uharm_2 as evenHarm,
|
over.Uharm_2 as evenHarm,
|
||||||
over.Iharm_2 as iharm2,
|
over.Iharm_2 as iharm2,
|
||||||
over.Iharm_3 as iharm3,
|
over.Iharm_3 as iharm3,
|
||||||
over.Iharm_4 as iharm4,
|
over.Iharm_4 as iharm4,
|
||||||
over.Iharm_5 as iharm5,
|
over.Iharm_5 as iharm5,
|
||||||
over.Iharm_6 as iharm6,
|
over.Iharm_6 as iharm6,
|
||||||
over.Iharm_7 as iharm7,
|
over.Iharm_7 as iharm7,
|
||||||
over.Iharm_8 as iharm8,
|
over.Iharm_8 as iharm8,
|
||||||
over.Iharm_9 as iharm9,
|
over.Iharm_9 as iharm9,
|
||||||
over.Iharm_10 as iharm10,
|
over.Iharm_10 as iharm10,
|
||||||
over.Iharm_11 as iharm11,
|
over.Iharm_11 as iharm11,
|
||||||
over.Iharm_12 as iharm12,
|
over.Iharm_12 as iharm12,
|
||||||
over.Iharm_13 as iharm13,
|
over.Iharm_13 as iharm13,
|
||||||
over.Iharm_14 as iharm14,
|
over.Iharm_14 as iharm14,
|
||||||
over.Iharm_15 as iharm15,
|
over.Iharm_15 as iharm15,
|
||||||
over.Iharm_16 as iharm16,
|
over.Iharm_16 as iharm16,
|
||||||
over.Iharm_17 as iharm17,
|
over.Iharm_17 as iharm17,
|
||||||
over.Iharm_18 as iharm18,
|
over.Iharm_18 as iharm18,
|
||||||
over.Iharm_19 as iharm19,
|
over.Iharm_19 as iharm19,
|
||||||
over.Iharm_20 as iharm20,
|
over.Iharm_20 as iharm20,
|
||||||
over.Iharm_21 as iharm21,
|
over.Iharm_21 as iharm21,
|
||||||
over.Iharm_22 as iharm22,
|
over.Iharm_22 as iharm22,
|
||||||
over.Iharm_23 as iharm23,
|
over.Iharm_23 as iharm23,
|
||||||
over.Iharm_24 as iharm24,
|
over.Iharm_24 as iharm24,
|
||||||
over.Iharm_25 as iharm25,
|
over.Iharm_25 as iharm25,
|
||||||
over.InUharm_1 as inUharm,
|
over.InUharm_1 as inUharm,
|
||||||
over.InUharm_16 as inUharm16
|
over.InUharm_16 as inUharm16
|
||||||
FROM
|
FROM pq_line line
|
||||||
pq_line line
|
|
||||||
INNER JOIN pq_line vol ON vol.Id = line.Pid
|
INNER JOIN pq_line vol ON vol.Id = line.Pid
|
||||||
INNER JOIN pq_line dev ON dev.Id = vol.Pid
|
INNER JOIN pq_line dev ON dev.Id = vol.Pid
|
||||||
INNER JOIN pq_line sub ON sub.Id = dev.Pid
|
INNER JOIN pq_line sub ON sub.Id = dev.Pid
|
||||||
@@ -102,18 +101,18 @@
|
|||||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="runFlag == '' and type !=null">
|
<if test="comFlag.size()!=0">
|
||||||
and device.Run_Flag in
|
|
||||||
<foreach item="item1" collection="runFlag" open="(" separator="," close=")">
|
|
||||||
#{item1}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="comFlag == '' and type !=null">
|
|
||||||
and device.Com_Flag in
|
and device.Com_Flag in
|
||||||
<foreach item="item2" collection="comFlag" open="(" separator="," close=")">
|
<foreach item="item2" collection="comFlag" open="(" separator="," close=")">
|
||||||
#{item2}
|
#{item2}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="searchValue != '' and searchValue != null ">
|
||||||
|
<bind name="searchValueLike" value="'%'+searchValue+'%'"/>
|
||||||
|
AND sub.NAME LIKE #{searchValueLike}
|
||||||
|
OR dev.name LIKE #{searchValueLike}
|
||||||
|
OR line.NAME LIKE #{searchValueLike}
|
||||||
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
areaId.NAME
|
areaId.NAME
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
|
|
||||||
private final LineDetailMapper lineDetailMapper;
|
private final LineDetailMapper lineDetailMapper;
|
||||||
|
|
||||||
private final InfluxDbUtils influxDbUtils;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
public List<RunManageVO> getLineLedger(RunManageParam runManageParam) {
|
||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
@@ -77,8 +75,8 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
||||||
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list->list.getLineIndexes().stream()).collect(Collectors.toList());
|
List<String> lineIndexes = generalDeviceDTOList.stream().flatMap(list->list.getLineIndexes().stream()).collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
if (!CollectionUtils.isEmpty(lineIndexes)) {
|
||||||
return deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(), runManageParam.getRunFlag());
|
return deviceMapper.getRunManageList(lineIndexes, runManageParam.getComFlag(),runManageParam.getSearchValue());
|
||||||
}else {
|
} else {
|
||||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user