Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
317d7fbe
提交
317d7fbe
authored
11月 18, 2021
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(统计,配套设备): 修改了配套设备的统计查询接口,以及修改了配套设备绑定的bug,删除设备和添加设备同时存在时会出现
修改了配套设备的统计查询接口,以及修改了配套设备绑定的bug
上级
e56c95f7
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
23 行增加
和
7 行删除
+23
-7
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+2
-1
MatchingDeviceLibraryDao.java
.../device/matching/repository/MatchingDeviceLibraryDao.java
+2
-0
MatchingDeviceLibraryService.java
...device/matching/service/MatchingDeviceLibraryService.java
+9
-0
MatchingDeviceLibraryServiceImpl.java
...tching/service/impl/MatchingDeviceLibraryServiceImpl.java
+9
-2
StatisticalServiceImpl.java
.../dev/statistical/service/impl/StatisticalServiceImpl.java
+1
-4
没有找到文件。
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
317d7fbe
...
@@ -522,7 +522,8 @@ public class MatchingDeviceController {
...
@@ -522,7 +522,8 @@ public class MatchingDeviceController {
m
.
setDeviceId
(
matchingDeviceEditVo
.
getAddDeviceId
());
m
.
setDeviceId
(
matchingDeviceEditVo
.
getAddDeviceId
());
}
}
//删除
//删除
if
(
matchingDeviceEditVo
.
getDeleteDeviceId
()
!=
null
){
//zjm 上面执行了下面回覆盖上面的赋值
if
(
matchingDeviceEditVo
.
getAddDeviceId
()
==
null
&&
matchingDeviceEditVo
.
getDeleteDeviceId
()
!=
null
){
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
matchingDeviceEditVo
.
getDeleteDeviceId
());
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
matchingDeviceEditVo
.
getDeleteDeviceId
());
String
remark
=
"将序列号为"
+
m
.
getSeqNumber
()
+
"的配套装备与序列号为"
+
deviceLibrary
.
getSeqNumber
()
+
"的装备进行解除绑定"
;
String
remark
=
"将序列号为"
+
m
.
getSeqNumber
()
+
"的配套装备与序列号为"
+
deviceLibrary
.
getSeqNumber
()
+
"的装备进行解除绑定"
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
m
.
getId
(),
remark
,
null
,
null
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
m
.
getId
(),
remark
,
null
,
null
);
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/repository/MatchingDeviceLibraryDao.java
浏览文件 @
317d7fbe
...
@@ -15,4 +15,6 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi
...
@@ -15,4 +15,6 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi
List
<
MatchingDeviceLibrary
>
findAllByCreateUnitId
(
Integer
unitId
);
List
<
MatchingDeviceLibrary
>
findAllByCreateUnitId
(
Integer
unitId
);
List
<
MatchingDeviceLibrary
>
findAllByCreateUnitIdIn
(
List
<
Integer
>
unitIds
);
}
}
dev-matching/src/main/java/com/tykj/dev/device/matching/service/MatchingDeviceLibraryService.java
浏览文件 @
317d7fbe
...
@@ -53,6 +53,15 @@ public interface MatchingDeviceLibraryService {
...
@@ -53,6 +53,15 @@ public interface MatchingDeviceLibraryService {
*/
*/
List
<
MatchingDeviceLibrary
>
getMatchingDevicePage
(
MatchingDeviceSelectVo
matchingDeviceSelectVo
);
List
<
MatchingDeviceLibrary
>
getMatchingDevicePage
(
MatchingDeviceSelectVo
matchingDeviceSelectVo
);
/**
* @param unitId 单位id
*/
List
<
MatchingDeviceLibrary
>
getMatchingByUnitIdAll
(
Integer
unitId
);
/**
/**
* @return 所有类型
* @return 所有类型
*/
*/
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/service/impl/MatchingDeviceLibraryServiceImpl.java
浏览文件 @
317d7fbe
...
@@ -180,8 +180,8 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
...
@@ -180,8 +180,8 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
}
}
//如果areaId为Null,unitId不为null,返回对应单位的配套设备
//如果areaId为Null,unitId不为null,返回对应单位的配套设备
else
{
else
{
String
unitName
=
userPublicService
.
findByUnitsToname
(
selectUnitId
);
//
String unitName = userPublicService.findByUnitsToname(selectUnitId);
predicateBuilder
.
eq
(
"createUnit
"
,
unitName
);
predicateBuilder
.
eq
(
"createUnit
Id"
,
selectUnitId
);
return
matchingDeviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
return
matchingDeviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
}
}
}
}
...
@@ -221,6 +221,13 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
...
@@ -221,6 +221,13 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
}
}
}
}
@Override
public
List
<
MatchingDeviceLibrary
>
getMatchingByUnitIdAll
(
Integer
unitId
)
{
List
<
Integer
>
unitIds
=
userPublicService
.
findByUnitIdSubordinateAll
(
unitId
).
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
());
return
matchingDeviceLibraryDao
.
findAllByCreateUnitIdIn
(
unitIds
);
}
/**
/**
* @return 所有类型
* @return 所有类型
*/
*/
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/impl/StatisticalServiceImpl.java
浏览文件 @
317d7fbe
...
@@ -537,12 +537,9 @@ public class StatisticalServiceImpl implements StatisticalService {
...
@@ -537,12 +537,9 @@ public class StatisticalServiceImpl implements StatisticalService {
// }else {
// }else {
// workBench.setMatchingDeviceNum(0);
// workBench.setMatchingDeviceNum(0);
// }
// }
MatchingDeviceSelectVo
matchingDeviceSelectVo
=
new
MatchingDeviceSelectVo
();
//通过单位id查询区域id
//通过单位id查询区域id
Integer
currentUnitId
=
userUtils
.
getCurrentUnitId
();
Integer
currentUnitId
=
userUtils
.
getCurrentUnitId
();
Units
units
=
unitsService
.
findById
(
currentUnitId
);
List
<
MatchingDeviceLibrary
>
matchingDevicePage
=
matchingDeviceLibraryService
.
getMatchingByUnitIdAll
(
currentUnitId
);
matchingDeviceSelectVo
.
setAreaId
(
units
.
getAreaId
());
List
<
MatchingDeviceLibrary
>
matchingDevicePage
=
matchingDeviceLibraryService
.
getMatchingDevicePage
(
matchingDeviceSelectVo
);
if
(!
matchingDevicePage
.
isEmpty
()){
if
(!
matchingDevicePage
.
isEmpty
()){
workBench
.
setMatchingDeviceNum
(
matchingDevicePage
.
size
());
workBench
.
setMatchingDeviceNum
(
matchingDevicePage
.
size
());
}
else
{
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论