update 压缩空气、氮气实时数据优化

maser
yinq 2 weeks ago
parent 3a57a654ba
commit afb07b93d1

@ -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,6 +62,14 @@ public class EmsRecordAirInstant extends BaseEntity
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date recordTime;
public String getMonitorName() {
return monitorName;
}
public void setMonitorName(String monitorName) {
this.monitorName = monitorName;
}
public void setObjId(Long objId)
{
this.objId = objId;

@ -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,6 +62,14 @@ public class EmsRecordNitrogenInstant extends BaseEntity
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date recordTime;
public String getMonitorName() {
return monitorName;
}
public void setMonitorName(String monitorName) {
this.monitorName = monitorName;
}
public void setObjId(Long objId)
{
this.objId = objId;

@ -15,30 +15,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="density" column="density" />
<result property="differencePress" column="difference_press" />
<result property="recordTime" column="record_time" />
<result property="monitorName" column="monitor_name" />
</resultMap>
<sql id="selectEmsRecordAirInstantVo">
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
</sql>
<select id="selectEmsRecordAirInstantList" parameterType="EmsRecordAirInstant" resultMap="EmsRecordAirInstantResult">
<include refid="selectEmsRecordAirInstantVo"/>
<where>
<if test="monitorCode != null and monitorCode != ''"> and monitor_code = #{monitorCode}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''"> and collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="fluxFlow != null "> and flux_flow = #{fluxFlow}</if>
<if test="steamFlow != null "> and steam_flow = #{steamFlow}</if>
<if test="temperature != null "> and temperature = #{temperature}</if>
<if test="press != null "> and press = #{press}</if>
<if test="density != null "> and density = #{density}</if>
<if test="differencePress != null "> and difference_press = #{differencePress}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
<if test="monitorCode != null and monitorCode != ''"> and rai.monitor_code = #{monitorCode}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''"> and rai.collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="fluxFlow != null "> and rai.flux_flow = #{fluxFlow}</if>
<if test="steamFlow != null "> and rai.steam_flow = #{steamFlow}</if>
<if test="temperature != null "> and rai.temperature = #{temperature}</if>
<if test="press != null "> and rai.press = #{press}</if>
<if test="density != null "> and rai.density = #{density}</if>
<if test="differencePress != null "> and rai.difference_press = #{differencePress}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and rai.record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
</where>
order by rai.collect_time desc
</select>
<select id="selectEmsRecordAirInstantByObjId" parameterType="Long" resultMap="EmsRecordAirInstantResult">
<include refid="selectEmsRecordAirInstantVo"/>
where obj_id = #{objId}
where rai.obj_id = #{objId}
</select>
<insert id="insertEmsRecordAirInstant" parameterType="EmsRecordAirInstant" useGeneratedKeys="true" keyProperty="objId">

@ -1,47 +1,67 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.os.ems.record.mapper.EmsRecordNitrogenInstantMapper">
<resultMap type="EmsRecordNitrogenInstant" id="EmsRecordNitrogenInstantResult">
<result property="objId" column="obj_id" />
<result property="monitorCode" column="monitor_code" />
<result property="collectTime" column="collect_time" />
<result property="fluxFlow" column="flux_flow" />
<result property="steamFlow" column="steam_flow" />
<result property="temperature" column="temperature" />
<result property="press" column="press" />
<result property="purity" column="purity" />
<result property="differencePress" column="difference_press" />
<result property="recordTime" column="record_time" />
<result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code"/>
<result property="collectTime" column="collect_time"/>
<result property="fluxFlow" column="flux_flow"/>
<result property="steamFlow" column="steam_flow"/>
<result property="temperature" column="temperature"/>
<result property="press" column="press"/>
<result property="purity" column="purity"/>
<result property="differencePress" column="difference_press"/>
<result property="recordTime" column="record_time"/>
<result property="monitorName" column="monitor_name"/>
</resultMap>
<sql id="selectEmsRecordNitrogenInstantVo">
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
</sql>
<select id="selectEmsRecordNitrogenInstantList" parameterType="EmsRecordNitrogenInstant" resultMap="EmsRecordNitrogenInstantResult">
<select id="selectEmsRecordNitrogenInstantList" parameterType="EmsRecordNitrogenInstant"
resultMap="EmsRecordNitrogenInstantResult">
<include refid="selectEmsRecordNitrogenInstantVo"/>
<where>
<if test="monitorCode != null and monitorCode != ''"> and monitor_code = #{monitorCode}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''"> and collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="fluxFlow != null "> and flux_flow = #{fluxFlow}</if>
<if test="steamFlow != null "> and steam_flow = #{steamFlow}</if>
<if test="temperature != null "> and temperature = #{temperature}</if>
<if test="press != null "> and press = #{press}</if>
<if test="purity != null "> and purity = #{purity}</if>
<if test="differencePress != null "> and difference_press = #{differencePress}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
<if test="monitorCode != null and monitorCode != ''">and rni.monitor_code = #{monitorCode}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and rni.collect_time between #{params.beginCollectTime} and #{params.endCollectTime}
</if>
<if test="fluxFlow != null ">and rni.flux_flow = #{fluxFlow}</if>
<if test="steamFlow != null ">and rni.steam_flow = #{steamFlow}</if>
<if test="temperature != null ">and rni.temperature = #{temperature}</if>
<if test="press != null ">and rni.press = #{press}</if>
<if test="purity != null ">and rni.purity = #{purity}</if>
<if test="differencePress != null ">and rni.difference_press = #{differencePress}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
and rni.record_time between #{params.beginRecordTime} and #{params.endRecordTime}
</if>
</where>
order by rni.collect_time desc
</select>
<select id="selectEmsRecordNitrogenInstantByObjId" parameterType="Long" resultMap="EmsRecordNitrogenInstantResult">
<include refid="selectEmsRecordNitrogenInstantVo"/>
where obj_id = #{objId}
where rni.obj_id = #{objId}
</select>
<insert id="insertEmsRecordNitrogenInstant" parameterType="EmsRecordNitrogenInstant" useGeneratedKeys="true" keyProperty="objId">
<insert id="insertEmsRecordNitrogenInstant" parameterType="EmsRecordNitrogenInstant" useGeneratedKeys="true"
keyProperty="objId">
insert into ems_record_nitrogen_instant
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">monitor_code,</if>
@ -53,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purity != null">purity,</if>
<if test="differencePress != null">difference_press,</if>
<if test="recordTime != null">record_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">#{monitorCode},</if>
<if test="collectTime != null">#{collectTime},</if>
@ -64,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purity != null">#{purity},</if>
<if test="differencePress != null">#{differencePress},</if>
<if test="recordTime != null">#{recordTime},</if>
</trim>
</trim>
</insert>
<update id="updateEmsRecordNitrogenInstant" parameterType="EmsRecordNitrogenInstant">
@ -84,7 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteEmsRecordNitrogenInstantByObjId" parameterType="Long">
delete from ems_record_nitrogen_instant where obj_id = #{objId}
delete
from ems_record_nitrogen_instant
where obj_id = #{objId}
</delete>
<delete id="deleteEmsRecordNitrogenInstantByObjIds" parameterType="String">

@ -58,6 +58,7 @@
and ersi.record_time between #{params.beginRecordTime} and #{params.endRecordTime}
</if>
</where>
order by ersi.collect_time desc
</select>
<select id="selectEmsRecordSteamInstantByObjId" parameterType="Long" resultMap="EmsRecordSteamInstantResult">

Loading…
Cancel
Save