| | |
| | | <result property="weight" column="weight" /> |
| | | <result property="contactName" column="contact_name" /> |
| | | <result property="contactPhone" column="contact_phone" /> |
| | | <result property="port" column="port" /> |
| | | <result property="seamlessNumber" column="seamless_number" /> |
| | | <result property="seamlessSupplierId" column="seamless_supplier_id" /> |
| | | <result property="seamlessSupplierName" column="seamless_supplier_name" /> |
| | | <result property="notes" column="notes" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectTmsDispatchOrderVo"> |
| | | select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, 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, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id, thisTab.ok_time, thisTab.confirm_time, thisTab.is_load ,thisTab.commission_model ,thisTab.order_time, thisTab.iscc, thisTab.close_why, thisTab.close_time, thisTab.close_by, thisTab.close_remark, thisTab.isfk, thisTab.is_print, thisTab.print_count, thisTab.print_time, thisTab.print_by, thisTab.six_link_no, thisTab.port_name, thisTab.bill_no, thisTab.terminal_name, thisTab.cargo_name, thisTab.piece_count, thisTab.weight, thisTab.contact_name, thisTab.contact_phone from tms_dispatch_order AS thisTab |
| | | select thisTab.id, thisTab.dispatch_no, thisTab.customer_id, thisTab.customer_name, thisTab.customer_code, thisTab.project_id, thisTab.project_name, thisTab.contract_id, thisTab.contract_name, thisTab.order_type, thisTab.transport_line, thisTab.sign_type, thisTab.vehicle_provider_id, thisTab.vehicle_provider_name, thisTab.loading_service_provider_id, thisTab.loading_service_provider_name, thisTab.customs_service_provider_id, thisTab.customs_service_provider_name, thisTab.is_urgent, thisTab.transport_type, thisTab.load_method, thisTab.main_driver_id, thisTab.main_driver_name, thisTab.assistant_driver_id, thisTab.required_vehicle_types, thisTab.assistant_driver_name, thisTab.vehicle_id, thisTab.container_no, thisTab.license_plate, thisTab.shipper_id, thisTab.earliest_departure, thisTab.shipper_name, thisTab.latest_departure, thisTab.shipper_mobile, thisTab.earliest_arrival, thisTab.shipper_address, thisTab.latest_arrival, thisTab.departure_address, thisTab.shipper_region_code, thisTab.receiver_id, thisTab.destination_address, thisTab.receiver_name, thisTab.actual_vehicle_type, thisTab.receiver_mobile, thisTab.actual_load_start, thisTab.shipper_region_label, thisTab.receiver_address, thisTab.actual_unload_end, thisTab.receiver_region_code, thisTab.actual_departure, thisTab.actual_arrival, thisTab.actual_quantity, thisTab.actual_weight, thisTab.receiver_region_label, thisTab.actual_volume, thisTab.reweigh_weight, thisTab.container_id, thisTab.electronic_lock, thisTab.empty_mileage, thisTab.shelf_id, thisTab.empty_fuel, thisTab.shelf_code, 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, thisTab.accounts_receivable_status, thisTab.accounts_payable_status, thisTab.collection_plan_id, thisTab.payment_plan_id , thisTab.is_customs, thisTab.start_region_code, thisTab.end_region_code, thisTab.quote_detail_id, thisTab.operation_mode, thisTab.quote_plan_id, thisTab.ok_time, thisTab.confirm_time, thisTab.is_load ,thisTab.commission_model ,thisTab.order_time, thisTab.iscc, thisTab.close_why, thisTab.close_time, thisTab.close_by, thisTab.close_remark, thisTab.isfk, thisTab.is_print, thisTab.print_count, thisTab.print_time, thisTab.print_by, thisTab.six_link_no, thisTab.port_name, thisTab.bill_no, thisTab.terminal_name, thisTab.cargo_name, thisTab.piece_count, thisTab.weight, thisTab.contact_name, thisTab.contact_phone, thisTab.port, thisTab.seamless_number, thisTab.seamless_supplier_id, thisTab.seamless_supplier_name from tms_dispatch_order AS thisTab |
| | | </sql> |
| | | <sql id="selectTmsDispatchOrderVoCount"> |
| | | select count(0) from tms_dispatch_order as thisTab |
| | | </sql> |
| | | |
| | | <sql id="whereCondition"> |
| | | <if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if> |
| | | <if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no like concat('%', #{dispatchNo}, '%')</if> |
| | | <if test="customerId != null "> and thisTab.customer_id = #{customerId}</if> |
| | | <if test="customerCode != null and customerCode != ''"> and thisTab.customer_code = #{customerCode}</if> |
| | | <if test="customerName != null and customerName != ''"> and thisTab.customer_name like concat('%', #{customerName}, '%')</if> |
| | |
| | | <if test="assistantDriverName != null and assistantDriverName != ''"> and thisTab.assistant_driver_name like concat('%', #{assistantDriverName}, '%')</if> |
| | | <if test="requiredVehicleTypes != null and requiredVehicleTypes != ''"> and thisTab.required_vehicle_types = #{requiredVehicleTypes}</if> |
| | | <if test="vehicleId != null "> and thisTab.vehicle_id = #{vehicleId}</if> |
| | | <if test="licensePlate != null and licensePlate != ''"> and thisTab.license_plate = #{licensePlate}</if> |
| | | <if test="licensePlate != null and licensePlate != ''"> and thisTab.license_plate like concat('%', #{licensePlate}, '%')</if> |
| | | <if test="shipperId != null "> and thisTab.shipper_id = #{shipperId}</if> |
| | | <if test="shipperName != null and shipperName != ''"> and thisTab.shipper_name like concat('%', #{shipperName}, '%')</if> |
| | | <if test="shipperMobile != null and shipperMobile != ''"> and thisTab.shipper_mobile = #{shipperMobile}</if> |
| | |
| | | <if test="weight != null "> and thisTab.weight = #{weight}</if> |
| | | <if test="contactName != null and contactName != ''"> and thisTab.contact_name like concat('%', #{contactName}, '%')</if> |
| | | <if test="contactPhone != null and contactPhone != ''"> and thisTab.contact_phone = #{contactPhone}</if> |
| | | |
| | | <if test="port != null and port != ''"> and thisTab.port = #{port}</if> |
| | | <if test="seamlessNumber != null and seamlessNumber != ''"> and thisTab.seamless_number = #{seamlessNumber}</if> |
| | | <if test="seamlessSupplierId != null"> and thisTab.seamless_supplier_id = #{seamlessSupplierId}</if> |
| | | <if test="seamlessSupplierName != null and seamlessSupplierName != ''"> and thisTab.seamless_supplier_name = #{seamlessSupplierName}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | |
| | | <if test="weight != null">weight,</if> |
| | | <if test="contactName != null">contact_name,</if> |
| | | <if test="contactPhone != null">contact_phone,</if> |
| | | <if test="port != null">port,</if> |
| | | <if test="seamlessNumber != null">seamless_number,</if> |
| | | <if test="seamlessSupplierId != null">seamless_supplier_id,</if> |
| | | <if test="seamlessSupplierName != null">seamless_supplier_name,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="dispatchNo != null and dispatchNo != ''">#{dispatchNo},</if> |
| | |
| | | <if test="weight != null">#{weight},</if> |
| | | <if test="contactName != null">#{contactName},</if> |
| | | <if test="contactPhone != null">#{contactPhone},</if> |
| | | <if test="port != null">#{port},</if> |
| | | <if test="seamlessNumber != null">#{seamlessNumber},</if> |
| | | <if test="seamlessSupplierId != null">#{seamlessSupplierId},</if> |
| | | <if test="seamlessSupplierName != null">#{seamlessSupplierName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="weight != null">weight = #{weight},</if> |
| | | <if test="contactName != null">contact_name = #{contactName},</if> |
| | | <if test="contactPhone != null">contact_phone = #{contactPhone},</if> |
| | | <if test="port != null">port = #{port},</if> |
| | | <if test="seamlessNumber != null">seamless_number = #{seamlessNumber},</if> |
| | | <if test="seamlessSupplierId != null">seamless_supplier_id = #{seamlessSupplierId},</if> |
| | | <if test="seamlessSupplierName != null">seamless_supplier_name = #{seamlessSupplierName},</if> |
| | | <if test="notes != null">notes = #{notes},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | </if> |
| | | |
| | | |
| | | and tdd.driver_id = #{driverId}; |
| | | and tdd.driver_id = #{driverId} |
| | | ORDER BY tdd.id DESC |
| | | </select> |
| | | <select id="selectAssignedItineraryDetail" resultType="com.ruoyi.tms.domain.vo.DriverDispatchVo"> |
| | | SELECT tdo.dispatch_no, tdo.customer_name, tdo.license_plate,tdo.transport_line,tdo.status,tdo.latest_departure, |
| | |
| | | WHERE tdo.dispatch_no = #{no} |
| | | GROUP BY tdo.id |
| | | </select> |
| | | <select id="selectItineraryLog" resultType="com.ruoyi.tms.domain.vo.DpItineraryLogVo"> |
| | | |
| | | </mapper> |
| | | SELECT |
| | | tr.vehicle_number as vehicleNumber, |
| | | tr.trip_time as tripTime , |
| | | tdo.dispatch_no as dispatchNo , |
| | | CASE |
| | | trip_type |
| | | WHEN 0 THEN |
| | | '开始申报' |
| | | WHEN 3 THEN |
| | | '审核通过' |
| | | WHEN 4 THEN |
| | | '海关验放' |
| | | WHEN 5 THEN |
| | | '放行离场' |
| | | end as remark |
| | | FROM |
| | | tms_trip tr |
| | | LEFT JOIN tms_dispatch_order tdo ON tr.dispatch_order_id = tdo.id |
| | | WHERE |
| | | tdo.`status` = 3 |
| | | AND tr.trip_type IN ( |
| | | 0, |
| | | 3, |
| | | 4, |
| | | 5) |
| | | order by tr.trip_time desc |
| | | limit 50 |
| | | </select> |
| | | |
| | | </mapper> |