1.微调
This commit is contained in:
@@ -102,4 +102,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
||||
void updateDeviceRunFlag(@Param("id")String deviceId, @Param("runFlag")Integer status);
|
||||
|
||||
List<PollutionLineInfoDTO> getPollutionDeviceInfo(@Param("id")List<String> devId);
|
||||
|
||||
List<DevDetail.DevPowerFlag> selectDevPowerFlagByIds(@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
manufacturerId.name as manufacturer,
|
||||
dev.name as devName,
|
||||
device.IP as ip,
|
||||
CASE linedetail.Power_Flag
|
||||
WHEN 0 THEN '电网侧'
|
||||
WHEN 1 THEN '非电网侧'
|
||||
END AS powerFlag,
|
||||
case linedetail.Run_Flag
|
||||
when 0 then '投运'
|
||||
when 1 then '检修'
|
||||
@@ -149,6 +153,10 @@
|
||||
manufacturerId.name as manufacturer,
|
||||
dev.name as devName,
|
||||
device.IP as ip,
|
||||
CASE linedetail.Power_Flag
|
||||
WHEN 0 THEN '电网侧'
|
||||
WHEN 1 THEN '非电网侧'
|
||||
END AS powerFlag,
|
||||
case linedetail.Run_Flag
|
||||
when 0 then '投运'
|
||||
when 1 then '检修'
|
||||
@@ -530,5 +538,31 @@
|
||||
AND substation.id = pqsub.id
|
||||
AND subv.id = pv.id
|
||||
</select>
|
||||
<select id="selectDevPowerFlagByIds" resultType="com.njcn.device.pq.pojo.vo.DevDetail$DevPowerFlag">
|
||||
SELECT DISTINCT
|
||||
device.id as devIndex,
|
||||
CASE lineDetail.Power_Flag
|
||||
WHEN 0 THEN '电网侧'
|
||||
WHEN 1 THEN '非电网侧'
|
||||
END AS powerFlag
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_dept_line pd,
|
||||
pq_line voltage,
|
||||
pq_line device,
|
||||
pq_line_detail lineDetail
|
||||
<where>
|
||||
<if test="ids!=null and ids.size()>0">
|
||||
device.id IN
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND line.pid = voltage.id
|
||||
AND line.id = pd.Line_Id
|
||||
AND voltage.pid = device.id
|
||||
AND line.id = lineDetail.id
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user