123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647 |
- <?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.RmsLineMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsLine">
- <id column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
- <result column="LINE_NO" jdbcType="VARCHAR" property="lineNo" />
- <result column="LINE_START_NODE_ID" jdbcType="DECIMAL" property="lineStartNodeId" />
- <result column="LINE_START_NODE_TYPE" jdbcType="DECIMAL" property="lineStartNodeType" />
- <result column="LINE_START_NODE_DESC" jdbcType="VARCHAR" property="lineStartNodeDesc" />
- <result column="LINE_PATH_LENGTH" jdbcType="DECIMAL" property="linePathLength" />
- <result column="LINE_END_NODE_ID" jdbcType="DECIMAL" property="lineEndNodeId" />
- <result column="LINE_END_NODE_TYPE" jdbcType="DECIMAL" property="lineEndNodeType" />
- <result column="LINE_END_NODE_DESC" jdbcType="VARCHAR" property="lineEndNodeDesc" />
- <result column="LINE_NAME" jdbcType="VARCHAR" property="lineName" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="LINE_TYPE" jdbcType="DECIMAL" property="lineType" />
- <result column="SPELL_NUMBER" jdbcType="DECIMAL" property="spellNumber" />
- </resultMap>
- <sql id="columns">
- LINE_ID, LINE_NO, LINE_START_NODE_ID, LINE_START_NODE_TYPE, LINE_START_NODE_DESC,
- LINE_PATH_LENGTH, LINE_END_NODE_ID, LINE_END_NODE_TYPE, LINE_END_NODE_DESC, LINE_NAME,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, LINE_TYPE, SPELL_NUMBER
- </sql>
- <sql id="columns_alias">
- t.LINE_ID, t.LINE_NO, t.LINE_START_NODE_ID, t.LINE_START_NODE_TYPE, t.LINE_START_NODE_DESC,
- t.LINE_PATH_LENGTH, t.LINE_END_NODE_ID, t.LINE_END_NODE_TYPE, t.LINE_END_NODE_DESC,
- t.LINE_NAME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
- t.INSERT_UPDATE_REMARK, t.DELETED, t.LINE_TYPE, t.SPELL_NUMBER
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM RMS_LINE
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM RMS_LINE t
- </sql>
- <sql id="where">
- <where>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="lineNo != null and lineNo != ''">
- and LINE_NO = #{lineNo}
- </if>
- <if test="lineStartNodeId != null">
- and LINE_START_NODE_ID = #{lineStartNodeId}
- </if>
- <if test="lineStartNodeType != null">
- and LINE_START_NODE_TYPE = #{lineStartNodeType}
- </if>
- <if test="lineStartNodeDesc != null and lineStartNodeDesc != ''">
- and LINE_START_NODE_DESC = #{lineStartNodeDesc}
- </if>
- <if test="linePathLength != null">
- and LINE_PATH_LENGTH = #{linePathLength}
- </if>
- <if test="lineEndNodeId != null">
- and LINE_END_NODE_ID = #{lineEndNodeId}
- </if>
- <if test="lineEndNodeType != null">
- and LINE_END_NODE_TYPE = #{lineEndNodeType}
- </if>
- <if test="lineEndNodeDesc != null and lineEndNodeDesc != ''">
- and LINE_END_NODE_DESC = #{lineEndNodeDesc}
- </if>
- <if test="lineName != null and lineName != ''">
- and LINE_NAME = #{lineName}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="lineType != null">
- and LINE_TYPE = #{lineType}
- </if>
- <if test="spellNumber != null">
- and SPELL_NUMBER = #{spellNumber}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="lineNo != null and lineNo != ''">
- and LINE_NO LIKE '%${lineNo}%'
- </if>
- <if test="lineStartNodeId != null">
- and LINE_START_NODE_ID = #{lineStartNodeId}
- </if>
- <if test="lineStartNodeType != null">
- and LINE_START_NODE_TYPE = #{lineStartNodeType}
- </if>
- <if test="lineStartNodeDesc != null and lineStartNodeDesc != ''">
- and LINE_START_NODE_DESC LIKE '%${lineStartNodeDesc}%'
- </if>
- <if test="linePathLength != null">
- and LINE_PATH_LENGTH = #{linePathLength}
- </if>
- <if test="lineEndNodeId != null">
- and LINE_END_NODE_ID = #{lineEndNodeId}
- </if>
- <if test="lineEndNodeType != null">
- and LINE_END_NODE_TYPE = #{lineEndNodeType}
- </if>
- <if test="lineEndNodeDesc != null and lineEndNodeDesc != ''">
- and LINE_END_NODE_DESC LIKE '%${lineEndNodeDesc}%'
- </if>
- <if test="lineName != null and lineName != ''">
- and LINE_NAME LIKE '%${lineName}%'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="lineType != null">
- and LINE_TYPE = #{lineType}
- </if>
- <if test="spellNumber != null">
- and SPELL_NUMBER = #{spellNumber}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from RMS_LINE
- where LINE_ID = #{lineId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from RMS_LINE
- where 1!=1
- <if test="lineNo != null and lineNo != ''">
- or LINE_NO = #{lineNo}
- </if>
- <if test="lineStartNodeId != null">
- or LINE_START_NODE_ID = #{lineStartNodeId}
- </if>
- <if test="lineStartNodeType != null">
- or LINE_START_NODE_TYPE = #{lineStartNodeType}
- </if>
- <if test="lineStartNodeDesc != null and lineStartNodeDesc != ''">
- or LINE_START_NODE_DESC = #{lineStartNodeDesc}
- </if>
- <if test="linePathLength != null">
- or LINE_PATH_LENGTH = #{linePathLength}
- </if>
- <if test="lineEndNodeId != null">
- or LINE_END_NODE_ID = #{lineEndNodeId}
- </if>
- <if test="lineEndNodeType != null">
- or LINE_END_NODE_TYPE = #{lineEndNodeType}
- </if>
- <if test="lineEndNodeDesc != null and lineEndNodeDesc != ''">
- or LINE_END_NODE_DESC = #{lineEndNodeDesc}
- </if>
- <if test="lineName != null and lineName != ''">
- or LINE_NAME = #{lineName}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="lineType != null">
- or LINE_TYPE = #{lineType}
- </if>
- <if test="spellNumber != null">
- or SPELL_NUMBER = #{spellNumber}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.RmsLine">
- insert into RMS_LINE (LINE_ID, LINE_NO, LINE_START_NODE_ID,
- LINE_START_NODE_TYPE, LINE_START_NODE_DESC, LINE_PATH_LENGTH,
- LINE_END_NODE_ID, LINE_END_NODE_TYPE, LINE_END_NODE_DESC,
- LINE_NAME, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, LINE_TYPE, SPELL_NUMBER
- )
- values (#{lineId,jdbcType=DECIMAL}, #{lineNo,jdbcType=VARCHAR}, #{lineStartNodeId,jdbcType=DECIMAL},
- #{lineStartNodeType,jdbcType=DECIMAL}, #{lineStartNodeDesc,jdbcType=VARCHAR}, #{linePathLength,jdbcType=DECIMAL},
- #{lineEndNodeId,jdbcType=DECIMAL}, #{lineEndNodeType,jdbcType=DECIMAL}, #{lineEndNodeDesc,jdbcType=VARCHAR},
- #{lineName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleted,jdbcType=DECIMAL}, #{lineType,jdbcType=DECIMAL}, #{spellNumber,jdbcType=DECIMAL}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsLine">
- insert into RMS_LINE
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="lineId != null">
- LINE_ID,
- </if>
- <if test="lineNo != null">
- LINE_NO,
- </if>
- <if test="lineStartNodeId != null">
- LINE_START_NODE_ID,
- </if>
- <if test="lineStartNodeType != null">
- LINE_START_NODE_TYPE,
- </if>
- <if test="lineStartNodeDesc != null">
- LINE_START_NODE_DESC,
- </if>
- <if test="linePathLength != null">
- LINE_PATH_LENGTH,
- </if>
- <if test="lineEndNodeId != null">
- LINE_END_NODE_ID,
- </if>
- <if test="lineEndNodeType != null">
- LINE_END_NODE_TYPE,
- </if>
- <if test="lineEndNodeDesc != null">
- LINE_END_NODE_DESC,
- </if>
- <if test="lineName != null">
- LINE_NAME,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- <if test="lineType != null">
- LINE_TYPE,
- </if>
- <if test="spellNumber != null">
- SPELL_NUMBER,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="lineId != null">
- #{lineId,jdbcType=DECIMAL},
- </if>
- <if test="lineNo != null">
- #{lineNo,jdbcType=VARCHAR},
- </if>
- <if test="lineStartNodeId != null">
- #{lineStartNodeId,jdbcType=DECIMAL},
- </if>
- <if test="lineStartNodeType != null">
- #{lineStartNodeType,jdbcType=DECIMAL},
- </if>
- <if test="lineStartNodeDesc != null">
- #{lineStartNodeDesc,jdbcType=VARCHAR},
- </if>
- <if test="linePathLength != null">
- #{linePathLength,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeId != null">
- #{lineEndNodeId,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeType != null">
- #{lineEndNodeType,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeDesc != null">
- #{lineEndNodeDesc,jdbcType=VARCHAR},
- </if>
- <if test="lineName != null">
- #{lineName,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="lineType != null">
- #{lineType,jdbcType=DECIMAL},
- </if>
- <if test="spellNumber != null">
- #{spellNumber,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsLine">
- update RMS_LINE
- set LINE_NO = #{lineNo,jdbcType=VARCHAR},
- LINE_START_NODE_ID = #{lineStartNodeId,jdbcType=DECIMAL},
- LINE_START_NODE_TYPE = #{lineStartNodeType,jdbcType=DECIMAL},
- LINE_START_NODE_DESC = #{lineStartNodeDesc,jdbcType=VARCHAR},
- LINE_PATH_LENGTH = #{linePathLength,jdbcType=DECIMAL},
- LINE_END_NODE_ID = #{lineEndNodeId,jdbcType=DECIMAL},
- LINE_END_NODE_TYPE = #{lineEndNodeType,jdbcType=DECIMAL},
- LINE_END_NODE_DESC = #{lineEndNodeDesc,jdbcType=VARCHAR},
- LINE_NAME = #{lineName,jdbcType=VARCHAR},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- DELETED = #{deleted,jdbcType=DECIMAL},
- LINE_TYPE = #{lineType,jdbcType=DECIMAL},
- SPELL_NUMBER = #{spellNumber,jdbcType=DECIMAL}
- where LINE_ID = #{lineId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsLine">
- update RMS_LINE
- <set>
- <if test="lineNo != null">
- LINE_NO = #{lineNo,jdbcType=VARCHAR},
- </if>
- <if test="lineStartNodeId != null">
- LINE_START_NODE_ID = #{lineStartNodeId,jdbcType=DECIMAL},
- </if>
- <if test="lineStartNodeType != null">
- LINE_START_NODE_TYPE = #{lineStartNodeType,jdbcType=DECIMAL},
- </if>
- <if test="lineStartNodeDesc != null">
- LINE_START_NODE_DESC = #{lineStartNodeDesc,jdbcType=VARCHAR},
- </if>
- <if test="linePathLength != null">
- LINE_PATH_LENGTH = #{linePathLength,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeId != null">
- LINE_END_NODE_ID = #{lineEndNodeId,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeType != null">
- LINE_END_NODE_TYPE = #{lineEndNodeType,jdbcType=DECIMAL},
- </if>
- <if test="lineEndNodeDesc != null">
- LINE_END_NODE_DESC = #{lineEndNodeDesc,jdbcType=VARCHAR},
- </if>
- <if test="lineName != null">
- LINE_NAME = #{lineName,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="lineType != null">
- LINE_TYPE = #{lineType,jdbcType=DECIMAL},
- </if>
- <if test="spellNumber != null">
- SPELL_NUMBER = #{spellNumber,jdbcType=DECIMAL},
- </if>
- </set>
- where LINE_ID = #{lineId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where LINE_ID = #{lineId,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 RMS_LINE
- (LINE_ID,
- LINE_NO, LINE_START_NODE_ID, LINE_START_NODE_TYPE,
- LINE_START_NODE_DESC, LINE_PATH_LENGTH,
- LINE_END_NODE_ID, LINE_END_NODE_TYPE,
- LINE_END_NODE_DESC, LINE_NAME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, LINE_TYPE, SPELL_NUMBER
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.lineId,jdbcType=DECIMAL},
- #{item.lineNo,jdbcType=VARCHAR}, #{item.lineStartNodeId,jdbcType=DECIMAL}, #{item.lineStartNodeType,jdbcType=DECIMAL},
- #{item.lineStartNodeDesc,jdbcType=VARCHAR}, #{item.linePathLength,jdbcType=DECIMAL},
- #{item.lineEndNodeId,jdbcType=DECIMAL}, #{item.lineEndNodeType,jdbcType=DECIMAL},
- #{item.lineEndNodeDesc,jdbcType=VARCHAR}, #{item.lineName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
- #{item.deleted,jdbcType=DECIMAL}, #{item.lineType,jdbcType=DECIMAL}, #{item.spellNumber,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update RMS_LINE
- set
- LINE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
- </foreach>
- ,LINE_NO=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineNo,jdbcType=VARCHAR}
- </foreach>
- ,LINE_START_NODE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineStartNodeId,jdbcType=DECIMAL}
- </foreach>
- ,LINE_START_NODE_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineStartNodeType,jdbcType=DECIMAL}
- </foreach>
- ,LINE_START_NODE_DESC=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineStartNodeDesc,jdbcType=VARCHAR}
- </foreach>
- ,LINE_PATH_LENGTH=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.linePathLength,jdbcType=DECIMAL}
- </foreach>
- ,LINE_END_NODE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineEndNodeId,jdbcType=DECIMAL}
- </foreach>
- ,LINE_END_NODE_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineEndNodeType,jdbcType=DECIMAL}
- </foreach>
- ,LINE_END_NODE_DESC=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineEndNodeDesc,jdbcType=VARCHAR}
- </foreach>
- ,LINE_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineName,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,LINE_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.lineType,jdbcType=DECIMAL}
- </foreach>
- ,SPELL_NUMBER=
- <foreach collection="list" item="item" index="index" separator=" " open="case LINE_ID" close="end">
- when #{item.lineId,jdbcType=DECIMAL} then #{item.spellNumber,jdbcType=DECIMAL}
- </foreach>
- where LINE_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.lineId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from RMS_LINE
- where LINE_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="getAllLineDesk" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT * FROM(SELECT
- RL.LINE_ID "lineId",
- RL.LINE_NO "lineNo",
- RL.SPELL_NUMBER "spellNumber",
- RL.LINE_NAME "lineName",
- (
- CASE
- WHEN RL.LINE_TYPE = 1
- THEN '内转'
- WHEN RL.LINE_TYPE = 2
- THEN '销售'
- WHEN RL.LINE_TYPE = 3
- THEN '采购'
- WHEN RL.LINE_TYPE = 4
- THEN '退货'
- END) "lineType",
- (
- SELECT
- listagg ( LINK_NAME, '-' )
- within GROUP ( ORDER BY SEGMENT_SQE )
- FROM RMS_LINE_SEGEMNT RLS
- LEFT JOIN RMS_LINK RK
- ON RK.LINK_ID = RLS.SEGMENT_START_NODE_ID
- WHERE RL.LINE_ID = RLS.LINE_ID
- AND RLS.DELETED = 0
- ) "lineDesk"
- FROM
- RMS_LINE RL
- WHERE RL.DELETED = 0
- )
- <where>
- <if test="lineNo != null">
- and
- <foreach collection="lineNo" item="item" open="(" separator="or" close=")">
- "lineNo" like '%${item}%'
- </foreach>
- </if>
- <if test="spellNumber != null">
- and
- <foreach collection="spellNumber" item="item" open="(" separator="or" close=")">
- "spellNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="lineType != null">
- and
- <foreach collection="lineType" item="item" open="(" separator="or" close=")">
- "lineType" like '%${item}%'
- </foreach>
- </if>
- <if test="lineDesk != null">
- and
- <foreach collection="lineDesk" item="item" open="(" separator="or" close=")">
- "lineDesk" like '%${item}%'
- </foreach>
- </if>
- <if test="lineName != null">
- and
- <foreach collection="lineName" item="item" open="(" separator="or" close=")">
- "lineName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "lineId" desc
- </if>
- </sql>
- <!-- 根据运输订单号查询运输路线主表信息-->
- <select id="getRmsLine" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT
- LINE_ID "lineId",
- LINE_NO "lineNo",
- LINE_NAME "lineName",
- LINE_TYPE "lineType",
- SPELL_NUMBER "spellNumber"
- FROM RMS_LINE
- WHERE LINE_ID = #{lineId}
- AND DELETED = 0
- </select>
- <select id="getOmstruckOrderNumber" parameterType="DECIMAL" resultType="int">
- SELECT
- count(*)
- FROM OMSTRUCK_ORDER
- WHERE LINE_ID = #{lineId}
- </select>
- </mapper>
|