Commit 8a909740 authored by hezhuozhi's avatar hezhuozhi

27467 人大金仓数据库适配

parent 99bb953f
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
( SBMC, 4 ) AS NAME, ( SBMC, 4 ) AS NAME,
GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum
FROM FROM
`sjgl_zsj_zsbtz` sjgl_zsj_zsbtz
WHERE WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS} MACHGENRE = #{DATAID} and WERKS = #{WERKS}
GROUP BY GROUP BY
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
FROM FROM
sjgl_zsj_zsbtz sjgl_zsj_zsbtz
WHERE 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 ) B
GROUP BY GROUP BY
B.FSB B.FSB
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto"> <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> </select>
</mapper> </mapper>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -51,16 +51,16 @@ ...@@ -51,16 +51,16 @@
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> </if>
ORDER BY `value` LIMIT 1 ) AS minTime, ORDER BY value LIMIT 1 ) AS minTime,
max( `value` ) AS max, max( value ) AS max,
( SELECT created_time FROM temporary_data WHERE ( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName} equipmentIndexName =#{equipmentIndexName}
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> ORDER BY `value` DESC LIMIT 1 ) AS maxTime, </if> ORDER BY value DESC LIMIT 1 ) AS maxTime,
min( `value` ) AS min min( value ) AS min
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName} gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
SELECT SELECT
* *
FROM FROM
`temporary_data` temporary_data
</select> </select>
</mapper> </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