|
|
|
@ -17,47 +17,51 @@
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="monitorName" column="monitor_name"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectEmsReportPointSteamVo">
|
|
|
|
|
select obj_id,
|
|
|
|
|
monitor_code,
|
|
|
|
|
instrument_value,
|
|
|
|
|
expend,
|
|
|
|
|
record_time,
|
|
|
|
|
begin_time,
|
|
|
|
|
end_time,
|
|
|
|
|
update_flag,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time
|
|
|
|
|
from ems_report_point_steam
|
|
|
|
|
select erps.obj_id,
|
|
|
|
|
erps.monitor_code,
|
|
|
|
|
erps.instrument_value,
|
|
|
|
|
erps.expend,
|
|
|
|
|
erps.record_time,
|
|
|
|
|
erps.begin_time,
|
|
|
|
|
erps.end_time,
|
|
|
|
|
erps.update_flag,
|
|
|
|
|
erps.create_by,
|
|
|
|
|
erps.create_time,
|
|
|
|
|
erps.update_by,
|
|
|
|
|
erps.update_time,
|
|
|
|
|
ebm.monitor_name
|
|
|
|
|
from ems_report_point_steam erps
|
|
|
|
|
left join ems_base_monitor_info ebm on erps.monitor_code = ebm.monitor_code
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmsReportPointSteamList" parameterType="EmsReportPointSteam"
|
|
|
|
|
resultMap="EmsReportPointSteamResult">
|
|
|
|
|
<include refid="selectEmsReportPointSteamVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="monitorCode != null and monitorCode != ''">and monitor_code = #{monitorCode}</if>
|
|
|
|
|
<if test="instrumentValue != null ">and instrument_value = #{instrumentValue}</if>
|
|
|
|
|
<if test="expend != null ">and expend = #{expend}</if>
|
|
|
|
|
<if test="monitorCode != null and monitorCode != ''">and erps.monitor_code = #{monitorCode}</if>
|
|
|
|
|
<if test="instrumentValue != null ">and erps.instrument_value = #{instrumentValue}</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 != ''">
|
|
|
|
|
and record_time between #{params.beginRecordTime} and #{params.endRecordTime}
|
|
|
|
|
and erps.record_time between #{params.beginRecordTime} and #{params.endRecordTime}
|
|
|
|
|
</if>
|
|
|
|
|
<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 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 test="updateFlag != null and updateFlag != ''">and update_flag = #{updateFlag}</if>
|
|
|
|
|
<if test="updateFlag != null and updateFlag != ''">and erps.update_flag = #{updateFlag}</if>
|
|
|
|
|
<if test="monitorName != null and monitorName != ''">and ebm.monitor_name like concat('%', #{monitorName}, '%')</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmsReportPointSteamByObjId" parameterType="Long" resultMap="EmsReportPointSteamResult">
|
|
|
|
|
<include refid="selectEmsReportPointSteamVo"/>
|
|
|
|
|
where obj_id = #{objId}
|
|
|
|
|
where erps.obj_id = #{objId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertEmsReportPointSteam" parameterType="EmsReportPointSteam" useGeneratedKeys="true"
|
|
|
|
|