|
@@ -19,65 +19,6 @@ type a02Req struct {
|
|
|
PlateType string `json:"plate_type"`
|
|
|
}
|
|
|
|
|
|
-type a02Response struct {
|
|
|
- PlateNo string `json:"plate_no"`
|
|
|
- PlateType string `json:"plate_type"`
|
|
|
- Vin string `json:"vin"` //
|
|
|
- EngineNo string `json:"engine_no"` //
|
|
|
- EngineType string `json:"engine_type"` //
|
|
|
- ModelNo string `json:"model_no"` //
|
|
|
- BrandName string `json:"brand_name"` //
|
|
|
- InitialRegistrationDate string `json:"initial_registration_date"` //16
|
|
|
- VehicleType string `json:"vehicle_type"` //18
|
|
|
- VehicleTypeDetail string `json:"vehicle_type_detail"` //18
|
|
|
- UseProperty string `json:"use_property"` //16
|
|
|
- UsePropertyDetail string `json:"use_property_detail"` //15
|
|
|
- VehicleBodyColor string `json:"vehicle_body_color"` //16
|
|
|
- VehicleBodyColorDetail string `json:"vehicle_body_color_detail"` //
|
|
|
- ApprovedLoad string `json:"approved_load"` //
|
|
|
- ApprovedNumber string `json:"approved_number"` //
|
|
|
- AxleNumber string `json:"axle_number"` //
|
|
|
- AxleWeight string `json:"axle_weight"` //
|
|
|
- Displacement string `json:"displacement"` //
|
|
|
- DisplacementL string `json:"displacement_l"`
|
|
|
- FrontWheelDistance string `json:"front_wheel_distance"` //
|
|
|
- BackWheelDistance string `json:"back_wheel_distance"` //
|
|
|
- FuelType string `json:"fuel_type"` //16
|
|
|
- FuelTypeDetail string `json:"fuel_type_detail"` //
|
|
|
- GrossMass string `json:"gross_mass"` //
|
|
|
- RatedPower string `json:"rated_power"` //
|
|
|
- ReleaseDate string `json:"release_date"` //
|
|
|
- UnladenMass string `json:"unladen_mass"` //
|
|
|
- EmissionStandard string `json:"emission_standard"` //
|
|
|
- High string `json:"high"` //
|
|
|
- Long string `json:"long"` //
|
|
|
- Wide string `json:"wide"` //
|
|
|
- OilWear string `json:"oil_wear"` //
|
|
|
- TractionMass string `json:"traction_mass"` //
|
|
|
- TyreSize string `json:"tyre_size"` //
|
|
|
- TyreNumber string `json:"tyre_number"` //
|
|
|
- WheelBase string `json:"wheel_base"` //
|
|
|
- CompulsoryScrapTo string `json:"compulsory_scrap_to"`
|
|
|
- InspectionResultEffectiveTo string `json:"inspection_result_effective_to"`
|
|
|
-
|
|
|
- //CertificateNumber string `json:"certificate_number"` //
|
|
|
- //CertificateDate string `json:"certificate_date"` //
|
|
|
- //VehicleManufacturer string `json:"vehicle_manufacturer"` //
|
|
|
- //ChassisModel string `json:"chassis_model"` //
|
|
|
- //ChassisId string `json:"chassis_id"` //
|
|
|
- //ChassisCertificateNumber string `json:"chassis_certificate_number"` //
|
|
|
- //DisplacementL string `json:"displacement_l"` //
|
|
|
- //CargoLong string `json:"cargo_long"` //
|
|
|
- //CargoWide string `json:"cargo_wide"` //
|
|
|
- //CargoHigh string `json:"cargo_high"` //
|
|
|
- //NumberOfLeafSprings string `json:"number_of_leaf_springs"` //
|
|
|
- //SteeringMode string `json:"steering_mode"` //
|
|
|
- //LoadMassCoefficient string `json:"load_mass_coefficient"` //
|
|
|
- //SemitrailerSaddleMaxAllowGrossMass string `json:"semitrailer_saddle_max_allow_gross_mass"` //
|
|
|
- //NumberOfPassengers string `json:"number_of_passengers"` //
|
|
|
- //TopSpeed string `json:"top_speed"` //
|
|
|
-}
|
|
|
-
|
|
|
// vin查车辆信息
|
|
|
func A02(ctx context.Context, params string) (reply *apis.QueryResponse, err error) {
|
|
|
reply = &apis.QueryResponse{}
|
|
@@ -90,7 +31,7 @@ func A02(ctx context.Context, params string) (reply *apis.QueryResponse, err err
|
|
|
|
|
|
db := database.DB()
|
|
|
|
|
|
- var res a02Response
|
|
|
+ var res a04Response
|
|
|
|
|
|
sql := "select * from v_gadm_vin where vin = ? "
|
|
|
|
|
@@ -125,12 +66,12 @@ func A02(ctx context.Context, params string) (reply *apis.QueryResponse, err err
|
|
|
res.PlateType = req.PlateType
|
|
|
}
|
|
|
|
|
|
- a02Str, _ := jsoniter.MarshalToString(res)
|
|
|
- a02Map := make(map[string]interface{})
|
|
|
- jsoniter.Unmarshal([]byte(a02Str), &a02Map)
|
|
|
+ a04Str, _ := jsoniter.MarshalToString(res)
|
|
|
+ a04Map := make(map[string]interface{})
|
|
|
+ jsoniter.Unmarshal([]byte(a04Str), &a04Map)
|
|
|
//formatData(a02Map)
|
|
|
|
|
|
- reply.Data, _ = jsoniter.MarshalToString(a02Map)
|
|
|
+ reply.Data, _ = jsoniter.MarshalToString(a04Map)
|
|
|
|
|
|
return reply, nil
|
|
|
|