Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
1ec3d497
Commit
1ec3d497
authored
Jul 02, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车辆查询接口
parent
7c4029ad
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
236 additions
and
24 deletions
+236
-24
ThirdFeign.java
...in/java/com/xxfc/platform/universal/feign/ThirdFeign.java
+25
-19
VehicleFeign.java
.../java/com/xxfc/platform/universal/feign/VehicleFeign.java
+22
-0
Vehicle.java
...ava/com/xxfc/platform/universal/feign/result/Vehicle.java
+174
-0
TrafficViolationsController.java
...orm/universal/controller/TrafficViolationsController.java
+9
-5
TrafficViolationsService.java
.../platform/universal/service/TrafficViolationsService.java
+6
-0
No files found.
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/ThirdFeign.java
View file @
1ec3d497
...
...
@@ -35,26 +35,7 @@ public interface ThirdFeign {
@RequestMapping
(
value
=
"/refund/app/wx"
,
method
=
RequestMethod
.
POST
)
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 {
/***************************************** 违章 ********************************************/
/**
* 获取违章信息列表
* @param rentViolationDTO
* @return
*/
@GetMapping
(
"/getRentViolation"
)
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
();
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/VehicleFeign.java
0 → 100644
View file @
1ec3d497
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
);
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/result/Vehicle.java
0 → 100644
View file @
1ec3d497
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
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/TrafficViolationsController.java
View file @
1ec3d497
...
...
@@ -2,6 +2,8 @@ package com.xxfc.platform.universal.controller;
import
com.alibaba.fastjson.JSONObject
;
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.vo.RentViolationDTO
;
import
com.xxfc.platform.universal.vo.TrafficViolations
;
...
...
@@ -16,7 +18,8 @@ import java.util.List;
@RestController
@RequestMapping
(
"3p/tv"
)
public
class
TrafficViolationsController
{
@Autowired
private
VehicleFeign
vehicleFeign
;
@Autowired
TrafficViolationsService
tvService
;
...
...
@@ -64,10 +67,11 @@ public class TrafficViolationsController {
@GetMapping
(
"/getRentViolation"
)
public
ObjectRestResponse
<
List
<
ViolationVO
>>
getRentViolation
(
RentViolationDTO
rentViolationDTO
)
{
return
ObjectRestResponse
.
succ
(
new
ArrayList
<
ViolationVO
>(){{
add
(
new
ViolationVO
(){{
setPrice
(
new
BigDecimal
(
"100.00"
));}});
add
(
new
ViolationVO
(){{
setPrice
(
new
BigDecimal
(
"200.00"
));}});
}});
String
vehicleId
=
rentViolationDTO
.
getVehicleId
();
Vehicle
vehicle
=
vehicleFeign
.
get
(
vehicleId
).
getData
();
return
ObjectRestResponse
.
succ
(
tvService
.
getRentViolation
(
rentViolationDTO
,
vehicle
));
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/TrafficViolationsService.java
View file @
1ec3d497
...
...
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.universal.biz.LicensePlateTypeBiz
;
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.vo.RentViolationDTO
;
import
com.xxfc.platform.universal.vo.TrafficViolations
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -209,4 +211,8 @@ public class TrafficViolationsService {
licensePlateTypeBiz
.
insertLicensePlateType
(
finalLicensePlateTypes
);
}
public
Object
getRentViolation
(
RentViolationDTO
rentViolationDTO
,
Vehicle
vehicle
)
{
return
null
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment