Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
3e73fc37
提交
3e73fc37
authored
6月 28, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交代码
上级
5e1f4e54
全部展开
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
131 行增加
和
5 行删除
+131
-5
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+0
-0
AllotBillSelectController.java
...ev/device/allot/controller/AllotBillSelectController.java
+89
-3
AllotBillService.java
...a/com/tykj/dev/device/allot/service/AllotBillService.java
+6
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+10
-1
DeviceStorageLocation.java
.../dev/device/library/subject/vo/DeviceStorageLocation.java
+25
-0
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+1
-1
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
3e73fc37
差异被折叠。
点击展开。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillSelectController.java
浏览文件 @
3e73fc37
...
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
...
...
@@ -50,6 +51,9 @@ public class AllotBillSelectController {
@Autowired
private
DeviceLibraryDao
deviceLibraryDao
;
@Autowired
private
TaskService
taskService
;
@ApiOperation
(
value
=
"查询配发单"
,
notes
=
"可以通过这个接口查询配发单"
)
@PostMapping
(
value
=
"/archives/allot/summary"
)
public
ResponseEntity
selectAllotBill
(
@RequestBody
AllotBillSelectVo
allotBillSelectVo
)
{
...
...
@@ -64,13 +68,14 @@ public class AllotBillSelectController {
return
ResponseEntity
.
ok
(
page
);
}
@ApiOperation
(
value
=
"查询配发单详情页"
,
notes
=
"可以通过这个接口查询配发单"
)
@ApiOperation
(
value
=
"查询配发单详情页
,通过billId查询
"
,
notes
=
"可以通过这个接口查询配发单"
)
@GetMapping
(
value
=
"/archives/allot/detail/{id}"
)
public
ResponseEntity
selectAllotBillDetail
(
@PathVariable
(
"id"
)
int
id
)
{
//获取所有装备id map
Map
<
Integer
,
DeviceLibrary
>
deviceLibraryMap
=
deviceLibraryService
.
getAllDeviceMap
();
//返回的数组
List
<
Object
>
list
=
new
ArrayList
<>();
// Integer billId = taskService.get(id).getBillId();
//set账单用户名称并添加
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
id
);
allotBillEntity
.
setSenderUserA
(
userService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
...
...
@@ -102,14 +107,15 @@ public class AllotBillSelectController {
return
ResponseEntity
.
ok
(
list
);
}
@ApiOperation
(
value
=
"查询退回单详情页"
,
notes
=
"可以通过这个接口查询退回单"
)
@ApiOperation
(
value
=
"查询退回单详情页
,通过billId查询
"
,
notes
=
"可以通过这个接口查询退回单"
)
@GetMapping
(
value
=
"/archives/back/detail/{id}"
)
public
ResponseEntity
selectBackBillDetail
(
@PathVariable
(
"id"
)
int
id
)
{
//获取所有装备id map
Map
<
Integer
,
DeviceLibrary
>
deviceLibraryMap
=
deviceLibraryService
.
getAllDeviceMap
();
//返回的数组
List
<
Object
>
list
=
new
ArrayList
<>();
//set账单用户名称并添加
//set账单用户名称并添
// Integer billId = taskService.get(id).getBillId();
AllotBackBill
allotBillEntity
=
allotBackBillService
.
getOne
(
id
);
allotBillEntity
.
setSenderUserA
(
userService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
allotBillEntity
.
setSenderUserB
(
allotBillEntity
.
getAgent
());
...
...
@@ -139,4 +145,84 @@ public class AllotBillSelectController {
list
.
add
(
libraryEntities
);
return
ResponseEntity
.
ok
(
list
);
}
@ApiOperation
(
value
=
"查询配发单详情页,通过taskId查询"
,
notes
=
"可以通过这个接口查询配发单"
)
@GetMapping
(
value
=
"/archives/allot/detail1/{id}"
)
public
ResponseEntity
selectAllotBillDetail2
(
@PathVariable
(
"id"
)
int
id
)
{
//获取所有装备id map
Map
<
Integer
,
DeviceLibrary
>
deviceLibraryMap
=
deviceLibraryService
.
getAllDeviceMap
();
//返回的数组
List
<
Object
>
list
=
new
ArrayList
<>();
Integer
billId
=
taskService
.
get
(
id
).
getBillId
();
//set账单用户名称并添加
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
billId
);
allotBillEntity
.
setSenderUserA
(
userService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
allotBillEntity
.
setSenderUserB
(
allotBillEntity
.
getAgent
());
if
(
allotBillEntity
.
getReceiveUseraId
()
!=
null
)
{
allotBillEntity
.
setReceiveUserA
(
userService
.
getOne
(
allotBillEntity
.
getReceiveUseraId
()).
getName
());
}
if
(
allotBillEntity
.
getReceiveUserbId
()
!=
null
)
{
allotBillEntity
.
setReceiveUserB
(
userService
.
getOne
(
allotBillEntity
.
getReceiveUserbId
()).
getName
());
}
//转换文件
allotBillEntity
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getSendFiles
()));
allotBillEntity
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReceiveFiles
()));
allotBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReplyFiles
()));
allotBillEntity
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getApplyFiles
()));
//转换单据
if
(
allotBillEntity
.
getScriptJson
()!=
null
){
allotBillEntity
.
setScripts
(
JacksonUtil
.
readValue
(
allotBillEntity
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}));
}
list
.
add
(
allotBillEntity
);
List
<
DeviceLibrary
>
libraryEntities
=
new
ArrayList
<>();
//如果接收装备详情不为空,分隔装备id并添加
if
(
allotBillEntity
.
getAllotCheckDetail
()
!=
null
)
{
for
(
Integer
deviceId
:
StringSplitUtil
.
split
(
allotBillEntity
.
getAllotCheckDetail
()))
{
libraryEntities
.
add
(
deviceLibraryMap
.
get
(
deviceId
));
}
}
list
.
add
(
libraryEntities
);
return
ResponseEntity
.
ok
(
list
);
}
@ApiOperation
(
value
=
"查询退回单详情页,通过taskId查询"
,
notes
=
"可以通过这个接口查询退回单"
)
@GetMapping
(
value
=
"/archives/back/detail1/{id}"
)
public
ResponseEntity
selectBackBillDetail2
(
@PathVariable
(
"id"
)
int
id
)
{
//获取所有装备id map
Map
<
Integer
,
DeviceLibrary
>
deviceLibraryMap
=
deviceLibraryService
.
getAllDeviceMap
();
//返回的数组
List
<
Object
>
list
=
new
ArrayList
<>();
//set账单用户名称并添
Integer
billId
=
taskService
.
get
(
id
).
getBillId
();
AllotBackBill
allotBillEntity
=
allotBackBillService
.
getOne
(
billId
);
allotBillEntity
.
setSenderUserA
(
userService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
allotBillEntity
.
setSenderUserB
(
allotBillEntity
.
getAgent
());
if
(
allotBillEntity
.
getReceiveUseraId
()
!=
null
)
{
allotBillEntity
.
setReceiveUserA
(
userService
.
getOne
(
allotBillEntity
.
getReceiveUseraId
()).
getName
());
}
if
(
allotBillEntity
.
getReceiveUserbId
()
!=
null
){
allotBillEntity
.
setReceiveUserB
(
userService
.
getOne
(
allotBillEntity
.
getReceiveUserbId
()).
getName
());
}
//转换文件
allotBillEntity
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getSendFiles
()));
allotBillEntity
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReceiveFiles
()));
allotBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getReplyFiles
()));
allotBillEntity
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBillEntity
.
getApplyFiles
()));
//转换单据
if
(
allotBillEntity
.
getScriptJson
()!=
null
){
allotBillEntity
.
setScripts
(
JacksonUtil
.
readValue
(
allotBillEntity
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}));
}
list
.
add
(
allotBillEntity
);
List
<
DeviceLibrary
>
libraryEntities
=
new
ArrayList
<>();
//如果接收装备详情不为空,分隔装备id并添加
if
(
allotBillEntity
.
getBackCheckDetail
()
!=
null
)
{
for
(
Integer
deviceId
:
StringSplitUtil
.
split
(
allotBillEntity
.
getBackCheckDetail
()))
{
libraryEntities
.
add
(
deviceLibraryMap
.
get
(
deviceId
));
}
}
list
.
add
(
libraryEntities
);
return
ResponseEntity
.
ok
(
list
);
}
}
dev-allot/src/main/java/com/tykj/dev/device/allot/service/AllotBillService.java
浏览文件 @
3e73fc37
...
...
@@ -51,4 +51,10 @@ public interface AllotBillService {
* 根据id删除配发单
*/
void
delete
(
Integer
id
);
// /**
// * @param
// * *在配发存储的时候用到存储数据库
// */
// void updateAllot();
}
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
3e73fc37
...
...
@@ -608,6 +608,15 @@ public class DeviceLibraryController {
return
ResultUtil
.
success
(
deviceLibraries
.
stream
().
filter
(
deviceLibrary1
->
!
deviceLibrary1
.
getId
().
equals
(
id
)
&&
deviceLibrary1
.
getLifeStatus
()
==
2
&&
deviceLibrary1
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
deviceLibrary1
.
getLocationUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())).
collect
(
Collectors
.
toList
()));
}
@ApiOperation
(
value
=
"修改装备的存放位置"
)
@PostMapping
(
"/updateDeviceLibraryLocation"
)
public
void
updateDeviceLibraryLocation
(
@RequestBody
DeviceStorageLocation
deviceStorageLocation
){
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
deviceStorageLocation
.
getDevId
());
//添加修改存放装备位置
deviceLibrary
.
setStorageLocation
(
deviceStorageLocation
.
getStorageLocation
());
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceStorageLocation
.
getDevId
(),
"将存放位置改为"
+
deviceStorageLocation
.
getStorageLocation
(),
null
,
null
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceStorageLocation.java
0 → 100644
浏览文件 @
3e73fc37
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* DATE:2021-6-24
* Author:zsp
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel
(
"装备位置"
)
public
class
DeviceStorageLocation
{
@ApiModelProperty
(
value
=
"装备id"
)
private
Integer
devId
;
@ApiModelProperty
(
value
=
"库存位置"
)
private
String
storageLocation
;
}
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
3e73fc37
...
...
@@ -386,7 +386,7 @@ public class StorageBillController {
if
(
storageBillSaveVo
.
getTaskId
()==
null
)
{
storageBillEntity
=
storageBillService
.
addEntity
(
storageBillSaveVo
.
toDo
());
//2.发起入库任务
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
storageBillSaveVo
.
getSendUnit
()+
"进行了
入库业务"
,
null
,
"."
,
storageBillEntity
.
getId
(),
2
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
"入库了"
+
storageBillSaveVo
.
getStorageBillDetails
().
stream
().
map
(
storageBillDetail
->
storageBillDetail
.
getModel
()).
collect
(
Collectors
.
toList
())+
"型号"
+
"
入库业务"
,
null
,
"."
,
storageBillEntity
.
getId
(),
2
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
taskEntity1
=
taskService
.
start
(
taskBto
);
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论