add 蒸汽整点数据报表关联计量设备名称

maser
yinq 2 weeks ago
parent 677bc08f56
commit 67dcb4ce66

@ -29,6 +29,12 @@ public class EmsReportPointSteam extends BaseEntity {
@Excel(name = "计量设备编号") @Excel(name = "计量设备编号")
private String monitorCode; private String monitorCode;
/**
*
*/
@Excel(name = "计量设备名称")
private String monitorName;
/** /**
* *
*/ */
@ -84,6 +90,14 @@ public class EmsReportPointSteam extends BaseEntity {
return monitorCode; return monitorCode;
} }
public String getMonitorName() {
return monitorName;
}
public void setMonitorName(String monitorName) {
this.monitorName = monitorName;
}
public void setInstrumentValue(BigDecimal instrumentValue) { public void setInstrumentValue(BigDecimal instrumentValue) {
this.instrumentValue = instrumentValue; this.instrumentValue = instrumentValue;
} }
@ -137,6 +151,7 @@ public class EmsReportPointSteam extends BaseEntity {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId()) .append("objId", getObjId())
.append("monitorCode", getMonitorCode()) .append("monitorCode", getMonitorCode())
.append("monitorName", getMonitorName())
.append("instrumentValue", getInstrumentValue()) .append("instrumentValue", getInstrumentValue())
.append("expend", getExpend()) .append("expend", getExpend())
.append("recordTime", getRecordTime()) .append("recordTime", getRecordTime())

@ -7,6 +7,7 @@
<resultMap type="EmsReportPointSteam" id="EmsReportPointSteamResult"> <resultMap type="EmsReportPointSteam" id="EmsReportPointSteamResult">
<result property="objId" column="obj_id"/> <result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code"/> <result property="monitorCode" column="monitor_code"/>
<result property="monitorName" column="monitor_name"/>
<result property="instrumentValue" column="instrument_value"/> <result property="instrumentValue" column="instrument_value"/>
<result property="expend" column="expend"/> <result property="expend" column="expend"/>
<result property="recordTime" column="record_time"/> <result property="recordTime" column="record_time"/>
@ -20,44 +21,46 @@
</resultMap> </resultMap>
<sql id="selectEmsReportPointSteamVo"> <sql id="selectEmsReportPointSteamVo">
select obj_id, select erps.obj_id,
monitor_code, erps.monitor_code,
instrument_value, ebmi.monitor_name,
expend, erps.instrument_value,
record_time, erps.expend,
begin_time, erps.record_time,
end_time, erps.begin_time,
update_flag, erps.end_time,
create_by, erps.update_flag,
create_time, erps.create_by,
update_by, erps.create_time,
update_time erps.update_by,
from ems_report_point_steam erps.update_time
from ems_report_point_steam erps
left join ems_base_monitor_info ebmi on erps.monitor_code = ebmi.monitor_code
</sql> </sql>
<select id="selectEmsReportPointSteamList" parameterType="EmsReportPointSteam" <select id="selectEmsReportPointSteamList" parameterType="EmsReportPointSteam"
resultMap="EmsReportPointSteamResult"> resultMap="EmsReportPointSteamResult">
<include refid="selectEmsReportPointSteamVo"/> <include refid="selectEmsReportPointSteamVo"/>
<where> <where>
<if test="monitorCode != null and monitorCode != ''">and monitor_code = #{monitorCode}</if> <if test="monitorCode != null and monitorCode != ''">and erps.monitor_code = #{monitorCode}</if>
<if test="instrumentValue != null ">and instrument_value = #{instrumentValue}</if> <if test="instrumentValue != null ">and erps.instrument_value = #{instrumentValue}</if>
<if test="expend != null ">and expend = #{expend}</if> <if test="expend != null ">and erps.expend = #{expend}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> <if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
and record_time between #{params.beginRecordTime} and #{params.endRecordTime} and erps.record_time between #{params.beginRecordTime} and #{params.endRecordTime}
</if> </if>
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''"> <if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
and begin_time between #{params.beginBeginTime} and #{params.endBeginTime} and erps.begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
</if> </if>
<if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''"> <if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''">
and end_time between #{params.beginEndTime} and #{params.endEndTime} and erps.end_time between #{params.beginEndTime} and #{params.endEndTime}
</if> </if>
<if test="updateFlag != null and updateFlag != ''">and update_flag = #{updateFlag}</if> <if test="updateFlag != null and updateFlag != ''">and erps.update_flag = #{updateFlag}</if>
</where> </where>
</select> </select>
<select id="selectEmsReportPointSteamByObjId" parameterType="Long" resultMap="EmsReportPointSteamResult"> <select id="selectEmsReportPointSteamByObjId" parameterType="Long" resultMap="EmsReportPointSteamResult">
<include refid="selectEmsReportPointSteamVo"/> <include refid="selectEmsReportPointSteamVo"/>
where obj_id = #{objId} where erps.obj_id = #{objId}
</select> </select>
<insert id="insertEmsReportPointSteam" parameterType="EmsReportPointSteam" useGeneratedKeys="true" <insert id="insertEmsReportPointSteam" parameterType="EmsReportPointSteam" useGeneratedKeys="true"

Loading…
Cancel
Save