Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
4eaf8169
提交
4eaf8169
authored
11月 24, 2021
作者:
ljj234
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 修改核查模块(重构)
上级
8cb8fb65
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
26 行增加
和
18 行删除
+26
-18
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+12
-8
ExamController.java
...kj/dev/device/confirmcheck/controller/ExamController.java
+1
-0
ConfirmCheckServiceImpl.java
...ce/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
+0
-1
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+9
-5
TestPaperServiceImpl.java
...j/dev/device/train/service/impl/TestPaperServiceImpl.java
+4
-4
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
4eaf8169
...
@@ -445,8 +445,11 @@ public class DeviceCheckController {
...
@@ -445,8 +445,11 @@ public class DeviceCheckController {
}
else
{
}
else
{
// 正常处理,即时计算
// 正常处理,即时计算
// checkType = 0 核查,checkType = 1 检查
// checkType = 0 核查,checkType = 1 检查
if
(
ctVo
.
getCheckType
()
==
0
)
{
if
(
ctVo
.
getCheckType
()
==
0
||
(
ctVo
.
getCheckType
()
==
1
&&
unitsService
.
isProvUnit
(
rootTask
.
getOwnUnit
())))
{
linkVo
.
setType
(
1
);
if
(
ctVo
.
getCheckType
()
==
0
)
{
linkVo
.
setType
(
1
);
}
// 根据tpye和billId找到父级节点 - 默认了最顶级的省核查节点应当为一个
// 根据tpye和billId找到父级节点 - 默认了最顶级的省核查节点应当为一个
// 先检出所有类型为7或者8的Task集合 方便后续操作
// 先检出所有类型为7或者8的Task集合 方便后续操作
...
@@ -590,14 +593,11 @@ public class DeviceCheckController {
...
@@ -590,14 +593,11 @@ public class DeviceCheckController {
log
.
info
(
"[TEST] COST {} MS"
,
finalTime
-
startTime
);
log
.
info
(
"[TEST] COST {} MS"
,
finalTime
-
startTime
);
}
}
// check type = 1 检查页面 看见的是自查 1=省核查,2=省检查,3=3级结构下的市检查,4=2级结构下的市检查
// check type = 1 检查页面 看见的是自查 1=省核查,2=省检查,3=3级结构下的市检查,4=2级结构下的市检查
if
(
ctVo
.
getCheckType
()
==
1
)
{
if
(
ctVo
.
getCheckType
()
==
1
&&
!
unitsService
.
isProvUnit
(
rootTask
.
getOwnUnit
()))
{
Integer
createUserId
=
ctVo
.
getCreateUserId
();
Integer
createUserId
=
ctVo
.
getCreateUserId
();
Integer
ownUnit
=
rootTask
.
getOwnUnit
();
Integer
ownUnit
=
rootTask
.
getOwnUnit
();
if
(
unitsService
.
isProvUnit
(
ownUnit
))
{
linkVo
.
setType
(
2
);
}
else
{
linkVo
.
setType
(
4
);
linkVo
.
setType
(
4
);
}
// 找到所有的子节点
// 找到所有的子节点
List
<
Task
>
childTask
=
taskRepo
.
findAllByParentTaskId
(
rootTask
.
getId
());
List
<
Task
>
childTask
=
taskRepo
.
findAllByParentTaskId
(
rootTask
.
getId
());
...
@@ -1085,6 +1085,7 @@ public class DeviceCheckController {
...
@@ -1085,6 +1085,7 @@ public class DeviceCheckController {
public
ResponseEntity
<
ResultObj
>
checkUserA
(
@PathVariable
Integer
id
,
public
ResponseEntity
<
ResultObj
>
checkUserA
(
@PathVariable
Integer
id
,
@RequestParam
int
assignUserId
,
@RequestParam
int
assignUserId
,
@RequestParam
String
checkResult
,
@RequestParam
String
checkResult
,
// todo
@RequestParam
String
terminalInfo
,
@RequestParam
String
terminalInfo
,
@RequestBody
DetailVo
detailVo
)
{
@RequestBody
DetailVo
detailVo
)
{
// 获取参数
// 获取参数
...
@@ -1288,6 +1289,7 @@ public class DeviceCheckController {
...
@@ -1288,6 +1289,7 @@ public class DeviceCheckController {
currentDetail
.
setUserCId
(
userId
);
currentDetail
.
setUserCId
(
userId
);
currentDetail
=
detailRepo
.
save
(
currentDetail
);
currentDetail
=
detailRepo
.
save
(
currentDetail
);
summaryDetail
(
currentTask
,
currentDetail
);
summaryDetail
(
currentTask
,
currentDetail
);
// // 检查该exam任务是否可以完结推进了
// // 检查该exam任务是否可以完结推进了
advanceExamTask
(
currentTask
.
getParentTaskId
(),
false
);
advanceExamTask
(
currentTask
.
getParentTaskId
(),
false
);
...
@@ -1846,7 +1848,9 @@ public class DeviceCheckController {
...
@@ -1846,7 +1848,9 @@ public class DeviceCheckController {
log
.
info
(
"[核查模块] 终止任务-正在关闭 task id = {} 的任务节点"
);
log
.
info
(
"[核查模块] 终止任务-正在关闭 task id = {} 的任务节点"
);
// 如果是核查类捡点,抛出异常
// 如果是核查类捡点,抛出异常
if
(
node
.
getCustomInfo
().
equals
(
"check"
)
||
node
.
getCustomInfo
().
equals
(
"exam"
))
{
if
(
node
.
getCustomInfo
().
equals
(
"check"
)
||
node
.
getCustomInfo
().
equals
(
"exam"
))
{
throw
new
ApiException
(
"关闭节点里不处理核查/核查节点...,你提供的任务节点id = "
+
node
.
getId
());
// throw new ApiException("关闭节点里不处理核查/核查节点...,你提供的任务节点id = " + node.getId());
log
.
error
(
"关闭节点里不处理核查/核查节点...,你提供的任务节点id = "
+
node
.
getId
());
return
;
}
}
// 其余节点,执行关闭策略
// 其余节点,执行关闭策略
// 1.将该任务进度推进至9999
// 1.将该任务进度推进至9999
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/ExamController.java
浏览文件 @
4eaf8169
...
@@ -587,6 +587,7 @@ public class ExamController {
...
@@ -587,6 +587,7 @@ public class ExamController {
// a 构建区单位的自查账单及任务
// a 构建区单位的自查账单及任务
List
<
Units
>
unitsEs
=
checkedUnits
.
stream
().
filter
(
o
->
o
.
getLevel
()
==
3
).
collect
(
toList
());
List
<
Units
>
unitsEs
=
checkedUnits
.
stream
().
filter
(
o
->
o
.
getLevel
()
==
3
).
collect
(
toList
());
log
.
info
(
"[核查] 检查,生成区的统计及详情:{}"
,
unitsEs
.
toString
());
log
.
info
(
"[核查] 检查,生成区的统计及详情:{}"
,
unitsEs
.
toString
());
unitsEs
=
unitsRepo
.
findAllById
(
checkUnitService
.
findExistDevice
(
unitsEs
.
stream
().
map
(
Units:
:
getUnitId
).
collect
(
toList
())));
for
(
Units
unit
:
unitsEs
)
{
for
(
Units
unit
:
unitsEs
)
{
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
浏览文件 @
4eaf8169
...
@@ -323,7 +323,6 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
...
@@ -323,7 +323,6 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
@Override
@Override
public
Page
<
CheckStatTableVo
>
findAllStatTable
(
CheckBillSelectVo
checkBillSelectVo
)
{
public
Page
<
CheckStatTableVo
>
findAllStatTable
(
CheckBillSelectVo
checkBillSelectVo
)
{
//过滤出顶级节点 过滤逻辑是1.自己就是父节点2.自己的customInfo = exam or check
//过滤出顶级节点 过滤逻辑是1.自己就是父节点2.自己的customInfo = exam or check
List
<
TaskBto
>
topStatList
=
taskService
.
findBillType
(
7
);
List
<
TaskBto
>
topStatList
=
taskService
.
findBillType
(
7
);
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
4eaf8169
...
@@ -51,7 +51,6 @@ import static java.util.stream.Collectors.*;
...
@@ -51,7 +51,6 @@ import static java.util.stream.Collectors.*;
* @author Matrix <xhyrzldf@gmail.com>
* @author Matrix <xhyrzldf@gmail.com>
* @since 2020/8/17 at 8:45 下午
* @since 2020/8/17 at 8:45 下午
*/
*/
@SuppressWarnings
(
"ALL"
)
@Slf4j
@Slf4j
@Component
@Component
public
class
ObjTransUtil
{
public
class
ObjTransUtil
{
...
@@ -148,9 +147,9 @@ public class ObjTransUtil {
...
@@ -148,9 +147,9 @@ public class ObjTransUtil {
childTask
=
childTask
.
stream
()
childTask
=
childTask
.
stream
()
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据待办任务"
))
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据待办任务"
))
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据确认任务"
))
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据确认任务"
))
.
collect
(
groupingBy
(
Task:
:
getOwnUnit
,
//
.collect(groupingBy(Task::getOwnUnit,
collectingAndThen
(
maxBy
(
Comparator
.
comparing
(
Task:
:
getId
)),
Optional:
:
get
)))
//
collectingAndThen(maxBy(Comparator.comparing(Task::getId)), Optional::get)))
.
values
().
stream
()
//
.values().stream()
.
collect
(
toList
());
.
collect
(
toList
());
long
total
=
childTask
.
size
();
long
total
=
childTask
.
size
();
...
@@ -171,7 +170,12 @@ public class ObjTransUtil {
...
@@ -171,7 +170,12 @@ public class ObjTransUtil {
}
else
{
}
else
{
// confirmTaskidDone 为true 代表此时等待最后的father任务 为false代表 flag = false 且isDone为false 代表整个节点里没有确认节点直接完结
// confirmTaskidDone 为true 代表此时等待最后的father任务 为false代表 flag = false 且isDone为false 代表整个节点里没有确认节点直接完结
if
(
fatherTask
.
getBillStatus
().
equals
(
END
.
id
)
||
fatherTask
.
getBillStatus
().
equals
(
CHECK_SHUT_DOWN
.
id
))
{
if
(
fatherTask
.
getBillStatus
().
equals
(
END
.
id
)
||
fatherTask
.
getBillStatus
().
equals
(
CHECK_SHUT_DOWN
.
id
))
{
completion
=
"核查完成"
;
if
(
stat
.
getCheckType
()
==
CheckType
.
CT_CHECK
)
{
completion
=
"核查完成"
;
}
else
{
completion
=
"检查完成"
;
}
}
else
{
}
else
{
completion
=
"核查完成待办结"
;
completion
=
"核查完成待办结"
;
}
}
...
...
dev-train/src/main/java/com/tykj/dev/device/train/service/impl/TestPaperServiceImpl.java
浏览文件 @
4eaf8169
...
@@ -133,10 +133,10 @@ public class TestPaperServiceImpl implements TestPaperService {
...
@@ -133,10 +133,10 @@ public class TestPaperServiceImpl implements TestPaperService {
@Override
@Override
public
TestPaper
generateTestPaper
(
GenerateTestPaper
generateTestPaper
)
{
public
TestPaper
generateTestPaper
(
GenerateTestPaper
generateTestPaper
)
{
TestPaper
testPaper
=
new
TestPaper
();
TestPaper
testPaper
=
new
TestPaper
();
// testPaper.setChooseProblemList(problemService.findByTypeAndLevel(1,1));
// testPaper.setChooseProblemList(problemService.find
All
ByTypeAndLevel(1,1));
// testPaper.setJudgeProblemList(problemService.findByTypeAndLevel(2,1));
// testPaper.setJudgeProblemList(problemService.find
All
ByTypeAndLevel(2,1));
// testPaper.setMultipleChoiceProblemList(problemService.findByTypeAndLevel(4,1));
// testPaper.setMultipleChoiceProblemList(problemService.find
All
ByTypeAndLevel(4,1));
// testPaper.setShortAnswerProblemList(problemService.findByTypeAndLevel(3,1));
// testPaper.setShortAnswerProblemList(problemService.find
All
ByTypeAndLevel(3,1));
// generateTestPaper.
// generateTestPaper.
List
<
ProblemVo
>
chooseList
=
new
ArrayList
<>();
List
<
ProblemVo
>
chooseList
=
new
ArrayList
<>();
List
<
ProblemVo
>
judgeProblemList
=
new
ArrayList
<>();
List
<
ProblemVo
>
judgeProblemList
=
new
ArrayList
<>();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论