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
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
SELECT FROM RMS_PERSONNEL
SELECT FROM RMS_PERSONNEL t
and PERSONNEL_ID = #{personnelId}
and PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
and PERSONNEL_POST = #{personnelPost}
and PERSONNEL_NAME = #{personnelName}
and PERSONNEL_DEPARTMENT_ID = #{departmentId}
and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
and PERSONNEL_SHIFTS = #{personnelShifts}
and PERSONNEL_TEAM = #{personnelTeam}
and INSERT_USERNAME = #{insertUsername}
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME = #{updateUsername}
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
and EAS_PERSONNEL_ID = #{easPersonnelId}
and DELETED = #{deleted}
and USERNAME = #{username}
and PASSWORD = #{password}
and PERSONNEL_ID = #{personnelId}
and PERSONNEL_JOB_NUMBER LIKE '%${personnelJobNumber}%'
and PERSONNEL_POST LIKE '%${personnelPost}%'
and PERSONNEL_NAME LIKE '%${personnelName}%'
and PERSONNEL_DEPARTMENT_ID = #{departmentId}
and PERSONNEL_WORKSHOPID LIKE '%${personnelWorkshopid}%'
and PERSONNEL_SHIFTS LIKE '%${personnelShifts}%'
and PERSONNEL_TEAM LIKE '%${personnelTeam}%'
and INSERT_USERNAME LIKE '%${insertUsername}%'
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME LIKE '%${updateUsername}%'
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
and EAS_PERSONNEL_ID = #{easPersonnelId}
and DELETED = #{deleted}
and USERNAME LIKE '%${username}%'
and PASSWORD LIKE '%${password}%'
delete from RMS_PERSONNEL
where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
delete from RMS_PERSONNEL
where 1!=1
or PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
or PERSONNEL_POST = #{personnelPost}
or PERSONNEL_NAME = #{personnelName}
or PERSONNEL_DEPARTMENT_ID = #{departmentId}
or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
or PERSONNEL_SHIFTS = #{personnelShifts}
or PERSONNEL_TEAM = #{personnelTeam}
or INSERT_USERNAME = #{insertUsername}
or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
or UPDATE_USERNAME = #{updateUsername}
or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
or EAS_PERSONNEL_ID = #{easPersonnelId}
or DELETED = #{deleted}
or USERNAME = #{username}
or PASSWORD = #{password}
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 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,
#{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},
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 RMS_PERSONNEL
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}
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
)
(
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
)
update RMS_PERSONNEL
set
PERSONNEL_ID=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
,PERSONNEL_JOB_NUMBER=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
,PERSONNEL_POST=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
,PERSONNEL_NAME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
,PERSONNEL_DEPARTMENT_ID=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.departmentId,jdbcType=DECIMAL}
,PERSONNEL_WORKSHOPID=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=VARCHAR}
,PERSONNEL_SHIFTS=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
,PERSONNEL_TEAM=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
,INSERT_USERNAME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
,INSERT_TIME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
,UPDATE_USERNAME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
,UPDATE_TIME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
,INSERT_UPDATE_REMARK=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
,EAS_PERSONNEL_ID=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=DECIMAL}
,DELETED=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
,USERNAME=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
,PASSWORD=
when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
where PERSONNEL_ID in
#{item.personnelId,jdbcType=DECIMAL}
delete from RMS_PERSONNEL
where PERSONNEL_ID in
#{id}
order by "${orderField}"
${orderType}