Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
2a7a5d82
提交
2a7a5d82
authored
5月 18, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[用户 退役 ]
上级
9ee175b5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
119 行增加
和
48 行删除
+119
-48
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+30
-2
DeviceNotInLibVo.java
...j/dev/device/confirmcheck/entity/vo/DeviceNotInLibVo.java
+2
-0
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+3
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+6
-12
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+78
-33
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
2a7a5d82
...
@@ -35,6 +35,7 @@ import com.tykj.dev.device.user.subject.service.AuService;
...
@@ -35,6 +35,7 @@ import com.tykj.dev.device.user.subject.service.AuService;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -74,6 +75,8 @@ public class DeviceCheckController {
...
@@ -74,6 +75,8 @@ public class DeviceCheckController {
Map
<
Integer
,
String
>
desMap
=
new
HashMap
<>();
Map
<
Integer
,
String
>
desMap
=
new
HashMap
<>();
Map
<
Integer
,
String
>
desBillMap
=
new
HashMap
<>();
@Autowired
@Autowired
private
DeviceCheckStatDao
statRepo
;
private
DeviceCheckStatDao
statRepo
;
@Autowired
@Autowired
...
@@ -634,9 +637,32 @@ public class DeviceCheckController {
...
@@ -634,9 +637,32 @@ public class DeviceCheckController {
@GetMapping
(
"/selectRemark/{taskId}"
)
@GetMapping
(
"/selectRemark/{taskId}"
)
public
ResponseEntity
selectRemark
(
@PathVariable
Integer
taskId
){
public
ResponseEntity
selectRemark
(
@PathVariable
Integer
taskId
){
TaskBto
taskBto
=
selectProvTask
(
taskId
);
TaskBto
taskBto
=
selectProvTask
(
taskId
);
return
ResponseEntity
.
ok
(
desMap
.
get
(
taskBto
.
getId
()));
Optional
<
DeviceCheckStat
>
optional
=
statRepo
.
findById
(
taskBto
.
getBillId
());
if
(
optional
.
isPresent
()){
DeviceCheckStat
deviceCheckStat
=
optional
.
get
();
if
(
deviceCheckStat
.
getCheckType
().
getId
()==
0
){
return
ResponseEntity
.
ok
(
desMap
.
get
(
taskBto
.
getId
()));
}
else
{
return
ResponseEntity
.
ok
(
desMap
.
get
(
taskId
));
}
}
else
{
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"没有找到id"
));
}
}
}
/**
* 根据taskId查询Remark
*/
@ApiOperation
(
value
=
"根据BillId查询Remark"
,
notes
=
"根据taskId查询Remark"
)
@GetMapping
(
"/selectRemarkBill/{billId}"
)
public
ResponseEntity
selectRemarkBill
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
desBillMap
.
get
(
billId
));
}
private
TaskBto
selectProvTask
(
Integer
taskId
){
private
TaskBto
selectProvTask
(
Integer
taskId
){
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
if
(
taskBto
.
getParentTaskId
()==
0
){
if
(
taskBto
.
getParentTaskId
()==
0
){
...
@@ -755,7 +781,9 @@ public class DeviceCheckController {
...
@@ -755,7 +781,9 @@ public class DeviceCheckController {
// 3-2 构建被查单位的 自查任务 (根据被查单位的级别来区分是县级状态是市级状态)
// 3-2 构建被查单位的 自查任务 (根据被查单位的级别来区分是县级状态是市级状态)
TaskBto
checkedTask
=
new
TaskBto
(
CHECK_EXAM_DETAIL_0
.
id
,
"自核查任务"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
detail
.
getId
(),
unit
.
getUnitId
(),
0
);
TaskBto
checkedTask
=
new
TaskBto
(
CHECK_EXAM_DETAIL_0
.
id
,
"自核查任务"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
detail
.
getId
(),
unit
.
getUnitId
(),
0
);
checkedTask
.
setCustomInfo
(
"manual"
);
checkedTask
.
setCustomInfo
(
"manual"
);
taskService
.
start
(
checkedTask
);
checkedTask
=
taskService
.
start
(
checkedTask
);
desBillMap
.
put
(
detail
.
getId
(),
ed
.
getRemark
());
desMap
.
put
(
checkedTask
.
getId
(),
ed
.
getRemark
());
}
}
// 4. 重新设置并保存统计账单
// 4. 重新设置并保存统计账单
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/DeviceNotInLibVo.java
浏览文件 @
2a7a5d82
...
@@ -46,4 +46,6 @@ public class DeviceNotInLibVo {
...
@@ -46,4 +46,6 @@ public class DeviceNotInLibVo {
private
String
typeName
;
private
String
typeName
;
private
String
secretLevelName
;
private
String
secretLevelName
;
private
String
lifeStatusName
;
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
2a7a5d82
...
@@ -296,6 +296,7 @@ public class ObjTransUtil {
...
@@ -296,6 +296,7 @@ public class ObjTransUtil {
//依据proofResult 判断是否是在库装备
//依据proofResult 判断是否是在库装备
if
(
proofResult
==
3
)
{
if
(
proofResult
==
3
)
{
// 非在库装备
// 非在库装备
notInLibVoList
.
add
(
toCheckNotInLibVo
(
device
));
notInLibVoList
.
add
(
toCheckNotInLibVo
(
device
));
}
else
{
}
else
{
// 在库装备
// 在库装备
...
@@ -362,7 +363,8 @@ public class ObjTransUtil {
...
@@ -362,7 +363,8 @@ public class ObjTransUtil {
device
.
getSecretLevel
(),
device
.
getSecretLevel
(),
device
.
getInvisibleRangeName
(),
device
.
getInvisibleRangeName
(),
device
.
getTypeName
(),
device
.
getTypeName
(),
device
.
getSecretLevelName
()
device
.
getSecretLevelName
(),
device
.
getLifeStatusName
()
);
);
}
}
}
}
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
2a7a5d82
...
@@ -132,25 +132,21 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -132,25 +132,21 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
USE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
USE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SEND_BACK
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SEND_BACK
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
);
List
<
String
>
directlUnderUnitNames
=
new
ArrayList
<>();
List
<
String
>
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
()));
Map
<
String
,
List
<
Integer
>
>
unitNameMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
unitNameMap
=
new
HashMap
<>();
List
<
String
>
seqNumbers
=
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
());
List
<
String
>
seqNumbers
=
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
());
if
(
seqNumbers
.
size
()!=
0
){
if
(
seqNumbers
.
size
()!=
0
){
log
.
info
(
"申请任务触发清退任务"
);
log
.
info
(
"申请任务触发清退任务"
);
deviceLibraryService
.
findAllBySeqNumber
(
seqNumbers
).
forEach
(
deviceLibraryService
.
findAllBySeqNumber
(
seqNumbers
).
forEach
(
deviceLibrary
->
{
deviceLibrary
->
{
if
(
unitNameMap
.
containsKey
(
deviceLibrary
.
getOwnUnit
())){
if
(!
unitNameMap
.
containsKey
(
deviceLibrary
.
getOwnUnit
())){
List
<
Integer
>
ids
=
unitNameMap
.
get
(
deviceLibrary
.
getOwnUnit
());
unitNameMap
.
put
(
deviceLibrary
.
getOwnUnit
(),
0
);
ids
.
add
(
deviceLibrary
.
getId
());
unitNameMap
.
put
(
deviceLibrary
.
getOwnUnit
(),
ids
);
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
deviceLibrary
.
getId
());
unitNameMap
.
put
(
deviceLibrary
.
getOwnUnit
(),
ids
);
}
}
}
}
);
);
...
@@ -878,10 +874,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -878,10 +874,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setRepelStatus
(
2
);
deviceRepelDetail
.
setRepelStatus
(
2
);
TaskBto
fatherTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
TaskBto
fatherTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
taskService
.
moveToEnd
(
fatherTask
);
taskService
.
moveToEnd
(
fatherTask
);
deviceRepelDetail
.
setReceiveTime
(
new
Date
());
DeviceRepelDetail
deviceRepelDetailFather
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
fatherTask
.
getBillId
());
DeviceRepelDetail
deviceRepelDetailFather
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
fatherTask
.
getBillId
());
deviceRepelDetailFather
.
setReceiveTime
(
new
Date
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetailFather
);
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
fatherTask
.
getId
(),
deviceRepelDetailFather
.
getRepelId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
fatherTask
.
getId
(),
deviceRepelDetailFather
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
2a7a5d82
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.sendback.service.impl;
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.sendback.service.impl;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.base.DeviceLifeStatus
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
...
@@ -15,7 +16,6 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
...
@@ -15,7 +16,6 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
@@ -104,11 +104,13 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -104,11 +104,13 @@ public class RepelQueryServiceImpl implements RepelQueryService {
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
1
5
||
deviceLibrary
.
getLifeStatus
()
==
1
4
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
deviceLibraries
.
add
(
deviceLibrary
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()!=
null
)
{
if
(
deviceLibrary
.
getType
()!=
null
)
{
...
@@ -137,12 +139,14 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -137,12 +139,14 @@ public class RepelQueryServiceImpl implements RepelQueryService {
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
))
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
()))
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
()))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
1
5
||
deviceLibrary
.
getLifeStatus
()
==
1
4
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
deviceLibraries
.
add
(
deviceLibrary
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()!=
null
)
{
if
(
deviceLibrary
.
getType
()!=
null
)
{
...
@@ -337,9 +341,10 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -337,9 +341,10 @@ public class RepelQueryServiceImpl implements RepelQueryService {
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
))
.
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
.
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
else
{
}
else
{
deviceLibraries
=
deviceLibraryDao
.
findAllBySeqNumberInAndOwnUnitIn
(
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
unitNameList
).
stream
()
deviceLibraries
=
deviceLibraryDao
.
findAllBySeqNumberInAndOwnUnitIn
(
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
()),
unitNameList
).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
...
@@ -347,14 +352,16 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -347,14 +352,16 @@ public class RepelQueryServiceImpl implements RepelQueryService {
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_SCRAPPED
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
TO_BE_DESTROYED
.
id
))
.
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
.
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
}
for
(
DeviceLibrary
deviceLibrary:
deviceLibraries
)
{
for
(
DeviceLibrary
deviceLibrary:
deviceLibraries
)
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
15
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
if
(
map
.
containsKey
(
deviceLibrary
.
getOwnUnit
()))
{
if
(
map
.
containsKey
(
deviceLibrary
.
getOwnUnit
()))
{
List
<
DeviceLibrary
>
libraries
=
map
.
get
(
deviceLibrary
.
getOwnUnit
());
List
<
DeviceLibrary
>
libraries
=
map
.
get
(
deviceLibrary
.
getOwnUnit
());
libraries
.
add
(
deviceLibrary
);
libraries
.
add
(
deviceLibrary
);
...
@@ -451,38 +458,76 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -451,38 +458,76 @@ public class RepelQueryServiceImpl implements RepelQueryService {
Map
<
Integer
,
String
>
typeMapAbnormal
=
new
HashMap
<>();
Map
<
Integer
,
String
>
typeMapAbnormal
=
new
HashMap
<>();
Map
<
String
,
String
>
modelMapAbnormal
=
new
HashMap
<>();
Map
<
String
,
String
>
modelMapAbnormal
=
new
HashMap
<>();
Units
units
=
unitsService
.
findById
(
deviceChoosePageVo
.
getUnitId
());
Units
units
=
unitsService
.
findById
(
deviceChoosePageVo
.
getUnitId
());
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
deviceChoosePageVo
.
getFielding
(),
units
.
getName
()).
stream
()
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetailNoDev
(
taskService
.
get
(
deviceChoosePageVo
.
getTaskId
()).
getBillId
());
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
if
(
deviceRepel
.
getSeqNumbers
()==
null
||
deviceRepel
.
getSeqNumbers
().
equals
(
""
))
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
deviceChoosePageVo
.
getFielding
(),
units
.
getName
()).
stream
()
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
.
filter
(
deviceLibrary
->
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
deviceLibrary
->
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
if
(
deviceLibrary
.
getLifeStatus
()==
2
||
deviceLibrary
.
getLifeStatus
()==
14
)
{
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
deviceLibraries
.
add
(
deviceLibrary
);
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
deviceLibrary
->
{
if
(
deviceLibrary
.
getType
()!=
null
)
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
typeMap
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()
!=
null
)
{
typeMap
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()
!=
null
)
{
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
}
}
else
{
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()
!=
null
)
{
if
(
deviceLibrary
.
getType
()
!=
null
)
{
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
}
}
}
else
{
}
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
}
else
{
if
(
deviceLibrary
.
getType
()!=
null
)
{
deviceLibraryDao
.
findAllBySeqNumberIn
(
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
())).
stream
()
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
()))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
);
modelMap
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()!=
null
)
{
typeMap
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()!=
null
)
{
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
modelMapAbnormal
.
put
(
deviceLibrary
.
getModel
(),
""
);
if
(
deviceLibrary
.
getType
()!=
null
)
{
typeMapAbnormal
.
put
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
());
}
}
}
}
}
}
);
);
}
Page
<
DeviceLibrary
>
deviceLibraryPage
=
PageUtil
.
getPerPage
(
deviceChoosePageVo
.
getDeviceSelectVos
().
getPage
(),
deviceChoosePageVo
.
getDeviceSelectVos
().
getSize
(),
deviceLibraries
,
deviceChoosePageVo
.
getDeviceSelectVos
().
getPageable
());
Page
<
DeviceLibrary
>
deviceLibraryPage
=
PageUtil
.
getPerPage
(
deviceChoosePageVo
.
getDeviceSelectVos
().
getPage
(),
deviceChoosePageVo
.
getDeviceSelectVos
().
getSize
(),
deviceLibraries
,
deviceChoosePageVo
.
getDeviceSelectVos
().
getPageable
());
Page
<
DeviceLibrary
>
deviceLibraryPageAbnormal
=
PageUtil
.
getPerPage
(
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getPage
(),
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getSize
(),
deviceLibraries
,
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getPageable
());
Page
<
DeviceLibrary
>
deviceLibraryPageAbnormal
=
PageUtil
.
getPerPage
(
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getPage
(),
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getSize
(),
deviceLibraries
Abnormal
,
deviceChoosePageVo
.
getDeviceSelectVoAbnormal
().
getPageable
());
return
new
DeviceChooseRepel
(
deviceLibraryPage
,
deviceLibraryPageAbnormal
,
1
,
modelMap
,
typeMap
,
modelMapAbnormal
,
typeMapAbnormal
);
return
new
DeviceChooseRepel
(
deviceLibraryPage
,
deviceLibraryPageAbnormal
,
1
,
modelMap
,
typeMap
,
modelMapAbnormal
,
typeMapAbnormal
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论