Commit 66a7235f authored by 王晓倩's avatar 王晓倩

实时数据列表sql

parent 33fe7e4f
...@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTDeviceReportDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo"> <select id="selectTDeviceReportDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo">
select t.report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time, select t.report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time,
d.device_name, d.device_code, d.device_type, d.device_model d.device_id, d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no left join t_device_info d on t.device_num = d.iot_no
<where> <where>
...@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRealtimeDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo"> <select id="selectRealtimeDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo">
select max(t.report_time) report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time, select max(t.report_time) report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time,
d.device_name, d.device_code, d.device_type, d.device_model d.device_id, d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t from t_device_report_data t
right join t_device_info d on t.device_num = d.iot_no right join t_device_info d on t.device_num = d.iot_no
<where> <where>
......
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