Commit 1ec3d497 authored by hanfeng's avatar hanfeng

修改车辆查询接口

parent 7c4029ad
...@@ -35,26 +35,7 @@ public interface ThirdFeign { ...@@ -35,26 +35,7 @@ public interface ThirdFeign {
@RequestMapping(value = "/refund/app/wx", method = RequestMethod.POST) @RequestMapping(value = "/refund/app/wx", method = RequestMethod.POST)
public ObjectRestResponse<String> refund(@RequestBody OrderRefundVo orderRefundVo); public ObjectRestResponse<String> refund(@RequestBody OrderRefundVo orderRefundVo);
/**
* 获取支持的城市
* @return
*/
@GetMapping("/city")
ObjectRestResponse getCityInfo();
/**
* 违章车辆查询
* @return
*/
@PostMapping("/trafficViolations")
ObjectRestResponse queryTrafficViolations(@RequestBody TrafficViolations trafficViolations) ;
/**
* 车辆类型查询
* @return
*/
@GetMapping("/LicensePlateType")
ObjectRestResponse getLicensePlateType();
/***************************************** 数据字典 ********************************************/ /***************************************** 数据字典 ********************************************/
...@@ -73,6 +54,31 @@ public interface ThirdFeign { ...@@ -73,6 +54,31 @@ public interface ThirdFeign {
/***************************************** 违章 ********************************************/ /***************************************** 违章 ********************************************/
/**
* 获取违章信息列表
* @param rentViolationDTO
* @return
*/
@GetMapping("/getRentViolation") @GetMapping("/getRentViolation")
public ObjectRestResponse<List<ViolationVO>> getRentViolation(@RequestParam(value = "rentViolationDTO") Map<String, Object> rentViolationDTO); public ObjectRestResponse<List<ViolationVO>> getRentViolation(@RequestParam(value = "rentViolationDTO") Map<String, Object> rentViolationDTO);
/**
* 获取支持的城市
* @return
*/
@GetMapping("/city")
ObjectRestResponse getCityInfo();
/**
* 违章车辆查询
* @return
*/
@PostMapping("/trafficViolations")
ObjectRestResponse queryTrafficViolations(@RequestBody TrafficViolations trafficViolations) ;
/**
* 车辆类型查询
* @return
*/
@GetMapping("/LicensePlateType")
ObjectRestResponse getLicensePlateType();
} }
package com.xxfc.platform.universal.feign;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.universal.feign.result.Vehicle;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Created by ace on 2017/9/15.
*/
@FeignClient(name = "vehicle")
public interface VehicleFeign {
@GetMapping(value = "/vehicleInfo/{id}")
public ObjectRestResponse<Vehicle> get(@PathVariable("id") String id);
}
package com.xxfc.platform.universal.feign.result;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import java.util.Date;
@Data
public class Vehicle {
/**
* 主键(uuid)
*/
@Id
private String id;
/**
* 车辆编号,0-没有
*/
private Integer code;
/**
* 车辆状态: 1-正常运行 2-维修 3-报废
*/
private Integer status;
/**
* 车牌号,空字符串-没有
*/
@Column(name = "number_plate")
private String numberPlate;
/**
* 品牌(编码,对应关系见相关常量),0-未填写
*/
private Integer brand;
/**
* 所属分支机构(id)
*/
@Column(name = "subordinate_branch")
private Integer subordinateBranch;
/**
* 用途类型:租赁房车(1)、展车等,对应关系见车辆常量表
*/
@Column(name = "use_type")
private Integer useType;
/**
* 备注信息
*/
private String remark;
/**
* 车架号
*/
private String vin;
/**
* 保险公司,见常量表
*/
private Integer insuranceCompany;
/**
* 保险单号
*/
private String insuranceNo;
/**
* 保险开始时间
*/
private Date insuranceStartDate;
/**
* 保险结束时间
*/
private Date insuranceEndDate;
/**
* 年审时间
*/
private Date annualVerificationDate;
/**
* 保养时间
*/
private Date maintenanceDate;
/**
* 保养里程数
*/
private Integer maintenanceMileage;
/**
* 车辆所属人-类型
*/
private Integer belongTo;
/**
* 所属人 名称
*/
private String belongToName;
/**
* 行驶证路径
*/
private String drivingLicensePath;
/**
* 发动机号
*/
private String engineNum;
/**
* 生产商
*/
private String manufacturer;
/**
* 收车时间
*/
private Date receiveTime;
/**
* 最后更新里程数
*/
private Integer mileageLastUpdate;
/**
* 停车分公司(id)
*/
@Column(name = "park_branch_company_id")
private Integer parkBranchCompanyId;
/**
* 预计目的地分公司id
*/
private Integer expectDestinationBranchCompanyId;
/**
* 车型id
*/
@Column(name = "model_id")
private Integer modelId;
/**
* 车辆当前出行状态: 1-出行中 2-预约中 3-空闲中 4-保养中
*/
@Column(name = "travel_status")
private Integer travelStatus;
/**
* 是否删除;0-正常;1-删除
*/
private Integer isDel;
/**
* 车牌类型
*/
private String type;
/**
* 车牌号码
*/
private String plateno;
/**
* 发动机号
*/
private String engineno;
/**
* 车架号
*/
private String frameno;
}
\ No newline at end of file
...@@ -2,6 +2,8 @@ package com.xxfc.platform.universal.controller; ...@@ -2,6 +2,8 @@ package com.xxfc.platform.universal.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.universal.feign.VehicleFeign;
import com.xxfc.platform.universal.feign.result.Vehicle;
import com.xxfc.platform.universal.service.TrafficViolationsService; import com.xxfc.platform.universal.service.TrafficViolationsService;
import com.xxfc.platform.universal.vo.RentViolationDTO; import com.xxfc.platform.universal.vo.RentViolationDTO;
import com.xxfc.platform.universal.vo.TrafficViolations; import com.xxfc.platform.universal.vo.TrafficViolations;
...@@ -16,7 +18,8 @@ import java.util.List; ...@@ -16,7 +18,8 @@ import java.util.List;
@RestController @RestController
@RequestMapping("3p/tv") @RequestMapping("3p/tv")
public class TrafficViolationsController { public class TrafficViolationsController {
@Autowired
private VehicleFeign vehicleFeign;
@Autowired @Autowired
TrafficViolationsService tvService; TrafficViolationsService tvService;
...@@ -64,10 +67,11 @@ public class TrafficViolationsController { ...@@ -64,10 +67,11 @@ public class TrafficViolationsController {
@GetMapping("/getRentViolation") @GetMapping("/getRentViolation")
public ObjectRestResponse<List<ViolationVO>> getRentViolation(RentViolationDTO rentViolationDTO) { public ObjectRestResponse<List<ViolationVO>> getRentViolation(RentViolationDTO rentViolationDTO) {
return ObjectRestResponse.succ(new ArrayList<ViolationVO>(){{ String vehicleId = rentViolationDTO.getVehicleId();
add(new ViolationVO(){{setPrice(new BigDecimal("100.00"));}});
add(new ViolationVO(){{setPrice(new BigDecimal("200.00"));}}); Vehicle vehicle = vehicleFeign.get(vehicleId).getData();
}});
return ObjectRestResponse.succ(tvService.getRentViolation(rentViolationDTO,vehicle));
} }
......
...@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.xxfc.platform.universal.biz.LicensePlateTypeBiz; import com.xxfc.platform.universal.biz.LicensePlateTypeBiz;
import com.xxfc.platform.universal.entity.LicensePlateType; import com.xxfc.platform.universal.entity.LicensePlateType;
import com.xxfc.platform.universal.feign.result.Vehicle;
import com.xxfc.platform.universal.utils.CertifHttpUtils; import com.xxfc.platform.universal.utils.CertifHttpUtils;
import com.xxfc.platform.universal.vo.RentViolationDTO;
import com.xxfc.platform.universal.vo.TrafficViolations; import com.xxfc.platform.universal.vo.TrafficViolations;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -209,4 +211,8 @@ public class TrafficViolationsService { ...@@ -209,4 +211,8 @@ public class TrafficViolationsService {
licensePlateTypeBiz.insertLicensePlateType(finalLicensePlateTypes); licensePlateTypeBiz.insertLicensePlateType(finalLicensePlateTypes);
} }
public Object getRentViolation(RentViolationDTO rentViolationDTO, Vehicle vehicle) {
return null;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment