Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
99e8e8ea
提交
99e8e8ea
authored
1月 21, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(装备模块和3D模块): 导入装备数据到3D库中
导入装备数据到3D库中
上级
e3cc2dfc
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
0 行删除
+23
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+8
-0
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+2
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+13
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
99e8e8ea
...
@@ -1232,6 +1232,14 @@ public class DeviceLibraryController {
...
@@ -1232,6 +1232,14 @@ public class DeviceLibraryController {
return
ResponseEntity
.
ok
(
s
);
return
ResponseEntity
.
ok
(
s
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GetMapping
(
"/importData"
)
@ApiOperation
(
value
=
"装备导入3D中"
)
public
ResponseEntity
<
String
>
importData
(){
deviceLibraryService
.
importData
();
return
ResponseEntity
.
ok
(
"导入成功"
);
}
// @ApiOperation(value = "修改单位名称", notes = "修改单位名称")
// @ApiOperation(value = "修改单位名称", notes = "修改单位名称")
// @PostMapping("/updateDeviceLocationAndOwnUnit")
// @PostMapping("/updateDeviceLocationAndOwnUnit")
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
99e8e8ea
...
@@ -565,4 +565,6 @@ public interface DeviceLibraryService {
...
@@ -565,4 +565,6 @@ public interface DeviceLibraryService {
Map
<
String
,
Object
>
fnConditionQuery
(
QueryTheWarehouseVo
queryTheWarehouseVo
);
Map
<
String
,
Object
>
fnConditionQuery
(
QueryTheWarehouseVo
queryTheWarehouseVo
);
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
importData
();
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
99e8e8ea
...
@@ -1422,6 +1422,19 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1422,6 +1422,19 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
deviceLibraryDao
.
batchUpdateDevicesByPackingIds
(
newModel
,
packingIds
);
deviceLibraryDao
.
batchUpdateDevicesByPackingIds
(
newModel
,
packingIds
);
}
}
@Override
public
void
importData
()
{
List
<
DeviceLibrary
>
deviceLibraryList
=
deviceLibraryDao
.
findAll
();
List
<
DeviceLibraryPosition
>
deviceLibraryPositions
=
new
ArrayList
<>();
deviceLibraryList
.
forEach
(
deviceLibrary
->
{
DeviceLibraryPosition
deviceLibraryPosition
=
new
DeviceLibraryPosition
();
deviceLibraryPosition
.
setDeviceId
(
deviceLibrary
.
getId
());
deviceLibraryPositions
.
add
(
deviceLibraryPosition
);
});
//批量保存到3D中
deviceLibraryPositionService
.
batchDeviceLibraryPositions
(
deviceLibraryPositions
);
}
private
Specification
<
DeviceLibrary
>
getSelectSpecification
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
private
Specification
<
DeviceLibrary
>
getSelectSpecification
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
//unitId为空,默认查询当前单位
//unitId为空,默认查询当前单位
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论