Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
jinan
traffic-signal-platform
Commits
f1342095
Commit
f1342095
authored
May 16, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同比优化
parent
3b121d60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
TrendServiceV2Impl.java
...va/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
+3
-3
GlobalExceptionHandler.java
...on/framework/exceptionhandler/GlobalExceptionHandler.java
+0
-9
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
View file @
f1342095
...
...
@@ -334,7 +334,7 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
LocalDateTime
current
=
vo
.
getDate
();
LocalDateTime
curDayStart
=
DateUtil
.
getLastDayMidNight
(
current
,
0
);
LocalDateTime
latDayStart
=
DateUtil
.
getLastDayMidNight
(
current
,
-
7
);
LocalDateTime
lastDayEnd
=
current
.
plusDays
(-
1
);
LocalDateTime
lastDayEnd
=
latDayStart
.
plusDays
(
1
);
List
<
StatisticsEventTypeCountTimeVO
>
currentList
=
holoEventMapper
.
selectGreenEventTypeCountTimeList
(
type
,
curDayStart
,
current
);
List
<
StatisticsEventTypeCountTimeVO
>
lastDayList
=
holoEventMapper
.
selectGreenEventTypeCountTimeList
(
type
,
latDayStart
,
lastDayEnd
);
setCountDurationRate
(
currentList
,
lastDayList
);
...
...
@@ -376,8 +376,8 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
String
type
=
vo
.
getType
();
LocalDateTime
current
=
vo
.
getDate
();
LocalDateTime
curDayStart
=
DateUtil
.
getLastDayMidNight
(
current
,
0
);
LocalDateTime
latDayStart
=
DateUtil
.
getLastDayMidNight
(
current
,
-
1
);
LocalDateTime
lastDayEnd
=
current
.
plusDays
(-
1
);
LocalDateTime
latDayStart
=
DateUtil
.
getLastDayMidNight
(
current
,
-
7
);
LocalDateTime
lastDayEnd
=
latDayStart
.
plusDays
(
1
);
List
<
StatisticsEventTypeCountTimeVO
>
currentList
=
holoEventMapper
.
selectCrossEventTypeCountTimeList
(
type
,
curDayStart
,
current
);
List
<
StatisticsEventTypeCountTimeVO
>
lastDayList
=
holoEventMapper
.
selectCrossEventTypeCountTimeList
(
type
,
latDayStart
,
lastDayEnd
);
setCountDurationRate
(
currentList
,
lastDayList
);
...
...
wj-common/src/main/java/net/wanji/common/framework/exceptionhandler/GlobalExceptionHandler.java
View file @
f1342095
...
...
@@ -5,14 +5,11 @@ import net.wanji.common.framework.Constants;
import
net.wanji.common.framework.exception.FeignServiceException
;
import
net.wanji.common.framework.exception.RidException
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
org.apache.catalina.connector.ClientAbortException
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.validation.FieldError
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -174,10 +171,4 @@ public class GlobalExceptionHandler {
return
JsonViewObject
.
newInstance
().
fail
(
errorMessage
);
}
@ExceptionHandler
(
value
=
ClientAbortException
.
class
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
JsonViewObject
clientExceptionHandler
(
ClientAbortException
ex
)
{
log
.
error
(
"ClientAbortException异常global:{}"
,
ex
);
return
JsonViewObject
.
newInstance
().
success
(
""
);
}
}
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