Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
f07b4320
Commit
f07b4320
authored
Sep 12, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加时速阈值 防止返回垃圾数据
parent
11b26b24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
WlCarMileageController.java
...eejoin/equipmanage/controller/WlCarMileageController.java
+8
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/WlCarMileageController.java
View file @
f07b4320
...
...
@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -20,6 +21,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -34,6 +36,8 @@ import java.util.*;
@Api
(
tags
=
"车量里程表Api"
)
@RequestMapping
(
value
=
"/wl-car-mileage"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
WlCarMileageController
{
@Value
(
"${car.max.speed:100}"
)
private
Integer
CAR_MAX_SPEED
;
@Autowired
IWlCarMileageService
iWlCarMileageService
;
...
...
@@ -170,7 +174,10 @@ public class WlCarMileageController {
BeanUtil
.
copyPropertiesIgnoreNull
(
wl
,
wlCarMileageDto
);
wlCarMileageDto
.
setStartTime
(
sdf
.
format
(
wl
.
getStartTime
()));
wlCarMileageDto
.
setEndTime
(
sdf
.
format
(
wl
.
getEndTime
()));
list
.
add
(
wlCarMileageDto
);
//判断当前车辆全程是否异常,如果时速小于阈值 则对数据进行返回 否则不予返回
if
((
wlCarMileage
.
getTravel
()/(
wlCarMileage
.
getTakeTime
()/
3600000
))<
CAR_MAX_SPEED
){
list
.
add
(
wlCarMileageDto
);
}
}
carTravelDto
.
setRecords
(
list
);
// // 初始化format格式
...
...
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