<?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" >
|
<mapper namespace="com.gk.hotwork.Mapper.TaskGasInfoMapper">
|
<resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.TaskGasInfo">
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
<result column="taskcode" property="taskcode" jdbcType="VARCHAR"/>
|
<result column="taskworker" property="taskworker" jdbcType="VARCHAR"/>
|
<result column="gastype" property="gastype" jdbcType="VARCHAR"/>
|
<result column="gasvalue" property="gasvalue" jdbcType="DECIMAL"/>
|
<result column="gasunit" property="gasunit" jdbcType="VARCHAR"/>
|
<result column="iswarn" property="iswarn" jdbcType="TINYINT"/>
|
<result column="isyujing" property="isyujing" jdbcType="TINYINT"/>
|
<result column="issms" property="issms" jdbcType="TINYINT"/>
|
<result column="ismend" property="ismend" jdbcType="TINYINT"/>
|
<result column="updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">
|
<!-- -->
|
id, taskcode, taskworker, gastype, gasvalue, gasunit, iswarn, isyujing, issms, ismend,
|
updatetime
|
</sql>
|
<select id="selectDataGrid" resultType="com.gk.hotwork.Domain.TaskGasInfo">
|
select *
|
from taskgas
|
<where>
|
1=1
|
<if test="condition.taskcode != null and condition.taskcode !=''">
|
and taskcode = #{condition.taskcode}
|
</if>
|
<if test="condition.gastype != null and condition.gastype !=''">
|
and gastype = #{condition.gastype}
|
</if>
|
</where>
|
</select>
|
<select id="selectLastGas" resultType="com.gk.hotwork.Domain.TaskGasInfo">
|
SELECT
|
*
|
FROM
|
(
|
SELECT * FROM `taskgas`
|
<where>
|
taskcode = #{taskCode}
|
AND taskworker = #{worker}
|
</where>
|
ORDER BY
|
updatetime DESC
|
LIMIT 100
|
) t
|
GROUP BY
|
t.gastype
|
</select>
|
|
|
</mapper>
|