From afb07b93d1ce84e1aa704ac98b45b1870896faf0 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 6 Aug 2025 14:32:20 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8E=8B=E7=BC=A9=E7=A9=BA=E6=B0=94?= =?UTF-8?q?=E3=80=81=E6=B0=AE=E6=B0=94=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../record/domain/EmsRecordAirInstant.java | 14 ++- .../domain/EmsRecordNitrogenInstant.java | 14 ++- .../ems/record/EmsRecordAirInstantMapper.xml | 36 +++++--- .../record/EmsRecordNitrogenInstantMapper.xml | 88 ++++++++++++------- .../record/EmsRecordSteamInstantMapper.xml | 1 + 5 files changed, 107 insertions(+), 46 deletions(-) diff --git a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordAirInstant.java b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordAirInstant.java index 7a2719f..cc388f6 100644 --- a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordAirInstant.java +++ b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordAirInstant.java @@ -24,6 +24,10 @@ public class EmsRecordAirInstant extends BaseEntity @Excel(name = "计量设备编号") private String monitorCode; + /** 计量设备名称 */ + @Excel(name = "计量设备名称") + private String monitorName; + /** 采集时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @@ -58,7 +62,15 @@ public class EmsRecordAirInstant extends BaseEntity @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date recordTime; - public void setObjId(Long objId) + public String getMonitorName() { + return monitorName; + } + + public void setMonitorName(String monitorName) { + this.monitorName = monitorName; + } + + public void setObjId(Long objId) { this.objId = objId; } diff --git a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordNitrogenInstant.java b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordNitrogenInstant.java index 8e3f401..f3467e5 100644 --- a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordNitrogenInstant.java +++ b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordNitrogenInstant.java @@ -24,6 +24,10 @@ public class EmsRecordNitrogenInstant extends BaseEntity @Excel(name = "计量设备编号") private String monitorCode; + /** 计量设备名称 */ + @Excel(name = "计量设备名称") + private String monitorName; + /** 采集时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @@ -58,7 +62,15 @@ public class EmsRecordNitrogenInstant extends BaseEntity @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date recordTime; - public void setObjId(Long objId) + public String getMonitorName() { + return monitorName; + } + + public void setMonitorName(String monitorName) { + this.monitorName = monitorName; + } + + public void setObjId(Long objId) { this.objId = objId; } diff --git a/os-ems/src/main/resources/mapper/ems/record/EmsRecordAirInstantMapper.xml b/os-ems/src/main/resources/mapper/ems/record/EmsRecordAirInstantMapper.xml index 49f8d93..d6f0ca2 100644 --- a/os-ems/src/main/resources/mapper/ems/record/EmsRecordAirInstantMapper.xml +++ b/os-ems/src/main/resources/mapper/ems/record/EmsRecordAirInstantMapper.xml @@ -15,30 +15,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select obj_id, monitor_code, collect_time, flux_flow, steam_flow, temperature, press, density, difference_press, record_time from ems_record_air_instant + select rai.obj_id, + rai.monitor_code, + rai.collect_time, + rai.flux_flow, + rai.steam_flow, + rai.temperature, + rai.press, + rai.density, + rai.difference_press, + rai.record_time, + bmi.monitor_name + from ems_record_air_instant rai + left join ems_base_monitor_info bmi on rai.monitor_code = bmi.monitor_code diff --git a/os-ems/src/main/resources/mapper/ems/record/EmsRecordNitrogenInstantMapper.xml b/os-ems/src/main/resources/mapper/ems/record/EmsRecordNitrogenInstantMapper.xml index 0ec477e..2859268 100644 --- a/os-ems/src/main/resources/mapper/ems/record/EmsRecordNitrogenInstantMapper.xml +++ b/os-ems/src/main/resources/mapper/ems/record/EmsRecordNitrogenInstantMapper.xml @@ -1,47 +1,67 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - + + + + + + + + + + + - select obj_id, monitor_code, collect_time, flux_flow, steam_flow, temperature, press, purity, difference_press, record_time from ems_record_nitrogen_instant + select rni.obj_id, + rni.monitor_code, + rni.collect_time, + rni.flux_flow, + rni.steam_flow, + rni.temperature, + rni.press, + rni.purity, + rni.difference_press, + rni.record_time, + bmi.monitor_name + from ems_record_nitrogen_instant rni + left join ems_base_monitor_info bmi on rni.monitor_code = bmi.monitor_code - - - and monitor_code = #{monitorCode} - and collect_time between #{params.beginCollectTime} and #{params.endCollectTime} - and flux_flow = #{fluxFlow} - and steam_flow = #{steamFlow} - and temperature = #{temperature} - and press = #{press} - and purity = #{purity} - and difference_press = #{differencePress} - and record_time between #{params.beginRecordTime} and #{params.endRecordTime} + + and rni.monitor_code = #{monitorCode} + + and rni.collect_time between #{params.beginCollectTime} and #{params.endCollectTime} + + and rni.flux_flow = #{fluxFlow} + and rni.steam_flow = #{steamFlow} + and rni.temperature = #{temperature} + and rni.press = #{press} + and rni.purity = #{purity} + and rni.difference_press = #{differencePress} + + and rni.record_time between #{params.beginRecordTime} and #{params.endRecordTime} + + order by rni.collect_time desc - + - - + + insert into ems_record_nitrogen_instant monitor_code, @@ -53,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" purity, difference_press, record_time, - + #{monitorCode}, #{collectTime}, @@ -64,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{purity}, #{differencePress}, #{recordTime}, - + @@ -84,11 +104,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from ems_record_nitrogen_instant where obj_id = #{objId} + delete + from ems_record_nitrogen_instant + where obj_id = #{objId} - delete from ems_record_nitrogen_instant where obj_id in + delete from ems_record_nitrogen_instant where obj_id in #{objId} diff --git a/os-ems/src/main/resources/mapper/ems/record/EmsRecordSteamInstantMapper.xml b/os-ems/src/main/resources/mapper/ems/record/EmsRecordSteamInstantMapper.xml index 4ee4d51..fb272ca 100644 --- a/os-ems/src/main/resources/mapper/ems/record/EmsRecordSteamInstantMapper.xml +++ b/os-ems/src/main/resources/mapper/ems/record/EmsRecordSteamInstantMapper.xml @@ -58,6 +58,7 @@ and ersi.record_time between #{params.beginRecordTime} and #{params.endRecordTime} + order by ersi.collect_time desc