Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
4af60f3a
提交
4af60f3a
authored
4月 26, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
6298624e
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
98 行增加
和
42 行删除
+98
-42
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+8
-1
DeviceApplyBillService.java
...tykj/dev/device/apply/service/DeviceApplyBillService.java
+1
-1
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+20
-6
DeviceApplyBill.java
.../tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
+1
-1
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+20
-8
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+26
-21
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+20
-0
TrainTask.java
...c/main/java/com/tykj/dev/device/train/task/TrainTask.java
+2
-4
没有找到文件。
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
4af60f3a
...
@@ -484,17 +484,24 @@ public class DeviceApplyController {
...
@@ -484,17 +484,24 @@ public class DeviceApplyController {
for
(
ReplyVo
replyVo
:
replyVos
){
for
(
ReplyVo
replyVo
:
replyVos
){
seqs
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
replyVo
.
getSeqInterval
()));
seqs
.
addAll
(
DeviceSeqUtil
.
selectDeviceSeqs
(
replyVo
.
getSeqInterval
()));
}
}
Set
<
Integer
>
lifeStatus
=
deviceLibraryService
.
findAllBySeqNumber
(
seqs
).
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryService
.
findAllBySeqNumber
(
seqs
);
Set
<
Integer
>
lifeStatus
=
deviceLibraries
.
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
integers
=
new
HashSet
<>();
Set
<
Integer
>
integers
=
new
HashSet
<>();
integers
.
add
(
11
);
integers
.
add
(
11
);
if
(
deviceApplyBill
.
getApplyType
()==
2
)
{
if
(
deviceApplyBill
.
getApplyType
()==
2
)
{
integers
.
add
(
15
);
integers
.
add
(
15
);
integers
.
add
(
12
);
integers
.
add
(
16
);
}
}
if
(
deviceApplyBill
.
getApplyType
()==
3
){
if
(
deviceApplyBill
.
getApplyType
()==
3
){
integers
.
add
(
17
);
integers
.
add
(
17
);
integers
.
add
(
5
);
integers
.
add
(
18
);
}
}
if
(
deviceApplyBill
.
getApplyType
()==
4
){
if
(
deviceApplyBill
.
getApplyType
()==
4
){
integers
.
add
(
19
);
integers
.
add
(
19
);
integers
.
add
(
10
);
integers
.
add
(
20
);
}
}
if
(
integers
.
containsAll
(
lifeStatus
)){
if
(
integers
.
containsAll
(
lifeStatus
)){
return
ResponseEntity
.
ok
(
true
);
return
ResponseEntity
.
ok
(
true
);
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/service/DeviceApplyBillService.java
浏览文件 @
4af60f3a
...
@@ -25,6 +25,6 @@ public interface DeviceApplyBillService {
...
@@ -25,6 +25,6 @@ public interface DeviceApplyBillService {
/**
/**
* @param scriptSaveVos 退役/报废/销毁装备单据详情
* @param scriptSaveVos 退役/报废/销毁装备单据详情
*/
*/
void
updateCompleteNum
(
List
<
ScriptSaveVo
>
scriptSaveVos
);
void
updateCompleteNum
(
Integer
applyType
,
List
<
ScriptSaveVo
>
scriptSaveVos
);
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/service/impl/DeviceApplyBillServiceImpl.java
浏览文件 @
4af60f3a
...
@@ -63,9 +63,6 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -63,9 +63,6 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
@Autowired
@Autowired
private
UserUtils
userUtils
;
private
UserUtils
userUtils
;
@Autowired
private
DeviceApplyBillService
deviceApplyBillService
;
@Override
@Override
public
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
)
{
public
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
)
{
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
...
@@ -112,7 +109,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -112,7 +109,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
}
}
@Override
@Override
public
void
updateCompleteNum
(
List
<
ScriptSaveVo
>
scriptSaveVos
)
{
public
void
updateCompleteNum
(
Integer
applyType
,
List
<
ScriptSaveVo
>
scriptSaveVos
)
{
Map
<
Integer
,
Task
>
taskMap
=
taskDao
.
findAllByBusinessTypeAndBillStatus
(
9
,
StatusEnum
.
WAIT_CONFIRM_APPLY_DEVICE
.
id
).
stream
().
collect
(
Collectors
.
toMap
(
Task:
:
getId
,
Function
.
identity
()));
Map
<
Integer
,
Task
>
taskMap
=
taskDao
.
findAllByBusinessTypeAndBillStatus
(
9
,
StatusEnum
.
WAIT_CONFIRM_APPLY_DEVICE
.
id
).
stream
().
collect
(
Collectors
.
toMap
(
Task:
:
getId
,
Function
.
identity
()));
Map
<
Integer
,
DeviceApplyBill
>
billMap
=
deviceApplyBillDao
.
findAll
().
stream
().
collect
(
Collectors
.
toMap
(
DeviceApplyBill:
:
getId
,
Function
.
identity
()));
Map
<
Integer
,
DeviceApplyBill
>
billMap
=
deviceApplyBillDao
.
findAll
().
stream
().
collect
(
Collectors
.
toMap
(
DeviceApplyBill:
:
getId
,
Function
.
identity
()));
Map
<
String
,
DeviceLibrary
>
seqMap
=
deviceLibraryService
.
getAllDeviceSeqMap
();
Map
<
String
,
DeviceLibrary
>
seqMap
=
deviceLibraryService
.
getAllDeviceSeqMap
();
...
@@ -146,7 +143,24 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -146,7 +143,24 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
}
}
if
(!
isComplete
){
if
(!
isComplete
){
Set
<
Integer
>
lifeStatus
=
deviceLibraryList
.
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
lifeStatus
=
deviceLibraryList
.
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
if
(
lifeStatus
.
size
()==
1
&&
lifeStatus
.
iterator
().
next
()==
11
){
Set
<
Integer
>
integers
=
new
HashSet
<>();
integers
.
add
(
11
);
if
(
applyType
==
2
)
{
integers
.
add
(
15
);
integers
.
add
(
12
);
integers
.
add
(
16
);
}
if
(
applyType
==
3
){
integers
.
add
(
17
);
integers
.
add
(
5
);
integers
.
add
(
18
);
}
if
(
applyType
==
4
){
integers
.
add
(
19
);
integers
.
add
(
10
);
integers
.
add
(
20
);
}
if
(
integers
.
containsAll
(
lifeStatus
)){
isComplete
=
true
;
isComplete
=
true
;
}
}
}
}
...
@@ -162,7 +176,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -162,7 +176,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
messageService
.
add
(
messageBto
);
messageService
.
add
(
messageBto
);
}
}
deviceApplyBill
.
setApplyStat
(
JacksonUtil
.
toJSon
(
replyVos
));
deviceApplyBill
.
setApplyStat
(
JacksonUtil
.
toJSon
(
replyVos
));
deviceApplyBillService
.
update
(
deviceApplyBill
);
update
(
deviceApplyBill
);
}
}
}
}
}
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
浏览文件 @
4af60f3a
...
@@ -88,7 +88,7 @@ public class DeviceApplyBill {
...
@@ -88,7 +88,7 @@ public class DeviceApplyBill {
/**
/**
* 申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:已批复待审核,4:批复审核失败,5:申请成功)
* 申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:已批复待审核,4:批复审核失败,5:申请成功)
*/
*/
@ApiModelProperty
(
value
=
"申请状态(0:申请待审核,1:申请审核失败,2:申请完结,3:等待中办
回执单,4:等待确认接收中办装备
)"
)
@ApiModelProperty
(
value
=
"申请状态(0:申请待审核,1:申请审核失败,2:申请完结,3:等待中办
批复,4:批复后待执行
)"
)
private
Integer
applyStatus
;
private
Integer
applyStatus
;
/**
/**
* 列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件
* 列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
4af60f3a
...
@@ -162,6 +162,7 @@ public class DeviceLibraryController {
...
@@ -162,6 +162,7 @@ public class DeviceLibraryController {
@ApiOperation
(
value
=
"模糊查询核心装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"模糊查询核心装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/feature/summary"
)
@PostMapping
(
"/core/feature/summary"
)
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
// long strat = System.currentTimeMillis();
Boolean
hasModelDim
=
deviceLibrarySelectVo
.
getModelDim
()!=
null
;
Boolean
hasModelDim
=
deviceLibrarySelectVo
.
getModelDim
()!=
null
;
Boolean
hasNameDim
=
deviceLibrarySelectVo
.
getNameDim
()!=
null
;
Boolean
hasNameDim
=
deviceLibrarySelectVo
.
getNameDim
()!=
null
;
Boolean
hasSeqDim
=
deviceLibrarySelectVo
.
getSeqDim
()!=
null
;
Boolean
hasSeqDim
=
deviceLibrarySelectVo
.
getSeqDim
()!=
null
;
...
@@ -171,7 +172,6 @@ public class DeviceLibraryController {
...
@@ -171,7 +172,6 @@ public class DeviceLibraryController {
Boolean
hasUpdateTimeDim
=
deviceLibrarySelectVo
.
getUpdateTimeDim
()!=
null
;
Boolean
hasUpdateTimeDim
=
deviceLibrarySelectVo
.
getUpdateTimeDim
()!=
null
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
);
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
Boolean
containModelDim
=
!
hasModelDim
||
deviceLibrary
.
getModel
().
contains
(
deviceLibrarySelectVo
.
getModelDim
());
Boolean
containModelDim
=
!
hasModelDim
||
deviceLibrary
.
getModel
().
contains
(
deviceLibrarySelectVo
.
getModelDim
());
...
@@ -184,17 +184,29 @@ public class DeviceLibraryController {
...
@@ -184,17 +184,29 @@ public class DeviceLibraryController {
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
&&
containUpdateTimeDim
;
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
&&
containUpdateTimeDim
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
List
<
DeviceVo
>
deviceVos
=
resultList
.
stream
().
map
(
DeviceLibrary:
:
parseVo
).
collect
(
Collectors
.
toList
());
//
List<DeviceVo> deviceVos = resultList.stream().map(DeviceLibrary::parseVo).collect(Collectors.toList());
Page
<
Device
Vo
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
deviceVos
,
deviceLibrarySelectVo
.
getPageable
());
Page
<
Device
Library
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
resultList
,
deviceLibrarySelectVo
.
getPageable
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
Integer
,
String
>
lifeStatusMap
=
configCache
.
getLifeStatusMap
();
Map
<
Integer
,
String
>
lifeStatusMap
=
configCache
.
getLifeStatusMap
();
Set
<
Integer
>
status
=
deviceVos
.
stream
().
map
(
DeviceVo:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
status
=
new
HashSet
<>();
Set
<
String
>
models
=
new
HashSet
<>();
Set
<
String
>
names
=
new
HashSet
<>();
Set
<
String
>
ownUnits
=
new
HashSet
<>();
Set
<
String
>
locationUnits
=
new
HashSet
<>();
resultList
.
forEach
(
deviceVo
->
{
status
.
add
(
deviceVo
.
getLifeStatus
());
models
.
add
(
deviceVo
.
getModel
());
names
.
add
(
deviceVo
.
getName
());
ownUnits
.
add
(
deviceVo
.
getOwnUnit
());
locationUnits
.
add
(
deviceVo
.
getLocationUnit
());
});
map
.
put
(
"pages"
,
deviceLibraryEntities
);
map
.
put
(
"pages"
,
deviceLibraryEntities
);
map
.
put
(
"models"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getModel
).
collect
(
Collectors
.
toSet
())
);
map
.
put
(
"models"
,
models
);
map
.
put
(
"names"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getName
).
collect
(
Collectors
.
toSet
())
);
map
.
put
(
"names"
,
names
);
map
.
put
(
"ownUnits"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getOwnUnit
).
collect
(
Collectors
.
toSet
())
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"locationUnits"
,
deviceVos
.
stream
().
map
(
DeviceVo:
:
getLocationUnit
).
collect
(
Collectors
.
toSet
())
);
map
.
put
(
"locationUnits"
,
locationUnits
);
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
// System.out.println("时间:"+(System.currentTimeMillis()-strat));
return
ResultUtil
.
success
(
map
);
return
ResultUtil
.
success
(
map
);
}
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
4af60f3a
...
@@ -120,7 +120,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -120,7 +120,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
GetTreeUtils
.
splitTree
(
libraryEntities
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
);
// return GetTreeUtils.splitTree(libraryEntities,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
return
libraryEntities
;
}
}
//areId不为空,查询某个区域下的所有单位的所有装备
//areId不为空,查询某个区域下的所有单位的所有装备
else
{
else
{
...
@@ -133,7 +134,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -133,7 +134,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
List
<
DeviceLibrary
>
libraryEntities
=
getAllList
(
deviceLibrarySelectVo
).
stream
()
List
<
DeviceLibrary
>
libraryEntities
=
getAllList
(
deviceLibrarySelectVo
).
stream
()
.
filter
(
deviceLibraryEntity
->
units
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
filter
(
deviceLibraryEntity
->
units
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
deviceLibraries
=
getList4
(
libraryEntities
);
//
List<DeviceLibrary> deviceLibraries = getList4(libraryEntities);
// List<DeviceLibrary> resultList = new ArrayList<>();
// List<DeviceLibrary> resultList = new ArrayList<>();
// for (DeviceLibrary d : deviceLibraries) {
// for (DeviceLibrary d : deviceLibraries) {
// resultList.add(d);
// resultList.add(d);
...
@@ -144,7 +145,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -144,7 +145,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
GetTreeUtils
.
splitTree
(
deviceLibraries
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
);
// return GetTreeUtils.splitTree(deviceLibraries,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
return
libraryEntities
;
}
}
//省能看到所有装备
//省能看到所有装备
if
(
selectLevel
==
1
)
{
if
(
selectLevel
==
1
)
{
...
@@ -152,7 +154,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -152,7 +154,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
List
<
DeviceLibrary
>
deviceLibraries
=
getAllList
(
deviceLibrarySelectVo
).
stream
()
List
<
DeviceLibrary
>
deviceLibraries
=
getAllList
(
deviceLibrarySelectVo
).
stream
()
.
filter
(
deviceLibraryEntity
->
!
unitNames
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
filter
(
deviceLibraryEntity
->
!
unitNames
.
contains
(
deviceLibraryEntity
.
getOwnUnit
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
libraryEntities
=
getList4
(
deviceLibraries
);
//
List<DeviceLibrary> libraryEntities = getList4(deviceLibraries);
// List<DeviceLibrary> resultList = new ArrayList<>();
// List<DeviceLibrary> resultList = new ArrayList<>();
// for (DeviceLibrary d : libraryEntities) {
// for (DeviceLibrary d : libraryEntities) {
// resultList.add(d);
// resultList.add(d);
...
@@ -163,7 +165,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -163,7 +165,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// if (deviceLibrarySelectVo.getContent()!=null){
// if (deviceLibrarySelectVo.getContent()!=null){
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// }
return
GetTreeUtils
.
splitTree
(
libraryEntities
,
DeviceLibrary:
:
getChilds
,
DeviceLibrary:
:
setChildNull
);
// return GetTreeUtils.splitTree(libraryEntities,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
return
deviceLibraries
;
}
else
{
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"区域等级只能为1,2,3"
));
throw
new
ApiException
(
ResultUtil
.
failed
(
"区域等级只能为1,2,3"
));
}
}
...
@@ -333,27 +336,29 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -333,27 +336,29 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
public
List
<
DeviceLibrary
>
getList2
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
List
<
DeviceLibrary
>
getList2
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryDao
.
findAll
(
getSelectSpecification6
(
deviceLibrarySelectVo
),
deviceLibrarySelectVo
.
getPageable
().
getSort
());
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryDao
.
findAll
(
getSelectSpecification6
(
deviceLibrarySelectVo
),
deviceLibrarySelectVo
.
getPageable
().
getSort
());
//返回父子结构
//返回父子结构
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
// Map<Integer, DeviceLibrary> nodeCollect =
deviceLibraryEntities
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
deviceLibraryEntity
));
// deviceLibraryEntities.stream().collect(Collectors.toMap(DeviceLibrary::getId, deviceLibraryEntity -> deviceLibraryEntity));
return
GetTreeUtils
.
parseTreeFromDown
(
// return GetTreeUtils.parseTreeFromDown(
deviceLibraryEntities
,
// deviceLibraryEntities,
DeviceLibrary:
:
getId
,
// DeviceLibrary::getId,
deviceLibraryEntity
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
deviceLibraryEntity
.
getPartParentId
())),
// deviceLibraryEntity -> Optional.ofNullable(nodeCollect.get(deviceLibraryEntity.getPartParentId())),
DeviceLibrary:
:
addChildNode
// DeviceLibrary::addChildNode
);
// );
return
deviceLibraryEntities
;
}
}
public
List
<
DeviceLibrary
>
getList3
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
,
String
name
)
{
public
List
<
DeviceLibrary
>
getList3
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
,
String
name
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryDao
.
findAll
(
getSelectSpecification2
(
deviceLibrarySelectVo
,
name
),
deviceLibrarySelectVo
.
getPageable
().
getSort
());
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryDao
.
findAll
(
getSelectSpecification2
(
deviceLibrarySelectVo
,
name
),
deviceLibrarySelectVo
.
getPageable
().
getSort
());
//返回父子结构
//返回父子结构
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
// Map<Integer, DeviceLibrary> nodeCollect =
deviceLibraryEntities
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
deviceLibraryEntity
));
// deviceLibraryEntities.stream().collect(Collectors.toMap(DeviceLibrary::getId, deviceLibraryEntity -> deviceLibraryEntity));
return
GetTreeUtils
.
parseTreeFromDown
(
// return GetTreeUtils.parseTreeFromDown(
deviceLibraryEntities
,
// deviceLibraryEntities,
DeviceLibrary:
:
getId
,
// DeviceLibrary::getId,
deviceLibraryEntity
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
deviceLibraryEntity
.
getPartParentId
())),
// deviceLibraryEntity -> Optional.ofNullable(nodeCollect.get(deviceLibraryEntity.getPartParentId())),
DeviceLibrary:
:
addChildNode
// DeviceLibrary::addChildNode
);
// );
return
deviceLibraryEntities
;
}
}
public
List
<
DeviceLibrary
>
getList4
(
List
<
DeviceLibrary
>
deviceLibraryEntities
)
{
public
List
<
DeviceLibrary
>
getList4
(
List
<
DeviceLibrary
>
deviceLibraryEntities
)
{
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
4af60f3a
...
@@ -921,6 +921,11 @@ public class RepairController {
...
@@ -921,6 +921,11 @@ public class RepairController {
ids
.
add
(
repairDetail1
.
getId
());
ids
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
messageMap
.
put
(
unitId
,
ids
);
}
}
if
(
repairDetail1
.
getPid
()!=
null
){
RepairDetail
repairDetail2
=
deviceRepairDetailService
.
getOne
(
repairDetail1
.
getPid
());
repairDetail2
.
setLocationUnit
(
repairBackBill
.
getReceiveUnit
());
deviceRepairDetailService
.
update
(
repairDetail2
);
}
}
}
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
}
}
...
@@ -952,6 +957,11 @@ public class RepairController {
...
@@ -952,6 +957,11 @@ public class RepairController {
ids
.
add
(
repairDetail1
.
getId
());
ids
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
ids
);
messageMap
.
put
(
unitId
,
ids
);
}
}
if
(
repairDetail1
.
getPid
()!=
null
){
RepairDetail
repairDetail2
=
deviceRepairDetailService
.
getOne
(
repairDetail1
.
getPid
());
repairDetail2
.
setLocationUnit
(
repairBackBill
.
getReceiveUnit
());
deviceRepairDetailService
.
update
(
repairDetail2
);
}
}
}
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
});
});
...
@@ -1731,6 +1741,11 @@ public class RepairController {
...
@@ -1731,6 +1741,11 @@ public class RepairController {
integers
.
add
(
repairDetail1
.
getId
());
integers
.
add
(
repairDetail1
.
getId
());
messageMap
.
put
(
unitId
,
integers
);
messageMap
.
put
(
unitId
,
integers
);
}
}
if
(
repairDetail1
.
getPid
()!=
null
){
RepairDetail
repairDetail2
=
deviceRepairDetailService
.
getOne
(
repairDetail1
.
getPid
());
repairDetail2
.
setLocationUnit
(
repairBackBill
.
getReceiveUnit
());
deviceRepairDetailService
.
update
(
repairDetail2
);
}
}
}
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
});
});
...
@@ -1821,6 +1836,11 @@ public class RepairController {
...
@@ -1821,6 +1836,11 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
repairBill
.
getReceiveUnit
());
repairDetail
.
setLocationUnit
(
repairBill
.
getReceiveUnit
());
repairDetail
.
setRepairStatus
(
1
);
repairDetail
.
setRepairStatus
(
1
);
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
if
(
repairDetail
.
getPid
()!=
null
){
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
getOne
(
repairDetail
.
getPid
());
repairDetail1
.
setLocationUnit
(
repairBill
.
getReceiveUnit
());
deviceRepairDetailService
.
update
(
repairDetail1
);
}
});
});
if
(
idList
.
size
()>
0
)
{
if
(
idList
.
size
()>
0
)
{
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为经办人"
,
idList
,
1
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为经办人"
,
idList
,
1
);
...
...
dev-train/src/main/java/com/tykj/dev/device/train/task/TrainTask.java
浏览文件 @
4af60f3a
...
@@ -14,10 +14,8 @@ import com.tykj.dev.misc.base.StatusEnum;
...
@@ -14,10 +14,8 @@ import com.tykj.dev.misc.base.StatusEnum;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -49,7 +47,7 @@ public class TrainTask {
...
@@ -49,7 +47,7 @@ public class TrainTask {
@Autowired
@Autowired
TrainThemeDao
trainThemeDao
;
TrainThemeDao
trainThemeDao
;
@Scheduled
(
cron
=
"0 0/1
* * * ?
"
)
@Scheduled
(
cron
=
"0 0/1
0 * * ?
"
)
private
void
signUpDeadline
()
{
private
void
signUpDeadline
()
{
trainThemeService
.
findAllStatus
(
StatusEnum
.
TRAIN1000
.
id
).
forEach
(
trainThemeService
.
findAllStatus
(
StatusEnum
.
TRAIN1000
.
id
).
forEach
(
trainTheme
->
{
trainTheme
->
{
...
@@ -81,7 +79,7 @@ public class TrainTask {
...
@@ -81,7 +79,7 @@ public class TrainTask {
}
}
@Scheduled
(
cron
=
"0 0/1
* * * ?
"
)
@Scheduled
(
cron
=
"0 0/1
0 * * ?
"
)
private
void
trainingStarted
()
{
private
void
trainingStarted
()
{
long
time
=
new
Date
().
getTime
();
long
time
=
new
Date
().
getTime
();
trainThemeService
.
findAllStatus
(
StatusEnum
.
TRAIN1010
.
id
).
forEach
(
trainThemeService
.
findAllStatus
(
StatusEnum
.
TRAIN1010
.
id
).
forEach
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论