Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
4f3c1056
提交
4f3c1056
authored
3月 08, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
156bb127
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
5 行删除
+10
-5
ConfigController.java
...java/com/tykj/dev/config/controller/ConfigController.java
+2
-1
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+6
-4
DeviceStatisticsVo.java
...ykj/dev/device/library/subject/vo/DeviceStatisticsVo.java
+2
-0
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/controller/ConfigController.java
浏览文件 @
4f3c1056
...
...
@@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -63,7 +64,7 @@ public class ConfigController {
@GetMapping
(
value
=
"/select"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
select
()
{
Map
<
String
,
List
<
SystemConfig
>>
map
=
systemConfigDao
.
findAllByDeleteTag
(
0
).
stream
().
collect
(
groupingBy
(
SystemConfig:
:
getChineseName
));
Map
<
String
,
List
<
SystemConfig
>>
map
=
systemConfigDao
.
findAllByDeleteTag
(
0
).
stream
().
sorted
(
Comparator
.
comparing
(
SystemConfig:
:
getValue
)).
collect
(
groupingBy
(
SystemConfig:
:
getChineseName
));
// Map<String,List<String>> resultMap = new HashMap<>();
// for (String s:map.keySet()) {
// resultMap.put(s,map.get(s).stream().map(SystemConfig::getLabel).collect(Collectors.toList()));
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
4f3c1056
...
...
@@ -13,10 +13,7 @@ import com.tykj.dev.device.library.subject.vo.DeviceStatisticsVo;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
...
...
@@ -190,6 +187,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if
(
strings
.
length
==
2
)
{
DeviceStatisticsVo
deviceStatisticsVo
=
new
DeviceStatisticsVo
();
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
List
<
String
>
devSeqs
=
new
ArrayList
<>();
deviceStatisticsVo
.
setModel
(
strings
[
0
]);
deviceStatisticsVo
.
setName
(
strings
[
1
]);
// deviceStatisticsVo.setDeviceNumber(map.get(s).size());
...
...
@@ -212,6 +210,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
//遍历核心装备,按照相同型号的装备生命状态统计
for
(
DeviceLibrary
d2
:
map
.
get
(
s
))
{
deviceIds
.
add
(
d2
.
getId
());
if
(
d2
.
getSeqNumber
()!=
null
)
{
devSeqs
.
add
(
d2
.
getSeqNumber
());
}
num
++;
switch
(
d2
.
getLifeStatus
())
{
case
2
:
...
...
@@ -278,6 +279,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceStatisticsVo
.
setScrappedNum
(
scrappedNum
);
deviceStatisticsVo
.
setRetiredNum
(
retiredNum
);
deviceStatisticsVo
.
setUseNum
(
useNum
);
deviceStatisticsVo
.
setSeqs
(
StringSplitUtil
.
stringListToString
(
DeviceSeqUtil
.
getContinuousSeqs
(
devSeqs
)));
deviceStatisticsVos
.
add
(
deviceStatisticsVo
);
}
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceStatisticsVo.java
浏览文件 @
4f3c1056
...
...
@@ -71,4 +71,6 @@ public class DeviceStatisticsVo {
@ApiModelProperty
(
value
=
"该型号使用中装备Id列表"
)
private
List
<
Integer
>
useIds
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"序列号区间"
)
public
String
seqs
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论