Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
29e042b5
提交
29e042b5
authored
3月 04, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
fa7b1996
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
3 行删除
+43
-3
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+1
-0
MatchingDeviceLibraryServiceImpl.java
...tching/service/impl/MatchingDeviceLibraryServiceImpl.java
+6
-1
MatchingDeviceLibrary.java
.../device/matching/subject/domin/MatchingDeviceLibrary.java
+14
-0
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+4
-0
RepairDetailServiceImpl.java
...v/device/repair/service/impl/RepairDetailServiceImpl.java
+4
-2
RepairDetail.java
...om/tykj/dev/device/repair/subject/domin/RepairDetail.java
+14
-0
没有找到文件。
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
29e042b5
...
...
@@ -183,6 +183,7 @@ public class MatchingDeviceController {
if
(
m
.
getDeviceId
()
>
0
)
{
m
.
setRelateDevice
(
deviceLibraryService
.
getOne
(
m
.
getDeviceId
()).
getRfidSurfaceId
());
}
m
.
setConfigName
();
}
return
ResponseEntity
.
ok
(
page
);
}
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/service/impl/MatchingDeviceLibraryServiceImpl.java
浏览文件 @
29e042b5
...
...
@@ -75,7 +75,12 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
@Override
public
MatchingDeviceLibrary
getOne
(
Integer
id
)
{
Optional
<
MatchingDeviceLibrary
>
matchingDeviceLibraryEntity
=
matchingDeviceLibraryDao
.
findById
(
id
);
return
matchingDeviceLibraryEntity
.
orElse
(
null
);
if
(
matchingDeviceLibraryEntity
.
isPresent
()){
return
matchingDeviceLibraryEntity
.
get
().
setConfigName
();
}
else
{
throw
new
ApiException
(
"id不存在"
);
}
}
@Override
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/subject/domin/MatchingDeviceLibrary.java
浏览文件 @
29e042b5
package
com
.
tykj
.
dev
.
device
.
matching
.
subject
.
domin
;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -118,4 +120,16 @@ public class MatchingDeviceLibrary {
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
@ApiModelProperty
(
value
=
"生命状态"
)
@Transient
private
String
lifeStatusName
;
public
MatchingDeviceLibrary
setConfigName
(){
ConfigCache
configCache
=
SpringUtils
.
getBean
(
"initConfigCache"
);
if
(
configCache
!=
null
)
{
setLifeStatusName
(
configCache
.
getLifeStatusMap
().
get
(
this
.
lifeStatus
)==
null
?
"-"
:
configCache
.
getLifeStatusMap
().
get
(
this
.
lifeStatus
));
}
return
this
;
}
}
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
29e042b5
...
...
@@ -1477,6 +1477,7 @@ public class RepairController {
repairDetailList
.
forEach
(
repairDetail
->
{
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
());
repairDetail
.
setLocationUnit
(
deviceLibrary
.
getLocationUnit
());
repairDetail
.
setConfigName
();
});
repairBillDetailVo
.
setRepairDetails
(
repairDetailList
);
//设置装备备注
...
...
@@ -1525,6 +1526,7 @@ public class RepairController {
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
1
);
repairDetails
.
forEach
(
repairDetail
->
{
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
))).
collect
(
Collectors
.
toList
()));
}
...
...
@@ -1536,6 +1538,7 @@ public class RepairController {
repairDetails1
.
removeAll
(
repairDetails
);
repairDetails1
.
forEach
(
repairDetail
->
{
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
});
return
ResponseEntity
.
ok
(
repairDetails1
.
stream
().
filter
(
repairDetail
->
userPublicService
.
findUnitsNameByUserId
(
repairDetail
.
getCreateUserId
()).
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
))).
collect
(
Collectors
.
toList
()));
}
...
...
@@ -1544,6 +1547,7 @@ public class RepairController {
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAllByRepairStatus
(
2
);
repairDetails
.
forEach
(
repairDetail
->
{
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setConfigName
();
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
))).
collect
(
Collectors
.
toList
()));
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairDetailServiceImpl.java
浏览文件 @
29e042b5
...
...
@@ -64,7 +64,9 @@ public class RepairDetailServiceImpl implements RepairDetailService {
@Override
public
List
<
RepairDetail
>
findByBillId
(
Integer
billId
)
{
return
deviceRepairDetailDao
.
findByDeviceRepairBillId
(
billId
);
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailDao
.
findByDeviceRepairBillId
(
billId
);
repairDetails
.
forEach
(
RepairDetail:
:
setConfigName
);
return
repairDetails
;
}
@Override
...
...
@@ -88,7 +90,7 @@ public class RepairDetailServiceImpl implements RepairDetailService {
public
RepairDetail
getOne
(
Integer
id
)
{
Optional
<
RepairDetail
>
repairDetail
=
deviceRepairDetailDao
.
findById
(
id
);
if
(
repairDetail
.
isPresent
())
{
return
repairDetail
.
get
();
return
repairDetail
.
get
()
.
setConfigName
()
;
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"所查询ID不存在"
));
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/domin/RepairDetail.java
浏览文件 @
29e042b5
package
com
.
tykj
.
dev
.
device
.
repair
.
subject
.
domin
;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -144,4 +146,16 @@ public class RepairDetail {
private
String
record3
;
private
Integer
repairBackBillId
;
@ApiModelProperty
(
value
=
"形态"
)
@Transient
private
String
typeName
;
public
RepairDetail
setConfigName
(){
ConfigCache
configCache
=
SpringUtils
.
getBean
(
"initConfigCache"
);
if
(
configCache
!=
null
)
{
setTypeName
(
configCache
.
getStyleMap
().
get
(
this
.
type
)==
null
?
"-"
:
configCache
.
getStyleMap
().
get
(
this
.
type
));
}
return
this
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论