Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
d72ed641
提交
d72ed641
authored
1月 20, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【清退提交】 直属单位相关代码
上级
c804b39f
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
31 行增加
和
24 行删除
+31
-24
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+12
-0
ModelNameGroup.java
...om/tykj/dev/device/sendback/entity/vo/ModelNameGroup.java
+1
-1
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+1
-1
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+17
-22
没有找到文件。
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
d72ed641
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.sendback.controller;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.sendback.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceIdLIstVo
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceIdLIstVo
;
import
com.tykj.dev.device.sendback.entity.vo.ModelAndTypeVo
;
import
com.tykj.dev.device.sendback.service.RepelQueryService
;
import
com.tykj.dev.device.sendback.service.RepelQueryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -111,4 +112,15 @@ public class RepelQueryController {
...
@@ -111,4 +112,15 @@ public class RepelQueryController {
public
ResponseEntity
provinceDirectlyUnderSelectedDev
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
unitId
){
public
ResponseEntity
provinceDirectlyUnderSelectedDev
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderSelectedDev
(
taskId
,
unitId
));
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderSelectedDev
(
taskId
,
unitId
));
}
}
/**
* 清退管理 选择装备列表的接口
*/
@PostMapping
(
value
=
"/findRepelListModelNameGroup"
)
@ApiOperation
(
value
=
"清退管理 选择装备列表的接口"
,
notes
=
"清退管理 选择装备列表的接口"
)
public
ResponseEntity
findRepelListModelNameGroup
(
@RequestBody
ModelAndTypeVo
modelAndTypeVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findRepelListModelNameGroup
(
modelAndTypeVo
));
}
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/ModelNameGroup.java
浏览文件 @
d72ed641
...
@@ -27,7 +27,7 @@ public class ModelNameGroup {
...
@@ -27,7 +27,7 @@ public class ModelNameGroup {
/**
/**
* 类型
* 类型
*/
*/
private
String
name
;
private
Integer
name
;
/**
/**
* 装备id集合
* 装备id集合
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
d72ed641
...
@@ -49,7 +49,7 @@ public interface RepelQueryService {
...
@@ -49,7 +49,7 @@ public interface RepelQueryService {
/**
/**
* 待清退页面查询统计查询接口
* 待清退页面查询统计查询接口
*/
*/
List
<
ModelNameGroup
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
);
List
<
DevRepelVo
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
);
/**
/**
* 已清退列表
* 已清退列表
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
d72ed641
...
@@ -92,7 +92,6 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -92,7 +92,6 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
@Override
public
List
<
ModelNameGroup
>
toRepelList
(
Integer
unitId
)
{
public
List
<
ModelNameGroup
>
toRepelList
(
Integer
unitId
)
{
Map
<
String
,
ModelNameGroup
>
modelNameGroupMap
=
new
HashMap
<>();
Units
units
=
unitsService
.
findById
(
unitId
);
Units
units
=
unitsService
.
findById
(
unitId
);
return
toModelNameGroup
(
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
));
return
toModelNameGroup
(
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
));
}
}
...
@@ -105,7 +104,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -105,7 +104,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
String
key
=
deviceLibrary
.
getModel
()+
deviceLibrary
.
getName
();
String
key
=
deviceLibrary
.
getModel
()+
deviceLibrary
.
getName
();
if
(!
modelNameGroupMap
.
containsKey
(
key
)){
if
(!
modelNameGroupMap
.
containsKey
(
key
)){
ids
.
add
(
deviceLibrary
.
getId
());
ids
.
add
(
deviceLibrary
.
getId
());
modelNameGroupMap
.
put
(
key
,
new
ModelNameGroup
(
deviceLibrary
.
getModel
(),
deviceLibrary
.
get
Nam
e
(),
ids
));
modelNameGroupMap
.
put
(
key
,
new
ModelNameGroup
(
deviceLibrary
.
getModel
(),
deviceLibrary
.
get
Typ
e
(),
ids
));
}
else
{
}
else
{
ModelNameGroup
modelNameGroup
=
modelNameGroupMap
.
get
(
key
);
ModelNameGroup
modelNameGroup
=
modelNameGroupMap
.
get
(
key
);
ids
=
modelNameGroupMap
.
get
(
key
).
getIds
();
ids
=
modelNameGroupMap
.
get
(
key
).
getIds
();
...
@@ -119,27 +118,23 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -119,27 +118,23 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
}
@Override
@Override
public
List
<
ModelNameGroup
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
)
{
public
List
<
DevRepelVo
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
)
{
Map
<
String
,
ModelNameGroup
>
modelNameGroupMap
=
new
HashMap
<>();
Units
units
=
unitsService
.
findById
(
modelAndTypeVo
.
getUnitId
());
Units
units
=
unitsService
.
findById
(
modelAndTypeVo
.
getUnitId
());
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
modelAndTypeVo
.
getModel
()!=
null
&&
deviceLibrary
.
getModel
().
equals
(
modelAndTypeVo
.
getModel
()))
if
(
modelAndTypeVo
.
getModel
()==
null
&&
modelAndTypeVo
.
getType
()==
null
){
.
filter
(
deviceLibrary
->
modelAndTypeVo
.
getType
()!=
null
&&
deviceLibrary
.
getLifeStatus
().
equals
(
modelAndTypeVo
.
getType
())).
forEach
(
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
()
deviceLibrary
->
{
.
map
(
this
::
devRepelVo
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
new
ArrayList
<>();
}
else
if
(
modelAndTypeVo
.
getModel
()!=
null
&&
modelAndTypeVo
.
getType
()==
null
){
String
key
=
deviceLibrary
.
getModel
()+
deviceLibrary
.
getName
();
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getModel
().
equals
(
modelAndTypeVo
.
getModel
()))
if
(!
modelNameGroupMap
.
containsKey
(
key
)){
.
map
(
this
::
devRepelVo
).
collect
(
Collectors
.
toList
());
ids
.
add
(
deviceLibrary
.
getId
());
}
else
if
(
modelAndTypeVo
.
getModel
()==
null
&&
modelAndTypeVo
.
getType
()!=
null
){
modelNameGroupMap
.
put
(
key
,
new
ModelNameGroup
(
deviceLibrary
.
getModel
(),
deviceLibrary
.
getName
(),
ids
));
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
()
}
else
{
.
filter
(
deviceLibrary
->
deviceLibrary
.
getType
().
equals
(
modelAndTypeVo
.
getType
()))
ModelNameGroup
modelNameGroup
=
modelNameGroupMap
.
get
(
key
);
.
map
(
this
::
devRepelVo
).
collect
(
Collectors
.
toList
());
ids
=
modelNameGroupMap
.
get
(
key
).
getIds
();
}
else
{
ids
.
add
(
deviceLibrary
.
getId
());
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getModel
().
equals
(
modelAndTypeVo
.
getModel
()))
modelNameGroup
.
setIds
(
ids
);
.
filter
(
deviceLibrary
->
deviceLibrary
.
getType
().
equals
(
modelAndTypeVo
.
getType
()))
modelNameGroupMap
.
put
(
key
,
modelNameGroup
);
.
map
(
this
::
devRepelVo
).
collect
(
Collectors
.
toList
());
}
}
}
);
return
modelNameGroupMap
.
values
().
stream
().
sorted
(
Comparator
.
comparing
(
ModelNameGroup:
:
getModel
)).
collect
(
Collectors
.
toList
());
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论