Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
e882ac99
提交
e882ac99
authored
11月 11, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块): 新增为工作交接查询装备的接口
新增为工作交接查询装备的接口
上级
ed83577e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
135 行增加
和
6 行删除
+135
-6
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+5
-6
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+6
-0
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+6
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+41
-0
DeviceLibrary.java
.../tykj/dev/device/library/subject/domin/DeviceLibrary.java
+12
-0
WorkUseVo.java
...ava/com/tykj/dev/device/library/subject/vo/WorkUseVo.java
+37
-0
WorkUseVos.java
...va/com/tykj/dev/device/library/subject/vo/WorkUseVos.java
+28
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
e882ac99
...
@@ -942,7 +942,11 @@ public class AllotBillController {
...
@@ -942,7 +942,11 @@ public class AllotBillController {
}
}
@GetMapping
(
"/getFileList"
)
@ApiOperation
(
"通过任务id查询账单中文件"
)
public
ResponseEntity
getFileList
(
Integer
taskId
){
return
ResponseEntity
.
ok
(
allotBillService
.
getFileList
(
taskId
));
}
...
@@ -1068,11 +1072,6 @@ public class AllotBillController {
...
@@ -1068,11 +1072,6 @@ public class AllotBillController {
}
}
}
}
@GetMapping
(
"getFileList"
)
@ApiOperation
(
"通过任务id查询账单中文件"
)
public
ResponseEntity
getFileList
(
Integer
taskId
){
return
ResponseEntity
.
ok
(
allotBillService
.
getFileList
(
taskId
));
}
}
}
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
e882ac99
...
@@ -1131,6 +1131,12 @@ public class DeviceLibraryController {
...
@@ -1131,6 +1131,12 @@ public class DeviceLibraryController {
return
setOrderNumber
(
sortNum
,
allListAndParent
);
return
setOrderNumber
(
sortNum
,
allListAndParent
);
}
}
@ApiOperation
(
value
=
"为工作交接查询装备"
,
notes
=
"为工作交接查询装备"
)
@GetMapping
(
"/selectDeviceForWorkUse"
)
public
List
<
WorkUseVo
>
selectDeviceForWorkUse
(){
return
deviceLibraryService
.
getDevicesForWorkUse
();
}
public
List
<
DeviceLibrary
>
getAllListAndParent
(){
public
List
<
DeviceLibrary
>
getAllListAndParent
(){
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
e882ac99
...
@@ -499,4 +499,10 @@ public interface DeviceLibraryService {
...
@@ -499,4 +499,10 @@ public interface DeviceLibraryService {
void
updateStorageLocation
(
UpdateStorageLocationVo
updateStorageLocationVo
);
void
updateStorageLocation
(
UpdateStorageLocationVo
updateStorageLocationVo
);
/**
* 查询装备给工作交接使用
* @return WorkUseVos
*/
List
<
WorkUseVo
>
getDevicesForWorkUse
();
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
e882ac99
...
@@ -1162,6 +1162,47 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1162,6 +1162,47 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
});
});
}
}
@Override
public
List
<
WorkUseVo
>
getDevicesForWorkUse
()
{
//获取当前登录的单位名称
String
currentUserUnitName
=
userUtils
.
getCurrentUserUnitName
();
PredicateBuilder
<
DeviceLibrary
>
builder
=
Specifications
.
and
();
builder
.
eq
(
"ownUnit"
,
currentUserUnitName
);
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
builder
.
build
());
List
<
Integer
>
status
=
new
ArrayList
<>(
Arrays
.
asList
(
5
,
11
,
12
));
deviceLibraries
=
deviceLibraries
.
stream
().
filter
(
deviceLibrary
->
!
status
.
contains
(
deviceLibrary
.
getLifeStatus
()))
.
collect
(
Collectors
.
toList
());
//进行过滤赋值、
deviceLibraries
.
forEach
(
deviceLibrary
->
{
if
(!
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
//不在库
deviceLibrary
.
setIsInLibrary
(
1
);
}
else
{
//在库
deviceLibrary
.
setIsInLibrary
(
0
);
}
});
//按照型号,名称,是否在库进行分组 "Ǵ"
Map
<
String
,
List
<
DeviceLibrary
>>
map
=
deviceLibraries
.
stream
().
collect
(
groupingBy
(
deviceLibrary
->
deviceLibrary
.
getModel
()
+
"Ǵ"
+
deviceLibrary
.
getName
()
+
"Ǵ"
+
deviceLibrary
.
getIsInLibrary
()));
List
<
WorkUseVo
>
workUseVos
=
new
ArrayList
<>();
map
.
keySet
().
forEach
(
s
->
{
WorkUseVo
workUseVo
=
new
WorkUseVo
();
String
[]
split
=
s
.
split
(
"Ǵ"
);
workUseVo
.
setModel
(
split
[
0
]);
workUseVo
.
setName
(
split
[
1
]);
workUseVo
.
setIsInLibrary
(
Integer
.
valueOf
(
split
[
2
]));
List
<
DeviceLibrary
>
deviceLibraries1
=
map
.
get
(
s
);
List
<
String
>
seqList
=
deviceLibraries1
.
stream
().
map
(
DeviceLibrary:
:
getSeqNumber
).
collect
(
Collectors
.
toList
());
workUseVo
.
setSeqNumber
(
String
.
join
(
"-"
,
seqList
));
workUseVo
.
setDeviceCount
(
deviceLibraries1
.
size
());
workUseVos
.
add
(
workUseVo
);
});
return
workUseVos
;
}
// @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/domin/DeviceLibrary.java
浏览文件 @
e882ac99
...
@@ -4,6 +4,7 @@ import com.tykj.dev.config.cache.ConfigCache;
...
@@ -4,6 +4,7 @@ import com.tykj.dev.config.cache.ConfigCache;
import
com.tykj.dev.device.library.subject.vo.DeviceExcel
;
import
com.tykj.dev.device.library.subject.vo.DeviceExcel
;
import
com.tykj.dev.device.library.subject.vo.DeviceExcelVo
;
import
com.tykj.dev.device.library.subject.vo.DeviceExcelVo
;
import
com.tykj.dev.device.library.subject.vo.DeviceVo
;
import
com.tykj.dev.device.library.subject.vo.DeviceVo
;
import
com.tykj.dev.device.library.subject.vo.WorkUseVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -277,6 +278,10 @@ public class DeviceLibrary implements Serializable {
...
@@ -277,6 +278,10 @@ public class DeviceLibrary implements Serializable {
@Transient
@Transient
private
Integer
orderNumber
;
private
Integer
orderNumber
;
@ApiModelProperty
(
value
=
"是否在库"
,
notes
=
"0 在库 1不在库"
)
@Transient
private
Integer
isInLibrary
;
public
void
addChildNode
(
DeviceLibrary
deviceLibraryEntity
)
{
public
void
addChildNode
(
DeviceLibrary
deviceLibraryEntity
)
{
childs
.
add
(
deviceLibraryEntity
);
childs
.
add
(
deviceLibraryEntity
);
}
}
...
@@ -292,6 +297,13 @@ public class DeviceLibrary implements Serializable {
...
@@ -292,6 +297,13 @@ public class DeviceLibrary implements Serializable {
return
mapper
.
map
(
this
,
DeviceVo
.
class
);
return
mapper
.
map
(
this
,
DeviceVo
.
class
);
}
}
// public WorkUseVo toWorkUse(){
// setConfigName();
// //modelMap复制
// ModelMapper mapper = BeanHelper.getUserMapper();
// return mapper.map(this, WorkUseVo.class);
// }
public
DeviceExcelVo
toDeviceExcelVo
(){
public
DeviceExcelVo
toDeviceExcelVo
(){
setConfigName
();
setConfigName
();
//modelMap复制
//modelMap复制
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/WorkUseVo.java
0 → 100644
浏览文件 @
e882ac99
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.Data
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author zsp
*/
@Data
@ApiModel
(
"返回给工作交接的vo"
)
@Repository
public
class
WorkUseVo
{
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"序列号"
)
private
String
seqNumber
;
@ApiModelProperty
(
value
=
"装备数量"
)
private
Integer
deviceCount
;
@ApiModelProperty
(
value
=
"是否在库"
,
notes
=
"0 在库 1不在库"
)
private
Integer
isInLibrary
;
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/WorkUseVos.java
0 → 100644
浏览文件 @
e882ac99
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author zsp
*/
@Data
@ApiModel
(
"返回给工作交接的vos"
)
@Repository
public
class
WorkUseVos
{
@ApiModelProperty
(
value
=
"非在库装备列表"
)
private
List
<
WorkUseVo
>
exceptionList
;
@ApiModelProperty
(
value
=
"在库装备列表"
)
private
List
<
WorkUseVo
>
normalList
;
// @ApiModelProperty(value = "是否在库",notes = "0 在库 1不在库")
// private Integer isInLibrary;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论