|
@@ -0,0 +1,589 @@
|
|
|
+<?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.steerinfo.ems.emscalorificvalue.mapper.EmsCalorificValueMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
|
|
|
+ <id column="WTBH" jdbcType="VARCHAR" property="wtbh" />
|
|
|
+ <result column="SAMPLETYPE" jdbcType="VARCHAR" property="sampletype" />
|
|
|
+ <result column="MATERIALNO" jdbcType="VARCHAR" property="materialno" />
|
|
|
+ <result column="MATERIALNAME" jdbcType="VARCHAR" property="materialname" />
|
|
|
+ <result column="MATERIALSOURCE" jdbcType="VARCHAR" property="materialsource" />
|
|
|
+ <result column="SAMPLETIME" jdbcType="TIMESTAMP" property="sampletime" />
|
|
|
+ <result column="SAMPLEPERSON" jdbcType="VARCHAR" property="sampleperson" />
|
|
|
+ <result column="SENDTIME" jdbcType="TIMESTAMP" property="sendtime" />
|
|
|
+ <result column="SENDER" jdbcType="VARCHAR" property="sender" />
|
|
|
+ <result column="JUDGERESULT" jdbcType="VARCHAR" property="judgeresult" />
|
|
|
+ <result column="JUDGETIME" jdbcType="TIMESTAMP" property="judgetime" />
|
|
|
+ <result column="MEMO" jdbcType="VARCHAR" property="memo" />
|
|
|
+ <result column="SAMPLENO" jdbcType="VARCHAR" property="sampleno" />
|
|
|
+ <result column="ITEMCODE" jdbcType="VARCHAR" property="itemcode" />
|
|
|
+ <result column="ITEM" jdbcType="VARCHAR" property="item" />
|
|
|
+ <result column="TESTRESULT" jdbcType="VARCHAR" property="testresult" />
|
|
|
+ <result column="ITEMJUDGERESULT" jdbcType="VARCHAR" property="itemjudgeresult" />
|
|
|
+ <result column="RECORDER" jdbcType="VARCHAR" property="recorder" />
|
|
|
+ <result column="INPUTTIME" jdbcType="TIMESTAMP" property="inputtime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ WTBH, SAMPLETYPE, MATERIALNO, MATERIALNAME, MATERIALSOURCE, SAMPLETIME, SAMPLEPERSON,
|
|
|
+ SENDTIME, SENDER, JUDGERESULT, JUDGETIME, MEMO, SAMPLENO, ITEMCODE, ITEM, TESTRESULT,
|
|
|
+ ITEMJUDGERESULT, RECORDER, INPUTTIME
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.WTBH, t.SAMPLETYPE, t.MATERIALNO, t.MATERIALNAME, t.MATERIALSOURCE, t.SAMPLETIME,
|
|
|
+ t.SAMPLEPERSON, t.SENDTIME, t.SENDER, t.JUDGERESULT, t.JUDGETIME, t.MEMO, t.SAMPLENO,
|
|
|
+ t.ITEMCODE, t.ITEM, t.TESTRESULT, t.ITEMJUDGERESULT, t.RECORDER, t.INPUTTIME
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM EMS_CALORIFIC_VALUE
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM EMS_CALORIFIC_VALUE t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="wtbh != null and wtbh != ''">
|
|
|
+ and WTBH = #{wtbh}
|
|
|
+ </if>
|
|
|
+ <if test="sampletype != null and sampletype != ''">
|
|
|
+ and SAMPLETYPE = #{sampletype}
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null and materialno != ''">
|
|
|
+ and MATERIALNO = #{materialno}
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null and materialname != ''">
|
|
|
+ and MATERIALNAME = #{materialname}
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null and materialsource != ''">
|
|
|
+ and MATERIALSOURCE = #{materialsource}
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ and TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = #{sampletime}
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null and sampleperson != ''">
|
|
|
+ and SAMPLEPERSON = #{sampleperson}
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ and TO_CHAR(SENDTIME,'yyyy-MM-dd') = #{sendtime}
|
|
|
+ </if>
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
+ and SENDER = #{sender}
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null and judgeresult != ''">
|
|
|
+ and JUDGERESULT = #{judgeresult}
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ and TO_CHAR(JUDGETIME,'yyyy-MM-dd') = #{judgetime}
|
|
|
+ </if>
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
+ and MEMO = #{memo}
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null and sampleno != ''">
|
|
|
+ and SAMPLENO = #{sampleno}
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null and itemcode != ''">
|
|
|
+ and ITEMCODE = #{itemcode}
|
|
|
+ </if>
|
|
|
+ <if test="item != null and item != ''">
|
|
|
+ and ITEM = #{item}
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null and testresult != ''">
|
|
|
+ and TESTRESULT = #{testresult}
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null and itemjudgeresult != ''">
|
|
|
+ and ITEMJUDGERESULT = #{itemjudgeresult}
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null and recorder != ''">
|
|
|
+ and RECORDER = #{recorder}
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ and TO_CHAR(INPUTTIME,'yyyy-MM-dd') = #{inputtime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="wtbh != null and wtbh != ''">
|
|
|
+ and WTBH LIKE '%${wtbh}%'
|
|
|
+ </if>
|
|
|
+ <if test="sampletype != null and sampletype != ''">
|
|
|
+ and SAMPLETYPE LIKE '%${sampletype}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null and materialno != ''">
|
|
|
+ and MATERIALNO LIKE '%${materialno}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null and materialname != ''">
|
|
|
+ and MATERIALNAME LIKE '%${materialname}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null and materialsource != ''">
|
|
|
+ and MATERIALSOURCE LIKE '%${materialsource}%'
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ and TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = #{sampletime}
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null and sampleperson != ''">
|
|
|
+ and SAMPLEPERSON LIKE '%${sampleperson}%'
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ and TO_CHAR(SENDTIME,'yyyy-MM-dd') = #{sendtime}
|
|
|
+ </if>
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
+ and SENDER LIKE '%${sender}%'
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null and judgeresult != ''">
|
|
|
+ and JUDGERESULT LIKE '%${judgeresult}%'
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ and TO_CHAR(JUDGETIME,'yyyy-MM-dd') = #{judgetime}
|
|
|
+ </if>
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
+ and MEMO LIKE '%${memo}%'
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null and sampleno != ''">
|
|
|
+ and SAMPLENO LIKE '%${sampleno}%'
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null and itemcode != ''">
|
|
|
+ and ITEMCODE LIKE '%${itemcode}%'
|
|
|
+ </if>
|
|
|
+ <if test="item != null and item != ''">
|
|
|
+ and ITEM LIKE '%${item}%'
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null and testresult != ''">
|
|
|
+ and TESTRESULT LIKE '%${testresult}%'
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null and itemjudgeresult != ''">
|
|
|
+ and ITEMJUDGERESULT LIKE '%${itemjudgeresult}%'
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null and recorder != ''">
|
|
|
+ and RECORDER LIKE '%${recorder}%'
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ and TO_CHAR(INPUTTIME,'yyyy-MM-dd') = #{inputtime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from EMS_CALORIFIC_VALUE
|
|
|
+ where WTBH = #{wtbh,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from EMS_CALORIFIC_VALUE
|
|
|
+ where 1!=1
|
|
|
+ <if test="sampletype != null and sampletype != ''">
|
|
|
+ or SAMPLETYPE = #{sampletype}
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null and materialno != ''">
|
|
|
+ or MATERIALNO = #{materialno}
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null and materialname != ''">
|
|
|
+ or MATERIALNAME = #{materialname}
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null and materialsource != ''">
|
|
|
+ or MATERIALSOURCE = #{materialsource}
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ or TO_CHAR(SAMPLETIME,'yyyy-MM-dd') = '#{sampletime}'
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null and sampleperson != ''">
|
|
|
+ or SAMPLEPERSON = #{sampleperson}
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ or TO_CHAR(SENDTIME,'yyyy-MM-dd') = '#{sendtime}'
|
|
|
+ </if>
|
|
|
+ <if test="sender != null and sender != ''">
|
|
|
+ or SENDER = #{sender}
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null and judgeresult != ''">
|
|
|
+ or JUDGERESULT = #{judgeresult}
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ or TO_CHAR(JUDGETIME,'yyyy-MM-dd') = '#{judgetime}'
|
|
|
+ </if>
|
|
|
+ <if test="memo != null and memo != ''">
|
|
|
+ or MEMO = #{memo}
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null and sampleno != ''">
|
|
|
+ or SAMPLENO = #{sampleno}
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null and itemcode != ''">
|
|
|
+ or ITEMCODE = #{itemcode}
|
|
|
+ </if>
|
|
|
+ <if test="item != null and item != ''">
|
|
|
+ or ITEM = #{item}
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null and testresult != ''">
|
|
|
+ or TESTRESULT = #{testresult}
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null and itemjudgeresult != ''">
|
|
|
+ or ITEMJUDGERESULT = #{itemjudgeresult}
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null and recorder != ''">
|
|
|
+ or RECORDER = #{recorder}
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ or TO_CHAR(INPUTTIME,'yyyy-MM-dd') = '#{inputtime}'
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
|
|
|
+ insert into EMS_CALORIFIC_VALUE (WTBH, SAMPLETYPE, MATERIALNO,
|
|
|
+ MATERIALNAME, MATERIALSOURCE, SAMPLETIME,
|
|
|
+ SAMPLEPERSON, SENDTIME, SENDER,
|
|
|
+ JUDGERESULT, JUDGETIME, MEMO,
|
|
|
+ SAMPLENO, ITEMCODE, ITEM,
|
|
|
+ TESTRESULT, ITEMJUDGERESULT, RECORDER,
|
|
|
+ INPUTTIME)
|
|
|
+ values (#{wtbh,jdbcType=VARCHAR}, #{sampletype,jdbcType=VARCHAR}, #{materialno,jdbcType=VARCHAR},
|
|
|
+ #{materialname,jdbcType=VARCHAR}, #{materialsource,jdbcType=VARCHAR}, #{sampletime,jdbcType=TIMESTAMP},
|
|
|
+ #{sampleperson,jdbcType=VARCHAR}, #{sendtime,jdbcType=TIMESTAMP}, #{sender,jdbcType=VARCHAR},
|
|
|
+ #{judgeresult,jdbcType=VARCHAR}, #{judgetime,jdbcType=TIMESTAMP}, #{memo,jdbcType=VARCHAR},
|
|
|
+ #{sampleno,jdbcType=VARCHAR}, #{itemcode,jdbcType=VARCHAR}, #{item,jdbcType=VARCHAR},
|
|
|
+ #{testresult,jdbcType=VARCHAR}, #{itemjudgeresult,jdbcType=VARCHAR}, #{recorder,jdbcType=VARCHAR},
|
|
|
+ #{inputtime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
|
|
|
+ insert into EMS_CALORIFIC_VALUE
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="wtbh != null">
|
|
|
+ WTBH,
|
|
|
+ </if>
|
|
|
+ <if test="sampletype != null">
|
|
|
+ SAMPLETYPE,
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null">
|
|
|
+ MATERIALNO,
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null">
|
|
|
+ MATERIALNAME,
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null">
|
|
|
+ MATERIALSOURCE,
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ SAMPLETIME,
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null">
|
|
|
+ SAMPLEPERSON,
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ SENDTIME,
|
|
|
+ </if>
|
|
|
+ <if test="sender != null">
|
|
|
+ SENDER,
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null">
|
|
|
+ JUDGERESULT,
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ JUDGETIME,
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ MEMO,
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null">
|
|
|
+ SAMPLENO,
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null">
|
|
|
+ ITEMCODE,
|
|
|
+ </if>
|
|
|
+ <if test="item != null">
|
|
|
+ ITEM,
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null">
|
|
|
+ TESTRESULT,
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null">
|
|
|
+ ITEMJUDGERESULT,
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null">
|
|
|
+ RECORDER,
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ INPUTTIME,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="wtbh != null">
|
|
|
+ #{wtbh,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sampletype != null">
|
|
|
+ #{sampletype,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null">
|
|
|
+ #{materialno,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null">
|
|
|
+ #{materialname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null">
|
|
|
+ #{materialsource,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ #{sampletime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null">
|
|
|
+ #{sampleperson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ #{sendtime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sender != null">
|
|
|
+ #{sender,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null">
|
|
|
+ #{judgeresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ #{judgetime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ #{memo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null">
|
|
|
+ #{sampleno,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null">
|
|
|
+ #{itemcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="item != null">
|
|
|
+ #{item,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null">
|
|
|
+ #{testresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null">
|
|
|
+ #{itemjudgeresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null">
|
|
|
+ #{recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ #{inputtime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
|
|
|
+ update EMS_CALORIFIC_VALUE
|
|
|
+ set SAMPLETYPE = #{sampletype,jdbcType=VARCHAR},
|
|
|
+ MATERIALNO = #{materialno,jdbcType=VARCHAR},
|
|
|
+ MATERIALNAME = #{materialname,jdbcType=VARCHAR},
|
|
|
+ MATERIALSOURCE = #{materialsource,jdbcType=VARCHAR},
|
|
|
+ SAMPLETIME = #{sampletime,jdbcType=TIMESTAMP},
|
|
|
+ SAMPLEPERSON = #{sampleperson,jdbcType=VARCHAR},
|
|
|
+ SENDTIME = #{sendtime,jdbcType=TIMESTAMP},
|
|
|
+ SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
+ JUDGERESULT = #{judgeresult,jdbcType=VARCHAR},
|
|
|
+ JUDGETIME = #{judgetime,jdbcType=TIMESTAMP},
|
|
|
+ MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
+ SAMPLENO = #{sampleno,jdbcType=VARCHAR},
|
|
|
+ ITEMCODE = #{itemcode,jdbcType=VARCHAR},
|
|
|
+ ITEM = #{item,jdbcType=VARCHAR},
|
|
|
+ TESTRESULT = #{testresult,jdbcType=VARCHAR},
|
|
|
+ ITEMJUDGERESULT = #{itemjudgeresult,jdbcType=VARCHAR},
|
|
|
+ RECORDER = #{recorder,jdbcType=VARCHAR},
|
|
|
+ INPUTTIME = #{inputtime,jdbcType=TIMESTAMP}
|
|
|
+ where WTBH = #{wtbh,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emscalorificvalue.model.EmsCalorificValue">
|
|
|
+ update EMS_CALORIFIC_VALUE
|
|
|
+ <set>
|
|
|
+ <if test="sampletype != null">
|
|
|
+ SAMPLETYPE = #{sampletype,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialno != null">
|
|
|
+ MATERIALNO = #{materialno,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialname != null">
|
|
|
+ MATERIALNAME = #{materialname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="materialsource != null">
|
|
|
+ MATERIALSOURCE = #{materialsource,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sampletime != null">
|
|
|
+ SAMPLETIME = #{sampletime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sampleperson != null">
|
|
|
+ SAMPLEPERSON = #{sampleperson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendtime != null">
|
|
|
+ SENDTIME = #{sendtime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sender != null">
|
|
|
+ SENDER = #{sender,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="judgeresult != null">
|
|
|
+ JUDGERESULT = #{judgeresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="judgetime != null">
|
|
|
+ JUDGETIME = #{judgetime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sampleno != null">
|
|
|
+ SAMPLENO = #{sampleno,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="itemcode != null">
|
|
|
+ ITEMCODE = #{itemcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="item != null">
|
|
|
+ ITEM = #{item,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="testresult != null">
|
|
|
+ TESTRESULT = #{testresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="itemjudgeresult != null">
|
|
|
+ ITEMJUDGERESULT = #{itemjudgeresult,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="recorder != null">
|
|
|
+ RECORDER = #{recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inputtime != null">
|
|
|
+ INPUTTIME = #{inputtime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where WTBH = #{wtbh,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where WTBH = #{wtbh,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="where"/>
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="whereLike"/>
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into EMS_CALORIFIC_VALUE
|
|
|
+ (WTBH,
|
|
|
+ SAMPLETYPE, MATERIALNO, MATERIALNAME,
|
|
|
+ MATERIALSOURCE, SAMPLETIME,
|
|
|
+ SAMPLEPERSON, SENDTIME, SENDER,
|
|
|
+ JUDGERESULT, JUDGETIME, MEMO,
|
|
|
+ SAMPLENO, ITEMCODE, ITEM,
|
|
|
+ TESTRESULT, ITEMJUDGERESULT,
|
|
|
+ RECORDER, INPUTTIME)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.wtbh,jdbcType=VARCHAR},
|
|
|
+ #{item.sampletype,jdbcType=VARCHAR}, #{item.materialno,jdbcType=VARCHAR}, #{item.materialname,jdbcType=VARCHAR},
|
|
|
+ #{item.materialsource,jdbcType=VARCHAR}, #{item.sampletime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.sampleperson,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=TIMESTAMP}, #{item.sender,jdbcType=VARCHAR},
|
|
|
+ #{item.judgeresult,jdbcType=VARCHAR}, #{item.judgetime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR},
|
|
|
+ #{item.sampleno,jdbcType=VARCHAR}, #{item.itemcode,jdbcType=VARCHAR}, #{item.item,jdbcType=VARCHAR},
|
|
|
+ #{item.testresult,jdbcType=VARCHAR}, #{item.itemjudgeresult,jdbcType=VARCHAR},
|
|
|
+ #{item.recorder,jdbcType=VARCHAR}, #{item.inputtime,jdbcType=TIMESTAMP} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update EMS_CALORIFIC_VALUE
|
|
|
+ set
|
|
|
+ WTBH=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.wtbh,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SAMPLETYPE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampletype,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIALNO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialno,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIALNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialname,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIALSOURCE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.materialsource,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SAMPLETIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampletime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,SAMPLEPERSON=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampleperson,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SENDTIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sendtime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,SENDER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sender,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,JUDGERESULT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.judgeresult,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,JUDGETIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.judgetime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,MEMO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SAMPLENO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.sampleno,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ITEMCODE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.itemcode,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ITEM=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.item,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,TESTRESULT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.testresult,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ITEMJUDGERESULT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.itemjudgeresult,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RECORDER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.recorder,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INPUTTIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case WTBH" close="end">
|
|
|
+ when #{item.wtbh,jdbcType=VARCHAR} then #{item.inputtime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ where WTBH in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.wtbh,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from EMS_CALORIFIC_VALUE
|
|
|
+ where WTBH in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!--获取最新的数据-->
|
|
|
+ <select id="getNewDate" resultMap="BaseResultMap">
|
|
|
+ select distinct t.wtbh, t.materialno, t.materialname, t.materialsource,substr(t.sampleno,0,8) as sampleno
|
|
|
+ from ems_calorific_value t
|
|
|
+ where
|
|
|
+ t.wtbh not in (select id from Fold_the_values )
|
|
|
+ </select>
|
|
|
+ <select id="getValue" parameterType="java.util.HashMap" resultType="java.lang.String">
|
|
|
+ select t.TESTRESULT from ems_calorific_value t
|
|
|
+ <where>
|
|
|
+ <if test="wtbh != null and wtbh != '' ">
|
|
|
+ and t.wtbh = #{wtbh}
|
|
|
+ </if>
|
|
|
+ <if test="item != null and item != '' ">
|
|
|
+ and t.item = #{item}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+</mapper>
|