SELECT
( SELECT platformcode FROM cfc_nocarcarrierplatforminfo WHERE isdeleteflag = 0 ) AS platformcode,
a.driver_id AS carrierid,
( CASE WHEN a.type = 1 THEN 2 ELSE 1 END ) AS carriertype,
a.driver_name AS carriername,
a.identification_number AS unifiedsocialcreditldentifier, //去除空数据
b.road_transport_business_license_no AS permitnumber, //去除空数据
a.area_id AS countrysubdivisioncode, //去除空数据
a.driver_name AS contactname,
a.create_time AS registrationdatetime,
a.phone AS contactmobiletelephonenumber,
a.blacklist_status AS isblaclklist,
a.is_delete AS isdeleteflag,
c.id,
a.is_report_carrier_message AS report_status,
a.report_time AS report_time,
a.report_abnormal_reason AS err_msg
FROM
tms_driver a
LEFT JOIN tms_vehicle b ON a.vehicle_type_id = b.id
LEFT JOIN cfc_carrierinfo c ON a.driver_id = c.carrierid
WHERE
a.is_delete = 0
SELECT
( SELECT platformcode FROM cfc_nocarcarrierplatforminfo WHERE isdeleteflag = 0 ) AS platformcode,
a.driver_id AS carrierid,
( CASE WHEN a.type = 1 THEN 2 ELSE 1 END ) AS carriertype,
a.driver_name AS carriername,
a.identification_number AS unifiedsocialcreditldentifier ,
b.road_transport_business_license_no AS permitnumber,
a.area_id AS countrysubdivisioncode,
a.driver_name AS contactname,
a.create_time AS registrationdatetime,
a.phone AS contactmobiletelephonenumber,
a.blacklist_status AS isblaclklist,
a.is_delete AS isdeleteflag,
c.id,
a.is_report_carrier_message AS report_status,
a.report_time AS report_time,
a.report_abnormal_reason AS err_msg
FROM
tms_driver a
LEFT JOIN tms_vehicle b ON a.vehicle_type_id = b.id
LEFT JOIN cfc_carrierinfo c ON a.driver_id = c.carrierid
WHERE
a.is_delete = 0 and
unifiedsocialcreditldentifier is not null
SELECT
( SELECT platformcode FROM cfc_nocarcarrierplatforminfo WHERE isdeleteflag = 0 ) AS platformcode,
a.driver_id AS carrierid,
( CASE WHEN a.type = 1 THEN 2 ELSE 1 END ) AS carriertype,
a.driver_name AS carriername,
a.identification_number AS unifiedsocialcreditldentifier,
b.road_transport_business_license_no AS permitnumber,
a.area_id AS countrysubdivisioncode,
a.driver_name AS contactname,
a.create_time AS registrationdatetime,
a.phone AS contactmobiletelephonenumber,
a.blacklist_status AS isblaclklist,
a.is_delete AS isdeleteflag,
c.id,
a.is_report_carrier_message AS report_status,
a.report_time AS report_time,
a.report_abnormal_reason AS err_msg
FROM
tms_driver a
inner JOIN tms_vehicle b ON a.vehicle_type_id = b.id
inner JOIN cfc_carrierinfo c ON a.driver_id = c.carrierid
WHERE
a.is_delete = 0
AND countrysubdivisioncode IS not NULL // 国家区划代码不能为空