select thisTab.id, thisTab.dispatch_no, thisTab.transport_mode, thisTab.product_name, thisTab.carrier_name, thisTab.departure_location_name, thisTab.arrival_location_name, thisTab.license_plate_number, thisTab.vehicle_plate_id, thisTab.main_driver_name, thisTab.assistant_driver_name, thisTab.point_num, thisTab.quantity, thisTab.actual_departure_time, thisTab.required_arrival_time, thisTab.actual_arrival_time, thisTab.be_return, thisTab.dispatch_quantity, thisTab.dispatch_weight, thisTab.dispatch_volume, thisTab.status, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.is_deleted from dispatch_order AS thisTab select count(0) from dispatch_order as thisTab and thisTab.dispatch_no = #{dispatchNo} and thisTab.transport_mode = #{transportMode} and thisTab.product_name like concat('%', #{productName}, '%') and thisTab.carrier_name like concat('%', #{carrierName}, '%') and thisTab.departure_location_name like concat('%', #{departureLocationName}, '%') and thisTab.arrival_location_name like concat('%', #{arrivalLocationName}, '%') and thisTab.license_plate_number = #{licensePlateNumber} and thisTab.vehicle_plate_id = #{vehiclePlateId} and thisTab.main_driver_name like concat('%', #{mainDriverName}, '%') and thisTab.assistant_driver_name like concat('%', #{assistantDriverName}, '%') and thisTab.point_num = #{pointNum} and thisTab.quantity = #{quantity} and thisTab.actual_departure_time = #{actualDepartureTime} and thisTab.required_arrival_time = #{requiredArrivalTime} and thisTab.actual_arrival_time = #{actualArrivalTime} and thisTab.be_return = #{beReturn} and thisTab.dispatch_quantity = #{dispatchQuantity} and thisTab.dispatch_weight = #{dispatchWeight} and thisTab.dispatch_volume = #{dispatchVolume} and thisTab.status = #{status} and thisTab.is_deleted = #{isDeleted} insert into dispatch_order dispatch_no, transport_mode, product_name, carrier_name, departure_location_name, arrival_location_name, license_plate_number, vehicle_plate_id, main_driver_name, assistant_driver_name, point_num, quantity, actual_departure_time, required_arrival_time, actual_arrival_time, be_return, dispatch_quantity, dispatch_weight, dispatch_volume, status, remark, create_by, create_time, update_by, update_time, is_deleted, #{dispatchNo}, #{transportMode}, #{productName}, #{carrierName}, #{departureLocationName}, #{arrivalLocationName}, #{licensePlateNumber}, #{vehiclePlateId}, #{mainDriverName}, #{assistantDriverName}, #{pointNum}, #{quantity}, #{actualDepartureTime}, #{requiredArrivalTime}, #{actualArrivalTime}, #{beReturn}, #{dispatchQuantity}, #{dispatchWeight}, #{dispatchVolume}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{isDeleted}, insert into dispatch_order id,dispatch_no,transport_mode,product_name,carrier_name,departure_location_name,arrival_location_name,license_plate_number,vehicle_plate_id,main_driver_name,assistant_driver_name,point_num,quantity,actual_departure_time,required_arrival_time,actual_arrival_time,be_return,dispatch_quantity,dispatch_weight,dispatch_volume,status,remark,create_by,create_time,update_by,update_time,is_deleted, #{item.id},#{item.dispatchNo},#{item.transportMode},#{item.productName},#{item.carrierName},#{item.departureLocationName},#{item.arrivalLocationName},#{item.licensePlateNumber},#{item.vehiclePlateId},#{item.mainDriverName},#{item.assistantDriverName},#{item.pointNum},#{item.quantity},#{item.actualDepartureTime},#{item.requiredArrivalTime},#{item.actualArrivalTime},#{item.beReturn},#{item.dispatchQuantity},#{item.dispatchWeight},#{item.dispatchVolume},#{item.status},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.isDeleted}, update dispatch_order dispatch_no = #{dispatchNo}, transport_mode = #{transportMode}, product_name = #{productName}, carrier_name = #{carrierName}, departure_location_name = #{departureLocationName}, arrival_location_name = #{arrivalLocationName}, license_plate_number = #{licensePlateNumber}, vehicle_plate_id = #{vehiclePlateId}, main_driver_name = #{mainDriverName}, assistant_driver_name = #{assistantDriverName}, point_num = #{pointNum}, quantity = #{quantity}, actual_departure_time = #{actualDepartureTime}, required_arrival_time = #{requiredArrivalTime}, actual_arrival_time = #{actualArrivalTime}, be_return = #{beReturn}, dispatch_quantity = #{dispatchQuantity}, dispatch_weight = #{dispatchWeight}, dispatch_volume = #{dispatchVolume}, status = #{status}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, is_deleted = #{isDeleted}, where id = #{id} update dispatch_order dispatch_no = #{item.dispatchNo}, transport_mode = #{item.transportMode}, product_name = #{item.productName}, carrier_name = #{item.carrierName}, departure_location_name = #{item.departureLocationName}, arrival_location_name = #{item.arrivalLocationName}, license_plate_number = #{item.licensePlateNumber}, vehicle_plate_id = #{item.vehiclePlateId}, main_driver_name = #{item.mainDriverName}, assistant_driver_name = #{item.assistantDriverName}, point_num = #{item.pointNum}, quantity = #{item.quantity}, actual_departure_time = #{item.actualDepartureTime}, required_arrival_time = #{item.requiredArrivalTime}, actual_arrival_time = #{item.actualArrivalTime}, be_return = #{item.beReturn}, dispatch_quantity = #{item.dispatchQuantity}, dispatch_weight = #{item.dispatchWeight}, dispatch_volume = #{item.dispatchVolume}, status = #{item.status}, remark = #{item.remark}, create_by = #{item.createBy}, create_time = #{item.createTime}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, is_deleted = #{item.isDeleted}, where id = #{item.id} delete from dispatch_order where id = #{id} delete from dispatch_order where id in #{id}