Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
85450c1d
提交
85450c1d
authored
2月 03, 2021
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块] 修复了两级核查与三级核查相关的BUG
上级
1c8a5e4f
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
80 行增加
和
41 行删除
+80
-41
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+2
-0
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+0
-0
DeviceCheckStat.java
...ev/device/confirmcheck/entity/domain/DeviceCheckStat.java
+2
-2
CheckDeviceStatVo.java
.../dev/device/confirmcheck/entity/vo/CheckDeviceStatVo.java
+12
-9
CheckStatVo.java
...m/tykj/dev/device/confirmcheck/entity/vo/CheckStatVo.java
+4
-3
ConfirmCheckServiceImpl.java
...ce/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
+7
-7
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+10
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+43
-20
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
85450c1d
...
@@ -150,6 +150,8 @@ public enum LogType {
...
@@ -150,6 +150,8 @@ public enum LogType {
CONFIRM_CHECK_EXAM_DETAIL_3
(
419
,
CONFIRM_CHECK_DETAIL
.
id
,
CHECK_EXAM_DETAIL_1
.
id
,
CHECK_EXAM_DETAIL_0
.
id
,
"B岗审核失败,跳回A岗人员操作"
),
CONFIRM_CHECK_EXAM_DETAIL_3
(
419
,
CONFIRM_CHECK_DETAIL
.
id
,
CHECK_EXAM_DETAIL_1
.
id
,
CHECK_EXAM_DETAIL_0
.
id
,
"B岗审核失败,跳回A岗人员操作"
),
CONFIRM_CHECK_EXAM_STAT_3
(
420
,
CONFIRM_CHECK_DETAIL
.
id
,
CHECK_EXAM_STAT_0
.
id
,
END
.
id
,
"检查统计任务数据已确认完毕,任务完结"
),
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起装备退回"
),
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起装备退回"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"退回装备接收成功"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"退回装备接收成功"
),
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
85450c1d
差异被折叠。
点击展开。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/domain/DeviceCheckStat.java
浏览文件 @
85450c1d
...
@@ -102,12 +102,12 @@ public class DeviceCheckStat extends BaseEntity {
...
@@ -102,12 +102,12 @@ public class DeviceCheckStat extends BaseEntity {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
DeviceCheckStat
(
CheckType
checkType
,
String
title
,
String
subtitle
,
String
statInfo
,
Integer
checkUserAId
,
Integer
checkUserBId
,
String
remark
)
{
public
DeviceCheckStat
(
CheckType
checkType
,
String
title
,
String
subtitle
,
String
statInfo
,
Integer
checkUserAId
,
Integer
checkUserBId
,
String
remark
,
LocalDateTime
endTime
)
{
this
.
checkType
=
checkType
;
this
.
checkType
=
checkType
;
this
.
title
=
title
;
this
.
title
=
title
;
this
.
subtitle
=
subtitle
;
this
.
subtitle
=
subtitle
;
this
.
startTime
=
LocalDateTime
.
now
();
this
.
startTime
=
LocalDateTime
.
now
();
this
.
endTime
=
LocalDateTime
.
now
().
plusMonths
(
1
)
;
this
.
endTime
=
endTime
;
this
.
statInfo
=
statInfo
;
this
.
statInfo
=
statInfo
;
this
.
checkUserAId
=
checkUserAId
;
this
.
checkUserAId
=
checkUserAId
;
this
.
checkUserBId
=
checkUserBId
;
this
.
checkUserBId
=
checkUserBId
;
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckDeviceStatVo.java
浏览文件 @
85450c1d
...
@@ -70,7 +70,7 @@ public class CheckDeviceStatVo implements Cloneable {
...
@@ -70,7 +70,7 @@ public class CheckDeviceStatVo implements Cloneable {
}
}
/**
/**
* 累加装备统计数据(相同型号),并将其下面各个地区的统计信息合并(次级地区会强制更改为{cityName})
* 累加装备统计数据(相同型号
&名字
),并将其下面各个地区的统计信息合并(次级地区会强制更改为{cityName})
* 多用于装备统计数据中既附带区又附带市的统计信息,想全部合并为市的操作(为了统一给省级单位查看统计数据)
* 多用于装备统计数据中既附带区又附带市的统计信息,想全部合并为市的操作(为了统一给省级单位查看统计数据)
* <li>将所有地区全部改名为市级地区</li>
* <li>将所有地区全部改名为市级地区</li>
* <li>合并所有数据</li>
* <li>合并所有数据</li>
...
@@ -80,8 +80,9 @@ public class CheckDeviceStatVo implements Cloneable {
...
@@ -80,8 +80,9 @@ public class CheckDeviceStatVo implements Cloneable {
* @return 合并后的装备统计对象,基于深拷贝的新对象
* @return 合并后的装备统计对象,基于深拷贝的新对象
*/
*/
public
CheckDeviceStatVo
reduce
(
CheckDeviceStatVo
other
,
String
cityName
,
Integer
cityStatId
)
{
public
CheckDeviceStatVo
reduce
(
CheckDeviceStatVo
other
,
String
cityName
,
Integer
cityStatId
)
{
if
(!
deviceModel
.
equals
(
other
.
deviceModel
))
{
boolean
flag
=
deviceModel
.
equals
(
other
.
deviceModel
)
&&
deviceName
.
equals
(
other
.
deviceName
);
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号的装备"
);
if
(!
flag
)
{
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号与名字的装备"
);
}
}
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
mergeVo
.
deviceCount
+=
other
.
deviceCount
;
mergeVo
.
deviceCount
+=
other
.
deviceCount
;
...
@@ -95,11 +96,12 @@ public class CheckDeviceStatVo implements Cloneable {
...
@@ -95,11 +96,12 @@ public class CheckDeviceStatVo implements Cloneable {
*
*
* @param other 要合并的装备统计信息
* @param other 要合并的装备统计信息
* @return 合并后的装备统计信息对相关,基于深拷贝
* @return 合并后的装备统计信息对相关,基于深拷贝
* @throws IllegalArgumentException 累加的统计信息对象必须是相同型号的装备
* @throws IllegalArgumentException 累加的统计信息对象必须是相同型号
与名字
的装备
*/
*/
public
CheckDeviceStatVo
reduce
(
CheckDeviceStatVo
other
)
{
public
CheckDeviceStatVo
reduce
(
CheckDeviceStatVo
other
)
{
if
(!
deviceModel
.
equals
(
other
.
getDeviceModel
()))
{
boolean
flag
=
deviceModel
.
equals
(
other
.
getDeviceModel
())
&&
deviceName
.
equals
(
other
.
getDeviceName
());
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号的装备"
);
if
(!
flag
)
{
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号与名字的装备"
);
}
}
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
...
@@ -130,11 +132,12 @@ public class CheckDeviceStatVo implements Cloneable {
...
@@ -130,11 +132,12 @@ public class CheckDeviceStatVo implements Cloneable {
*
*
* @param other 要合并的装备统计信息
* @param other 要合并的装备统计信息
* @return 合并后的装备统计信息对相关,基于深拷贝
* @return 合并后的装备统计信息对相关,基于深拷贝
* @throws IllegalArgumentException 累加的统计信息对象必须是相同型号的装备
* @throws IllegalArgumentException 累加的统计信息对象必须是相同型号
与名字
的装备
*/
*/
public
CheckDeviceStatVo
cleanReduce
(
CheckDeviceStatVo
other
)
{
public
CheckDeviceStatVo
cleanReduce
(
CheckDeviceStatVo
other
)
{
if
(!
deviceModel
.
equals
(
other
.
getDeviceModel
()))
{
boolean
flag
=
deviceModel
.
equals
(
other
.
getDeviceModel
())
&&
deviceName
.
equals
(
other
.
getDeviceName
());
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号的装备"
);
if
(!
flag
)
{
throw
new
IllegalArgumentException
(
"累加的统计信息对象必须是相同型号且名称相同的装备"
);
}
}
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
CheckDeviceStatVo
mergeVo
=
new
CheckDeviceStatVo
(
this
);
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckStatVo.java
浏览文件 @
85450c1d
...
@@ -110,13 +110,14 @@ public class CheckStatVo {
...
@@ -110,13 +110,14 @@ public class CheckStatVo {
return
this
;
return
this
;
}
}
//map key deviceModel+deviceName
Map
<
String
,
CheckDeviceStatVo
>
oriModelMap
=
deviceStatVoList
.
stream
()
Map
<
String
,
CheckDeviceStatVo
>
oriModelMap
=
deviceStatVoList
.
stream
()
.
collect
(
Collectors
.
toMap
(
CheckDeviceStatVo:
:
getDeviceModel
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
d
->
d
.
getDeviceModel
()+
d
.
getDeviceName
()
,
Function
.
identity
()));
//遍历要加入的LIST 如果在源数据map中寻找到了则累加,否则添加进去
//遍历要加入的LIST 如果在源数据map中寻找到了则累加,否则添加进去
for
(
CheckDeviceStatVo
vo
:
otherList
)
{
for
(
CheckDeviceStatVo
vo
:
otherList
)
{
oriModelMap
.
computeIfPresent
(
vo
.
getDeviceModel
(),
(
k
,
v
)
->
v
.
cleanReduce
(
vo
));
oriModelMap
.
computeIfPresent
(
vo
.
getDeviceModel
()
+
vo
.
getDeviceName
()
,
(
k
,
v
)
->
v
.
cleanReduce
(
vo
));
oriModelMap
.
putIfAbsent
(
vo
.
getDeviceModel
(),
vo
);
oriModelMap
.
putIfAbsent
(
vo
.
getDeviceModel
()
+
vo
.
getDeviceName
()
,
vo
);
}
}
deviceStatVoList
=
new
ArrayList
<>(
oriModelMap
.
values
());
deviceStatVoList
=
new
ArrayList
<>(
oriModelMap
.
values
());
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/service/impl/ConfirmCheckServiceImpl.java
浏览文件 @
85450c1d
...
@@ -251,17 +251,17 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
...
@@ -251,17 +251,17 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
List
<
CheckDeviceStatVo
>
countyVo
=
regionMap
.
get
(
true
);
List
<
CheckDeviceStatVo
>
countyVo
=
regionMap
.
get
(
true
);
// 市级数据
// 市级数据
Map
<
String
,
CheckDeviceStatVo
>
map
=
regionMap
.
get
(
false
).
stream
()
Map
<
String
,
CheckDeviceStatVo
>
map
=
regionMap
.
get
(
false
).
stream
()
.
collect
(
toMap
(
CheckDeviceStatVo:
:
getDeviceModel
,
Function
.
identity
()));
.
collect
(
toMap
(
d
->
d
.
getDeviceModel
()+
d
.
getDeviceName
()
,
Function
.
identity
()));
//查找区域数据内的父级地区(即市),将数据count数据add进去(通过两次get),将areaList数据也加进去
//查找区域数据内的父级地区(即市),将数据count数据add进去(通过两次get),将areaList数据也加进去
for
(
CheckDeviceStatVo
v
:
countyVo
)
{
for
(
CheckDeviceStatVo
v
:
countyVo
)
{
String
couName
=
v
.
getAreaStatList
().
get
(
0
).
getAreaName
();
String
couName
=
v
.
getAreaStatList
().
get
(
0
).
getAreaName
();
String
cityName
=
areaCache
.
findFatherByName
(
couName
).
getName
();
String
cityName
=
areaCache
.
findFatherByName
(
couName
).
getName
();
//把相同型号的区级的数据merge到市级即可,没有的话改个名加进去
//把相同型号
与名字的
的区级的数据merge到市级即可,没有的话改个名加进去
Integer
cityStatId
=
areaStatIdMap
.
get
(
cityName
);
Integer
cityStatId
=
areaStatIdMap
.
get
(
cityName
);
map
.
computeIfPresent
(
v
.
getDeviceModel
(),
(
k
,
value
)
->
value
.
reduce
(
v
,
cityName
,
cityStatId
));
map
.
computeIfPresent
(
v
.
getDeviceModel
()
+
v
.
getDeviceName
()
,
(
k
,
value
)
->
value
.
reduce
(
v
,
cityName
,
cityStatId
));
map
.
computeIfAbsent
(
v
.
getDeviceModel
(),
k
->
{
map
.
computeIfAbsent
(
v
.
getDeviceModel
()
+
v
.
getDeviceName
()
,
k
->
{
v
.
getAreaStatList
().
forEach
(
area
->
area
.
setAreaName
(
cityName
));
v
.
getAreaStatList
().
forEach
(
area
->
area
.
setAreaName
(
cityName
));
return
v
;
return
v
;
});
});
...
@@ -288,7 +288,7 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
...
@@ -288,7 +288,7 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
List
<
CheckDeviceStatVo
>
cityStatVo
=
new
ArrayList
<>();
List
<
CheckDeviceStatVo
>
cityStatVo
=
new
ArrayList
<>();
statVoListCopy2
.
stream
()
statVoListCopy2
.
stream
()
.
filter
(
stat
->
cityNames
.
contains
(
stat
.
getAreaStatList
().
get
(
0
).
getAreaName
()))
.
filter
(
stat
->
cityNames
.
contains
(
stat
.
getAreaStatList
().
get
(
0
).
getAreaName
()))
.
collect
(
Collectors
.
groupingBy
(
CheckDeviceStatVo:
:
getDeviceModel
,
reducing
(
CheckDeviceStatVo:
:
reduce
)))
.
collect
(
Collectors
.
groupingBy
(
d
->
d
.
getDeviceModel
()+
d
.
getDeviceName
()
,
reducing
(
CheckDeviceStatVo:
:
reduce
)))
.
forEach
((
k
,
v
)
->
cityStatVo
.
add
(
v
.
get
()));
.
forEach
((
k
,
v
)
->
cityStatVo
.
add
(
v
.
get
()));
csd
.
setStatInfo
(
JacksonUtil
.
toJSon
(
cityStatVo
));
csd
.
setStatInfo
(
JacksonUtil
.
toJSon
(
cityStatVo
));
}
}
...
@@ -487,8 +487,8 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
...
@@ -487,8 +487,8 @@ public class ConfirmCheckServiceImpl implements ConfirmCheckService, CommandLine
@Override
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
//开启计划任务
//开启计划任务
startAutoCheckCron
();
//
startAutoCheckCron();
log
.
info
(
"[核查模块] 初始化开启任务成功"
);
//
log.info("[核查模块] 初始化开启任务成功");
}
}
}
}
dev-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
85450c1d
...
@@ -149,6 +149,16 @@ public interface TaskService {
...
@@ -149,6 +149,16 @@ public interface TaskService {
*/
*/
boolean
TaskTreeIsOver
(
int
rootId
);
boolean
TaskTreeIsOver
(
int
rootId
);
/**
* 判断该任务节点下的所有节点是否任意一个都没有处于完结状态(即用来判断该任务树是否是初始状态)
* @param rootId task的根节点id
* @param currentIsOver 当前的child节点是否处于完结状态
* @return Task Tree 是否是初始状态
*/
boolean
TaskTreeIsStart
(
int
rootId
,
boolean
currentIsOver
);
/**
/**
* @param oldUserId 旧专管员id
* @param oldUserId 旧专管员id
* @param newUserId 新交接专管员id
* @param newUserId 新交接专管员id
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
85450c1d
...
@@ -286,7 +286,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -286,7 +286,7 @@ public class TaskServiceImpl implements TaskService {
public
TaskBto
start
(
TaskBto
taskBto
)
{
public
TaskBto
start
(
TaskBto
taskBto
)
{
Task
task
=
taskDao
.
save
(
taskBto
.
toDo
());
Task
task
=
taskDao
.
save
(
taskBto
.
toDo
());
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
CompletableFuture
.
runAsync
(()
->{
CompletableFuture
.
runAsync
(()
->
{
try
{
try
{
Thread
.
sleep
(
2000
);
Thread
.
sleep
(
2000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -336,7 +336,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -336,7 +336,7 @@ public class TaskServiceImpl implements TaskService {
public
Task
update
(
TaskBto
taskBto
)
{
public
Task
update
(
TaskBto
taskBto
)
{
taskBto
.
setUserReadDetailList
(
new
ArrayList
<>());
taskBto
.
setUserReadDetailList
(
new
ArrayList
<>());
Task
task
=
taskDao
.
save
(
taskBto
.
toDo
());
Task
task
=
taskDao
.
save
(
taskBto
.
toDo
());
CompletableFuture
.
runAsync
(()
->
blockChainUtil
.
appendHash
(
JacksonUtil
.
toJSon
(
taskBto
.
toDo
()),
taskBto
.
getRecordId
()),
TaskBeanConfig
.
getThreadPoolTaskScheduler
());
CompletableFuture
.
runAsync
(()
->
blockChainUtil
.
appendHash
(
JacksonUtil
.
toJSon
(
taskBto
.
toDo
()),
taskBto
.
getRecordId
()),
TaskBeanConfig
.
getThreadPoolTaskScheduler
());
return
task
;
return
task
;
}
}
...
@@ -365,7 +365,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -365,7 +365,7 @@ public class TaskServiceImpl implements TaskService {
@Override
@Override
public
List
<
TaskUserVo
>
getList
(
TaskSelectVo
taskSelectVo
)
{
public
List
<
TaskUserVo
>
getList
(
TaskSelectVo
taskSelectVo
)
{
List
<
TaskUserVo
>
taskEntities
=
getTaskUserVoList
(
taskSelectVo
);
List
<
TaskUserVo
>
taskEntities
=
getTaskUserVoList
(
taskSelectVo
);
if
(
taskSelectVo
.
getOrders
().
size
()
>
0
)
{
if
(
taskSelectVo
.
getOrders
().
size
()
>
0
)
{
//根据vo待办和跟踪时间的查询顺序按顺序或降序排序输出
//根据vo待办和跟踪时间的查询顺序按顺序或降序排序输出
if
(
taskSelectVo
.
getSelectNum
()
==
2
&&
"trackingTime"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getCoulmn
()))
{
if
(
taskSelectVo
.
getSelectNum
()
==
2
&&
"trackingTime"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getCoulmn
()))
{
if
(
"ASC"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getDirection
().
toString
()))
{
if
(
"ASC"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getDirection
().
toString
()))
{
...
@@ -406,7 +406,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -406,7 +406,7 @@ public class TaskServiceImpl implements TaskService {
.
filter
(
taskUserVo
->
find
(
taskUserVo
.
getId
(),
list
)
>
-
1
)
.
filter
(
taskUserVo
->
find
(
taskUserVo
.
getId
(),
list
)
>
-
1
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//判断是否需要按发起时间排序
//判断是否需要按发起时间排序
if
(
taskSelectVo
.
getOrders
().
size
()
>
0
)
{
if
(
taskSelectVo
.
getOrders
().
size
()
>
0
)
{
if
(
"createTime"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getCoulmn
()))
{
if
(
"createTime"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getCoulmn
()))
{
if
(
"ASC"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getDirection
().
toString
()))
{
if
(
"ASC"
.
equals
(
taskSelectVo
.
getOrders
().
get
(
0
).
getDirection
().
toString
()))
{
return
taskUtils
.
orderByCreateTimeAsc2
(
taskUserVos
);
return
taskUtils
.
orderByCreateTimeAsc2
(
taskUserVos
);
...
@@ -446,25 +446,24 @@ public class TaskServiceImpl implements TaskService {
...
@@ -446,25 +446,24 @@ public class TaskServiceImpl implements TaskService {
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
//获取涉及人员当前指针
//获取涉及人员当前指针
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()
<
userIds
.
size
())
{
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()
<
userIds
.
size
())
{
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
//当前指针userId大于0,待办人即当前id
//当前指针userId大于0,待办人即当前id
if
(
userId3
>
0
)
{
if
(
userId3
>
0
)
{
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
}
}
//当前指针userId等于0,待办人为所属单位下所有用户
//当前指针userId等于0,待办人为所属单位下所有用户
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()!=
null
)
{
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()
!=
null
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
List
<
User
>
users
=
userCache
.
findAll
();
List
<
User
>
users
=
userCache
.
findAll
();
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
});
});
if
(
stringBuffer
.
length
()
>
0
)
{
if
(
stringBuffer
.
length
()
>
0
)
{
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
}
}
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
}
}
else
{
else
{
taskUserVo
.
setProcessingUser
(
""
);
taskUserVo
.
setProcessingUser
(
""
);
}
}
}
}
...
@@ -520,7 +519,6 @@ public class TaskServiceImpl implements TaskService {
...
@@ -520,7 +519,6 @@ public class TaskServiceImpl implements TaskService {
@Override
@Override
public
boolean
TaskTreeIsOver
(
int
rootId
)
{
public
boolean
TaskTreeIsOver
(
int
rootId
)
{
List
<
Task
>
taskList
=
taskDao
.
findAllByParentTaskId
(
rootId
);
List
<
Task
>
taskList
=
taskDao
.
findAllByParentTaskId
(
rootId
);
if
(
CollectionUtils
.
isEmpty
(
taskList
))
{
if
(
CollectionUtils
.
isEmpty
(
taskList
))
{
return
true
;
return
true
;
}
else
{
}
else
{
...
@@ -529,6 +527,32 @@ public class TaskServiceImpl implements TaskService {
...
@@ -529,6 +527,32 @@ public class TaskServiceImpl implements TaskService {
}
}
}
}
/**
* 判断该任务节点下的下一级节点是否任意一个都没有处于完结状态(即用来判断该任务树是否是初始状态)
*
* @param rootId task的根节点id
* @return Task Tree 是否是初始状态
*/
@Override
public
boolean
TaskTreeIsStart
(
int
rootId
,
boolean
currentIsOver
)
{
List
<
Task
>
taskList
=
taskDao
.
findAllByParentTaskId
(
rootId
);
if
(
CollectionUtils
.
isEmpty
(
taskList
))
{
return
false
;
}
else
{
long
overJobCount
=
taskList
.
stream
()
.
filter
(
task
->
task
.
getBillStatus
().
equals
(
StatusEnum
.
END
.
id
))
.
count
();
//如果当前任务是完结的,那么完结数量等于1就证明是初始状态,否则必须为0
if
(
currentIsOver
)
{
return
overJobCount
==
1
;
}
else
{
return
overJobCount
==
0
;
}
}
}
/**
/**
* @param oldUserId 旧专管员id
* @param oldUserId 旧专管员id
* @param newUserId 新交接专管员id
* @param newUserId 新交接专管员id
...
@@ -639,7 +663,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -639,7 +663,7 @@ public class TaskServiceImpl implements TaskService {
boolean
userConfirm2
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
-
1
;
boolean
userConfirm2
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
-
1
;
boolean
pointExists
=
taskBto
.
getCurrentPoint
()
<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
pointExists
=
taskBto
.
getCurrentPoint
()
<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
isDraft
=
taskBto
.
getBillStatus
()
==
201
||
taskBto
.
getBillStatus
()==
333
||
taskBto
.
getBillStatus
()==
810
||
taskBto
.
getBillStatus
()==
322
||
taskBto
.
getBillStatus
()==
722
;
boolean
isDraft
=
taskBto
.
getBillStatus
()
==
201
||
taskBto
.
getBillStatus
()
==
333
||
taskBto
.
getBillStatus
()
==
810
||
taskBto
.
getBillStatus
()
==
322
||
taskBto
.
getBillStatus
()
==
722
;
boolean
isCreateUser
=
userId
.
equals
(
taskBto
.
getCreateUserId
());
boolean
isCreateUser
=
userId
.
equals
(
taskBto
.
getCreateUserId
());
return
unitExists
&&
pointExists
&&
!
userConfirm
&&
!
userConfirm2
&&
!
isDraft
&&
isCreateUser
;
return
unitExists
&&
pointExists
&&
!
userConfirm
&&
!
userConfirm2
&&
!
isDraft
&&
isCreateUser
;
})
})
...
@@ -696,25 +720,24 @@ public class TaskServiceImpl implements TaskService {
...
@@ -696,25 +720,24 @@ public class TaskServiceImpl implements TaskService {
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
//获取涉及人员当前指针
//获取涉及人员当前指针
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()
<
userIds
.
size
())
{
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()
<
userIds
.
size
())
{
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
//当前指针userId大于0,待办人即当前id
//当前指针userId大于0,待办人即当前id
if
(
userId3
>
0
)
{
if
(
userId3
>
0
)
{
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
taskUserVo
.
setProcessingUser
(
userCache
.
findById
(
userId3
).
getName
());
}
}
//当前指针userId等于0,待办人为所属单位下所有用户
//当前指针userId等于0,待办人为所属单位下所有用户
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()!=
null
)
{
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()
!=
null
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
List
<
User
>
users
=
userCache
.
findAll
();
List
<
User
>
users
=
userCache
.
findAll
();
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
});
});
if
(
stringBuffer
.
length
()
>
0
)
{
if
(
stringBuffer
.
length
()
>
0
)
{
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
}
}
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
}
}
else
{
else
{
taskUserVo
.
setProcessingUser
(
""
);
taskUserVo
.
setProcessingUser
(
""
);
}
}
}
}
...
@@ -828,10 +851,10 @@ public class TaskServiceImpl implements TaskService {
...
@@ -828,10 +851,10 @@ public class TaskServiceImpl implements TaskService {
* @param userIds 用户Id列表
* @param userIds 用户Id列表
* @return 返回存在这些用户的单位
* @return 返回存在这些用户的单位
*/
*/
private
Set
<
Integer
>
getUnitsByUsers
(
List
<
Integer
>
userIds
){
private
Set
<
Integer
>
getUnitsByUsers
(
List
<
Integer
>
userIds
)
{
Set
<
Integer
>
unitIds
=
new
HashSet
<>();
Set
<
Integer
>
unitIds
=
new
HashSet
<>();
userIds
.
forEach
(
integer
->
{
userIds
.
forEach
(
integer
->
{
if
(
integer
>
0
)
{
if
(
integer
>
0
)
{
unitIds
.
add
(
userCache
.
findById
(
integer
).
getUnitsId
());
unitIds
.
add
(
userCache
.
findById
(
integer
).
getUnitsId
());
}
}
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论