Commit 8a909740 authored by hezhuozhi's avatar hezhuozhi

27467 人大金仓数据库适配

parent 99bb953f
......@@ -11,7 +11,7 @@
( SBMC, 4 ) AS NAME,
GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum
FROM
`sjgl_zsj_zsbtz`
sjgl_zsj_zsbtz
WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS}
GROUP BY
......@@ -31,7 +31,7 @@
FROM
sjgl_zsj_zsbtz
WHERE
FSB IN ( SELECT DBID FROM `sjgl_zsj_zsbtz` WHERE MACHGENRE = ( SELECT DATAID FROM `tpri_dmp_databook` WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
FSB IN ( SELECT DBID FROM sjgl_zsj_zsbtz WHERE MACHGENRE = ( SELECT DATAID FROM tpri_dmp_databook WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
) B
GROUP BY
B.FSB
......@@ -39,7 +39,7 @@
<select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT
WERKS AS `code`,
WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
......@@ -53,7 +53,7 @@
<select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT
WERKS AS `code`,
WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
......
......@@ -5,6 +5,6 @@
<select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto">
SELECT * FROM `system_enum` WHERE type = #{type} and system_name = #{systemName}
SELECT * FROM system_enum WHERE type = #{type} and system_name = #{systemName}
</select>
</mapper>
......@@ -9,7 +9,7 @@
created_time as createdTime ,
equipmentIndexName
FROM
`temporary_data`
temporary_data
<where>
<if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId}
......@@ -27,7 +27,7 @@
created_time as createdTime ,
equipmentIndexName
FROM
`temporary_data`
temporary_data
<where>
<if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId}
......@@ -51,16 +51,16 @@
<if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId}
</if>
ORDER BY `value` LIMIT 1 ) AS minTime,
max( `value` ) AS max,
ORDER BY value LIMIT 1 ) AS minTime,
max( value ) AS max,
( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName}
<if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId}
</if> ORDER BY `value` DESC LIMIT 1 ) AS maxTime,
min( `value` ) AS min
</if> ORDER BY value DESC LIMIT 1 ) AS maxTime,
min( value ) AS min
FROM
`temporary_data`
temporary_data
<where>
<if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
......@@ -76,7 +76,7 @@
SELECT
*
FROM
`temporary_data`
temporary_data
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment