Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
d86f1bba
提交
d86f1bba
authored
12月 10, 2021
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(任务、丢失、清退): 修改涉及单位等级为1的问题修改
修改涉及单位等级为1的问题修改
上级
4ad27adb
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
25 行增加
和
21 行删除
+25
-21
LossBillServiceImpl.java
...ykj/dev/device/loss/service/impl/LossBillServiceImpl.java
+4
-4
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+2
-2
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+12
-10
TrainJobController.java
.../tykj/dev/device/train/controller/TrainJobController.java
+1
-1
TrainThemeServiceImpl.java
.../dev/device/train/service/impl/TrainThemeServiceImpl.java
+3
-1
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+3
-3
没有找到文件。
dev-loss/src/main/java/com/tykj/dev/device/loss/service/impl/LossBillServiceImpl.java
浏览文件 @
d86f1bba
...
...
@@ -95,9 +95,9 @@ public class LossBillServiceImpl implements LossBillService {
Units
units
=
unitsService
.
findById
(
deviceLoss
.
getUnitId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
TaskBto
taskBto
;
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
taskBto
=
end
(
deviceLossThis
.
getCreateUserId
(),
deviceLossThis
.
getId
(),
units
.
getName
()
+
"丢失装备任务"
,
units
.
getUnitId
());
}
else
if
(
units
.
getLevel
()==
2
){
}
else
if
(
units
.
getLevel
()==
2
||
units
.
getType
()==
2
){
Units
parentUnits
=
unitsService
.
findUnitAreaId
(
area
.
getFatherId
());
taskBto
=
newLossCityTask
(
parentUnits
.
getUnitId
(),
deviceLossThis
.
getId
(),
units
.
getName
()
+
"丢失装备任务"
,
securityUser
.
getCurrentUserInfo
().
getUserId
());
}
else
{
...
...
@@ -159,10 +159,10 @@ public class LossBillServiceImpl implements LossBillService {
Units
units
=
unitsService
.
findById
(
deviceLoss
.
getUnitId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
TaskBto
taskBto
;
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
taskBto
=
endRetrieve
(
deviceLossThis
.
getCreateUserId
(),
deviceLossThis
.
getId
(),
units
.
getName
()
+
"找回装备任务"
,
units
.
getUnitId
());
deviceLibraryService
.
upDateLeftStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
,
deviceLoss
.
getDevIdsList
());
}
else
if
(
units
.
getLevel
()==
2
){
}
else
if
(
units
.
getLevel
()==
2
||
units
.
getType
()==
2
){
Units
parentUnits
=
unitsService
.
findUnitAreaId
(
area
.
getFatherId
());
taskBto
=
newRetrieveCityTask
(
parentUnits
.
getUnitId
(),
deviceLossThis
.
getId
(),
units
.
getName
()
+
"找回装备任务"
,
securityUser
.
getCurrentUserInfo
().
getUserId
());
}
else
{
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
d86f1bba
...
...
@@ -995,7 +995,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setRepelStatus
(
2
);
repelTaskStatistical
.
setTaskStatus
(
1
);
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
deviceLibraryService
.
upDateLeftStatusAndUnitNameAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
else
{
deviceLibraryService
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
,
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
...
...
@@ -1024,7 +1024,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
else
{
repelTaskStatistical
.
setTaskStatus
(
1
);
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()
==
1
)
{
deviceLibraryService
.
upDateLeftStatusAndUnitNameAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
else
{
deviceLibraryService
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
SEND_BACK
.
id
,
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
d86f1bba
...
...
@@ -16,6 +16,7 @@ import com.tykj.dev.device.task.subject.domin.TaskLog;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.utils.TaskUtils
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
...
...
@@ -93,6 +94,9 @@ public class TaskServiceImpl implements TaskService {
@Autowired
UnitsDao
unitsDao
;
@Autowired
UnitsCache
unitsCache
;
@Override
public
Task
deleteById
(
Task
task
)
{
...
...
@@ -625,21 +629,20 @@ public class TaskServiceImpl implements TaskService {
//办结 4 封存 5 全部 0 我发起的 1
if
(
num
==
4
||
num
==
5
||
num
==
1
||
num
==
0
)
{
//获取单位等级
Integer
level
=
userUtils
.
getCurrentUnitLevel
(
);
Units
unit
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
()
);
//获取该单位以及下属单位所有用户Id
List
<
Integer
>
idLists
=
userPublicService
.
findAllUserIdByUnitsName
(
userUtils
.
getCurrentUserUnitName
());
List
<
TaskUserVo
>
taskUserVos
=
new
ArrayList
<>();
//省能看到所有业务
if
(
level
==
1
)
{
if
(
unit
.
getType
()
==
1
&&
unit
.
getLevel
()==
1
)
{
taskUserVos
=
taskDao
.
findAll
(
getSelectSpecification
(
taskSelectVo
)).
stream
()
.
filter
(
taskBto
->
taskSelectVo
.
getType
()
==
null
||
taskSelectVo
.
getType
()==
1
?(
taskBto
.
getCustomInfo
()==
null
||
!
"country"
.
equals
(
taskBto
.
getCustomInfo
())):(
taskBto
.
getCustomInfo
()!=
null
&&
"country"
.
equals
(
taskBto
.
getCustomInfo
())))
.
map
(
Task:
:
parse2Bto
)
.
map
(
TaskBto:
:
toVo
)
.
collect
(
Collectors
.
toList
());
}
//市或县只能看到涉及人员和idLists有交集的
if
(
level
==
2
||
level
==
3
)
{
}
else
{
//市或县只能看到涉及人员和idLists有交集的
taskUserVos
=
taskDao
.
findAll
(
getSelectSpecification
(
taskSelectVo
)).
stream
()
.
map
(
Task:
:
parse2Bto
)
.
map
(
TaskBto:
:
toVo
)
...
...
@@ -856,22 +859,21 @@ public class TaskServiceImpl implements TaskService {
//办结 封存 全部 我发起的
if
(
num
==
4
||
num
==
5
||
num
==
1
||
num
==
0
)
{
//获取单位等级
Integer
level
=
userUtils
.
getCurrentUnitLevel
(
);
Units
units
=
unitsCache
.
findById
(
userUtils
.
getCurrentUnitId
()
);
//获取该单位以及下属单位所有用户Id
// List<Integer> idLists = userPublicService.findAllUserIdByUnitsName(userUtils.getCurrentUserUnitName());
List
<
Integer
>
idLists
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
List
<
TaskUserVo
>
taskUserVos
=
new
ArrayList
<>();
//省能看到所有业务
if
(
level
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
taskUserVos
=
taskDao
.
findAll
(
getSelectSpecification
(
taskSelectVo
)).
stream
()
.
filter
(
taskBto
->
taskSelectVo
.
getType
()
==
null
||
taskSelectVo
.
getType
()==
1
?(
taskBto
.
getCustomInfo
()==
null
||
!
"country"
.
equals
(
taskBto
.
getCustomInfo
())):(
taskBto
.
getCustomInfo
()!=
null
&&
"country"
.
equals
(
taskBto
.
getCustomInfo
())))
.
map
(
Task:
:
parse2Bto
)
.
map
(
TaskBto:
:
toVo
)
.
collect
(
Collectors
.
toList
());
}
//市或县只能看到涉及人员和idLists有交集的
if
(
level
==
2
||
level
==
3
)
{
}
else
{
//市或县只能看到涉及人员和idLists有交集的
taskUserVos
=
taskDao
.
findAll
(
getSelectSpecification
(
taskSelectVo
)).
stream
()
.
map
(
Task:
:
parse2Bto
)
.
map
(
TaskBto:
:
toVo
)
...
...
dev-train/src/main/java/com/tykj/dev/device/train/controller/TrainJobController.java
浏览文件 @
d86f1bba
...
...
@@ -183,7 +183,7 @@ public class TrainJobController {
taskService
.
start
(
taskBto
);
}
);
if
(
securityUser
.
getCurrentUserInfo
().
getUnits
().
getLevel
()==
1
){
if
(
securityUser
.
getCurrentUserInfo
().
getUnits
().
getLevel
()==
1
&&
securityUser
.
getCurrentUserInfo
().
getUnits
().
getType
()==
1
){
List
<
Integer
>
userIds
=
userService
.
findAllByUnite
(
securityUser
.
getCurrentUserInfo
().
getUnitsId
()).
stream
().
map
(
User:
:
getUserId
).
collect
(
Collectors
.
toList
());
userIds
.
remove
(
securityUser
.
getCurrentUserInfo
().
getUserId
());
messageService
.
add
(
new
MessageBto
(
task
.
getId
(),
BusinessEnum
.
TRAIN
.
id
,
"发起"
+(
trainTheme
.
getTrainType
()==
0
?
"线上"
:
"线下"
)+
"培训业务:【"
+
messageToString
(
trainTheme
)+
"】"
,
userIds
,
trainTheme
.
getTrainId
().
toString
()));
...
...
dev-train/src/main/java/com/tykj/dev/device/train/service/impl/TrainThemeServiceImpl.java
浏览文件 @
d86f1bba
...
...
@@ -352,8 +352,10 @@ public class TrainThemeServiceImpl implements TrainThemeService {
predicateBuilder
.
lt
(
"createTime"
,
conditionsTrainVo
.
getEndTime
());
}
Units
units
=
unitsCache
.
findById
(
conditionsTrainVo
.
getUnitId
());
if
(
units
.
getLevel
()!=
1
){
if
(
units
.
getLevel
()
!=
1
){
predicateBuilder
.
eq
(
"unitsId"
,
conditionsTrainVo
.
getUnitId
());
}
if
(
conditionsTrainVo
.
getDimName
()
!=
null
)
{
Class
<
TrainTheme
>
trainThemeClass
=
TrainTheme
.
class
;
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
d86f1bba
...
...
@@ -197,7 +197,7 @@ public class UnitsServiceImpl implements UnitsService {
Units
units
=
unitsDao
.
findById
(
unitsId
).
get
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
filter
(
area
->
area
.
getType
()
<=
3
).
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Units
>
units1
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
units1
.
add
(
units
);
units1
.
addAll
(
unitsDao
.
findAllByType
(
2
));
}
...
...
@@ -209,7 +209,7 @@ public class UnitsServiceImpl implements UnitsService {
Units
units
=
unitsDao
.
findById
(
unitsId
).
get
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
filter
(
area
->
area
.
getType
()
<=
3
).
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Units
>
units1
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
if
(
units
.
getLevel
()==
1
){
if
(
units
.
getLevel
()==
1
&&
units
.
getType
()==
1
){
units1
.
addAll
(
unitsDao
.
findAllByType
(
2
));
}
units1
.
add
(
units
);
...
...
@@ -221,7 +221,7 @@ public class UnitsServiceImpl implements UnitsService {
Units
units
=
unitsDao
.
findById
(
unitsId
).
get
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
filter
(
area
->
area
.
getType
()
<=
3
).
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Units
>
units1
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
if
(
units
.
getLevel
()
==
1
)
{
if
(
units
.
getLevel
()
==
1
&&
units
.
getType
()==
1
)
{
// units1.add(units);
units1
.
addAll
(
unitsDao
.
findAllByType
(
2
));
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论