Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
a03599a7
提交
a03599a7
authored
8月 12, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑装备,对设备统计进行排序
上级
f7712daf
流水线
#313
已失败 于阶段
变更
4
流水线
1
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
7 行删除
+27
-7
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+16
-6
DeviceLibraryUpdateVo.java
.../dev/device/library/subject/vo/DeviceLibraryUpdateVo.java
+7
-0
DeviceNewVo.java
...a/com/tykj/dev/device/library/subject/vo/DeviceNewVo.java
+3
-0
DeviceModelSort.java
...rc/main/java/com/tykj/dev/misc/utils/DeviceModelSort.java
+1
-1
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
a03599a7
...
...
@@ -79,8 +79,6 @@ public class DeviceLibraryController {
@Autowired
private
DeviceLibraryCacheService
cacheLibraryService
;
@ApiOperation
(
value
=
"修改装备备注"
,
notes
=
"修改装备备注"
)
@PostMapping
(
"/setRecord"
)
@CacheEvict
(
value
=
"devicesLibraryList"
,
key
=
"'device'"
,
allEntries
=
true
)
...
...
@@ -646,6 +644,19 @@ public class DeviceLibraryController {
if
(
libraryUpdateVo
.
getType
()
!=
null
)
{
deviceLibraryEntity
.
setType
(
libraryUpdateVo
.
getType
());
}
//add 库房
if
(
libraryUpdateVo
.
getStorageLocation
()!=
null
){
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
"将存放位置改为"
+
libraryUpdateVo
.
getStorageLocation
(),
null
,
null
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setStorageLocation
(
libraryUpdateVo
.
getStorageLocation
());
}
//add 备注
if
(
libraryUpdateVo
.
getRecord
()!=
null
){
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
"将备注改为"
+
libraryUpdateVo
.
getRecord
(),
null
,
null
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setRecord
(
libraryUpdateVo
.
getRecord
());
}
deviceLibraryService
.
update
(
deviceLibraryEntity
);
}
//添加绑定配件
...
...
@@ -809,12 +820,11 @@ public class DeviceLibraryController {
map
.
forEach
((
k
,
v
)->{
DeviceNewVo
deviceNewVo
=
new
DeviceNewVo
(
v
.
get
(
0
).
getModel
(),
v
.
get
(
0
).
getName
(),
v
.
get
(
0
).
getMatchingRangeName
(),
v
.
get
(
0
).
getTypeName
(),
v
.
size
(),
k
,
v
.
stream
().
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
()));
v
.
size
(),
k
,
DeviceModelSort
.
toUnitSort
(
k
),
v
.
stream
().
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
()));
deviceNewVoList
.
add
(
deviceNewVo
);
});
for
(
DeviceNewVo
deviceNewVo
:
deviceNewVoList
)
{
Integer
unitSort
=
DeviceModelSort
.
toUnitSort
(
deviceNewVo
.
getOwnUnit
());
}
deviceNewVoList
.
sort
(
Comparator
.
comparing
(
DeviceNewVo:
:
getLevel
));
return
deviceNewVoList
;
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibraryUpdateVo.java
浏览文件 @
a03599a7
...
...
@@ -45,4 +45,11 @@ public class DeviceLibraryUpdateVo {
@ApiModelProperty
(
value
=
"管理状态,0-不再所属单位,1-在所属单位"
)
private
Integer
manageStatus
;
@ApiModelProperty
(
"库存位置"
)
private
String
storageLocation
;
@ApiModelProperty
(
"备注"
)
private
String
record
;
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceNewVo.java
浏览文件 @
a03599a7
...
...
@@ -35,6 +35,9 @@ public class DeviceNewVo {
@ApiModelProperty
(
value
=
"所属单位"
,
example
=
"省机要局"
)
private
String
ownUnit
;
@ApiModelProperty
(
"组织架构级别"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"装备id"
)
private
List
<
Integer
>
devicesId
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/DeviceModelSort.java
浏览文件 @
a03599a7
...
...
@@ -43,7 +43,7 @@ public class DeviceModelSort {
/**
* 单位排序排序方法
* @param unitList 需要排序的型号
* @return 排
】
序过后的型号列表
* @return 排序过后的型号列表
*/
public
static
List
<
String
>
unitToSort
(
List
<
String
>
unitList
){
return
unitList
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceModelSort:
:
toUnitSort
)).
collect
(
Collectors
.
toList
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论