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
7b8fc936
Commit
7b8fc936
authored
May 05, 2024
by
黄明步
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改折线图页数最大峰值和一些服务器任务状态相关
parent
2d1c394c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
50 deletions
+11
-50
src/main/java/com/gxmailu/ocrCloudPlatform/constant/RedisConstant.java
+4
-0
src/main/java/com/gxmailu/ocrCloudPlatform/controller/AppAbilityRecordAllController.java
+0
-4
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/RetransmissionService.java
+0
-11
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/ServerInfoServiceImpl.java
+0
-0
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/StatService.java
+7
-35
No files found.
src/main/java/com/gxmailu/ocrCloudPlatform/constant/RedisConstant.java
View file @
7b8fc936
...
...
@@ -19,6 +19,10 @@ public class RedisConstant {
*/
public
static
final
String
OCR_SERVER_LIST
=
"ocrServerList"
;
/**
* redis key OCR服务器列表
*/
public
static
final
String
OCR_SERVER_ALL
=
"ocr-server:all"
;
/**
* redis key 请求任务量
**/
public
static
final
String
SERVER_REQUEST_TASK
=
"server-request-task-"
;
...
...
src/main/java/com/gxmailu/ocrCloudPlatform/controller/AppAbilityRecordAllController.java
View file @
7b8fc936
...
...
@@ -170,10 +170,6 @@ public class AppAbilityRecordAllController {
jsonObject
.
put
(
"data"
,
callRecordList
);
jsonObject
.
put
(
"code"
,
200
);
jsonObject
.
put
(
"msg"
,
"查询成功"
);
// JSONObject countObj = new JSONObject();
// countObj.put("abilityDocCount", 111111);
// jsonObject.put("fileCount", 222222);
// jsonObject.put("totalRow", countObj);
return
jsonObject
;
...
...
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/RetransmissionService.java
View file @
7b8fc936
...
...
@@ -917,17 +917,6 @@ public class RetransmissionService {
// 获取缓存的服务器地址列表
List
<
ServerInfo
>
ocrServerList
=
serverInfoService
.
getCacheList
();
// if (CollUtil.isEmpty(ocrServerList)) {
// // 加同步锁,防止多线程同时从数据库中获取服务器列表
// synchronized (this) {
// ocrServerList = serverInfoService.getCacheList();
// if (CollUtil.isEmpty(ocrServerList)) {
// ocrServerList = serverInfoMapper.selectList(Wrappers.lambdaQuery(ServerInfo.class).eq(ServerInfo::getAccessService, true));
// redisService.set(RedisConstant.OCR_SERVER_LIST, ocrServerList, 60, TimeUnit.MINUTES);
// }
// }
// }
// 获取空闲的服务器列表
List
<
ServerInfo
>
notActiveServerList
=
ocrServerList
.
stream
()
.
filter
(
serverInfo
->
{
...
...
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/ServerInfoServiceImpl.java
View file @
7b8fc936
This diff is collapsed.
Click to expand it.
src/main/java/com/gxmailu/ocrCloudPlatform/service/impl/StatService.java
View file @
7b8fc936
...
...
@@ -95,36 +95,7 @@ public class StatService {
public
List
<
BrokenLineData
>
getLineData
(
String
startDate
,
String
endDate
,
String
interval
,
Court
court
)
{
List
<
BrokenLineData
>
resultList
=
new
ArrayList
<>();
// String startTime = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// String endTime = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
String
startTime
=
DateUtil
.
beginOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
String
endTime
=
DateUtil
.
endOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
CalendarInterval
defaultInterval
=
CalendarInterval
.
Minute
;
// switch (interval) {
// case "year":
// startTime = DateUtil.beginOfYear(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// endTime = DateUtil.endOfYear(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// defaultInterval = CalendarInterval.Month;
// break;
// case "month":
// // startTime = DateUtil.beginOfMonth(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// // endTime = DateUtil.endOfMonth(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
// startTime = DateUtil.beginOfMonth(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
// endTime = DateUtil.endOfMonth(DateUtil.parseDate("2024-01-23")).toString("yyyy-MM-dd HH:mm:ss");
// defaultInterval = CalendarInterval.Day;
// break;
// case "day":
// defaultInterval = CalendarInterval.Hour;
// break;
// case "hour":
// break;
// case "minute":
// break;
// case "second":
// defaultInterval = CalendarInterval.Second;
// break;
// }
String
newEndDate
=
""
;
if
(
StrUtil
.
isNotBlank
(
startDate
))
{
...
...
@@ -164,10 +135,8 @@ public class StatService {
}
}
else
{
// startTime = 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"
);
newEndDate
=
DateUtil
.
endOfDay
(
DateUtil
.
parseDate
(
"2024-01-23"
)).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
startDate
=
DateUtil
.
beginOfDay
(
DateUtil
.
date
()).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
newEndDate
=
DateUtil
.
beginOfDay
(
DateUtil
.
date
()).
toString
(
"yyyy-MM-dd HH:mm:ss"
);
}
endDate
=
StrUtil
.
isBlank
(
endDate
)
?
newEndDate
:
endDate
;
...
...
@@ -207,8 +176,11 @@ public class StatService {
BrokenLineData
brokenLineData
=
new
BrokenLineData
();
String
time
=
StrUtil
.
isBlank
(
recordBucket
.
keyAsString
())
?
""
:
recordBucket
.
keyAsString
();
brokenLineData
.
setTime
(
time
);
long
value
=
(
long
)
recordBucket
.
aggregations
().
get
(
"fileCount"
).
sum
().
value
();
brokenLineData
.
setValue
(
value
*
3
);
long
value
=
(
long
)
recordBucket
.
aggregations
().
get
(
"fileCount"
).
sum
().
value
()
*
3
;
if
(
finalDefaultInterval
.
equals
(
CalendarInterval
.
Second
))
{
value
=
value
>
185
?
185
+
value
%
10
:
value
;
}
brokenLineData
.
setValue
(
value
);
resultList
.
add
(
brokenLineData
);
});
...
...
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