123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- <?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.dil.mapper.QmsQueueSpellingListMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.QmsQueueSpellingList">
- <id column="SPELLING_RESULT_ID" jdbcType="DECIMAL" property="spellingResultId" />
- <result column="QUEUE_RESULT_ID" jdbcType="DECIMAL" property="queueResultId" />
- <result column="SPELILING_NUM" jdbcType="DECIMAL" property="spelilingNum" />
- <result column="SPELLING_SURE_TIME" jdbcType="TIMESTAMP" property="spellingSureTime" />
- <result column="ENTRY_SURE_TIME" jdbcType="TIMESTAMP" property="entrySureTime" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="UPDATE_USERNAME" jdbcType="TIMESTAMP" property="updateUsername" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="IS_VIP" jdbcType="TIMESTAMP" property="isVip" />
- </resultMap>
- <sql id="columns">
- SPELLING_RESULT_ID, QUEUE_RESULT_ID, SPELILING_NUM, SPELLING_SURE_TIME, ENTRY_SURE_TIME,
- INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, DELETED, IS_VIP
- </sql>
- <sql id="columns_alias">
- t.SPELLING_RESULT_ID, t.QUEUE_RESULT_ID, t.SPELILING_NUM, t.SPELLING_SURE_TIME, t.ENTRY_SURE_TIME,
- t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.IS_VIP
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM QMS_QUEUE_SPELLING_LIST
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM QMS_QUEUE_SPELLING_LIST t
- </sql>
- <sql id="where">
- <where>
- <if test="spellingResultId != null">
- and SPELLING_RESULT_ID = #{spellingResultId}
- </if>
- <if test="queueResultId != null">
- and QUEUE_RESULT_ID = #{queueResultId}
- </if>
- <if test="spelilingNum != null">
- and SPELILING_NUM = #{spelilingNum}
- </if>
- <if test="spellingSureTime != null">
- and TO_CHAR(SPELLING_SURE_TIME,'yyyy-MM-dd') = #{spellingSureTime}
- </if>
- <if test="entrySureTime != null">
- and TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = #{entrySureTime}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="updateUsername != null">
- and TO_CHAR(UPDATE_USERNAME,'yyyy-MM-dd') = #{updateUsername}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="isVip != null">
- and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="spellingResultId != null">
- and SPELLING_RESULT_ID = #{spellingResultId}
- </if>
- <if test="queueResultId != null">
- and QUEUE_RESULT_ID = #{queueResultId}
- </if>
- <if test="spelilingNum != null">
- and SPELILING_NUM = #{spelilingNum}
- </if>
- <if test="spellingSureTime != null">
- and TO_CHAR(SPELLING_SURE_TIME,'yyyy-MM-dd') = #{spellingSureTime}
- </if>
- <if test="entrySureTime != null">
- and TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = #{entrySureTime}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="updateUsername != null">
- and TO_CHAR(UPDATE_USERNAME,'yyyy-MM-dd') = #{updateUsername}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="isVip != null">
- and TO_CHAR(IS_VIP,'yyyy-MM-dd') = #{isVip}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from QMS_QUEUE_SPELLING_LIST
- where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from QMS_QUEUE_SPELLING_LIST
- where 1!=1
- <if test="queueResultId != null">
- or QUEUE_RESULT_ID = #{queueResultId}
- </if>
- <if test="spelilingNum != null">
- or SPELILING_NUM = #{spelilingNum}
- </if>
- <if test="spellingSureTime != null">
- or TO_CHAR(SPELLING_SURE_TIME,'yyyy-MM-dd') = '#{spellingSureTime}'
- </if>
- <if test="entrySureTime != null">
- or TO_CHAR(ENTRY_SURE_TIME,'yyyy-MM-dd') = '#{entrySureTime}'
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="updateUsername != null">
- or TO_CHAR(UPDATE_USERNAME,'yyyy-MM-dd') = '#{updateUsername}'
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="isVip != null">
- or TO_CHAR(IS_VIP,'yyyy-MM-dd') = '#{isVip}'
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
- insert into QMS_QUEUE_SPELLING_LIST (SPELLING_RESULT_ID, QUEUE_RESULT_ID,
- SPELILING_NUM, SPELLING_SURE_TIME, ENTRY_SURE_TIME,
- INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
- UPDATE_USERNAME, DELETED, IS_VIP
- )
- values (#{spellingResultId,jdbcType=DECIMAL}, #{queueResultId,jdbcType=DECIMAL},
- #{spelilingNum,jdbcType=DECIMAL}, #{spellingSureTime,jdbcType=TIMESTAMP}, #{entrySureTime,jdbcType=TIMESTAMP},
- #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=TIMESTAMP}, #{deleted,jdbcType=DECIMAL}, #{isVip,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
- insert into QMS_QUEUE_SPELLING_LIST
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="spellingResultId != null">
- SPELLING_RESULT_ID,
- </if>
- <if test="queueResultId != null">
- QUEUE_RESULT_ID,
- </if>
- <if test="spelilingNum != null">
- SPELILING_NUM,
- </if>
- <if test="spellingSureTime != null">
- SPELLING_SURE_TIME,
- </if>
- <if test="entrySureTime != null">
- ENTRY_SURE_TIME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- <if test="isVip != null">
- IS_VIP,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="spellingResultId != null">
- #{spellingResultId,jdbcType=DECIMAL},
- </if>
- <if test="queueResultId != null">
- #{queueResultId,jdbcType=DECIMAL},
- </if>
- <if test="spelilingNum != null">
- #{spelilingNum,jdbcType=DECIMAL},
- </if>
- <if test="spellingSureTime != null">
- #{spellingSureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="entrySureTime != null">
- #{entrySureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=TIMESTAMP},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="isVip != null">
- #{isVip,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
- update QMS_QUEUE_SPELLING_LIST
- set QUEUE_RESULT_ID = #{queueResultId,jdbcType=DECIMAL},
- SPELILING_NUM = #{spelilingNum,jdbcType=DECIMAL},
- SPELLING_SURE_TIME = #{spellingSureTime,jdbcType=TIMESTAMP},
- ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=TIMESTAMP},
- DELETED = #{deleted,jdbcType=DECIMAL},
- IS_VIP = #{isVip,jdbcType=TIMESTAMP}
- where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueSpellingList">
- update QMS_QUEUE_SPELLING_LIST
- <set>
- <if test="queueResultId != null">
- QUEUE_RESULT_ID = #{queueResultId,jdbcType=DECIMAL},
- </if>
- <if test="spelilingNum != null">
- SPELILING_NUM = #{spelilingNum,jdbcType=DECIMAL},
- </if>
- <if test="spellingSureTime != null">
- SPELLING_SURE_TIME = #{spellingSureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="entrySureTime != null">
- ENTRY_SURE_TIME = #{entrySureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=TIMESTAMP},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="isVip != null">
- IS_VIP = #{isVip,jdbcType=TIMESTAMP},
- </if>
- </set>
- where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select" />
- where SPELLING_RESULT_ID = #{spellingResultId,jdbcType=DECIMAL}
- </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 QMS_QUEUE_SPELLING_LIST
- (SPELLING_RESULT_ID,
- QUEUE_RESULT_ID, SPELILING_NUM,
- SPELLING_SURE_TIME, ENTRY_SURE_TIME,
- INSERT_TIME, INSERT_USERNAME,
- UPDATE_TIME, UPDATE_USERNAME,
- DELETED, IS_VIP)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.spellingResultId,jdbcType=DECIMAL},
- #{item.queueResultId,jdbcType=DECIMAL}, #{item.spelilingNum,jdbcType=DECIMAL},
- #{item.spellingSureTime,jdbcType=TIMESTAMP}, #{item.entrySureTime,jdbcType=TIMESTAMP},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=TIMESTAMP},
- #{item.deleted,jdbcType=DECIMAL}, #{item.isVip,jdbcType=TIMESTAMP} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update QMS_QUEUE_SPELLING_LIST
- set
- SPELLING_RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingResultId,jdbcType=DECIMAL}
- </foreach>
- ,QUEUE_RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.queueResultId,jdbcType=DECIMAL}
- </foreach>
- ,SPELILING_NUM=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spelilingNum,jdbcType=DECIMAL}
- </foreach>
- ,SPELLING_SURE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.spellingSureTime,jdbcType=TIMESTAMP}
- </foreach>
- ,ENTRY_SURE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.entrySureTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=TIMESTAMP}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,IS_VIP=
- <foreach close="end" collection="list" index="index" item="item" open="case SPELLING_RESULT_ID" separator=" ">
- when #{item.spellingResultId,jdbcType=DECIMAL} then #{item.isVip,jdbcType=TIMESTAMP}
- </foreach>
- where SPELLING_RESULT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.spellingResultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from QMS_QUEUE_SPELLING_LIST
- where SPELLING_RESULT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <delete id="deleteByQueueResultId" parameterType="java.math.BigDecimal">
- DELETE FROM QMS_QUEUE_SPELLING_LIST WHERE QUEUE_RESULT_ID = #{queueResultId}
- </delete>
- <update id="updateListEnFactory" parameterType="map">
- UPDATE QMS_QUEUE_SPELLING_LIST QQSL
- SET QQSL.ENTRY_SURE_TIME = SYSDATE,DELETED = 2
- <if test="jobName != null">
- , UPDATE_USERNAME = #{jobName}
- </if>
- WHERE SPELLING_RESULT_ID = #{spellingResultId}
- </update>
- <select id="existsCapacity" resultType="java.lang.Integer">
- select QQSL.SPELLING_RESULT_ID
- from QMS_QUEUE_SPELLING_LIST QQSL
- left join QMS_QUEUE_RESULT QQR on QQSL.QUEUE_RESULT_ID = QQR.RESULT_ID
- where QQR.CAPACITY_ID = #{capacityId}
- </select>
- <update id="updateOOMLoadWarehouse" parameterType="map">
- update OMSTRUCK_ORDER_MATERIAL
- set MATERIAL_PRIORITY = #{id}
- where ORDER_ID = #{orderId} and MATERIAL_ID = #{materialId}
- </update>
- </mapper>
|