Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ocrCloudPlatForm
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ocr-cloud-platform
ocrCloudPlatForm
Commits
c60d3495
Commit
c60d3495
authored
Apr 24, 2024
by
黄明步
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ec76952a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
src/main/java/com/gxmailu/ocrCloudPlatform/controller/StatController.java
+4
-2
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/StatService.java
+14
-2
No files found.
src/main/java/com/gxmailu/ocrCloudPlatform/controller/StatController.java
View file @
c60d3495
...
@@ -34,13 +34,15 @@ public class StatController {
...
@@ -34,13 +34,15 @@ public class StatController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期范围,非必填,为空则默认当日"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期范围,非必填,为空则默认当日"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期范围,非必填"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期范围,非必填"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"displayType"
,
value
=
"展示类型,总体量或各法院使用量可选值[detailed|full]"
,
dataType
=
"String"
,
required
=
false
),
@ApiImplicitParam
(
name
=
"interval"
,
value
=
"时间间隔,按日查询时可用,可选值[hour|minute|second]"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"displayType"
,
value
=
"展示类型,总体量或各法院使用量可选值[detailed|full]"
,
dataType
=
"String"
),
})
})
@GetMapping
(
"/getBrokenLineData"
)
@GetMapping
(
"/getBrokenLineData"
)
public
Result
getBrokenLineData
(
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
public
Result
getBrokenLineData
(
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"interval"
,
required
=
false
)
String
interval
,
@RequestParam
(
value
=
"displayType"
,
defaultValue
=
"full"
)
String
displayType
)
{
@RequestParam
(
value
=
"displayType"
,
defaultValue
=
"full"
)
String
displayType
)
{
return
statService
.
getBrokenLineData
(
startDate
,
endDate
,
"interval"
,
displayType
);
return
statService
.
getBrokenLineData
(
startDate
,
endDate
,
interval
,
displayType
);
}
}
...
...
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/StatService.java
View file @
c60d3495
...
@@ -128,7 +128,20 @@ public class StatService {
...
@@ -128,7 +128,20 @@ public class StatService {
DateTime
yearMonthDayDateTime
=
DateUtil
.
parse
(
startDate
,
"yyyy-MM-dd"
);
DateTime
yearMonthDayDateTime
=
DateUtil
.
parse
(
startDate
,
"yyyy-MM-dd"
);
startDate
=
DateUtil
.
beginOfDay
(
yearMonthDayDateTime
).
toString
();
startDate
=
DateUtil
.
beginOfDay
(
yearMonthDayDateTime
).
toString
();
newEndDate
=
DateUtil
.
endOfDay
(
yearMonthDayDateTime
).
toString
();
newEndDate
=
DateUtil
.
endOfDay
(
yearMonthDayDateTime
).
toString
();
defaultInterval
=
CalendarInterval
.
Hour
;
switch
(
interval
)
{
case
"hour"
:
defaultInterval
=
CalendarInterval
.
Hour
;
break
;
case
"minute"
:
defaultInterval
=
CalendarInterval
.
Minute
;
break
;
case
"second"
:
defaultInterval
=
CalendarInterval
.
Second
;
break
;
default
:
defaultInterval
=
CalendarInterval
.
Hour
;
break
;
}
break
;
break
;
}
}
...
@@ -137,7 +150,6 @@ public class StatService {
...
@@ -137,7 +150,6 @@ public class StatService {
// newEndDate = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// newEndDate = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
startDate
=
DateUtil
.
beginOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
startDate
=
DateUtil
.
beginOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
newEndDate
=
DateUtil
.
endOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
newEndDate
=
DateUtil
.
endOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
defaultInterval
=
CalendarInterval
.
Minute
;
}
}
endDate
=
StrUtil
.
isBlank
(
endDate
)
?
newEndDate
:
endDate
;
endDate
=
StrUtil
.
isBlank
(
endDate
)
?
newEndDate
:
endDate
;
...
...
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