Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
2680734d
提交
2680734d
authored
6月 02, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
42cc6430
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
69 行增加
和
33 行删除
+69
-33
DeviceLibrarySaveVo.java
...kj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
+1
-0
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+30
-28
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+31
-5
StorageBill.java
...om/tykj/dev/device/storage/subject/domin/StorageBill.java
+6
-0
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+1
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
浏览文件 @
2680734d
...
...
@@ -53,4 +53,5 @@ public class DeviceLibrarySaveVo {
@ApiModelProperty
(
value
=
"货架位置"
)
private
String
position
;
}
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
2680734d
...
...
@@ -285,36 +285,38 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
@Transient
public
void
deleteAll
(
Integer
id
)
{
PackingLibrary
packingLibrary
=
getOne
(
id
);
if
(
deviceLibraryDao
.
getAllByPackingId
(
id
).
size
()>
0
){
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号已有装备,请进行退装操作"
));
}
if
(
packingLibrary
.
getIsRoot
()==
1
)
{
if
(
packingLibraryDao
.
findAllByPartParentIdAndPackingStatus
(
id
,
2
).
size
()>
0
){
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号目录下存在列装装备"
));
}
Integer
order
=
packingLibrary
.
getShowOrder
();
getInsertList
(
new
SelectPack
()).
forEach
(
packingLibrary1
->
{
if
(
packingLibrary1
.
getShowOrder
()
>
order
)
{
packingLibrary1
.
setShowOrder
(
packingLibrary1
.
getShowOrder
()
-
1
);
update
(
packingLibrary1
);
}
});
}
List
<
Integer
>
ids
=
packingLibraryDao
.
findAllByPartParentId
(
id
).
stream
().
map
(
PackingLibrary:
:
getId
).
collect
(
Collectors
.
toList
());
delete
(
id
);
if
(
ids
.
size
()>
0
){
ids
.
forEach
(
integer
->
{
if
(
deviceLibraryDao
.
getAllByPackingId
(
integer
).
size
()>
0
){
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号已有装备,请进行退装操作"
));
if
(
packingLibrary
.
getPackingStatus
()==
2
)
{
if
(
deviceLibraryDao
.
getAllByPackingId
(
id
).
size
()
>
0
)
{
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号已有装备,请进行退装操作"
));
}
if
(
packingLibrary
.
getIsRoot
()
==
1
)
{
if
(
packingLibraryDao
.
findAllByPartParentIdAndPackingStatus
(
id
,
2
).
size
()
>
0
)
{
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号目录下存在列装装备"
));
}
deleteAll
(
integer
);
});
Integer
order
=
packingLibrary
.
getShowOrder
();
getInsertList
(
new
SelectPack
()).
forEach
(
packingLibrary1
->
{
if
(
packingLibrary1
.
getShowOrder
()
>
order
)
{
packingLibrary1
.
setShowOrder
(
packingLibrary1
.
getShowOrder
()
-
1
);
update
(
packingLibrary1
);
}
});
}
List
<
Integer
>
ids
=
packingLibraryDao
.
findAllByPartParentId
(
id
).
stream
().
map
(
PackingLibrary:
:
getId
).
collect
(
Collectors
.
toList
());
delete
(
id
);
if
(
ids
.
size
()
>
0
)
{
ids
.
forEach
(
integer
->
{
if
(
deviceLibraryDao
.
getAllByPackingId
(
integer
).
size
()
>
0
)
{
throw
new
ApiException
(
ResponseEntity
.
status
(
20000
).
body
(
"该列装型号已有装备,请进行退装操作"
));
}
deleteAll
(
integer
);
});
}
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
0
,
1
,
"手动删除列装"
,
userIds
,
0
);
messageBto
.
setRecord
(
id
.
toString
());
messageService
.
add
(
messageBto
);
}
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
0
,
1
,
"手动删除列装"
,
userIds
,
0
);
messageBto
.
setRecord
(
id
.
toString
());
messageService
.
add
(
messageBto
);
}
/**
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
2680734d
...
...
@@ -6,6 +6,7 @@ import com.tykj.dev.device.apply.repository.DeviceApplyBillDao;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.vo.ApplyBillDetailVo
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
...
...
@@ -24,6 +25,7 @@ import com.tykj.dev.device.task.repository.TaskDao;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.user.read.service.MessageService
;
...
...
@@ -333,6 +335,21 @@ public class StorageBillController {
return
ResultUtil
.
success
(
libraryEntities
);
}
@ApiOperation
(
value
=
"办结后添加其他单据"
,
notes
=
"办结后添加其他单据"
)
@PostMapping
(
value
=
"/addOtherFiles/{taskId}"
)
public
ResponseEntity
addOtherFiles
(
@PathVariable
(
"taskId"
)
int
taskId
,
@RequestBody
List
<
FileRet
>
fileRets
){
//获取业务
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
//获取单据
StorageBill
storageBill
=
storageBillService
.
getOne
(
taskBto
.
getBillId
());
//set 其他单据
storageBill
.
setOtherFiles
(
FilesUtil
.
stringFileToList
(
fileRets
));
storageBillService
.
update
(
storageBill
);
//添加业务日志
taskLogService
.
addLog
(
new
TaskLogBto
(
taskId
,
"上传补充单据"
,
null
));
return
ResponseEntity
.
ok
(
"ok"
);
}
@ApiOperation
(
value
=
"添加入库单"
,
notes
=
"可以通过这个接口发起入库业务"
)
@PostMapping
(
value
=
"/addStorageBill"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -385,7 +402,8 @@ public class StorageBillController {
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
storageBillEntity
.
getFileName
(),
storageBillEntity
.
getFileUrl
()));
//3.存装备
Integer
parentId
=
null
;
// Integer parentId = null;
Integer
parentPackingId
=
null
;
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
saveEntities
=
new
ArrayList
<>();
String
logMessage
;
...
...
@@ -395,6 +413,8 @@ public class StorageBillController {
else
{
logMessage
=
"发起装备入库(未打印标签)"
;
}
//存放所有save的装备
List
<
DeviceLibrary
>
saveDevices
=
new
ArrayList
<>();
for
(
DeviceLibrarySaveVo
d
:
storageBillSaveVo
.
getDeviceLibrarySaveVoList
())
{
if
(
d
.
getRfidCardId
()==
null
||
""
.
equals
(
d
.
getRfidCardId
())
||
deviceLibraryDao
.
getAllByRfidCardId
(
d
.
getRfidCardId
()).
size
()==
0
)
{
DeviceLibrary
saveEntity
=
new
DeviceLibrary
();
...
...
@@ -412,19 +432,25 @@ public class StorageBillController {
if
(
d
.
getIsSinglePart
()
==
0
)
{
if
(
deviceLibraryEntity
.
getIsPart
()
==
0
)
{
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
parentId
=
saveEntity
.
getId
();
}
if
(
deviceLibraryEntity
.
getIsPart
()
==
1
)
{
deviceLibraryEntity
.
setPartParentId
(
parentId
);
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
);
parentId
=
saveEntity
.
getId
();
}
}
//如果是单独的配件,不用设置父装备id
else
{
saveEntity
=
deviceLibraryService
.
addEntity
(
deviceLibraryEntity
);
parentId
=
saveEntity
.
getId
();
}
saveDevices
.
add
(
saveEntity
);
// parentId = saveEntity.getId();
parentPackingId
=
packingLibraryEntity
.
getId
();
saveEntities
.
add
(
saveEntity
);
stringBuffer
.
append
(
saveEntity
.
getId
());
//存装备日志
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/subject/domin/StorageBill.java
浏览文件 @
2680734d
...
...
@@ -181,6 +181,9 @@ public class StorageBill {
@Column
(
name
=
"allot_files"
,
columnDefinition
=
"TEXT"
)
private
String
allotFiles
;
@Column
(
name
=
"other_files"
,
columnDefinition
=
"TEXT"
)
private
String
otherFiles
;
@Transient
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
...
...
@@ -189,4 +192,7 @@ public class StorageBill {
@Transient
private
List
<
FileRet
>
allotFileList
=
new
ArrayList
<>();
@Transient
private
List
<
FileRet
>
otherFileList
=
new
ArrayList
<>();
}
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
2680734d
...
...
@@ -138,6 +138,7 @@ public class TaskSelectController {
storageBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
storageBillEntity
.
getReplyFiles
()));
storageBillEntity
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
storageBillEntity
.
getApplyFiles
()));
storageBillEntity
.
setAllotFileList
(
FilesUtil
.
stringFileToList
(
storageBillEntity
.
getAllotFiles
()));
storageBillEntity
.
setOtherFileList
(
FilesUtil
.
stringFileToList
(
storageBillEntity
.
getOtherFiles
()));
list
.
add
(
storageBillEntity
);
String
str
=
storageBillEntity
.
getStorageDetail
();
List
<
Integer
>
list1
=
StringSplitUtil
.
userIdSplit
(
str
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论