You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
962 B
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.haiwei.manage.mapper.ApiMapper">
<select id="queryPram" resultType="com.haiwei.manage.domain.ParamVo">
SELECT
ee.name,
info.PointName as pointname,
ed.Data as data
FROM EPointData ed
right join (
SELECT PID, MAX(CreateTime) AS LatestTime
FROM EPointData
GROUP BY PID
) ld on ld.PID = ed.PID and ld.LatestTime = CreateTime
right join EPointsInfo info on ed.PID = info.ID
left join EEquipmentMaintenance ee on ee.ID = info.EID
where ee.EquipmentType =1
</select>
<select id="queryDeviceState" resultType="com.haiwei.manage.domain.ParamVo">
SELECT name,
DataType as data
FROM EEquipmentState
where PID=7
</select>
</mapper>