Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
368c48a3
提交
368c48a3
authored
2月 10, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块): 新增根据装备id查询所有配件接口
新增根据装备id查询所有配件接口
上级
e003c2b7
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
58 行增加
和
0 行删除
+58
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+8
-0
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+7
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+12
-0
PartsVo.java
.../java/com/tykj/dev/device/library/subject/vo/PartsVo.java
+31
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
368c48a3
...
@@ -1273,6 +1273,14 @@ public class DeviceLibraryController {
...
@@ -1273,6 +1273,14 @@ public class DeviceLibraryController {
return
ResponseEntity
.
ok
(
"导入成功"
);
return
ResponseEntity
.
ok
(
"导入成功"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GetMapping
(
"/findParts"
)
@ApiOperation
(
value
=
"根据装备id查询配件"
)
public
ResponseEntity
<
List
<
PartsVo
>>
findParts
(
Integer
deviceId
){
List
<
PartsVo
>
allParts
=
deviceLibraryService
.
findAllParts
(
deviceId
);
return
ResponseEntity
.
ok
(
allParts
);
}
// @ApiOperation(value = "修改单位名称", notes = "修改单位名称")
// @ApiOperation(value = "修改单位名称", notes = "修改单位名称")
// @PostMapping("/updateDeviceLocationAndOwnUnit")
// @PostMapping("/updateDeviceLocationAndOwnUnit")
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
368c48a3
...
@@ -567,4 +567,11 @@ public interface DeviceLibraryService {
...
@@ -567,4 +567,11 @@ public interface DeviceLibraryService {
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
importData
();
void
importData
();
/**
* 配件的集合
* @param deviceId 装备id
* @return 配件的集合
*/
List
<
PartsVo
>
findAllParts
(
Integer
deviceId
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
368c48a3
...
@@ -1463,6 +1463,18 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1463,6 +1463,18 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceLibraryPositionService
.
batchDeviceLibraryPositions
(
deviceLibraryPositions
);
deviceLibraryPositionService
.
batchDeviceLibraryPositions
(
deviceLibraryPositions
);
}
}
@Override
public
List
<
PartsVo
>
findAllParts
(
Integer
deviceId
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAllByPartParentId
(
deviceId
);
List
<
PartsVo
>
partsVos
=
new
ArrayList
<>();
deviceLibraries
.
forEach
(
deviceLibrary
->
{
PartsVo
partsVo
=
new
PartsVo
();
BeanUtils
.
copyProperties
(
deviceLibrary
,
partsVo
);
partsVos
.
add
(
partsVo
);
});
return
partsVos
;
}
private
Specification
<
DeviceLibrary
>
getSelectSpecification
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
private
Specification
<
DeviceLibrary
>
getSelectSpecification
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
//unitId为空,默认查询当前单位
//unitId为空,默认查询当前单位
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/PartsVo.java
0 → 100644
浏览文件 @
368c48a3
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author zsp
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"根据装备id查询配件的vo"
)
public
class
PartsVo
{
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"序列号"
)
private
String
seqNumber
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论