Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
84f9df39
提交
84f9df39
authored
2月 14, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块): 新增了查询未上架的装备
新增了查询未上架的装备
上级
c074b818
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
108 行增加
和
0 行删除
+108
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+9
-0
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+8
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+61
-0
QueryNotOnVo.java
...ykj/dev/device/library/subject/model/vo/QueryNotOnVo.java
+30
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
84f9df39
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.model.vo.QueryNotOnVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.user.cache.StoreCache
;
import
com.tykj.dev.device.user.cache.StoreCache
;
...
@@ -1257,6 +1258,14 @@ public class DeviceLibraryController {
...
@@ -1257,6 +1258,14 @@ public class DeviceLibraryController {
return
ResponseEntity
.
ok
(
map
);
return
ResponseEntity
.
ok
(
map
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@PostMapping
(
"/fnNotOnDeviceQuery"
)
@ApiOperation
(
value
=
"查询未上架的装备"
,
notes
=
"查询未上架的装备"
)
public
ResponseEntity
<
Map
<
String
,
Object
>>
fnNotOnDeviceQuery
(
@RequestBody
QueryNotOnVo
queryNotOnVo
){
Map
<
String
,
Object
>
map
=
deviceLibraryService
.
fnNotOnDeviceQuery
(
queryNotOnVo
);
return
ResponseEntity
.
ok
(
map
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@PostMapping
(
"/fnModifyWarehouseLocationsInBatches"
)
@PostMapping
(
"/fnModifyWarehouseLocationsInBatches"
)
@ApiOperation
(
value
=
"修改出库和入库(3D)"
,
notes
=
"修改出库和入库"
)
@ApiOperation
(
value
=
"修改出库和入库(3D)"
,
notes
=
"修改出库和入库"
)
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
84f9df39
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.library.service;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.library.service;
import
com.tykj.dev.config.UpdateCache
;
import
com.tykj.dev.config.UpdateCache
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.model.vo.QueryNotOnVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.user.util.DecryptMD5
;
import
com.tykj.dev.device.user.util.DecryptMD5
;
...
@@ -564,6 +565,13 @@ public interface DeviceLibraryService {
...
@@ -564,6 +565,13 @@ public interface DeviceLibraryService {
*/
*/
Map
<
String
,
Object
>
fnConditionQuery
(
QueryTheWarehouseVo
queryTheWarehouseVo
);
Map
<
String
,
Object
>
fnConditionQuery
(
QueryTheWarehouseVo
queryTheWarehouseVo
);
/**
* 查询为上架的商品
* @param queryNotOnVo 条件查询类
* @return
*/
Map
<
String
,
Object
>
fnNotOnDeviceQuery
(
QueryNotOnVo
queryNotOnVo
);
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
batchUpdateDevicesByPackingIds
(
String
newModel
,
List
<
Integer
>
packingIds
);
void
importData
();
void
importData
();
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
84f9df39
...
@@ -18,6 +18,7 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
...
@@ -18,6 +18,7 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition
;
import
com.tykj.dev.device.library.subject.model.vo.AllVO
;
import
com.tykj.dev.device.library.subject.model.vo.AllVO
;
import
com.tykj.dev.device.library.subject.model.vo.QueryNotOnVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo
;
import
com.tykj.dev.device.library.subject.model.vo.UpdatePostionMessageVO
;
import
com.tykj.dev.device.library.subject.model.vo.UpdatePostionMessageVO
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.subject.vo.*
;
...
@@ -1410,6 +1411,66 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1410,6 +1411,66 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return
map
;
return
map
;
}
}
@Override
public
Map
<
String
,
Object
>
fnNotOnDeviceQuery
(
QueryNotOnVo
queryNotOnVo
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
BeanUtils
.
copyProperties
(
queryNotOnVo
,
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
List
<
Integer
>
deviceIds
=
queryNotOnVo
.
getDeviceIds
();
//先查询未上架的装备
List
<
DeviceLibrary
>
allByIds
=
findAllByIds
(
deviceIds
);
//根据构造器查询
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
//进行过滤
List
<
DeviceLibrary
>
deviceLibraryList
=
allByIds
.
stream
().
filter
(
deviceLibraries:
:
contains
).
collect
(
Collectors
.
toList
());
deviceLibraryList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
//3D位置的map
List
<
DeviceLibraryPosition
>
deviceLibraryPositionList
=
deviceLibraryPositionService
.
findAll
();
deviceLibraryPositionList
=
deviceLibraryPositionList
.
stream
().
filter
(
deviceLibraryPosition
->
deviceIds
.
contains
(
deviceLibraryPosition
.
getDeviceId
()))
.
collect
(
Collectors
.
toList
());
Map
<
Integer
,
DeviceLibraryPosition
>
positionMap
=
deviceLibraryPositionList
.
stream
().
collect
(
toMap
(
DeviceLibraryPosition:
:
getDeviceId
,
Function
.
identity
()));
List
<
AllVO
>
allVOS
=
new
ArrayList
<>();
//开始遍历装备
deviceLibraryList
.
forEach
(
deviceLibrary
->
{
AllVO
allVO
=
new
AllVO
();
//开始赋值
allVO
.
setDeviceLibrary
(
deviceLibrary
);
DeviceLibraryPosition
deviceLibraryPosition
=
positionMap
.
getOrDefault
(
deviceLibrary
.
getId
(),
new
DeviceLibraryPosition
());
allVO
.
setDeviceLibraryPosition
(
deviceLibraryPosition
);
allVOS
.
add
(
allVO
);
});
List
<
AllVO
>
pageAllVo
=
new
ArrayList
<>(
allVOS
);
Page
<
AllVO
>
allVOPage
=
PageUtil
.
getPerPage
(
queryNotOnVo
.
getPage
(),
queryNotOnVo
.
getSize
(),
pageAllVo
,
queryNotOnVo
.
getPageable
());
List
<
DeviceLibrary
>
collect
=
pageAllVo
.
stream
().
map
(
AllVO:
:
getDeviceLibrary
).
collect
(
Collectors
.
toList
());
List
<
String
>
models
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
seqNumberList
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getSeqNumber
).
collect
(
Collectors
.
toList
());
List
<
String
>
names
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getName
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
ownUnits
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getOwnUnit
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Integer
>
storageLocationIds
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getStorageLocationId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Integer
,
String
>
idMap
=
storeCache
.
getIdMap
();
map
.
put
(
"allVOPage"
,
allVOPage
);
map
.
put
(
"models"
,
models
);
map
.
put
(
"seqNumberList"
,
seqNumberList
);
map
.
put
(
"names"
,
names
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"storageLocation"
,
storageLocationIds
.
stream
().
map
(
integer
->
new
StorageLocationVo
(
integer
,
idMap
.
getOrDefault
(
integer
,
null
)))
.
collect
(
Collectors
.
toList
()));
return
map
;
}
// @Override
// @Override
// @UpdateCache
// @UpdateCache
// public int updatePartParentId(List<Integer> deviceIds) {
// public int updatePartParentId(List<Integer> deviceIds) {
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/model/vo/QueryNotOnVo.java
0 → 100644
浏览文件 @
84f9df39
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
model
.
vo
;
import
com.tykj.dev.misc.base.CustomPage
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zsp
* @create 2021/12/30 13:05
*/
@Data
@ApiModel
(
"未上架的装备查询类"
)
public
class
QueryNotOnVo
extends
CustomPage
{
@ApiModelProperty
(
value
=
"型号"
,
example
=
"bmxx"
)
public
String
model
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"BM-1"
)
public
String
name
;
@ApiModelProperty
(
value
=
"装备序列号"
,
example
=
"123-1"
)
public
String
seqNumber
;
@ApiModelProperty
(
value
=
"装备ids"
)
private
List
<
Integer
>
deviceIds
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论