select thisTab.id, thisTab.dispatch_no, thisTab.customer_name, thisTab.customer_code, thisTab.project_name, thisTab.transport_plan_no, thisTab.departure_region, thisTab.destination_region, thisTab.transport_line, thisTab.vehicle_provider, thisTab.main_driver, thisTab.assistant_driver, thisTab.required_vehicle_type, thisTab.vehicle_number, thisTab.transport_mode, thisTab.load_mode, thisTab.goods_name, thisTab.quantity, thisTab.goods_type, thisTab.weight, thisTab.net_weight, thisTab.volume, thisTab.loose_pieces, thisTab.full_containers, thisTab.container_no, thisTab.pallet_count, thisTab.earliest_departure, thisTab.latest_departure, thisTab.earliest_arrival, thisTab.latest_arrival, thisTab.departure_address, thisTab.destination_address, thisTab.actual_vehicle_type, thisTab.actual_load_start, thisTab.actual_unload_end, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.electronic_lock, thisTab.container_info, thisTab.car_plate, thisTab.empty_mileage, thisTab.empty_fuel, thisTab.loaded_mileage, thisTab.loaded_fuel, thisTab.shift_no, thisTab.line_no, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_dispatch_order AS thisTab
select count(0) from tms_dispatch_order as thisTab
and thisTab.dispatch_no = #{dispatchNo}
and thisTab.customer_name like concat('%', #{customerName}, '%')
and thisTab.project_name like concat('%', #{projectName}, '%')
and thisTab.transport_plan_no = #{transportPlanNo}
and thisTab.departure_region = #{departureRegion}
and thisTab.destination_region = #{destinationRegion}
and thisTab.transport_line = #{transportLine}
and thisTab.vehicle_provider = #{vehicleProvider}
and thisTab.main_driver = #{mainDriver}
and thisTab.required_vehicle_type = #{requiredVehicleType}
and thisTab.vehicle_number = #{vehicleNumber}
and thisTab.status = #{status}
insert into tms_dispatch_order
dispatch_no,
customer_name,
customer_code,
project_name,
transport_plan_no,
departure_region,
destination_region,
transport_line,
vehicle_provider,
main_driver,
assistant_driver,
required_vehicle_type,
vehicle_number,
transport_mode,
load_mode,
goods_name,
quantity,
goods_type,
weight,
net_weight,
volume,
loose_pieces,
full_containers,
container_no,
pallet_count,
earliest_departure,
latest_departure,
earliest_arrival,
latest_arrival,
departure_address,
destination_address,
actual_vehicle_type,
actual_load_start,
actual_unload_end,
actual_departure,
actual_arrival,
actual_quantity,
actual_weight,
actual_volume,
reweigh_weight,
electronic_lock,
container_info,
car_plate,
empty_mileage,
empty_fuel,
loaded_mileage,
loaded_fuel,
shift_no,
line_no,
status,
create_by,
create_time,
update_by,
update_time,
remark,
#{dispatchNo},
#{customerName},
#{customerCode},
#{projectName},
#{transportPlanNo},
#{departureRegion},
#{destinationRegion},
#{transportLine},
#{vehicleProvider},
#{mainDriver},
#{assistantDriver},
#{requiredVehicleType},
#{vehicleNumber},
#{transportMode},
#{loadMode},
#{goodsName},
#{quantity},
#{goodsType},
#{weight},
#{netWeight},
#{volume},
#{loosePieces},
#{fullContainers},
#{containerNo},
#{palletCount},
#{earliestDeparture},
#{latestDeparture},
#{earliestArrival},
#{latestArrival},
#{departureAddress},
#{destinationAddress},
#{actualVehicleType},
#{actualLoadStart},
#{actualUnloadEnd},
#{actualDeparture},
#{actualArrival},
#{actualQuantity},
#{actualWeight},
#{actualVolume},
#{reweighWeight},
#{electronicLock},
#{containerInfo},
#{carPlate},
#{emptyMileage},
#{emptyFuel},
#{loadedMileage},
#{loadedFuel},
#{shiftNo},
#{lineNo},
#{status},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
insert into tms_dispatch_order
id,dispatch_no,customer_name,customer_code,project_name,transport_plan_no,departure_region,destination_region,transport_line,vehicle_provider,main_driver,assistant_driver,required_vehicle_type,vehicle_number,transport_mode,load_mode,goods_name,quantity,goods_type,weight,net_weight,volume,loose_pieces,full_containers,container_no,pallet_count,earliest_departure,latest_departure,earliest_arrival,latest_arrival,departure_address,destination_address,actual_vehicle_type,actual_load_start,actual_unload_end,actual_departure,actual_arrival,actual_quantity,actual_weight,actual_volume,reweigh_weight,electronic_lock,container_info,car_plate,empty_mileage,empty_fuel,loaded_mileage,loaded_fuel,shift_no,line_no,status,create_by,create_time,update_by,update_time,remark,
#{item.id},#{item.dispatchNo},#{item.customerName},#{item.customerCode},#{item.projectName},#{item.transportPlanNo},#{item.departureRegion},#{item.destinationRegion},#{item.transportLine},#{item.vehicleProvider},#{item.mainDriver},#{item.assistantDriver},#{item.requiredVehicleType},#{item.vehicleNumber},#{item.transportMode},#{item.loadMode},#{item.goodsName},#{item.quantity},#{item.goodsType},#{item.weight},#{item.netWeight},#{item.volume},#{item.loosePieces},#{item.fullContainers},#{item.containerNo},#{item.palletCount},#{item.earliestDeparture},#{item.latestDeparture},#{item.earliestArrival},#{item.latestArrival},#{item.departureAddress},#{item.destinationAddress},#{item.actualVehicleType},#{item.actualLoadStart},#{item.actualUnloadEnd},#{item.actualDeparture},#{item.actualArrival},#{item.actualQuantity},#{item.actualWeight},#{item.actualVolume},#{item.reweighWeight},#{item.electronicLock},#{item.containerInfo},#{item.carPlate},#{item.emptyMileage},#{item.emptyFuel},#{item.loadedMileage},#{item.loadedFuel},#{item.shiftNo},#{item.lineNo},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
update tms_dispatch_order
dispatch_no = #{dispatchNo},
customer_name = #{customerName},
customer_code = #{customerCode},
project_name = #{projectName},
transport_plan_no = #{transportPlanNo},
departure_region = #{departureRegion},
destination_region = #{destinationRegion},
transport_line = #{transportLine},
vehicle_provider = #{vehicleProvider},
main_driver = #{mainDriver},
assistant_driver = #{assistantDriver},
required_vehicle_type = #{requiredVehicleType},
vehicle_number = #{vehicleNumber},
transport_mode = #{transportMode},
load_mode = #{loadMode},
goods_name = #{goodsName},
quantity = #{quantity},
goods_type = #{goodsType},
weight = #{weight},
net_weight = #{netWeight},
volume = #{volume},
loose_pieces = #{loosePieces},
full_containers = #{fullContainers},
container_no = #{containerNo},
pallet_count = #{palletCount},
earliest_departure = #{earliestDeparture},
latest_departure = #{latestDeparture},
earliest_arrival = #{earliestArrival},
latest_arrival = #{latestArrival},
departure_address = #{departureAddress},
destination_address = #{destinationAddress},
actual_vehicle_type = #{actualVehicleType},
actual_load_start = #{actualLoadStart},
actual_unload_end = #{actualUnloadEnd},
actual_departure = #{actualDeparture},
actual_arrival = #{actualArrival},
actual_quantity = #{actualQuantity},
actual_weight = #{actualWeight},
actual_volume = #{actualVolume},
reweigh_weight = #{reweighWeight},
electronic_lock = #{electronicLock},
container_info = #{containerInfo},
car_plate = #{carPlate},
empty_mileage = #{emptyMileage},
empty_fuel = #{emptyFuel},
loaded_mileage = #{loadedMileage},
loaded_fuel = #{loadedFuel},
shift_no = #{shiftNo},
line_no = #{lineNo},
status = #{status},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
update tms_dispatch_order
dispatch_no = #{item.dispatchNo},
customer_name = #{item.customerName},
customer_code = #{item.customerCode},
project_name = #{item.projectName},
transport_plan_no = #{item.transportPlanNo},
departure_region = #{item.departureRegion},
destination_region = #{item.destinationRegion},
transport_line = #{item.transportLine},
vehicle_provider = #{item.vehicleProvider},
main_driver = #{item.mainDriver},
assistant_driver = #{item.assistantDriver},
required_vehicle_type = #{item.requiredVehicleType},
vehicle_number = #{item.vehicleNumber},
transport_mode = #{item.transportMode},
load_mode = #{item.loadMode},
goods_name = #{item.goodsName},
quantity = #{item.quantity},
goods_type = #{item.goodsType},
weight = #{item.weight},
net_weight = #{item.netWeight},
volume = #{item.volume},
loose_pieces = #{item.loosePieces},
full_containers = #{item.fullContainers},
container_no = #{item.containerNo},
pallet_count = #{item.palletCount},
earliest_departure = #{item.earliestDeparture},
latest_departure = #{item.latestDeparture},
earliest_arrival = #{item.earliestArrival},
latest_arrival = #{item.latestArrival},
departure_address = #{item.departureAddress},
destination_address = #{item.destinationAddress},
actual_vehicle_type = #{item.actualVehicleType},
actual_load_start = #{item.actualLoadStart},
actual_unload_end = #{item.actualUnloadEnd},
actual_departure = #{item.actualDeparture},
actual_arrival = #{item.actualArrival},
actual_quantity = #{item.actualQuantity},
actual_weight = #{item.actualWeight},
actual_volume = #{item.actualVolume},
reweigh_weight = #{item.reweighWeight},
electronic_lock = #{item.electronicLock},
container_info = #{item.containerInfo},
car_plate = #{item.carPlate},
empty_mileage = #{item.emptyMileage},
empty_fuel = #{item.emptyFuel},
loaded_mileage = #{item.loadedMileage},
loaded_fuel = #{item.loadedFuel},
shift_no = #{item.shiftNo},
line_no = #{item.lineNo},
status = #{item.status},
create_by = #{item.createBy},
create_time = #{item.createTime},
update_by = #{item.updateBy},
update_time = #{item.updateTime},
remark = #{item.remark},
where id = #{item.id}
delete from tms_dispatch_order where id = #{id}
delete from tms_dispatch_order where id in
#{id}