Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
7f688260
提交
7f688260
authored
1月 10, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块,3D模块): 修改接口接收的参数
修改接口接收的参数
上级
d0826a99
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
39 行增加
和
23 行删除
+39
-23
DeviceLibraryPositionController.java
...e/library/controller/DeviceLibraryPositionController.java
+7
-7
DeviceLibraryPositionDao.java
...v/device/library/repository/DeviceLibraryPositionDao.java
+6
-2
DeviceLibraryPositionService.java
.../device/library/service/DeviceLibraryPositionService.java
+10
-4
DeviceLibraryPositionServiceImpl.java
...ibrary/service/impl/DeviceLibraryPositionServiceImpl.java
+7
-1
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+4
-7
UpdatePostionMessageVO.java
...vice/library/subject/model/vo/UpdatePostionMessageVO.java
+5
-2
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryPositionController.java
浏览文件 @
7f688260
...
@@ -40,23 +40,23 @@ public class DeviceLibraryPositionController {
...
@@ -40,23 +40,23 @@ public class DeviceLibraryPositionController {
}
}
@GetMapping
(
"/findById"
)
@GetMapping
(
"/findById"
)
@ApiOperation
(
value
=
"根据id查询"
)
@ApiOperation
(
value
=
"根据
装备
id查询"
)
public
ResponseEntity
<
DeviceLibraryPosition
>
findById
(
Integer
i
d
){
public
ResponseEntity
<
DeviceLibraryPosition
>
findById
(
Integer
deviceI
d
){
DeviceLibraryPosition
deviceLibraryPosition
=
deviceLibraryPositionService
.
findBy
Id
(
i
d
);
DeviceLibraryPosition
deviceLibraryPosition
=
deviceLibraryPositionService
.
findBy
DeviceId
(
deviceI
d
);
return
ResponseEntity
.
ok
(
deviceLibraryPosition
);
return
ResponseEntity
.
ok
(
deviceLibraryPosition
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GetMapping
(
"/delete"
)
@GetMapping
(
"/delete"
)
@ApiOperation
(
value
=
"根据id删除"
)
@ApiOperation
(
value
=
"根据
装备
id删除"
)
public
ResponseEntity
<
String
>
deleteByPosition
(
Integer
i
d
){
public
ResponseEntity
<
String
>
deleteByPosition
(
Integer
deviceI
d
){
deviceLibraryPositionService
.
deleteBy
Position
(
i
d
);
deviceLibraryPositionService
.
deleteBy
DeviceId
(
deviceI
d
);
return
ResponseEntity
.
ok
(
"删除成功"
);
return
ResponseEntity
.
ok
(
"删除成功"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@PostMapping
(
"/fnUpdatePostionMessage"
)
@PostMapping
(
"/fnUpdatePostionMessage"
)
@ApiOperation
(
value
=
"批量修改x y z位置"
,
notes
=
"修改x y z"
)
@ApiOperation
(
value
=
"批量修改x y z
和u
位置"
,
notes
=
"修改x y z"
)
public
ResponseEntity
<
String
>
fnUpdatePostionMessage
(
@RequestBody
List
<
UpdatePostionMessageVO
>
updatePostionMessageVOS
){
public
ResponseEntity
<
String
>
fnUpdatePostionMessage
(
@RequestBody
List
<
UpdatePostionMessageVO
>
updatePostionMessageVOS
){
deviceLibraryPositionService
.
fnUpdatePostionMessage
(
updatePostionMessageVOS
);
deviceLibraryPositionService
.
fnUpdatePostionMessage
(
updatePostionMessageVOS
);
return
ResponseEntity
.
ok
(
"修改成功"
);
return
ResponseEntity
.
ok
(
"修改成功"
);
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryPositionDao.java
浏览文件 @
7f688260
...
@@ -20,11 +20,15 @@ public interface DeviceLibraryPositionDao extends JpaRepository<DeviceLibraryPos
...
@@ -20,11 +20,15 @@ public interface DeviceLibraryPositionDao extends JpaRepository<DeviceLibraryPos
List
<
DeviceLibraryPosition
>
findAllByDeviceIdIn
(
List
<
Integer
>
deviceIds
);
List
<
DeviceLibraryPosition
>
findAllByDeviceIdIn
(
List
<
Integer
>
deviceIds
);
void
deleteByDeviceId
(
Integer
deviceId
);
@Transactional
@Transactional
@Modifying
@Modifying
@Query
(
"update DeviceLibraryPosition d set d.deviceLibraryPositionMessage = :deviceLibraryPositionMessage where d.id = :id"
)
@Query
(
"update DeviceLibraryPosition d set d.deviceLibraryPositionMessage = :deviceLibraryPositionMessage, "
+
"d.uNum = :uNum where d.deviceId = :deviceId"
)
int
fnUpdatePostionMessage
(
@Param
(
"deviceLibraryPositionMessage"
)
String
deviceLibraryPositionMessage
,
int
fnUpdatePostionMessage
(
@Param
(
"deviceLibraryPositionMessage"
)
String
deviceLibraryPositionMessage
,
@Param
(
"id"
)
Integer
id
);
@Param
(
"uNum"
)
String
uNum
,
@Param
(
"deviceId"
)
Integer
deviceId
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryPositionService.java
浏览文件 @
7f688260
...
@@ -36,6 +36,13 @@ public interface DeviceLibraryPositionService {
...
@@ -36,6 +36,13 @@ public interface DeviceLibraryPositionService {
*/
*/
DeviceLibraryPosition
findById
(
Integer
id
);
DeviceLibraryPosition
findById
(
Integer
id
);
/**
* 根据id查询单个对象
* @param deviceId 装备id
* @return 一个对象
*/
DeviceLibraryPosition
findByDeviceId
(
Integer
deviceId
);
/**
/**
* 根据id进行删除
* 根据id进行删除
* @param id id
* @param id id
...
@@ -43,11 +50,10 @@ public interface DeviceLibraryPositionService {
...
@@ -43,11 +50,10 @@ public interface DeviceLibraryPositionService {
void
deleteByPosition
(
Integer
id
);
void
deleteByPosition
(
Integer
id
);
/**
/**
* 根据装备id查询
* 根据id进行删除
* @param deviceId 装备的id
* @param deviceId id
* @return 对象
*/
*/
DeviceLibraryPosition
find
ByDeviceId
(
Integer
deviceId
);
void
delete
ByDeviceId
(
Integer
deviceId
);
/**
/**
* 根据装备id的集合进行查询
* 根据装备id的集合进行查询
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryPositionServiceImpl.java
浏览文件 @
7f688260
...
@@ -50,6 +50,11 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
...
@@ -50,6 +50,11 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
deviceLibraryPositionDao
.
deleteById
(
id
);
deviceLibraryPositionDao
.
deleteById
(
id
);
}
}
@Override
public
void
deleteByDeviceId
(
Integer
deviceId
)
{
deviceLibraryPositionDao
.
deleteByDeviceId
(
deviceId
);
}
@Override
@Override
public
DeviceLibraryPosition
findByDeviceId
(
Integer
deviceId
)
{
public
DeviceLibraryPosition
findByDeviceId
(
Integer
deviceId
)
{
return
deviceLibraryPositionDao
.
findByDeviceId
(
deviceId
);
return
deviceLibraryPositionDao
.
findByDeviceId
(
deviceId
);
...
@@ -65,7 +70,8 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
...
@@ -65,7 +70,8 @@ public class DeviceLibraryPositionServiceImpl implements DeviceLibraryPositionSe
if
(!
updatePostionMessageVO
.
isEmpty
()){
if
(!
updatePostionMessageVO
.
isEmpty
()){
updatePostionMessageVO
.
forEach
(
updatePostionMessageVO1
->
{
updatePostionMessageVO
.
forEach
(
updatePostionMessageVO1
->
{
String
json
=
updatePostionMessageVO1
.
getDeviceLibraryPositionMessageVo
().
toJson
();
String
json
=
updatePostionMessageVO1
.
getDeviceLibraryPositionMessageVo
().
toJson
();
deviceLibraryPositionDao
.
fnUpdatePostionMessage
(
json
,
updatePostionMessageVO1
.
getId
());
deviceLibraryPositionDao
.
fnUpdatePostionMessage
(
json
,
updatePostionMessageVO1
.
getUNum
(),
updatePostionMessageVO1
.
getDeviceId
());
});
});
}
}
}
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
7f688260
...
@@ -1327,14 +1327,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1327,14 +1327,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
pageAllVo
=
allVOS
.
stream
().
filter
(
allVO
->
{
pageAllVo
=
allVOS
.
stream
().
filter
(
allVO
->
{
DeviceLibraryPosition
deviceLibraryPosition
=
allVO
.
getDeviceLibraryPosition
();
DeviceLibraryPosition
deviceLibraryPosition
=
allVO
.
getDeviceLibraryPosition
();
if
(
deviceLibraryPosition
!=
null
)
{
if
(
deviceLibraryPosition
!=
null
)
{
String
deviceLibraryPositionName
=
deviceLibraryPosition
.
getDeviceLibraryPositionName
();
Integer
ifCabinet
=
deviceLibraryPosition
.
getIfCabinet
();
if
(
deviceLibraryPositionName
==
null
)
{
return
ifCabinet
==
0
;
return
true
;
}
else
{
return
false
;
}
}
else
{
}
else
{
//为空 说明该装备不在3D库中
return
false
;
return
false
;
}
}
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -1343,6 +1338,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1343,6 +1338,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
}
}
Page
<
AllVO
>
allVOPage
=
PageUtil
.
getPerPage
(
queryTheWarehouseVo
.
getPage
(),
Page
<
AllVO
>
allVOPage
=
PageUtil
.
getPerPage
(
queryTheWarehouseVo
.
getPage
(),
queryTheWarehouseVo
.
getSize
(),
pageAllVo
,
queryTheWarehouseVo
.
getPageable
());
queryTheWarehouseVo
.
getSize
(),
pageAllVo
,
queryTheWarehouseVo
.
getPageable
());
//不分页的数据
map
.
put
(
"pageAllVo"
,
pageAllVo
);
List
<
DeviceLibrary
>
collect
=
pageAllVo
.
stream
().
map
(
AllVO:
:
getDeviceLibrary
).
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
collect
=
pageAllVo
.
stream
().
map
(
AllVO:
:
getDeviceLibrary
).
collect
(
Collectors
.
toList
());
List
<
String
>
models
=
List
<
String
>
models
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
());
collect
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
());
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/model/vo/UpdatePostionMessageVO.java
浏览文件 @
7f688260
...
@@ -14,10 +14,13 @@ import lombok.Data;
...
@@ -14,10 +14,13 @@ import lombok.Data;
@ApiModel
(
"修改xyz"
)
@ApiModel
(
"修改xyz"
)
public
class
UpdatePostionMessageVO
extends
CustomPage
{
public
class
UpdatePostionMessageVO
extends
CustomPage
{
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"
装备
id"
,
example
=
"1"
)
public
Integer
i
d
;
public
Integer
deviceI
d
;
@ApiModelProperty
(
value
=
"位置类vo"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"位置类vo"
,
example
=
"1"
)
private
DeviceLibraryPositionMessageVo
deviceLibraryPositionMessageVo
;
private
DeviceLibraryPositionMessageVo
deviceLibraryPositionMessageVo
;
@ApiModelProperty
(
value
=
"u位"
,
notes
=
"1-1"
)
private
String
uNum
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论