Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
8bf077a4
提交
8bf077a4
authored
4月 13, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
853c2536
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
60 行增加
和
36 行删除
+60
-36
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+3
-1
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+3
-1
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+10
-9
PackingLibraryDao.java
...tykj/dev/device/packing/repository/PackingLibraryDao.java
+2
-0
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+1
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
FileUploadVo.java
...a/com/tykj/dev/device/repair/subject/vo/FileUploadVo.java
+4
-1
DeviceRetiredController.java
...ev/device/retired/controller/DeviceRetiredController.java
+30
-23
DeviceRetiredResultVo.java
...j/dev/device/retired/entity/vo/DeviceRetiredResultVo.java
+7
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
8bf077a4
...
...
@@ -154,7 +154,9 @@ public class AllotBillController {
}
//1.添加配发单
AllotBill
a
=
allotBillSaveVo
.
toDo
();
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
if
(
allotBillSaveVo
.
getTaskId
()==
null
)
{
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
}
AllotBill
allotBillEntity
;
if
(
allotBillSaveVo
.
getTaskId
()==
null
){
allotBillEntity
=
allotBillService
.
addEntity
(
a
);
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
8bf077a4
...
...
@@ -93,7 +93,9 @@ public class BackController {
}
//1.添加配发单
AllotBackBill
a
=
allotBillSaveVo
.
toBackDo
();
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
if
(
allotBillSaveVo
.
getTaskId
()==
null
)
{
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
}
AllotBackBill
allotBackBill
=
allotBackBillService
.
addEntity
(
a
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
8bf077a4
...
...
@@ -20,6 +20,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -85,11 +86,11 @@ public class DeviceLibraryController {
}
@ApiOperation
(
value
=
"根据装备id查询装备详情"
,
notes
=
"根据装备id查询装备详情"
)
@PostMapping
(
"/selectByIds"
)
public
ResponseEntity
selectByIds
(
@RequestBody
List
<
Integer
>
ids
){
@PostMapping
(
"/selectByIds
/{page}/{size}
"
)
public
ResponseEntity
selectByIds
(
@RequestBody
List
<
Integer
>
ids
,
@PathVariable
(
"page"
)
int
page
,
@PathVariable
(
"size"
)
int
size
){
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
ids
.
forEach
(
integer
->
deviceLibraries
.
add
(
deviceLibraryService
.
getOne
(
integer
).
setConfigName
()));
return
ResponseEntity
.
ok
(
deviceLibraries
);
return
ResponseEntity
.
ok
(
PageUtil
.
getPerPage
(
page
,
size
,
deviceLibraries
,
PageRequest
.
of
(
page
,
size
))
);
}
@ApiOperation
(
value
=
"根据装备id查询装备详情"
,
notes
=
"根据装备id查询装备详情"
)
...
...
@@ -479,7 +480,7 @@ public class DeviceLibraryController {
d
.
setPartParentId
(
deviceEditVo
.
getDeviceId
());
deviceLibraryService
.
update
(
d
);
//添加装备日志
String
remark
=
"将
表面号为"
+
d
.
getRfidSurfaceId
()
+
"的配件与表面号为"
+
deviceLibraryEntity
.
getRfidSurfaceId
()
+
"的装备绑定"
;
String
remark
=
"将
序列号为"
+
d
.
getSeqNumber
()
+
"的配件与表面号为"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"的装备绑定"
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
DeviceLogDto
deviceLogDto2
=
new
DeviceLogDto
(
id
,
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
...
...
@@ -489,7 +490,7 @@ public class DeviceLibraryController {
deviceLibraryEntity
.
setPartParentId
(
id
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
//添加装备日志
String
remark
=
"将
表面号为"
+
deviceLibraryEntity
.
getRfidSurfaceId
()
+
"的配件与表面号为"
+
d
.
getRfidSurfaceId
()
+
"的装备绑定"
;
String
remark
=
"将
序列号为"
+
deviceLibraryEntity
.
getSeqNumber
()
+
"的配件与序列号为"
+
d
.
getSeqNumber
()
+
"的装备绑定"
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
DeviceLogDto
deviceLogDto2
=
new
DeviceLogDto
(
id
,
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
...
...
@@ -529,19 +530,19 @@ public class DeviceLibraryController {
return
ResultUtil
.
success
(
"更新成功"
);
}
@ApiOperation
(
value
=
"通过
表面
号查询配件"
,
notes
=
"通过表面号查询配件"
)
@ApiOperation
(
value
=
"通过
序列
号查询配件"
,
notes
=
"通过表面号查询配件"
)
@GetMapping
(
"/selectPart/{rfid}"
)
public
ResponseEntity
selectPart
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllBy
RfidSurfaceId
(
rfid
);
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllBy
SeqNumber
(
rfid
);
libraryEntities
.
forEach
(
DeviceLibrary:
:
setConfigName
);
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
1
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
deviceLibraryEntityList
);
}
@ApiOperation
(
value
=
"通过
表面
号查询装备"
,
notes
=
"通过表面号查询装备"
)
@ApiOperation
(
value
=
"通过
序列
号查询装备"
,
notes
=
"通过表面号查询装备"
)
@GetMapping
(
"/selectDevice/{rfid}"
)
public
ResponseEntity
selectDevice
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllBy
RfidSurfaceId
(
rfid
);
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllBy
SeqNumber
(
rfid
);
libraryEntities
.
forEach
(
DeviceLibrary:
:
setConfigName
);
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
0
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
deviceLibraryEntityList
);
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/repository/PackingLibraryDao.java
浏览文件 @
8bf077a4
...
...
@@ -13,6 +13,8 @@ public interface PackingLibraryDao extends JpaRepository<PackingLibrary, Integer
List
<
PackingLibrary
>
findAllByPartParentId
(
Integer
id
);
List
<
PackingLibrary
>
findAllByPartParentIdAndPackingStatus
(
Integer
id
,
Integer
packingId
);
List
<
PackingLibrary
>
findAllByIdIn
(
List
<
Integer
>
ids
);
PackingLibrary
findByShowOrder
(
Integer
showOrder
);
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
8bf077a4
...
...
@@ -291,7 +291,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"该列装型号已有装备,请进行退装操作"
));
}
if
(
packingLibrary
.
getIsRoot
()==
1
)
{
if
(
packingLibraryDao
.
findAllByPartParentId
(
id
).
size
()>
0
){
if
(
packingLibraryDao
.
findAllByPartParentId
AndPackingStatus
(
id
,
2
).
size
()>
0
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"该列装型号目录下存在列装装备"
));
}
Integer
order
=
packingLibrary
.
getShowOrder
();
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
8bf077a4
差异被折叠。
点击展开。
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/FileUploadVo.java
浏览文件 @
8bf077a4
...
...
@@ -40,5 +40,8 @@ public class FileUploadVo {
private
Integer
startUserbId
;
@ApiModelProperty
(
value
=
"接收单位B岗"
)
private
Integer
repairUserbId
;
private
Integer
receiveUserbId
;
@ApiModelProperty
(
value
=
"接收单位A岗"
)
private
Integer
repairUseraId
;
}
dev-retired/src/main/java/com/tykj/dev/device/retired/controller/DeviceRetiredController.java
浏览文件 @
8bf077a4
...
...
@@ -27,10 +27,7 @@ import com.tykj.dev.device.user.util.AuthenticationUtils;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -42,10 +39,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.transaction.Transactional
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -108,11 +102,19 @@ public class DeviceRetiredController {
BeanUtils
.
copyProperties
(
canRetiredDeviceSelectVo
,
packingLibrarySelectVo
);
List
<
PackingLibrary
>
list
=
packingLibraryService
.
getList
(
packingLibrarySelectVo
);
//循环获取列装主体的数量,并生成VO
list
.
forEach
(
packingLibrary
->
{
for
(
PackingLibrary
packingLibrary
:
list
)
{
DeviceRetiredResultVo
deviceRetiredResultVo
=
calcDeviceRetiredResultVo
(
packingLibrary
);
deviceRetiredResultVos
.
add
(
deviceRetiredResultVo
);
});
return
ResultUtil
.
success
(
deviceRetiredResultVos
.
stream
().
filter
(
DeviceRetiredResultVo:
:
devNumIsZero
).
collect
(
Collectors
.
toList
()));
}
Map
<
Integer
,
DeviceRetiredResultVo
>
nodeCollect
=
deviceRetiredResultVos
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceRetiredResultVo:
:
getId
,
deviceRetiredResultVo
->
deviceRetiredResultVo
));
List
<
DeviceRetiredResultVo
>
containList
=
GetTreeUtils
.
parseTreeFromDown
(
deviceRetiredResultVos
,
DeviceRetiredResultVo:
:
getId
,
d
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
d
.
getPartParentId
())),
DeviceRetiredResultVo:
:
addChildNode
).
stream
().
filter
(
DeviceRetiredResultVo:
:
devNumIsZero
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
containList
);
}
@ApiOperation
(
value
=
"提交退装表单"
,
notes
=
"可以通过这个接口提交销毁表单发起退装流程"
)
...
...
@@ -230,18 +232,23 @@ public class DeviceRetiredController {
DeviceRetiredResultVo
deviceRetiredResultVo
=
new
DeviceRetiredResultVo
();
BeanUtils
.
copyProperties
(
packingLibraryEntity
,
deviceRetiredResultVo
);
deviceRetiredResultVo
.
setCount
(
deviceRetiredBillService
.
getCantPackingCount
(
packingLibraryEntity
.
getId
()));
List
<
PackingLibrary
>
PackingChildren
=
packingLibraryEntity
.
getChilds
();
for
(
PackingLibrary
p
:
PackingChildren
)
{
DeviceRetiredResultVo
childDeviceRetiredResultVo
=
new
DeviceRetiredResultVo
();
BeanUtils
.
copyProperties
(
p
,
childDeviceRetiredResultVo
);
childDeviceRetiredResultVo
.
setCount
(
deviceRetiredBillService
.
getCantPackingCount
(
p
.
getId
()));
if
(!
p
.
getChilds
().
isEmpty
()){
for
(
PackingLibrary
pack:
p
.
getChilds
())
{
childDeviceRetiredResultVo
.
getChilds
().
add
(
calcDeviceRetiredResultVo
(
pack
));
}
}
deviceRetiredResultVo
.
getChilds
().
add
(
childDeviceRetiredResultVo
);
}
deviceRetiredResultVo
.
setChilds
(
new
ArrayList
<>());
// List<PackingLibrary> PackingChildren = packingLibraryEntity.getChilds();
// for (PackingLibrary p : PackingChildren) {
// DeviceRetiredResultVo childDeviceRetiredResultVo = new DeviceRetiredResultVo();
// BeanUtils.copyProperties(p, childDeviceRetiredResultVo);
// childDeviceRetiredResultVo.setCount(deviceRetiredBillService.getCantPackingCount(p.getId()));
// if (p.getChilds()!=null&&!p.getChilds().isEmpty()){
// for (PackingLibrary pack:p.getChilds()) {
// List<DeviceRetiredResultVo> d = childDeviceRetiredResultVo.getChilds();
// d.add(calcDeviceRetiredResultVo(pack));
// childDeviceRetiredResultVo.setChilds(d);
// }
// }
// List<DeviceRetiredResultVo> d = childDeviceRetiredResultVo.getChilds();
// d.add(childDeviceRetiredResultVo);
// childDeviceRetiredResultVo.setChilds(d);
// }
return
deviceRetiredResultVo
;
}
...
...
dev-retired/src/main/java/com/tykj/dev/device/retired/entity/vo/DeviceRetiredResultVo.java
浏览文件 @
8bf077a4
...
...
@@ -20,6 +20,9 @@ public class DeviceRetiredResultVo {
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"id"
)
private
Integer
partParentId
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
...
...
@@ -67,4 +70,8 @@ public class DeviceRetiredResultVo {
return
false
;
}
}
public
void
addChildNode
(
DeviceRetiredResultVo
deviceRetiredResultVo
)
{
childs
.
add
(
deviceRetiredResultVo
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论