123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621 |
- <?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.RmsPersonnelMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsPersonnel">
- <id column="PERSONNEL_ID" jdbcType="DECIMAL" property="personnelId" />
- <result column="PERSONNEL_JOB_NUMBER" jdbcType="VARCHAR" property="personnelJobNumber" />
- <result column="PERSONNEL_POST" jdbcType="VARCHAR" property="personnelPost" />
- <result column="PERSONNEL_NAME" jdbcType="VARCHAR" property="personnelName" />
- <result column="PERSONNEL_DEPARTMENT_ID" jdbcType="DECIMAL" property="departmentId" />
- <result column="PERSONNEL_WORKSHOPID" jdbcType="VARCHAR" property="personnelWorkshopid" />
- <result column="PERSONNEL_SHIFTS" jdbcType="VARCHAR" property="personnelShifts" />
- <result column="PERSONNEL_TEAM" jdbcType="VARCHAR" property="personnelTeam" />
- <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="EAS_PERSONNEL_ID" jdbcType="DECIMAL" property="easPersonnelId" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="USERNAME" jdbcType="VARCHAR" property="username" />
- <result column="PASSWORD" jdbcType="VARCHAR" property="password" />
- </resultMap>
- <sql id="columns">
- PERSONNEL_ID, PERSONNEL_JOB_NUMBER, PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID, PERSONNEL_WORKSHOPID,
- PERSONNEL_SHIFTS, PERSONNEL_TEAM, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID, DELETED, USERNAME, PASSWORD
- </sql>
- <sql id="columns_alias">
- t.PERSONNEL_ID, t.PERSONNEL_JOB_NUMBER, t.PERSONNEL_POST, t.PERSONNEL_NAME, t.PERSONNEL_DEPARTMENT_ID,
- t.PERSONNEL_WORKSHOPID, t.PERSONNEL_SHIFTS, t.PERSONNEL_TEAM, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.EAS_PERSONNEL_ID,
- t.DELETED, t.USERNAME, t.PASSWORD
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM RMS_PERSONNEL
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM RMS_PERSONNEL t
- </sql>
- <sql id="where">
- <where>
- <if test="personnelId != null">
- and PERSONNEL_ID = #{personnelId}
- </if>
- <if test="personnelJobNumber != null and personnelJobNumber != ''">
- and PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
- </if>
- <if test="personnelPost != null and personnelPost != ''">
- and PERSONNEL_POST = #{personnelPost}
- </if>
- <if test="personnelName != null and personnelName != ''">
- and PERSONNEL_NAME = #{personnelName}
- </if>
- <if test="departmentId != null">
- and PERSONNEL_DEPARTMENT_ID = #{departmentId}
- </if>
- <if test="personnelWorkshopid != null and personnelWorkshopid != ''">
- and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- and PERSONNEL_SHIFTS = #{personnelShifts}
- </if>
- <if test="personnelTeam != null and personnelTeam != ''">
- and PERSONNEL_TEAM = #{personnelTeam}
- </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="easPersonnelId != null">
- and EAS_PERSONNEL_ID = #{easPersonnelId}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="username != null and username != ''">
- and USERNAME = #{username}
- </if>
- <if test="password != null and password != ''">
- and PASSWORD = #{password}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="personnelId != null">
- and PERSONNEL_ID = #{personnelId}
- </if>
- <if test="personnelJobNumber != null and personnelJobNumber != ''">
- and PERSONNEL_JOB_NUMBER LIKE '%${personnelJobNumber}%'
- </if>
- <if test="personnelPost != null and personnelPost != ''">
- and PERSONNEL_POST LIKE '%${personnelPost}%'
- </if>
- <if test="personnelName != null and personnelName != ''">
- and PERSONNEL_NAME LIKE '%${personnelName}%'
- </if>
- <if test="departmentId != null">
- and PERSONNEL_DEPARTMENT_ID = #{departmentId}
- </if>
- <if test="personnelWorkshopid != null and personnelWorkshopid != ''">
- and PERSONNEL_WORKSHOPID LIKE '%${personnelWorkshopid}%'
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- and PERSONNEL_SHIFTS LIKE '%${personnelShifts}%'
- </if>
- <if test="personnelTeam != null and personnelTeam != ''">
- and PERSONNEL_TEAM LIKE '%${personnelTeam}%'
- </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="easPersonnelId != null">
- and EAS_PERSONNEL_ID = #{easPersonnelId}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="username != null and username != ''">
- and USERNAME LIKE '%${username}%'
- </if>
- <if test="password != null and password != ''">
- and PASSWORD LIKE '%${password}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from RMS_PERSONNEL
- where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from RMS_PERSONNEL
- where 1!=1
- <if test="personnelJobNumber != null and personnelJobNumber != ''">
- or PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
- </if>
- <if test="personnelPost != null and personnelPost != ''">
- or PERSONNEL_POST = #{personnelPost}
- </if>
- <if test="personnelName != null and personnelName != ''">
- or PERSONNEL_NAME = #{personnelName}
- </if>
- <if test="departmentId != null">
- or PERSONNEL_DEPARTMENT_ID = #{departmentId}
- </if>
- <if test="personnelWorkshopid != null and personnelWorkshopid != ''">
- or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
- </if>
- <if test="personnelShifts != null and personnelShifts != ''">
- or PERSONNEL_SHIFTS = #{personnelShifts}
- </if>
- <if test="personnelTeam != null and personnelTeam != ''">
- or PERSONNEL_TEAM = #{personnelTeam}
- </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="easPersonnelId != null">
- or EAS_PERSONNEL_ID = #{easPersonnelId}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="username != null and username != ''">
- or USERNAME = #{username}
- </if>
- <if test="password != null and password != ''">
- or PASSWORD = #{password}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.RmsPersonnel">
- insert into RMS_PERSONNEL (PERSONNEL_ID, PERSONNEL_JOB_NUMBER,
- PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID,
- PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, PERSONNEL_TEAM,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID,
- DELETED, USERNAME, PASSWORD
- )
- values (#{personnelId,jdbcType=DECIMAL}, #{personnelJobNumber,jdbcType=VARCHAR},
- #{personnelPost,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, #{departmentId,jdbcType=DECIMAL},
- #{personnelWorkshopid,jdbcType=VARCHAR}, #{personnelShifts,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{easPersonnelId,jdbcType=DECIMAL},
- #{deleted,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
- insert into RMS_PERSONNEL
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="personnelId != null">
- PERSONNEL_ID,
- </if>
- <if test="personnelJobNumber != null">
- PERSONNEL_JOB_NUMBER,
- </if>
- <if test="personnelPost != null">
- PERSONNEL_POST,
- </if>
- <if test="personnelName != null">
- PERSONNEL_NAME,
- </if>
- <if test="departmentId != null">
- PERSONNEL_DEPARTMENT_ID,
- </if>
- <if test="personnelWorkshopid != null">
- PERSONNEL_WORKSHOPID,
- </if>
- <if test="personnelShifts != null">
- PERSONNEL_SHIFTS,
- </if>
- <if test="personnelTeam != null">
- PERSONNEL_TEAM,
- </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="easPersonnelId != null">
- EAS_PERSONNEL_ID,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- <if test="username != null">
- USERNAME,
- </if>
- <if test="password != null">
- PASSWORD,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="personnelId != null">
- #{personnelId,jdbcType=DECIMAL},
- </if>
- <if test="personnelJobNumber != null">
- #{personnelJobNumber,jdbcType=VARCHAR},
- </if>
- <if test="personnelPost != null">
- #{personnelPost,jdbcType=VARCHAR},
- </if>
- <if test="personnelName != null">
- #{personnelName,jdbcType=VARCHAR},
- </if>
- <if test="departmentId != null">
- #{departmentId,jdbcType=DECIMAL},
- </if>
- <if test="personnelWorkshopid != null">
- #{personnelWorkshopid,jdbcType=VARCHAR},
- </if>
- <if test="personnelShifts != null">
- #{personnelShifts,jdbcType=VARCHAR},
- </if>
- <if test="personnelTeam != null">
- #{personnelTeam,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="easPersonnelId != null">
- #{easPersonnelId,jdbcType=DECIMAL},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsPersonnel">
- update RMS_PERSONNEL
- set PERSONNEL_JOB_NUMBER = #{personnelJobNumber,jdbcType=VARCHAR},
- PERSONNEL_POST = #{personnelPost,jdbcType=VARCHAR},
- PERSONNEL_NAME = #{personnelName,jdbcType=VARCHAR},
- PERSONNEL_DEPARTMENT_ID = #{departmentId,jdbcType=DECIMAL},
- PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=VARCHAR},
- PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
- PERSONNEL_TEAM = #{personnelTeam,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},
- EAS_PERSONNEL_ID = #{easPersonnelId,jdbcType=DECIMAL},
- DELETED = #{deleted,jdbcType=DECIMAL},
- USERNAME = #{username,jdbcType=VARCHAR},
- PASSWORD = #{password,jdbcType=VARCHAR}
- where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
- update RMS_PERSONNEL
- <set>
- <if test="personnelJobNumber != null">
- PERSONNEL_JOB_NUMBER = #{personnelJobNumber,jdbcType=VARCHAR},
- </if>
- <if test="personnelPost != null">
- PERSONNEL_POST = #{personnelPost,jdbcType=VARCHAR},
- </if>
- <if test="personnelName != null">
- PERSONNEL_NAME = #{personnelName,jdbcType=VARCHAR},
- </if>
- <if test="departmentId != null">
- PERSONNEL_DEPARTMENT_ID = #{departmentId,jdbcType=DECIMAL},
- </if>
- <if test="personnelWorkshopid != null">
- PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=VARCHAR},
- </if>
- <if test="personnelShifts != null">
- PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
- </if>
- <if test="personnelTeam != null">
- PERSONNEL_TEAM = #{personnelTeam,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="easPersonnelId != null">
- EAS_PERSONNEL_ID = #{easPersonnelId,jdbcType=DECIMAL},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="username != null">
- USERNAME = #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- PASSWORD = #{password,jdbcType=VARCHAR},
- </if>
- </set>
- where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where PERSONNEL_ID = #{personnelId,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_PERSONNEL
- (PERSONNEL_ID,
- PERSONNEL_JOB_NUMBER, PERSONNEL_POST,
- PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID, PERSONNEL_WORKSHOPID,
- PERSONNEL_SHIFTS, PERSONNEL_TEAM,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID,
- DELETED, USERNAME, PASSWORD
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.personnelId,jdbcType=DECIMAL},
- #{item.personnelJobNumber,jdbcType=VARCHAR}, #{item.personnelPost,jdbcType=VARCHAR},
- #{item.personnelName,jdbcType=VARCHAR}, #{item.departmentId,jdbcType=DECIMAL}, #{item.personnelWorkshopid,jdbcType=VARCHAR},
- #{item.personnelShifts,jdbcType=VARCHAR}, #{item.personnelTeam,jdbcType=VARCHAR},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.easPersonnelId,jdbcType=DECIMAL},
- #{item.deleted,jdbcType=DECIMAL}, #{item.username,jdbcType=VARCHAR}, #{item.password,jdbcType=VARCHAR}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update RMS_PERSONNEL
- set
- PERSONNEL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
- </foreach>
- ,PERSONNEL_JOB_NUMBER=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_POST=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_DEPARTMENT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.departmentId,jdbcType=DECIMAL}
- </foreach>
- ,PERSONNEL_WORKSHOPID=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_SHIFTS=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
- </foreach>
- ,PERSONNEL_TEAM=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,EAS_PERSONNEL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=DECIMAL}
- </foreach>
- ,DELETED=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
- </foreach>
- ,PASSWORD=
- <foreach collection="list" item="item" index="index" separator=" " open="case PERSONNEL_ID" close="end">
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
- </foreach>
- where PERSONNEL_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.personnelId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from RMS_PERSONNEL
- where PERSONNEL_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 得到人员信息下拉 -->
- <select id="getPersonnelList" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (
- SELECT
- RP.PERSONNEL_ID AS "personnelId",
- RP.PERSONNEL_JOB_NUMBER AS "personnelJobNumber",
- RP.PERSONNEL_NAME AS "personnelName",
- RP.PERSONNEL_POST AS "personnelPost",
- RS.SHIPPER_NAME AS "shipperName",
- RP.PERSONNEL_WORKSHOPID AS "personnelWorkshopid",
- RP.PERSONNEL_SHIFTS AS "personnelShifts",
- RS.SHIPPER_ID AS "shipperId",
- RP.PERSONNEL_DEPARTMENT_ID AS "departmentId",
- RP.PERSONNEL_TEAM AS "personnelTeam"
- FROM RMS_PERSONNEL RP
- LEFT JOIN RMS_SHIPPER RS
- ON RP.PERSONNEL_DEPARTMENT_ID=RS.SHIPPER_ID
- WHERE RP.DELETED != 1
- ORDER BY RP.INSERT_TIME DESC
- )
- <where>
- <if test="personnelJobNumber!= null">
- and
- <foreach collection="personnelJobNumber" item="item" open="(" separator="," close=")">
- "personnelJobNumber" in #{item}
- </foreach>
- </if>
- <if test="personnelName!= null">
- and
- <foreach collection="personnelName" item="item" open="(" separator="," close=")">
- "personnelName" in #{item}
- </foreach>
- </if>
- <if test="personnelPost!= null">
- and
- <foreach collection="personnelPost" item="item" open="(" separator="," close=")">
- "personnelPost" in #{item}
- </foreach>
- </if>
- <if test="shipperName!= null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="," close=")">
- "shipperName" in #{item}
- </foreach>
- </if>
- <if test="personnelWorkshopid!= null">
- and
- <foreach collection="personnelWorkshopid" item="item" open="(" separator="," close=")">
- "personnelWorkshopld" in #{item}
- </foreach>
- </if>
- <if test="personnelShifts!= null">
- and
- <foreach collection="personnelShifts" item="item" open="(" separator="," close=")">
- "personnelShifts" in #{item}
- </foreach>
- </if>
- <if test="departmentId!= null">
- and
- <foreach collection="departmentId" item="item" open="(" separator="," close=")">
- "departmentId" in #{item}
- </foreach>
- </if>
- <if test="personnelTeam!= null">
- and
- <foreach collection="personnelTeam" item="item" open="(" separator="," close=")">
- "personnelTeam" in #{item}
- </foreach>
- </if>
- </where>
- </select>
- <!-- 根据id值展示人员信息-->
- <select id="selectPersonnelById" resultType="java.util.LinkedHashMap">
- SELECT
- RP.PERSONNEL_ID AS "personnelId",
- RP.PERSONNEL_DEPARTMENT_ID AS "departmentId",
- RP.PERSONNEL_JOB_NUMBER AS "personnelJobNumber",
- RP.PERSONNEL_NAME AS "personnelName",
- RP.PERSONNEL_POST AS "personnelPost",
- RP.PERSONNEL_WORKSHOPID AS "personnelWorkshopid",
- RP.PERSONNEL_SHIFTS AS "personnelShifts",
- RP.PERSONNEL_TEAM AS "personnelTeam"
- FROM RMS_PERSONNEL RP
- WHERE RP.PERSONNEL_ID=#{id}
- </select>
- <!-- 获得托运人信息-->
- <select id="getShipperId" resultType="java.util.LinkedHashMap">
- SELECT RS.SHIPPER_ID AS "id",
- RS.SHIPPER_ID AS "value",
- RS.SHIPPER_NAME AS "label"
- FROM RMS_SHIPPER RS
- WHERE RS.DELETED!=1
- </select>
- </mapper>
|