Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
06e8aabb
提交
06e8aabb
authored
11月 28, 2022
作者:
LJJ
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'feature-screen' 到 'dev'
Feature screen 查看合并请求
!101
上级
c41d0ac4
ba556686
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
45 行增加
和
7 行删除
+45
-7
ConfirmCheckApp.java
...ava/com/tykj/dev/device/confirmcheck/ConfirmCheckApp.java
+2
-0
ConfirmCheckTask.java
...m/tykj/dev/device/confirmcheck/task/ConfirmCheckTask.java
+4
-0
CheckMapTask.java
.../tykj/dev/device/screen/subject/service/CheckMapTask.java
+10
-7
CheckScreenTask.java
.../tykj/dev/device/screen/subject/task/CheckScreenTask.java
+29
-0
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/ConfirmCheckApp.java
浏览文件 @
06e8aabb
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.confirmcheck;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.confirmcheck;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
/**
/**
* ConfirmCheckApp.
* ConfirmCheckApp.
...
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*/
*/
@SpringBootApplication
(
scanBasePackages
=
{
"com.tykj.dev.*"
}
@SpringBootApplication
(
scanBasePackages
=
{
"com.tykj.dev.*"
}
)
)
@EnableScheduling
public
class
ConfirmCheckApp
{
public
class
ConfirmCheckApp
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ConfirmCheckApp
.
class
,
args
);
SpringApplication
.
run
(
ConfirmCheckApp
.
class
,
args
);
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/task/ConfirmCheckTask.java
浏览文件 @
06e8aabb
...
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.*
;
...
@@ -85,4 +86,7 @@ public class ConfirmCheckTask implements CommandLineRunner {
...
@@ -85,4 +86,7 @@ public class ConfirmCheckTask implements CommandLineRunner {
hisNotInLib
.
put
(
deviceCheckDetail
.
getId
(),
devNotInLibrary
);
hisNotInLib
.
put
(
deviceCheckDetail
.
getId
(),
devNotInLibrary
);
}
}
}
}
}
}
dev-screen/src/main/java/com/tykj/dev/device/screen/subject/service/CheckMapTask.java
浏览文件 @
06e8aabb
...
@@ -50,12 +50,13 @@ public class CheckMapTask implements CommandLineRunner {
...
@@ -50,12 +50,13 @@ public class CheckMapTask implements CommandLineRunner {
public
List
<
Units
>
findUnitByArea
(
String
areaName
)
{
public
List
<
Units
>
findUnitByArea
(
String
areaName
)
{
switch
(
areaName
)
{
switch
(
areaName
)
{
case
"浙江省"
:
case
"省机要局"
:
return
unitsDao
.
findAllByTypeAndLevel
(
1
,
1
);
List
<
Units
>
all
=
unitsDao
.
findAllByTypeAndLevel
(
1
,
1
);
List
<
Units
>
two
=
unitsDao
.
findAllByTypeAndLevel
(
2
,
1
);
all
.
addAll
(
two
);
return
all
;
case
"省直属"
:
case
"省直属"
:
return
unitsDao
.
findAllByEscrow
(
1
).
orElse
(
new
ArrayList
<>());
return
unitsDao
.
findAllByEscrow
(
1
).
orElse
(
new
ArrayList
<>());
case
"省局"
:
return
unitsDao
.
findAllByTypeAndLevel
(
2
,
1
);
default
:
default
:
}
}
...
@@ -128,8 +129,8 @@ public class CheckMapTask implements CommandLineRunner {
...
@@ -128,8 +129,8 @@ public class CheckMapTask implements CommandLineRunner {
public
Map
<
Integer
,
List
<
CheckUnitInfo
>>
init
()
{
public
Map
<
Integer
,
List
<
CheckUnitInfo
>>
init
()
{
List
<
CheckUnitInfo
>
checkUnitInfos
=
checkScreenService
.
statMapData
();
List
<
CheckUnitInfo
>
checkUnitInfos
=
checkScreenService
.
statMapData
();
List
<
CheckUnitInfo
>
selfExamination
=
selfCheckBillService
.
selectNoFinSh2Weeks
();
//
List<CheckUnitInfo> selfExamination = selfCheckBillService.selectNoFinSh2Weeks();
checkUnitInfos
.
addAll
(
selfExamination
);
//
checkUnitInfos.addAll(selfExamination);
collect
=
checkUnitInfos
.
stream
().
collect
(
Collectors
.
groupingBy
(
CheckUnitInfo:
:
getUnitId
));
collect
=
checkUnitInfos
.
stream
().
collect
(
Collectors
.
groupingBy
(
CheckUnitInfo:
:
getUnitId
));
return
collect
;
return
collect
;
}
}
...
@@ -150,12 +151,14 @@ public class CheckMapTask implements CommandLineRunner {
...
@@ -150,12 +151,14 @@ public class CheckMapTask implements CommandLineRunner {
@Override
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
initShi
();
initShi
();
}
public
void
initAll
()
{
init
();
init
();
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
log
.
info
(
"开始计算数据"
,
System
.
currentTimeMillis
()
-
startTime
);
log
.
info
(
"开始计算数据"
,
System
.
currentTimeMillis
()
-
startTime
);
initArea
();
initArea
();
log
.
info
(
"计算数据,用时:{}ms"
,
System
.
currentTimeMillis
()
-
startTime
);
log
.
info
(
"计算数据,用时:{}ms"
,
System
.
currentTimeMillis
()
-
startTime
);
log
.
info
(
"打印{}"
,
rs
.
toString
());
log
.
info
(
"打印{}"
,
rs
.
toString
());
}
}
}
}
dev-screen/src/main/java/com/tykj/dev/device/screen/subject/task/CheckScreenTask.java
0 → 100644
浏览文件 @
06e8aabb
package
com
.
tykj
.
dev
.
device
.
screen
.
subject
.
task
;
import
com.tykj.dev.device.screen.subject.service.CheckMapTask
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
/**
* @AUTHOR: cnljj1995@gmail.com
* @DATE: 2022/11/28
*/
@Slf4j
@Component
public
class
CheckScreenTask
{
@Autowired
private
CheckMapTask
checkMapTask
;
@Scheduled
(
cron
=
"* 15 * * * ? "
)
public
void
checkMap
()
{
long
startTime
=
System
.
currentTimeMillis
();
log
.
info
(
"大屏自核查定时任务开始"
);
checkMapTask
.
initAll
();
log
.
info
(
"大屏自核查定时任务完成,用时:{}"
,
System
.
currentTimeMillis
()
-
startTime
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论