Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety
Commits
0187f1cf
Commit
0187f1cf
authored
Aug 11, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时数据mapper修改
parent
e3551d44
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
TDeviceReportDataMapper.xml
.../main/resources/mapper/system/TDeviceReportDataMapper.xml
+10
-10
No files found.
gassafety-system/src/main/resources/mapper/system/TDeviceReportDataMapper.xml
View file @
0187f1cf
...
...
@@ -38,25 +38,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if
test=
"deviceCode != null "
>
and d.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"deviceType != null "
>
and d.device_type = #{deviceType}
</if>
<if
test=
"startReportTime != null "
>
and report_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and report_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"startReportTime != null "
>
and
t.
report_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and
t.
report_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and
t.
communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and
t.
device_status = #{deviceStatus}
</if>
</where>
</select>
<select
id=
"selectRealtimeDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResult"
>
select max(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 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
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
<where>
<if
test=
"deviceCode != null "
>
and d.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"deviceType != null "
>
and d.device_type = #{deviceType}
</if>
<if
test=
"startReportTime != null "
>
and report_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and report_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"startReportTime != null "
>
and
t.
report_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and
t.
report_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and
t.
communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and
t.
device_status = #{deviceStatus}
</if>
</where>
group by t.device_num
</select>
...
...
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
where device_report_data_id = #{deviceReportDataId}
where
t.
device_report_data_id = #{deviceReportDataId}
</select>
<insert
id=
"insertTDeviceReportData"
parameterType=
"TDeviceReportData"
useGeneratedKeys=
"true"
keyProperty=
"deviceReportDataId"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment