Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
205ebcb8
提交
205ebcb8
authored
6月 04, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增了是否捆绑(状态)
上级
a0db30c5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
37 行增加
和
14 行删除
+37
-14
DeviceLibrarySaveVo.java
...kj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
+3
-0
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+34
-14
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
浏览文件 @
205ebcb8
...
...
@@ -54,4 +54,7 @@ public class DeviceLibrarySaveVo {
@ApiModelProperty
(
value
=
"货架位置"
)
private
String
position
;
@ApiModelProperty
(
value
=
"是否需要绑定"
,
notes
=
"0 是绑定, 1 是未绑定"
)
private
Integer
IsBinding
=
0
;
}
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
205ebcb8
...
...
@@ -386,6 +386,7 @@ public class StorageBillController {
taskEntity1
=
taskService
.
start
(
taskBto
);
}
else
{
//从草稿进来的
taskEntity1
=
taskService
.
get
(
storageBillSaveVo
.
getTaskId
());
StorageBill
storageBill
=
storageBillService
.
getOne
(
taskEntity1
.
getBillId
());
StorageBill
storageBill1
=
storageBillSaveVo
.
toDo
();
...
...
@@ -422,29 +423,47 @@ public class StorageBillController {
PackingLibrary
packingLibraryEntity
=
packingLibraryService
.
getOne
(
d
.
getPackingId
());
BeanUtils
.
copyProperties
(
packingLibraryEntity
,
deviceLibraryEntity
);
deviceLibraryEntity
.
setId
(
null
);
deviceLibraryEntity
.
setLifeStatus
(
2
);
deviceLibraryEntity
.
setLifeStatus
(
2
);
//设置为在库状态
BeanUtils
.
copyProperties
(
d
,
deviceLibraryEntity
);
deviceLibraryEntity
.
setStorageBillId
(
storageBillId
);
deviceLibraryEntity
.
setLocationUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceLibraryEntity
.
setOwnUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceLibraryEntity
.
setPartParentId
(
null
);
//如果不是单独的配件,设置父装备id为上一个装备的id
if
(
d
.
getIsSinglePart
()
==
0
)
{
if
(
deviceLibraryEntity
.
getIsPart
()
==
0
)
{
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
}
if
(
deviceLibraryEntity
.
getIsPart
()
==
1
)
{
if
(
parentPackingId
!=
null
)
{
for
(
int
i
=
saveDevices
.
size
()-
1
;
i
>=
0
;
i
--){
if
(
packingLibraryEntity
.
getPartParentId
().
equals
(
saveDevices
.
get
(
i
).
getPackingId
())){
deviceLibraryEntity
.
setPartParentId
(
saveDevices
.
get
(
i
).
getId
());
break
;
//如果不是单独的配件,设置父装备id为上一个装备的id 0-不是,1-是
if
(
d
.
getIsBinding
()
==
0
){
if
(
d
.
getIsSinglePart
()
==
0
)
{
//0 不是,1:是
if
(
deviceLibraryEntity
.
getIsPart
()
==
0
)
{
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
}
if
(
deviceLibraryEntity
.
getIsPart
()
==
1
)
{
if
(
parentPackingId
!=
null
)
{
for
(
int
i
=
saveDevices
.
size
()-
1
;
i
>=
0
;
i
--){
if
(
packingLibraryEntity
.
getPartParentId
().
equals
(
saveDevices
.
get
(
i
).
getPackingId
())){
deviceLibraryEntity
.
setPartParentId
(
saveDevices
.
get
(
i
).
getId
());
}
}
}
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
}
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
}
}
// if (d.getIsSinglePart() == 0) {
// //0 不是,1:是
// if (deviceLibraryEntity.getIsPart() == 0) {
// saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
// }
// if (deviceLibraryEntity.getIsPart() == 1) {
// if (parentPackingId!=null) {
// for (int i = saveDevices.size()-1;i>=0;i--){
// if (packingLibraryEntity.getPartParentId().equals(saveDevices.get(i).getPackingId())){
// deviceLibraryEntity.setPartParentId(saveDevices.get(i).getId());
// }
// }
// }
// saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
// }
// }
//如果是单独的配件,不用设置父装备id
else
{
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
...
...
@@ -523,7 +542,7 @@ public class StorageBillController {
messageBto
.
setInvolveUserIdList
(
userPublicService
.
findOtherUser
(
userId
));
messageBto
.
setBusinessType
(
taskEntity1
.
getBusinessType
());
messageService
.
add
(
messageBto
);
//判断是否有申请任务序列号
//判断是否有申请任务序列号
未导入申请任务但是序列号是申请任务的序列号
if
(
storageBillSaveVo
.
getApplyTaskIds
()==
null
||
storageBillSaveVo
.
getApplyTaskIds
().
isEmpty
()){
if
(
storageBillSaveVo
.
getHasTaskSeqs
()!=
null
&&
storageBillSaveVo
.
getHasTaskSeqs
().
size
()>
0
){
List
<
String
>
hasTaskSeqs
=
storageBillSaveVo
.
getHasTaskSeqs
();
...
...
@@ -704,6 +723,7 @@ public class StorageBillController {
@GetMapping
(
value
=
"/selectUnPrintStorageTask"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
selectUnPrintStorageTask
()
{
//storageStatus 入库状态(0:草稿,1:审核失败,2:已入库)
List
<
StorageBill
>
storageBills
=
storageBillDao
.
findAllByStorageStatusAndIsPrint
(
2
,
0
);
List
<
Task
>
tasks
=
taskDao
.
findAllByBusinessTypeAndBillIdIn
(
2
,
storageBills
.
stream
().
map
(
StorageBill:
:
getId
).
collect
(
Collectors
.
toList
()));
return
ResponseEntity
.
ok
(
tasks
.
stream
().
map
(
Task:
:
parse2Bto
).
map
(
TaskBto:
:
toVo
).
sorted
(
Comparator
.
comparing
(
TaskUserVo:
:
getUpdateTime
)).
collect
(
Collectors
.
toList
()));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论