Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
37828098
提交
37828098
authored
10月 09, 2021
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(清退任务): 沿用老版本清退任务发起
沿用老版本清退任务发起
上级
04908b08
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
62 行增加
和
30 行删除
+62
-30
RepelTaskStatistical.java
...v/device/sendback/entity/domain/RepelTaskStatistical.java
+6
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+56
-29
没有找到文件。
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/RepelTaskStatistical.java
浏览文件 @
37828098
...
@@ -65,6 +65,10 @@ public class RepelTaskStatistical extends BaseEntity {
...
@@ -65,6 +65,10 @@ public class RepelTaskStatistical extends BaseEntity {
@ApiModelProperty
(
value
=
"区域名称"
)
@ApiModelProperty
(
value
=
"区域名称"
)
private
String
areaName
;
private
String
areaName
;
/**
* 排序
*/
private
Integer
showOrder
;
/**
/**
* 本单位需要清退装备数量
* 本单位需要清退装备数量
*/
*/
...
@@ -94,7 +98,7 @@ public class RepelTaskStatistical extends BaseEntity {
...
@@ -94,7 +98,7 @@ public class RepelTaskStatistical extends BaseEntity {
this
.
areaName
=
areaName
;
this
.
areaName
=
areaName
;
}
}
public
RepelTaskStatistical
(
Integer
repelId
,
Integer
fatherTaskId
,
Integer
taskId
,
Integer
taskStatus
,
String
areaName
,
Integer
count
,
String
des
)
{
public
RepelTaskStatistical
(
Integer
repelId
,
Integer
fatherTaskId
,
Integer
taskId
,
Integer
taskStatus
,
String
areaName
,
Integer
count
,
String
des
,
Integer
showOrder
)
{
this
.
repelId
=
repelId
;
this
.
repelId
=
repelId
;
this
.
fatherTaskId
=
fatherTaskId
;
this
.
fatherTaskId
=
fatherTaskId
;
this
.
taskId
=
taskId
;
this
.
taskId
=
taskId
;
...
@@ -102,5 +106,6 @@ public class RepelTaskStatistical extends BaseEntity {
...
@@ -102,5 +106,6 @@ public class RepelTaskStatistical extends BaseEntity {
this
.
areaName
=
areaName
;
this
.
areaName
=
areaName
;
this
.
count
=
count
;
this
.
count
=
count
;
this
.
des
=
des
;
this
.
des
=
des
;
this
.
showOrder
=
showOrder
;
}
}
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
37828098
...
@@ -118,9 +118,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -118,9 +118,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
* @param deviceRepel
* @param deviceRepel
* @param userId
* @param userId
*/
*/
//
@Override
@Override
//
@Transactional(rollbackFor = Exception.class)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
initiateRepel
1
(
DeviceRepel
deviceRepel
,
Integer
userId
)
{
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
,
SecurityUser
securityUser
)
{
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//参照选择的范围给单位都发送 市清退任务待执行
//参照选择的范围给单位都发送 市清退任务待执行
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
...
@@ -220,7 +220,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -220,7 +220,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units1
.
getName
()+
"]"
+
"型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units1
.
getName
()+
"]"
+
"型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
.
distinct
()
.
distinct
()
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
taskBto
.
getId
(),
userId
);
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
taskBto
.
getId
(),
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
,
units1
.
getShowOrder
()
));
}
}
}
}
}
else
{
}
else
{
...
@@ -239,7 +239,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -239,7 +239,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
"[省直属相关单位]型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
"[省直属相关单位]型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
.
distinct
()
.
distinct
()
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
userId
);
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
,
units
.
getShowOrder
()+
2
));
}
}
DeviceRepelDetail
deviceRepelDetail1
=
new
DeviceRepelDetail
();
DeviceRepelDetail
deviceRepelDetail1
=
new
DeviceRepelDetail
();
deviceRepelDetail1
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail1
.
setRepelId
(
deviceRepel1
.
getId
());
...
@@ -255,7 +255,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -255,7 +255,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail1
).
getId
(),
taskBto
.
getId
(),
"[省本级]型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail1
).
getId
(),
taskBto
.
getId
(),
"[省本级]型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
.
distinct
()
.
distinct
()
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
userId
);
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
,
units
.
getShowOrder
()
));
}
}
if
(
list
==
null
||
list
.
size
()
==
0
)
{
if
(
list
==
null
||
list
.
size
()
==
0
)
{
throw
new
ApiException
(
ResponseEntity
.
ok
(
"发布失败"
));
throw
new
ApiException
(
ResponseEntity
.
ok
(
"发布失败"
));
...
@@ -266,9 +266,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -266,9 +266,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
//测试版本
//测试版本
@Override
//
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
//
@Transactional(rollbackFor = Exception.class)
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
,
SecurityUser
securityUser
)
{
public
void
initiateRepel
1
(
DeviceRepel
deviceRepel
,
Integer
userId
,
SecurityUser
securityUser
)
{
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//参照选择的范围给单位都发送 市清退任务待执行
//参照选择的范围给单位都发送 市清退任务待执行
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
//如果省本身有需要清退的型号,给省自己发起一个代办任务 本级装备待清退
...
@@ -288,7 +288,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -288,7 +288,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
);
List
<
Units
>
directlUnderUnitNames
=
new
ArrayList
<>();
List
<
Units
>
directlUnderUnitNames
=
new
ArrayList
<>();
//是否存在直属代管单位
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
//是否包括自己单位
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setFielding
(
StringUtils
.
ListToString
(
deviceRepel
.
getFieldingIds
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
...
@@ -342,21 +344,24 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -342,21 +344,24 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
TaskBto
taskBto
=
statsXTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
getUnitDesc
()+
"]-"
+
deviceRepel
.
getTitle
(),
userId
);
TaskBto
taskBto
=
statsXTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
getUnitDesc
()+
"]-"
+
deviceRepel
.
getTitle
(),
userId
);
//给本单位其他专管员阅知
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
Map
<
Units
,
List
<
Units
>>
mapUnitList
=
new
HashMap
<>();
Map
<
Units
,
List
<
Units
>>
mapUnitList
=
new
HashMap
<>();
Map
<
Units
,
Integer
>
unitTaskIDMap
=
new
HashMap
<>();
Map
<
Units
,
Integer
>
unitTaskIDMap
=
new
HashMap
<>();
Map
<
String
,
List
<
DeviceLibrary
>>
unitNameDevice
=
toUnitListDeviceLibrary
(
deviceRepel
.
getFieldingIds
(),
seqNumbers
,
lifeStatus
);
Map
<
String
,
List
<
DeviceLibrary
>>
unitNameDevice
=
toUnitListDeviceLibrary
(
deviceRepel
.
getFieldingIds
(),
seqNumbers
,
lifeStatus
);
//存放直属不代管单位的集合
List
<
Units
>
directlUnderNoEscrowUnitList
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
().
forEach
(
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->
{
unisId
->
{
Units
units1
=
unitsService
.
findById
(
unisId
);
Units
units1
=
unitsService
.
findById
(
unisId
);
if
(
unisId
!=
units
.
getUnitId
())
{
if
(
unisId
!=
units
.
getUnitId
())
{
if
(
units1
.
getType
()
==
2
)
{
if
(
units1
.
getType
()
==
2
&&
units1
.
getEscrow
()==
1
)
{
directlUnderUnit
.
set
(
true
);
directlUnderUnit
.
set
(
true
);
directlUnderUnitNames
.
add
(
units1
);
directlUnderUnitNames
.
add
(
units1
);
}
else
if
(
units1
.
getType
()
==
1
)
{
}
else
if
(
units1
.
getType
()
==
1
)
{
mapUnitList
.
put
(
units1
,
unitsService
.
findBySubordinateUnit
(
units1
.
getUnitId
()));
mapUnitList
.
put
(
units1
,
unitsService
.
findBySubordinateUnit
(
units1
.
getUnitId
()));
}
else
{
directlUnderNoEscrowUnitList
.
add
(
units1
);
}
}
}
else
{
}
else
{
correspondingLevel
.
set
(
true
);
correspondingLevel
.
set
(
true
);
...
@@ -379,11 +384,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -379,11 +384,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
//判断是否为
//判断是否为
//生成任务状态为1206的清退任务
//生成任务状态为1206的清退任务
if
(
deviceRepel
.
getRepelStatus
()==
2
){
if
(
deviceRepel
.
getRepelStatus
()==
2
){
TaskBto
taskBto1
=
cityRepelTask
(
k
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
k
.
getUnitDesc
()
+
"]"
+
deviceRepel
.
getTitle
(),
taskBto
.
getId
(),
0
);
TaskBto
taskBto1
=
cityRepelTask
(
k
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
k
.
getUnitDesc
()
+
"]
-
"
+
deviceRepel
.
getTitle
(),
taskBto
.
getId
(),
0
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
5
,
k
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
5
,
k
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
,
k
.
getShowOrder
()
));
}
else
{
}
else
{
TaskBto
taskBto1
=
cityRepelTask1206
(
k
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
k
.
getUnitDesc
()
+
"]"
+
deviceRepel
.
getTitle
(),
taskBto
.
getId
(),
0
);
TaskBto
taskBto1
=
cityRepelTask1206
(
k
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
k
.
getUnitDesc
()
+
"]
-
"
+
deviceRepel
.
getTitle
(),
taskBto
.
getId
(),
0
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
5
,
k
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
5
,
k
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
,
k
.
getShowOrder
()
));
DeviceRepel
deviceRepel2
=
new
DeviceRepel
();
DeviceRepel
deviceRepel2
=
new
DeviceRepel
();
deviceRepel2
.
setTaskScopes
(
v
.
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
()));
deviceRepel2
.
setTaskScopes
(
v
.
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
()));
deviceRepel2
.
setId
(
null
);
deviceRepel2
.
setId
(
null
);
...
@@ -401,6 +406,10 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -401,6 +406,10 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
}
}
});
});
//处理直属不代管单位清退
directlUnderNoEscrowUnitDW
(
directlUnderNoEscrowUnitList
,
unitNameDevice
,
deviceRepel1
,
taskBto
);
//处理直属代管单位
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail
.
setRepelStatus
(
1
);
deviceRepelDetail
.
setRepelStatus
(
1
);
...
@@ -425,11 +434,13 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -425,11 +434,13 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceLibraries
.
size
()!=
0
){
if
(
deviceLibraries
.
size
()!=
0
){
suspensionBillBusinessService
.
initiateSuspensionBill2
(
deviceLibraries
.
stream
().
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
()),
securityUser
);
suspensionBillBusinessService
.
initiateSuspensionBill2
(
deviceLibraries
.
stream
().
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
()),
securityUser
);
}
}
if
(
directlUnderUnit
.
get
()
&&
count
.
get
()
!=
0
)
{
if
(
directlUnderUnit
.
get
()
&&
count
.
get
()
!=
0
)
{
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
"[省直属相关单位]-"
+
deviceRepel
.
getTitle
(),
userId
);
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
"[省直属相关单位]-"
+
deviceRepel
.
getTitle
(),
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto2
.
getId
(),
0
,
"省直属"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
,
units
.
getShowOrder
()+
1
));
repelEscrowService
.
saveAllRepelEscrowService
(
escrows
);
repelEscrowService
.
saveAllRepelEscrowService
(
escrows
);
}
}
//处理本级单位
DeviceRepelDetail
deviceRepelDetail1
=
new
DeviceRepelDetail
();
DeviceRepelDetail
deviceRepelDetail1
=
new
DeviceRepelDetail
();
deviceRepelDetail1
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail1
.
setRepelId
(
deviceRepel1
.
getId
());
deviceRepelDetail1
.
setRepelStatus
(
1
);
deviceRepelDetail1
.
setRepelStatus
(
1
);
...
@@ -445,7 +456,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -445,7 +456,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
if
(
correspondingLevel
.
get
()
&&
count
.
get
()
!=
0
)
{
if
(
correspondingLevel
.
get
()
&&
count
.
get
()
!=
0
)
{
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail1
).
getId
(),
taskBto
.
getId
(),
"[省本级]-"
+
deviceRepel
.
getTitle
(),
userId
);
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail1
).
getId
(),
taskBto
.
getId
(),
"[省本级]-"
+
deviceRepel
.
getTitle
(),
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
"省本级"
,
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
units
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
.
get
()),
""
,
units
.
getShowOrder
()
));
}
}
if
(
list
==
null
||
list
.
size
()
==
0
)
{
if
(
list
==
null
||
list
.
size
()
==
0
)
{
throw
new
ApiException
(
ResponseEntity
.
ok
(
"发布失败"
));
throw
new
ApiException
(
ResponseEntity
.
ok
(
"发布失败"
));
...
@@ -453,6 +464,28 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -453,6 +464,28 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
}
}
/**
* 直属不代管单位清退处理
* @param list
*/
private
void
directlUnderNoEscrowUnitDW
(
List
<
Units
>
list
,
Map
<
String
,
List
<
DeviceLibrary
>>
unitNameDevice
,
DeviceRepel
deviceRepel
,
TaskBto
taskBto
){
if
(
list
.
size
()!=
0
){
List
<
RepelTaskStatistical
>
repelTaskStatisticals
=
new
ArrayList
<>();
list
.
forEach
(
units
->
{
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
deviceRepelDetail
.
setRepelId
(
deviceRepel
.
getId
());
deviceRepelDetail
.
setRepelStatus
(
1
);
deviceRepelDetail
.
setSendUnit
(
units
.
getName
());
deviceRepelDetail
.
setSendUnitId
(
units
.
getUnitId
());
TaskBto
taskBto1
=
cityRepelTask1206
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units
.
getUnitDesc
()
+
"]"
+
deviceRepel
.
getTitle
(),
taskBto
.
getId
(),
0
);
repelTaskStatisticals
.
add
(
new
RepelTaskStatistical
(
deviceRepel
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
5
,
units
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
0
),
""
,
units
.
getShowOrder
()));
}
);
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
repelTaskStatisticals
);
}
};
@Autowired
@Autowired
DeviceLibraryCacheService
deviceLibraryCacheService
;
DeviceLibraryCacheService
deviceLibraryCacheService
;
...
@@ -485,7 +518,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -485,7 +518,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setTaskScope
(
StringUtils
.
ListToString
(
deviceRepel
.
getTaskScopes
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
deviceRepel
.
setFiles
(
FilesUtil
.
stringFileToList
(
deviceRepel
.
getFileRets
()));
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
get
Name
()+
"]-"
+
deviceRepel1
.
getTitle
()
,
taskId
,
0
);
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
get
UnitDesc
()+
"]-"
+
deviceRepel1
.
getTitle
()+
"统计任务"
,
taskId
,
0
);
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
unitsList
.
forEach
(
unitsList
.
forEach
(
...
@@ -501,8 +534,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -501,8 +534,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
unitNameDevice
.
containsKey
(
units1
.
getName
()))
{
if
(
unitNameDevice
.
containsKey
(
units1
.
getName
()))
{
List
<
DeviceLibrary
>
deviceLibraryList
=
unitNameDevice
.
get
(
units1
.
getName
());
List
<
DeviceLibrary
>
deviceLibraryList
=
unitNameDevice
.
get
(
units1
.
getName
());
deviceLibraries
.
addAll
(
deviceLibraryList
.
stream
().
filter
(
deviceLibrary
->
!
deviceLibrary
.
getLocationUnit
().
equals
(
deviceLibrary
.
getOwnUnit
())
&&
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)).
collect
(
Collectors
.
toList
()));
deviceLibraries
.
addAll
(
deviceLibraryList
.
stream
().
filter
(
deviceLibrary
->
!
deviceLibrary
.
getLocationUnit
().
equals
(
deviceLibrary
.
getOwnUnit
())
&&
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)).
collect
(
Collectors
.
toList
()));
TaskBto
taskBto1
=
countyRepelTask
(
units1
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units1
.
get
Name
()+
"]-"
+
deviceRepel1
.
getTitle
(),
taskBto
.
getId
(),
0
);
TaskBto
taskBto1
=
countyRepelTask
(
units1
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units1
.
get
UnitDesc
()+
"]-"
+
deviceRepel1
.
getTitle
(),
taskBto
.
getId
(),
0
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
units1
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
deviceLibraryList
.
size
()),
""
));
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
units1
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
deviceLibraryList
.
size
()),
""
,
units1
.
getShowOrder
()
));
}
}
}
else
{
}
else
{
...
@@ -567,9 +600,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -567,9 +600,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
}
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
DeviceRepel
deviceRepel1
=
deviceRepelService
.
saveDeviceRepel
(
deviceRepel
);
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
getName
()+
"]"
+
"型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
TaskBto
taskBto
=
cityTotalTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"["
+
units
.
getUnitDesc
()+
"]-"
+
deviceRepel1
.
getTitle
()+
"清退统计任务"
,
taskId
,
userId
);
.
distinct
()
.
collect
(
Collectors
.
toList
()))
+
"设备统计任务"
,
taskId
,
userId
);
// addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"转发清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
// addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"转发清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
...
@@ -585,10 +616,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -585,10 +616,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
deviceRepelDetail
.
setSendUnitId
(
units1
.
getUnitId
());
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
Integer
count
=
deviceLibraryService
.
countAllRepel
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
lifeStatus
);
if
(
count
!=
0
)
{
if
(
count
!=
0
)
{
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
units1
.
getName
()
+
"清退型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
"["
+
units1
.
getUnitDesc
()+
"]-"
+
deviceRepel1
.
getTitle
(),
taskBto
.
getId
(),
userId
);
.
distinct
()
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
units1
.
getUnitDesc
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
,
units1
.
getShowOrder
()));
.
collect
(
Collectors
.
toList
()))
+
"设备"
,
taskBto
.
getId
(),
userId
);
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
repelStatusJudgeCount
(
deviceRepel
.
getRepelStatus
(),
count
),
""
));
}
}
}
}
}
}
...
@@ -597,8 +626,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -597,8 +626,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1212
,
userId
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1212
,
userId
);
}
}
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
}
}
@Override
@Override
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论