sql适配大梦数据库

This commit is contained in:
cdf
2025-12-19 16:15:55 +08:00
parent 670eaf7d38
commit eeb27c519b
8 changed files with 28 additions and 31 deletions

View File

@@ -7,10 +7,10 @@
SELECT DISTINCT
monitor.Org_Id AS orgId,
monitor.Org_Name AS orgName,
monitor.`Powerr_Id` AS powerId,
monitor.`Powerr_Name` AS powerName,
monitor.Powerr_Id AS powerId,
monitor.Powerr_Name AS powerName,
monitor.id AS monitorId,
monitor.`Name` AS monitorName,
monitor.Name AS monitorName,
monitor.Line_Id,
monitor.Line_Name,
pdm.Monitor_Sort AS monitorSort,
@@ -29,8 +29,8 @@
(
SELECT
pm.id,
pm.`Name`,
pm.`Status`,
pm.Name,
pm.Status,
pm.Org_Id,
pm.Org_Name,
pm.Powerr_Id,
@@ -51,8 +51,8 @@
) AS monitor
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
WHERE
monitor.`Status` = 1
AND pdm.`Status` = 1
monitor.Status = 1
AND pdm.Status = 1
AND monitor.Org_Id IN
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
#{orgId}
@@ -85,7 +85,7 @@
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
</if>
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
AND monitor.Name LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
</if>
</select>

View File

@@ -30,12 +30,12 @@
<select id="getAnomalousData" resultType="OnlineMonitorVo">
SELECT DISTINCT
t6.`Name` gdName,
t5.`Name` subName,
t4.`Name` deviceName,
t6.Name gdName,
t5.Name subName,
t4.Name deviceName,
t1.Line_Id lineId,
t2.`Name` lineName,
t8.`Name` monitorObjType,
t2.Name lineName,
t8.Name monitorObjType,
t7.Obj_Name monitorObj,
"异常数据" as target,
count(t1.time_id) lastDay
@@ -67,4 +67,4 @@
order by lastDay desc
</select>
</mapper>
</mapper>

View File

@@ -381,7 +381,7 @@
line.LEVEL,
line.sort,
line.pids,
CONCAT(voltage.name, '_', line.name, '(',device.`Name`,')') name,
CONCAT(voltage.name, '_', line.name, '(',device.Name,')') name,
comFlag.Com_Flag,
detail.pt_type,
detail.obj_id

View File

@@ -1542,7 +1542,7 @@
<select id="selectByIds" resultType="com.njcn.device.pq.pojo.vo.LineDetailVO$Detail">
SELECT DISTINCT
line.id as lineId,
dept.`Name` deptName,
dept.Name deptName,
area.name as areaId,
gd.NAME gdName,
substation.NAME subName,

View File

@@ -112,12 +112,12 @@
<select id="getNoData" resultType="OnlineMonitorVo">
SELECT DISTINCT
t6.`Name` gdName,
t5.`Name` subName,
t4.`Name` deviceName,
t6.Name gdName,
t5.Name subName,
t4.Name deviceName,
t1.line_index lineId,
t2.`Name` lineName,
t8.`Name` monitorObjType,
t2.Name lineName,
t8.Name monitorObjType,
t7.Obj_Name monitorObj,
"完整性为0" as target,
count(t1.time_id) lastDay