Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
99bb2aad
提交
99bb2aad
authored
6月 21, 2021
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块] 逾期,丢失,销毁,任务数量统计bug fix
上级
d6f71b75
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
63 行增加
和
39 行删除
+63
-39
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+58
-37
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+5
-2
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
99bb2aad
...
@@ -157,17 +157,27 @@ public class DeviceCheckController {
...
@@ -157,17 +157,27 @@ public class DeviceCheckController {
String
checkUnit
=
detail
.
getCheckUnit
();
String
checkUnit
=
detail
.
getCheckUnit
();
//查出所有装备 分为4类 A 所在是本单位 B 所属是本单位 其中
//查出所有装备 分为4类 A 所在是本单位 B 所属是本单位 其中
List
<
DeviceLibrary
>
allDevices
=
deviceRepo
.
findAll
();
List
<
DeviceLibrary
>
allDevices
=
deviceRepo
.
findAll
();
//在库 = A and B & not B
//在库 = A and B & not B
去除掉ls = 10 的装备 把ls = 11 的装备加入到非在库
Map
<
Boolean
,
List
<
DeviceLibrary
>>
locationMap
=
allDevices
.
stream
()
Map
<
Boolean
,
List
<
DeviceLibrary
>>
locationMap
=
allDevices
.
stream
()
.
collect
(
partitioningBy
(
d
->
d
.
getLocationUnit
().
equals
(
checkUnit
)));
.
collect
(
partitioningBy
(
d
->
d
.
getLocationUnit
().
equals
(
checkUnit
)));
List
<
DeviceLibrary
>
devInLib
=
locationMap
.
get
(
true
);
List
<
DeviceLibrary
>
devInLib
=
locationMap
.
get
(
true
);
// filter ls == 11 join to 非在库
List
<
DeviceLibrary
>
ls11Lib
=
devInLib
.
stream
().
filter
(
d
->
d
.
getLifeStatus
()
==
11
).
collect
(
toList
());
// filter ls == 10
devInLib
=
devInLib
.
stream
()
.
filter
(
d
->
d
.
getLifeStatus
()
!=
10
&&
d
.
getLifeStatus
()
!=
11
)
.
collect
(
toList
());
// 非在库 = not A and in B
// 非在库 = not A and in B
List
<
DeviceLibrary
>
devNotInLib
=
locationMap
.
get
(
false
)
List
<
DeviceLibrary
>
devNotInLib
=
locationMap
.
get
(
false
)
.
stream
().
filter
(
d
->
d
.
getOwnUnit
().
equals
(
checkUnit
))
.
stream
().
filter
(
d
->
d
.
getOwnUnit
().
equals
(
checkUnit
))
.
collect
(
toList
());
.
collect
(
toList
());
devNotInLib
.
addAll
(
ls11Lib
);
// 更新detail
// 更新detail
detail
.
updateDevice
(
devInLib
,
devNotInLib
);
detail
.
updateDevice
(
devInLib
,
devNotInLib
);
...
@@ -206,8 +216,14 @@ public class DeviceCheckController {
...
@@ -206,8 +216,14 @@ public class DeviceCheckController {
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
long
finalTime
=
System
.
currentTimeMillis
();
long
finalTime
=
System
.
currentTimeMillis
();
for
(
Task
child
:
childTask
)
{
for
(
Task
child
:
childTask
)
{
// 将子节点任务中的 统计数据确认任务 给过滤掉
if
(
child
.
getTitle
().
contains
(
"统计数据确认任务"
))
{
continue
;
}
Integer
childBusType
=
child
.
getBusinessType
();
Integer
childBusType
=
child
.
getBusinessType
();
Integer
childBusId
=
child
.
getBillId
();
Integer
childBusId
=
child
.
getBillId
();
// 处理子节点,子节点有两种类型 - 检查类统计与自查类数据
// 处理子节点,子节点有两种类型 - 检查类统计与自查类数据
if
(
childBusType
.
equals
(
CONFIRM_CHECK_STAT
.
id
))
{
if
(
childBusType
.
equals
(
CONFIRM_CHECK_STAT
.
id
))
{
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
...
@@ -387,26 +403,33 @@ public class DeviceCheckController {
...
@@ -387,26 +403,33 @@ public class DeviceCheckController {
}
}
//核查结果
//核查结果
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
// if (endTime.isBefore(LocalDateTime.now())) {
if
(
revAreaStat
.
getComProgress
()
==
1
){
// if (revAreaStat.getComProgress() ==1){
lcd
.
setCheckResult
(
"逾期进行中"
);
// lcd.setCheckResult("逾期进行中");
}
else
if
(
task
.
getBillStatus
()
!=
9999
||
revAreaStat
.
getComProgress
()
!=
2
)
{
// }else if (task.getBillStatus() != 9999 || revAreaStat.getComProgress() != 2) {
lcd
.
setCheckResult
(
"逾期"
);
// lcd.setCheckResult("逾期");
}
else
{
// } else {
// lcd.setCheckResult("逾期完成");
// }
// } else {
if
(
task
.
getBillStatus
()
==
9999
)
{
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
lcd
.
setCheckResult
(
"逾期完成"
);
lcd
.
setCheckResult
(
"逾期完成"
);
}
}
else
{
}
else
{
if
(
task
.
getBillStatus
()
==
9999
)
{
lcd
.
setCheckResult
(
"完成"
);
lcd
.
setCheckResult
(
"完成"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
0
)
{
}
lcd
.
setCheckResult
(
"未开始"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
0
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
1
)
{
lcd
.
setCheckResult
(
"未开始"
);
lcd
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
1
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
0
)
{
lcd
.
setCheckResult
(
"进行中"
);
lcd
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
0
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
1
)
{
lcd
.
setCheckResult
(
"进行中"
);
lcd
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
1
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
)
{
lcd
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
)
{
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
lcd
.
setCheckResult
(
"逾期完成"
);
}
else
{
lcd
.
setCheckResult
(
"完成"
);
lcd
.
setCheckResult
(
"完成"
);
}
}
}
}
...
@@ -438,26 +461,24 @@ public class DeviceCheckController {
...
@@ -438,26 +461,24 @@ public class DeviceCheckController {
}
}
//核查结果
//核查结果
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
if
(
task
.
getBillStatus
()
==
9999
)
{
if
(
revAreaStat
.
getComProgress
()
==
1
){
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
led
.
setCheckResult
(
"逾期进行中"
);
}
else
if
(
task
.
getBillStatus
()
!=
9999
||
revAreaStat
.
getComProgress
()
!=
2
)
{
led
.
setCheckResult
(
"逾期"
);
}
else
{
led
.
setCheckResult
(
"逾期完成"
);
led
.
setCheckResult
(
"逾期完成"
);
}
}
else
{
}
else
{
if
(
task
.
getBillStatus
()
==
9999
)
{
led
.
setCheckResult
(
"完成"
);
led
.
setCheckResult
(
"完成"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
0
)
{
}
led
.
setCheckResult
(
"未开始"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
0
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
1
)
{
led
.
setCheckResult
(
"未开始"
);
led
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
1
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
0
)
{
led
.
setCheckResult
(
"进行中"
);
led
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
0
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
1
)
{
led
.
setCheckResult
(
"进行中"
);
led
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
&&
task
.
getBillStatus
()
%
10
==
1
)
{
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
)
{
led
.
setCheckResult
(
"进行中"
);
}
else
if
(
revAreaStat
.
getComProgress
()
==
2
)
{
if
(
endTime
.
isBefore
(
LocalDateTime
.
now
()))
{
led
.
setCheckResult
(
"逾期完成"
);
}
else
{
led
.
setCheckResult
(
"完成"
);
led
.
setCheckResult
(
"完成"
);
}
}
}
}
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
99bb2aad
...
@@ -129,6 +129,7 @@ public class ObjTransUtil {
...
@@ -129,6 +129,7 @@ public class ObjTransUtil {
// 构建完成情况参数 未完成数量/总数
// 构建完成情况参数 未完成数量/总数
// 获得当前节点的子节点总数 = 总数 其中状态为9999的为已完成
// 获得当前节点的子节点总数 = 总数 其中状态为9999的为已完成
//
TaskBto
fatherTask
=
taskService
.
get
(
stat
.
getId
(),
BusinessEnum
.
CONFIRM_CHECK_STAT
.
id
);
TaskBto
fatherTask
=
taskService
.
get
(
stat
.
getId
(),
BusinessEnum
.
CONFIRM_CHECK_STAT
.
id
);
Integer
fatherTaskId
=
fatherTask
.
getId
();
Integer
fatherTaskId
=
fatherTask
.
getId
();
...
@@ -137,7 +138,7 @@ public class ObjTransUtil {
...
@@ -137,7 +138,7 @@ public class ObjTransUtil {
boolean
flag
=
false
;
boolean
flag
=
false
;
boolean
confirmTaskisDone
=
false
;
boolean
confirmTaskisDone
=
false
;
for
(
Task
task
:
childTask
)
{
for
(
Task
task
:
childTask
)
{
if
(
task
.
getTitle
().
contains
(
"统计
确认待办
任务"
))
{
if
(
task
.
getTitle
().
contains
(
"统计
数据确认
任务"
))
{
if
(
task
.
getBillStatus
()
!=
9999
)
{
if
(
task
.
getBillStatus
()
!=
9999
)
{
flag
=
true
;
flag
=
true
;
}
else
{
}
else
{
...
@@ -148,7 +149,9 @@ public class ObjTransUtil {
...
@@ -148,7 +149,9 @@ public class ObjTransUtil {
// 3/3 -> 统计待确认 -> 省统计任务待完结
// 3/3 -> 统计待确认 -> 省统计任务待完结
childTask
=
childTask
.
stream
().
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计确认待办任务"
))
childTask
=
childTask
.
stream
()
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据待办任务"
))
.
filter
(
task
->
!
task
.
getTitle
().
contains
(
"统计数据确认任务"
))
.
collect
(
toList
());
.
collect
(
toList
());
long
total
=
childTask
.
size
();
long
total
=
childTask
.
size
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论