|
@@ -20,18 +20,19 @@
|
|
|
<result column="USERNAME" jdbcType="VARCHAR" property="username" />
|
|
|
<result column="PASSWORD" jdbcType="VARCHAR" property="password" />
|
|
|
<result column="PERSONNEL_SSO_ID" jdbcType="VARCHAR" property="personnelSsoId" />
|
|
|
+ <result column="PERSONNEL_CONTACT_NUMBER" jdbcType="VARCHAR" property="personnelContactNumber" />
|
|
|
</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, PERSONNEL_SSO_ID
|
|
|
+ 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, PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER
|
|
|
</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, t.PERSONNEL_SSO_ID
|
|
|
+ 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, t.PERSONNEL_SSO_ID, t.PERSONNEL_CONTACT_NUMBER
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM RMS_PERSONNEL
|
|
@@ -40,7 +41,7 @@
|
|
|
SELECT <include refid="columns_alias" /> FROM RMS_PERSONNEL t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="personnelId != null">
|
|
|
and PERSONNEL_ID = #{personnelId}
|
|
|
</if>
|
|
@@ -95,10 +96,13 @@
|
|
|
<if test="personnelSsoId != null and personnelSsoId != ''">
|
|
|
and PERSONNEL_SSO_ID = #{personnelSsoId}
|
|
|
</if>
|
|
|
+ <if test="personnelContactNumber != null and personnelContactNumber != ''">
|
|
|
+ and PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="personnelId != null">
|
|
|
and PERSONNEL_ID = #{personnelId}
|
|
|
</if>
|
|
@@ -153,6 +157,9 @@
|
|
|
<if test="personnelSsoId != null and personnelSsoId != ''">
|
|
|
and PERSONNEL_SSO_ID LIKE '%${personnelSsoId}%'
|
|
|
</if>
|
|
|
+ <if test="personnelContactNumber != null and personnelContactNumber != ''">
|
|
|
+ and PERSONNEL_CONTACT_NUMBER LIKE '%${personnelContactNumber}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
@@ -161,74 +168,77 @@
|
|
|
</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="personnelDepartmentId != null">
|
|
|
- or PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId}
|
|
|
- </if>
|
|
|
- <if test="personnelWorkshopid != null">
|
|
|
- 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 and easPersonnelId != ''">
|
|
|
- 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>
|
|
|
- <if test="personnelSsoId != null and personnelSsoId != ''">
|
|
|
- or PERSONNEL_SSO_ID = #{personnelSsoId}
|
|
|
- </if>
|
|
|
+ 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="personnelDepartmentId != null">
|
|
|
+ or PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId}
|
|
|
+ </if>
|
|
|
+ <if test="personnelWorkshopid != null">
|
|
|
+ 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 and easPersonnelId != ''">
|
|
|
+ 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>
|
|
|
+ <if test="personnelSsoId != null and personnelSsoId != ''">
|
|
|
+ or PERSONNEL_SSO_ID = #{personnelSsoId}
|
|
|
+ </if>
|
|
|
+ <if test="personnelContactNumber != null and personnelContactNumber != ''">
|
|
|
+ or PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber}
|
|
|
+ </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,
|
|
|
- PERSONNEL_SSO_ID)
|
|
|
- values (#{personnelId,jdbcType=DECIMAL}, #{personnelJobNumber,jdbcType=VARCHAR},
|
|
|
- #{personnelPost,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, #{personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
- #{personnelWorkshopid,jdbcType=DECIMAL}, #{personnelShifts,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
|
|
|
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{easPersonnelId,jdbcType=VARCHAR},
|
|
|
- #{deleted,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
- #{personnelSsoId,jdbcType=VARCHAR})
|
|
|
+ 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,
|
|
|
+ PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER)
|
|
|
+ values (#{personnelId,jdbcType=DECIMAL}, #{personnelJobNumber,jdbcType=VARCHAR},
|
|
|
+ #{personnelPost,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, #{personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
+ #{personnelWorkshopid,jdbcType=DECIMAL}, #{personnelShifts,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{easPersonnelId,jdbcType=VARCHAR},
|
|
|
+ #{deleted,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
+ #{personnelSsoId,jdbcType=VARCHAR}, #{personnelContactNumber,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
|
|
|
insert into RMS_PERSONNEL
|
|
@@ -287,6 +297,9 @@
|
|
|
<if test="personnelSsoId != null">
|
|
|
PERSONNEL_SSO_ID,
|
|
|
</if>
|
|
|
+ <if test="personnelContactNumber != null">
|
|
|
+ PERSONNEL_CONTACT_NUMBER,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="personnelId != null">
|
|
@@ -343,27 +356,31 @@
|
|
|
<if test="personnelSsoId != null">
|
|
|
#{personnelSsoId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="personnelContactNumber != null">
|
|
|
+ #{personnelContactNumber,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 = #{personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
- PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
|
|
|
- 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=VARCHAR},
|
|
|
- DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
- USERNAME = #{username,jdbcType=VARCHAR},
|
|
|
- PASSWORD = #{password,jdbcType=VARCHAR},
|
|
|
- PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR}
|
|
|
+ PERSONNEL_POST = #{personnelPost,jdbcType=VARCHAR},
|
|
|
+ PERSONNEL_NAME = #{personnelName,jdbcType=VARCHAR},
|
|
|
+ PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
+ PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
|
|
|
+ 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=VARCHAR},
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ USERNAME = #{username,jdbcType=VARCHAR},
|
|
|
+ PASSWORD = #{password,jdbcType=VARCHAR},
|
|
|
+ PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR},
|
|
|
+ PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber,jdbcType=VARCHAR}
|
|
|
where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
|
|
@@ -420,10 +437,13 @@
|
|
|
<if test="personnelSsoId != null">
|
|
|
PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="personnelContactNumber != null">
|
|
|
+ PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -436,112 +456,118 @@
|
|
|
<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, PERSONNEL_SSO_ID)
|
|
|
- ( <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.personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
- #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{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=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.username,jdbcType=VARCHAR},
|
|
|
- #{item.password,jdbcType=VARCHAR}, #{item.personnelSsoId,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
+ 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, PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER
|
|
|
+ )
|
|
|
+ ( <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.personnelDepartmentId,jdbcType=DECIMAL},
|
|
|
+ #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{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=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.username,jdbcType=VARCHAR},
|
|
|
+ #{item.password,jdbcType=VARCHAR}, #{item.personnelSsoId,jdbcType=VARCHAR}, #{item.personnelContactNumber,jdbcType=VARCHAR}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update RMS_PERSONNEL
|
|
|
- set
|
|
|
- PERSONNEL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_JOB_NUMBER=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_POST=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_NAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_DEPARTMENT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelDepartmentId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_WORKSHOPID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_SHIFTS=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_TEAM=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,EAS_PERSONNEL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,DELETED=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PASSWORD=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,PERSONNEL_SSO_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
- when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelSsoId,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where PERSONNEL_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.personnelId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
+ update RMS_PERSONNEL
|
|
|
+ set
|
|
|
+ PERSONNEL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_JOB_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_POST=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_DEPARTMENT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelDepartmentId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_WORKSHOPID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_SHIFTS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_TEAM=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,EAS_PERSONNEL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PASSWORD=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_SSO_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelSsoId,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PERSONNEL_CONTACT_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
|
|
|
+ when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelContactNumber,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where PERSONNEL_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.personnelId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from RMS_PERSONNEL
|
|
|
- where PERSONNEL_ID in
|
|
|
+ where PERSONNEL_ID in
|
|
|
<foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
@@ -562,7 +588,8 @@
|
|
|
RP.PERSONNEL_SHIFTS AS "personnelShifts",
|
|
|
RS.SHIPPER_ID AS "shipperId",
|
|
|
RP.PERSONNEL_DEPARTMENT_ID AS "departmentId",
|
|
|
- RP.PERSONNEL_TEAM AS "personnelTeam"
|
|
|
+ RP.PERSONNEL_TEAM AS "personnelTeam",
|
|
|
+ RP.PERSONNEL_CONTACT_NUMBER "concactNumber"
|
|
|
FROM RMS_PERSONNEL RP
|
|
|
LEFT JOIN RMS_SHIPPER RS
|
|
|
ON RP.PERSONNEL_DEPARTMENT_ID=RS.SHIPPER_ID
|
|
@@ -677,10 +704,10 @@
|
|
|
<!-- 查询sso主键以及机构编码 -->
|
|
|
<select id="getShipperMap" parameterType="DECIMAL" resultType="java.util.Map" >
|
|
|
SELECT
|
|
|
- RS.SHIPPER_SSO_ID AS "shipperSsoId",
|
|
|
- RS.SHIPPER_ORG_CODE AS "shipperOrgCode"
|
|
|
-FROM RMS_SHIPPER RS
|
|
|
-WHERE RS.SHIPPER_ID = #{shipperId}
|
|
|
+ RS.SHIPPER_SSO_ID AS "shipperSsoId",
|
|
|
+ RS.SHIPPER_ORG_CODE AS "shipperOrgCode"
|
|
|
+ FROM RMS_SHIPPER RS
|
|
|
+ WHERE RS.SHIPPER_ID = #{shipperId}
|
|
|
</select>
|
|
|
<select id="selectByParametersPersonnelJobNumber" resultType="java.lang.Integer">
|
|
|
SELECT RP.PERSONNEL_ID
|
|
@@ -688,4 +715,10 @@ WHERE RS.SHIPPER_ID = #{shipperId}
|
|
|
WHERE RP.PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
|
|
|
AND RP.DELETED =0
|
|
|
</select>
|
|
|
+ <select id="getPersonnelIdByJobNumber" resultType="java.math.BigDecimal">
|
|
|
+ select COUNT(RP.PERSONNEL_ID)
|
|
|
+ from RMS_PERSONNEL RP
|
|
|
+ WHERE RP.PERSONNEL_JOB_NUMBER=#{personnelJobNumber} and RP.PERSONNEL_NAME=#{personnelName} and RP.DELETED=0
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|