DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_DATE, SHIPPER_ID, DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER, RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
UPDATE_TIME, INSERT_UPDATE_REMARK, CARRIER_ID, DAYPLAN_SEND_STATION_ID, DELETED
t.DAYPLAN_ID, t.DAYPLAN_NO, t.DAYPLAN_DATE, t.SHIPPER_ID, t.DAYPLAN_DELIVERY_DATE,
t.DAYPLAN_OWN_CARS_AMOUT, t.DAYPLAN_TO_THE_STATION_ID, t.DAYPLAN_WAGON_NUMBER, t.RECEIVING_UNIT_ID,
t.DAYPLAN_CONSIGNEE_NAME, t.DAYPLAN_CONSIGNEE_TEL, t.DAYPLAN_RECEIVE_STATUS, t.INSERT_USERNAME,
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.CARRIER_ID,
t.DAYPLAN_SEND_STATION_ID, t.DELETED
SELECT
FROM AMS_RAIL_OFFSET_DAYPLAN
SELECT
FROM AMS_RAIL_OFFSET_DAYPLAN t
and DAYPLAN_ID = #{dayplanId}
and DAYPLAN_NO = #{dayplanNo}
and TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = #{dayplanDate}
and SHIPPER_ID = #{shipperId}
and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
and DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
and DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
and DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
and RECEIVING_UNIT_ID = #{receivingUnitId}
and DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName}
and DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel}
and DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
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 CARRIER_ID = #{carrierId}
and DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
and DELETED = #{deleted}
and DAYPLAN_ID = #{dayplanId}
and DAYPLAN_NO LIKE '%${dayplanNo}%'
and TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = #{dayplanDate}
and SHIPPER_ID = #{shipperId}
and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
and DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
and DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
and DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
and RECEIVING_UNIT_ID = #{receivingUnitId}
and DAYPLAN_CONSIGNEE_NAME LIKE '%${dayplanConsigneeName}%'
and DAYPLAN_CONSIGNEE_TEL LIKE '%${dayplanConsigneeTel}%'
and DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
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 CARRIER_ID = #{carrierId}
and DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
and DELETED = #{deleted}
delete
from AMS_RAIL_OFFSET_DAYPLAN
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
delete from AMS_RAIL_OFFSET_DAYPLAN
where 1!=1
or DAYPLAN_NO = #{dayplanNo}
or TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = '#{dayplanDate}'
or SHIPPER_ID = #{shipperId}
or TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = '#{dayplanDeliveryDate}'
or DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
or DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
or DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
or RECEIVING_UNIT_ID = #{receivingUnitId}
or DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName}
or DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel}
or DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
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 CARRIER_ID = #{carrierId}
or DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
or DELETED = #{deleted}
insert into AMS_RAIL_OFFSET_DAYPLAN (DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_DATE,
SHIPPER_ID, DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER,
RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS,
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
UPDATE_TIME, INSERT_UPDATE_REMARK, CARRIER_ID,
DAYPLAN_SEND_STATION_ID, DELETED)
values (#{dayplanId,jdbcType=DECIMAL}, #{dayplanNo,jdbcType=VARCHAR}, #{dayplanDate,jdbcType=TIMESTAMP},
#{shipperId,jdbcType=DECIMAL}, #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
#{dayplanOwnCarsAmout,jdbcType=DECIMAL},
#{dayplanToTheStationId,jdbcType=DECIMAL}, #{dayplanWagonNumber,jdbcType=DECIMAL},
#{receivingUnitId,jdbcType=DECIMAL}, #{dayplanConsigneeName,jdbcType=VARCHAR},
#{dayplanConsigneeTel,jdbcType=VARCHAR}, #{dayplanReceiveStatus,jdbcType=DECIMAL},
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{carrierId,jdbcType=DECIMAL},
#{dayplanSendStationId,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL})
insert into AMS_RAIL_OFFSET_DAYPLAN
DAYPLAN_ID,
DAYPLAN_NO,
DAYPLAN_DATE,
SHIPPER_ID,
DAYPLAN_DELIVERY_DATE,
DAYPLAN_OWN_CARS_AMOUT,
DAYPLAN_TO_THE_STATION_ID,
DAYPLAN_WAGON_NUMBER,
RECEIVING_UNIT_ID,
DAYPLAN_CONSIGNEE_NAME,
DAYPLAN_CONSIGNEE_TEL,
DAYPLAN_RECEIVE_STATUS,
INSERT_USERNAME,
INSERT_TIME,
UPDATE_USERNAME,
UPDATE_TIME,
INSERT_UPDATE_REMARK,
CARRIER_ID,
DAYPLAN_SEND_STATION_ID,
DELETED,
#{dayplanId,jdbcType=DECIMAL},
#{dayplanNo,jdbcType=VARCHAR},
#{dayplanDate,jdbcType=TIMESTAMP},
#{shipperId,jdbcType=DECIMAL},
#{dayplanDeliveryDate,jdbcType=TIMESTAMP},
#{dayplanOwnCarsAmout,jdbcType=DECIMAL},
#{dayplanToTheStationId,jdbcType=DECIMAL},
#{dayplanWagonNumber,jdbcType=DECIMAL},
#{receivingUnitId,jdbcType=DECIMAL},
#{dayplanConsigneeName,jdbcType=VARCHAR},
#{dayplanConsigneeTel,jdbcType=VARCHAR},
#{dayplanReceiveStatus,jdbcType=DECIMAL},
#{insertUsername,jdbcType=VARCHAR},
#{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{insertUpdateRemark,jdbcType=VARCHAR},
#{carrierId,jdbcType=DECIMAL},
#{dayplanSendStationId,jdbcType=DECIMAL},
#{deleted,jdbcType=DECIMAL},
update AMS_RAIL_OFFSET_DAYPLAN
set DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
DAYPLAN_DATE = #{dayplanDate,jdbcType=TIMESTAMP},
SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId,jdbcType=DECIMAL},
DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber,jdbcType=DECIMAL},
RECEIVING_UNIT_ID = #{receivingUnitId,jdbcType=DECIMAL},
DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName,jdbcType=VARCHAR},
DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel,jdbcType=VARCHAR},
DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus,jdbcType=DECIMAL},
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},
CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId,jdbcType=DECIMAL},
DELETED = #{deleted,jdbcType=DECIMAL}
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
update AMS_RAIL_OFFSET_DAYPLAN
DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
DAYPLAN_DATE = #{dayplanDate,jdbcType=TIMESTAMP},
SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId,jdbcType=DECIMAL},
DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber,jdbcType=DECIMAL},
RECEIVING_UNIT_ID = #{receivingUnitId,jdbcType=DECIMAL},
DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName,jdbcType=VARCHAR},
DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel,jdbcType=VARCHAR},
DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus,jdbcType=DECIMAL},
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},
CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId,jdbcType=DECIMAL},
DELETED = #{deleted,jdbcType=DECIMAL},
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
insert into AMS_RAIL_OFFSET_DAYPLAN
(DAYPLAN_ID,
DAYPLAN_NO, DAYPLAN_DATE, SHIPPER_ID,
DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER,
RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS,
INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, CARRIER_ID,
DAYPLAN_SEND_STATION_ID, DELETED
)
(
select
#{item.dayplanId,jdbcType=DECIMAL},
#{item.dayplanNo,jdbcType=VARCHAR}, #{item.dayplanDate,jdbcType=TIMESTAMP}, #{item.shipperId,jdbcType=DECIMAL},
#{item.dayplanDeliveryDate,jdbcType=TIMESTAMP}, #{item.dayplanOwnCarsAmout,jdbcType=DECIMAL},
#{item.dayplanToTheStationId,jdbcType=DECIMAL}, #{item.dayplanWagonNumber,jdbcType=DECIMAL},
#{item.receivingUnitId,jdbcType=DECIMAL}, #{item.dayplanConsigneeName,jdbcType=VARCHAR},
#{item.dayplanConsigneeTel,jdbcType=VARCHAR}, #{item.dayplanReceiveStatus,jdbcType=DECIMAL},
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
#{item.dayplanSendStationId,jdbcType=DECIMAL}, #{item.deleted,jdbcType=DECIMAL}
from dual
)
update AMS_RAIL_OFFSET_DAYPLAN
set
DAYPLAN_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanId,jdbcType=DECIMAL}
,DAYPLAN_NO=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanNo,jdbcType=VARCHAR}
,DAYPLAN_DATE=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDate,jdbcType=TIMESTAMP}
,SHIPPER_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
,DAYPLAN_DELIVERY_DATE=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDeliveryDate,jdbcType=TIMESTAMP}
,DAYPLAN_OWN_CARS_AMOUT=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanOwnCarsAmout,jdbcType=DECIMAL}
,DAYPLAN_TO_THE_STATION_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanToTheStationId,jdbcType=DECIMAL}
,DAYPLAN_WAGON_NUMBER=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanWagonNumber,jdbcType=DECIMAL}
,RECEIVING_UNIT_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.receivingUnitId,jdbcType=DECIMAL}
,DAYPLAN_CONSIGNEE_NAME=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanConsigneeName,jdbcType=VARCHAR}
,DAYPLAN_CONSIGNEE_TEL=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanConsigneeTel,jdbcType=VARCHAR}
,DAYPLAN_RECEIVE_STATUS=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanReceiveStatus,jdbcType=DECIMAL}
,INSERT_USERNAME=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
,INSERT_TIME=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
,UPDATE_USERNAME=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
,UPDATE_TIME=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
,INSERT_UPDATE_REMARK=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
,CARRIER_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
,DAYPLAN_SEND_STATION_ID=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanSendStationId,jdbcType=DECIMAL}
,DELETED=
when #{item.dayplanId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
where DAYPLAN_ID in
#{item.dayplanId,jdbcType=DECIMAL}
delete from AMS_RAIL_OFFSET_DAYPLAN
where DAYPLAN_ID in
#{id}
order by "${orderField}"
${orderType}
order by "insertTime" desc