INSTRUCTIONS_CAPACITY_ID, INSTRUCTIONS_ID, CAPACITY_ID, INSTRUCTION_PLANNED_LOADING,
INSTRUCTIONS_SHIP_POSITION, INSTRUCTION_CONTACT_INF, INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, INSTRUCTIONS_CAPACITY_STATUS,
DELETED, INSTRUCTION_ESARRIVAL_TIME
t.INSTRUCTIONS_CAPACITY_ID, t.INSTRUCTIONS_ID, t.CAPACITY_ID, t.INSTRUCTION_PLANNED_LOADING,
t.INSTRUCTIONS_SHIP_POSITION, t.INSTRUCTION_CONTACT_INF, t.INSERT_USERNAME, t.INSERT_TIME,
t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.INSTRUCTIONS_CAPACITY_STATUS,
t.DELETED, t.INSTRUCTION_ESARRIVAL_TIME
SELECT FROM OMSSHIP_INSTRUCTIONS_CAPACITY
SELECT FROM OMSSHIP_INSTRUCTIONS_CAPACITY t
and INSTRUCTIONS_CAPACITY_ID = #{instructionsCapacityId}
and INSTRUCTIONS_ID = #{instructionsId}
and CAPACITY_ID = #{capacityId}
and INSTRUCTION_PLANNED_LOADING = #{instructionPlannedLoading}
and INSTRUCTIONS_SHIP_POSITION = #{instructionsShipPosition}
and INSTRUCTION_CONTACT_INF = #{instructionContactInf}
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 INSTRUCTIONS_CAPACITY_STATUS = #{instructionsCapacityStatus}
and DELETED = #{deleted}
and TO_CHAR(INSTRUCTION_ESARRIVAL_TIME,'yyyy-MM-dd') = #{instructionEsarrivalTime}
and INSTRUCTIONS_CAPACITY_ID = #{instructionsCapacityId}
and INSTRUCTIONS_ID = #{instructionsId}
and CAPACITY_ID = #{capacityId}
and INSTRUCTION_PLANNED_LOADING = #{instructionPlannedLoading}
and INSTRUCTIONS_SHIP_POSITION LIKE '%${instructionsShipPosition}%'
and INSTRUCTION_CONTACT_INF LIKE '%${instructionContactInf}%'
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 INSTRUCTIONS_CAPACITY_STATUS LIKE '%${instructionsCapacityStatus}%'
and DELETED = #{deleted}
and TO_CHAR(INSTRUCTION_ESARRIVAL_TIME,'yyyy-MM-dd') = #{instructionEsarrivalTime}
delete from OMSSHIP_INSTRUCTIONS_CAPACITY
where INSTRUCTIONS_CAPACITY_ID = #{instructionsCapacityId,jdbcType=DECIMAL}
delete from OMSSHIP_INSTRUCTIONS_CAPACITY
where 1!=1
or INSTRUCTIONS_ID = #{instructionsId}
or CAPACITY_ID = #{capacityId}
or INSTRUCTION_PLANNED_LOADING = #{instructionPlannedLoading}
or INSTRUCTIONS_SHIP_POSITION = #{instructionsShipPosition}
or INSTRUCTION_CONTACT_INF = #{instructionContactInf}
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 INSTRUCTIONS_CAPACITY_STATUS = #{instructionsCapacityStatus}
or DELETED = #{deleted}
or TO_CHAR(INSTRUCTION_ESARRIVAL_TIME,'yyyy-MM-dd') = '#{instructionEsarrivalTime}'
insert into OMSSHIP_INSTRUCTIONS_CAPACITY (INSTRUCTIONS_CAPACITY_ID, INSTRUCTIONS_ID,
CAPACITY_ID, INSTRUCTION_PLANNED_LOADING,
INSTRUCTIONS_SHIP_POSITION, INSTRUCTION_CONTACT_INF,
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
UPDATE_TIME, INSERT_UPDATE_REMARK, INSTRUCTIONS_CAPACITY_STATUS,
DELETED, INSTRUCTION_ESARRIVAL_TIME)
values (#{instructionsCapacityId,jdbcType=DECIMAL}, #{instructionsId,jdbcType=DECIMAL},
#{capacityId,jdbcType=DECIMAL}, #{instructionPlannedLoading,jdbcType=DECIMAL},
#{instructionsShipPosition,jdbcType=VARCHAR}, #{instructionContactInf,jdbcType=VARCHAR},
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{instructionsCapacityStatus,jdbcType=VARCHAR},
#{deleted,jdbcType=DECIMAL}, #{instructionEsarrivalTime,jdbcType=TIMESTAMP})
insert into OMSSHIP_INSTRUCTIONS_CAPACITY
INSTRUCTIONS_CAPACITY_ID,
INSTRUCTIONS_ID,
CAPACITY_ID,
INSTRUCTION_PLANNED_LOADING,
INSTRUCTIONS_SHIP_POSITION,
INSTRUCTION_CONTACT_INF,
INSERT_USERNAME,
INSERT_TIME,
UPDATE_USERNAME,
UPDATE_TIME,
INSERT_UPDATE_REMARK,
INSTRUCTIONS_CAPACITY_STATUS,
DELETED,
INSTRUCTION_ESARRIVAL_TIME,
#{instructionsCapacityId,jdbcType=DECIMAL},
#{instructionsId,jdbcType=DECIMAL},
#{capacityId,jdbcType=DECIMAL},
#{instructionPlannedLoading,jdbcType=DECIMAL},
#{instructionsShipPosition,jdbcType=VARCHAR},
#{instructionContactInf,jdbcType=VARCHAR},
#{insertUsername,jdbcType=VARCHAR},
#{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{insertUpdateRemark,jdbcType=VARCHAR},
#{instructionsCapacityStatus,jdbcType=VARCHAR},
#{deleted,jdbcType=DECIMAL},
#{instructionEsarrivalTime,jdbcType=TIMESTAMP},
update OMSSHIP_INSTRUCTIONS_CAPACITY
set INSTRUCTIONS_ID = #{instructionsId,jdbcType=DECIMAL},
CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
INSTRUCTION_PLANNED_LOADING = #{instructionPlannedLoading,jdbcType=DECIMAL},
INSTRUCTIONS_SHIP_POSITION = #{instructionsShipPosition,jdbcType=VARCHAR},
INSTRUCTION_CONTACT_INF = #{instructionContactInf,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},
INSTRUCTIONS_CAPACITY_STATUS = #{instructionsCapacityStatus,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL},
INSTRUCTION_ESARRIVAL_TIME = #{instructionEsarrivalTime,jdbcType=TIMESTAMP}
where INSTRUCTIONS_CAPACITY_ID = #{instructionsCapacityId,jdbcType=DECIMAL}
update OMSSHIP_INSTRUCTIONS_CAPACITY
INSTRUCTIONS_ID = #{instructionsId,jdbcType=DECIMAL},
CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
INSTRUCTION_PLANNED_LOADING = #{instructionPlannedLoading,jdbcType=DECIMAL},
INSTRUCTIONS_SHIP_POSITION = #{instructionsShipPosition,jdbcType=VARCHAR},
INSTRUCTION_CONTACT_INF = #{instructionContactInf,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},
INSTRUCTIONS_CAPACITY_STATUS = #{instructionsCapacityStatus,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL},
INSTRUCTION_ESARRIVAL_TIME = #{instructionEsarrivalTime,jdbcType=TIMESTAMP},
where INSTRUCTIONS_CAPACITY_ID = #{instructionsCapacityId,jdbcType=DECIMAL}
insert into OMSSHIP_INSTRUCTIONS_CAPACITY
(INSTRUCTIONS_CAPACITY_ID,
INSTRUCTIONS_ID, CAPACITY_ID, INSTRUCTION_PLANNED_LOADING,
INSTRUCTIONS_SHIP_POSITION, INSTRUCTION_CONTACT_INF,
INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, INSTRUCTIONS_CAPACITY_STATUS,
DELETED, INSTRUCTION_ESARRIVAL_TIME
)
(
select
#{item.instructionsCapacityId,jdbcType=DECIMAL},
#{item.instructionsId,jdbcType=DECIMAL}, #{item.capacityId,jdbcType=DECIMAL}, #{item.instructionPlannedLoading,jdbcType=DECIMAL},
#{item.instructionsShipPosition,jdbcType=VARCHAR}, #{item.instructionContactInf,jdbcType=VARCHAR},
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.instructionsCapacityStatus,jdbcType=VARCHAR},
#{item.deleted,jdbcType=DECIMAL}, #{item.instructionEsarrivalTime,jdbcType=TIMESTAMP}
from dual
)
update OMSSHIP_INSTRUCTIONS_CAPACITY
set
INSTRUCTIONS_CAPACITY_ID=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionsCapacityId,jdbcType=DECIMAL}
,INSTRUCTIONS_ID=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionsId,jdbcType=DECIMAL}
,CAPACITY_ID=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
,INSTRUCTION_PLANNED_LOADING=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionPlannedLoading,jdbcType=DECIMAL}
,INSTRUCTIONS_SHIP_POSITION=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionsShipPosition,jdbcType=VARCHAR}
,INSTRUCTION_CONTACT_INF=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionContactInf,jdbcType=VARCHAR}
,INSERT_USERNAME=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
,INSERT_TIME=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
,UPDATE_USERNAME=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
,UPDATE_TIME=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
,INSERT_UPDATE_REMARK=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
,INSTRUCTIONS_CAPACITY_STATUS=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionsCapacityStatus,jdbcType=VARCHAR}
,DELETED=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
,INSTRUCTION_ESARRIVAL_TIME=
when #{item.instructionsCapacityId,jdbcType=DECIMAL} then #{item.instructionEsarrivalTime,jdbcType=TIMESTAMP}
where INSTRUCTIONS_CAPACITY_ID in
#{item.instructionsCapacityId,jdbcType=DECIMAL}
delete from OMSSHIP_INSTRUCTIONS_CAPACITY
where INSTRUCTIONS_CAPACITY_ID in
#{id}
order by "${orderField}"
${orderType}
order by "insertTime" desc