Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
f95aa9e1
提交
f95aa9e1
authored
10月 14, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(列装模块,维修模块,阅知模块,配发模块): 添加阅知详细内容
添加阅知详细内容
上级
d259aa52
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
170 行增加
和
28 行删除
+170
-28
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+14
-4
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+9
-4
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+66
-1
DeviceApplySaveVo.java
...m/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
+9
-7
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+20
-3
PackingLibrary.java
...tykj/dev/device/packing/subject/domin/PackingLibrary.java
+4
-0
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+33
-9
RepairDetailService.java
...m/tykj/dev/device/repair/service/RepairDetailService.java
+8
-0
RepairDetailServiceImpl.java
...v/device/repair/service/impl/RepairDetailServiceImpl.java
+7
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
f95aa9e1
...
...
@@ -232,7 +232,14 @@ public class AllotBillController {
}
//生成发件方上传配发单的子任务
// TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_ALLOT_FILE
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
allotBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
allotBillSaveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))
+
"的装备共"
+
allotBillSaveVo
.
getAllotCount
()
+
"件"
,
saveEntity
.
getId
(),
saveEntity
.
getNodeIdDetail
()
+
saveEntity
.
getId
()
+
"."
,
saveEntity
.
getBillId
(),
3
,
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
()),
0
,
null
,
Collections
.
singletonList
(
0
));
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_ALLOT_FILE
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
allotBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
allotBillSaveVo
.
getScriptSaveVos
()
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))
+
"的装备共"
+
allotBillSaveVo
.
getAllotCount
()
+
"件"
,
saveEntity
.
getId
(),
saveEntity
.
getNodeIdDetail
()
+
saveEntity
.
getId
()
+
"."
,
saveEntity
.
getBillId
(),
3
,
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
()),
0
,
null
,
Collections
.
singletonList
(
0
));
taskService
.
start
(
taskBto2
);
}
//横向配发
...
...
@@ -470,7 +477,7 @@ public class AllotBillController {
messageService
.
add
(
messageBto
);
}
//根据status判断是否业务完结,发送不同的阅知message
String
message
=
allotReceiveVo
.
getStatus
()
==
0
?
allotBillEntity
.
getReceiveUnit
()+
"配发业务办结"
:
allotBillEntity
.
getReceiveUnit
()+
"接收配发装备"
;
String
message
=
allotReceiveVo
.
getStatus
()
==
0
?
allotBillEntity
.
getReceiveUnit
()+
"配发业务
已
办结"
:
allotBillEntity
.
getReceiveUnit
()+
"接收配发装备"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
message
,
ids
,
1
);
messageService
.
add
(
messageBto
);
log
.
info
(
"[配发模块]:接收并发起入库"
);
...
...
@@ -683,7 +690,8 @@ public class AllotBillController {
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBill
.
getSendUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
allotBill
.
getReceiveUnit
()+
"单位的配发业务已办结,"
,
ids
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"上传成功"
);
}
...
...
@@ -762,7 +770,9 @@ public class AllotBillController {
userIds
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
String
content
=
allotBill
.
getReceiveUnit
()+
"单位的配发业务已办结"
;
// MessageBto messageBto = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(), "业务办结", userIds, 1);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
content
,
userIds
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"OK"
);
}
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
f95aa9e1
...
...
@@ -319,8 +319,10 @@ public class BackController {
messageService
.
add
(
messageBto
);
}
//根据status判断是否业务完结,发送不同的阅知message
String
message
=
allotBackReceiveVo
.
getStatus
()==
0
?
"业务办结"
:
"接收退回装备"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
message
,
ids
,
1
);
// String message = allotBackReceiveVo.getStatus()==0?"业务办结":"接收退回装备";
String
message
=
allotBackReceiveVo
.
getStatus
()==
0
?
"单位退回业务已办结"
:
"单位接收退回装备"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
allotBackBill
.
getReceiveUnit
()+
message
,
ids
,
1
);
messageService
.
add
(
messageBto
);
log
.
info
(
"[退回模块]:接收并发起入库"
);
myWebSocket
.
sendMessage1
();
...
...
@@ -382,7 +384,9 @@ public class BackController {
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBackBill
.
getSendUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
// MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"业务办结",ids,1);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
allotBackBill
.
getReceiveUnit
()+
"退回业务已办结"
,
ids
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"上传成功"
);
}
...
...
@@ -458,7 +462,8 @@ public class BackController {
userIds
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBackBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
allotBackBill
.
getReceiveUnit
()+
"业务办结"
,
userIds
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"OK"
);
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
f95aa9e1
...
...
@@ -31,6 +31,7 @@ import com.tykj.dev.device.user.subject.dao.UserDao;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
...
...
@@ -41,6 +42,7 @@ import com.tykj.dev.socket.MyWebSocket;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -130,7 +132,9 @@ public class DeviceApplyController {
}
}
//添加申请单
DeviceApplyBill
deviceApplyBillEntity
=
deviceApplyBillService
.
addEntity
(
deviceApplySaveVo
.
toDo
());
// DeviceApplyBill deviceApplyBillEntity = deviceApplyBillService.addEntity(deviceApplySaveVo.toDo());
DeviceApplyBill
deviceApplyBillEntity
=
deviceApplyBillService
.
addEntity
(
toDo
(
deviceApplySaveVo
));
Integer
userId
=
userUtils
.
getCurrentUserId
();
//发起任务
TaskBto
taskBto
;
...
...
@@ -623,4 +627,65 @@ public class DeviceApplyController {
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"办结成功"
);
}
/**
* 转实体
*/
public
DeviceApplyBill
toDo
(
DeviceApplySaveVo
deviceApplySaveVo
)
{
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
DeviceApplyBill
deviceApplyBillEntity
=
mapper
.
map
(
deviceApplySaveVo
,
DeviceApplyBill
.
class
);
deviceApplyBillEntity
.
setApplyStatus
(
0
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"x"
);
//申请详情
if
(
deviceApplySaveVo
.
getStorageBillDetailVoList
()!=
null
&&
deviceApplySaveVo
.
getStorageBillDetailVoList
().
size
()
>
0
)
{
//分解父子结构
List
<
ApplyBillDetailVo
>
applyBillDetailVos
=
GetTreeUtils
.
splitTree
(
deviceApplySaveVo
.
getStorageBillDetailVoList
(),
ApplyBillDetailVo:
:
getChilds
,
ApplyBillDetailVo:
:
setChildNull
);
//拼接列装id和申请数量字符串
for
(
ApplyBillDetailVo
s
:
applyBillDetailVos
)
{
stringBuffer
.
append
(
s
.
getPackingId
()).
append
(
"x"
);
//zsp
Integer
packingId
=
s
.
getPackingId
();
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryService
.
findAllByPackingId
(
packingId
);
if
(
deviceLibraries
.
size
()>
0
){
s
.
setCompleteCount
(
deviceLibraries
.
size
()
+
s
.
getCompleteCount
())
;
}
if
(
s
.
getStorageCount
()!=
null
)
{
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
}
else
{
stringBuffer
.
append
(
0
).
append
(
"x"
);
}
}
//转为json存储
deviceApplyBillEntity
.
setApplyStat
(
JacksonUtil
.
toJSon
(
applyBillDetailVos
));
//如果不是装备申请,添加replyVo
if
(
deviceApplySaveVo
.
getApplyType
()!=
1
){
List
<
ReplyVo
>
replyVos
=
new
ArrayList
<>();
for
(
ApplyBillDetailVo
applyBillDetailVo
:
applyBillDetailVos
){
ReplyVo
replyVo
=
new
ReplyVo
();
replyVo
.
setId
(
applyBillDetailVo
.
getPackingId
());
replyVo
.
setNum
(
applyBillDetailVo
.
getStorageCount
());
replyVo
.
setSeqInterval
(
applyBillDetailVo
.
getSeqInterval
());
replyVos
.
add
(
replyVo
);
}
//转为json存储
deviceApplyBillEntity
.
setReplyVos
(
JacksonUtil
.
toJSon
(
replyVos
));
}
}
//set组合字符串
deviceApplyBillEntity
.
setApplyDetail
(
stringBuffer
.
toString
());
//单据转换
if
(
deviceApplySaveVo
.
getApplyFiles
()!=
null
&&
deviceApplySaveVo
.
getApplyFiles
().
size
()>
0
){
deviceApplyBillEntity
.
setApplyFiles
(
FilesUtil
.
stringFileToList
(
deviceApplySaveVo
.
getApplyFiles
()));
}
if
(
deviceApplySaveVo
.
getApplyNumFiles
()!=
null
&&
deviceApplySaveVo
.
getApplyNumFiles
().
size
()>
0
){
deviceApplyBillEntity
.
setApplyNumFiles
(
FilesUtil
.
stringFileToList
(
deviceApplySaveVo
.
getApplyNumFiles
()));
}
if
(
deviceApplySaveVo
.
getReplyFiles
()!=
null
&&
deviceApplySaveVo
.
getReplyFiles
().
size
()>
0
){
deviceApplyBillEntity
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
deviceApplySaveVo
.
getReplyFiles
()));
}
return
deviceApplyBillEntity
;
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
浏览文件 @
f95aa9e1
...
...
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Min
;
...
...
@@ -25,7 +26,7 @@ import java.util.List;
@ApiModel
(
"装备申请存储类"
)
public
class
DeviceApplySaveVo
{
// @NotNull(message = "applyNumber不能为空")
// @NotNull(message = "applyNumber不能为空")
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
...
...
@@ -70,6 +71,7 @@ public class DeviceApplySaveVo {
@ApiModelProperty
(
value
=
"申请类型(1:装备申请,2:退役申请,3:报废申请,4:销毁申请)"
)
private
Integer
applyType
;
/**
* 转实体
*/
...
...
@@ -86,12 +88,12 @@ public class DeviceApplySaveVo {
//拼接列装id和申请数量字符串
for
(
ApplyBillDetailVo
s
:
applyBillDetailVos
)
{
stringBuffer
.
append
(
s
.
getPackingId
()).
append
(
"x"
);
if
(
s
.
getStorageCount
()!=
null
)
{
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
}
else
{
stringBuffer
.
append
(
0
).
append
(
"x"
);
}
if
(
s
.
getStorageCount
()!=
null
)
{
stringBuffer
.
append
(
s
.
getStorageCount
()).
append
(
"x"
);
}
else
{
stringBuffer
.
append
(
0
).
append
(
"x"
);
}
}
//转为json存储
deviceApplyBillEntity
.
setApplyStat
(
JacksonUtil
.
toJSon
(
applyBillDetailVos
));
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
f95aa9e1
...
...
@@ -541,6 +541,8 @@ public class PackingController {
}
packingLibrary
.
setShowOrder
(
packingModelEdit
.
getShowOrder
());
PackingLog
packingLog
=
new
PackingLog
();
if
(
packingLibrary
.
getIsRoot
()
==
1
)
{
if
(
packingModelEdit
.
getModel
()
!=
null
&&
!
packingModelEdit
.
getModel
().
equals
(
packingLibrary
.
getModel
()))
{
//判断该列装下有没有入库装备 有装备则进行装备的型号的修改
...
...
@@ -573,7 +575,7 @@ public class PackingController {
packingLibrary
.
setName
(
packingModelEdit
.
getModel
());
packingLibraryService
.
changeAllModel
(
packingLibrary
.
getId
(),
packingModelEdit
.
getModel
());
//添加列装日志
PackingLog
packingLog
=
new
PackingLog
();
//
PackingLog packingLog = new PackingLog();
packingLog
.
setRemark
(
"将原型号"
+
packingLibrary
.
getModel
()+
"修改型号为"
+
packingModelEdit
.
getModel
());
packingLog
.
setPackingId
(
packingLibrary
.
getId
());
packingLogService
.
add
(
packingLog
);
...
...
@@ -582,7 +584,8 @@ public class PackingController {
packingLibraryService
.
update
(
packingLibrary
);
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
0
,
1
,
"修改列装型号目录"
,
userIds
,
0
);
// MessageBto messageBto = new MessageBto(0, 1, "修改列装型号目录", userIds, 0);
MessageBto
messageBto
=
new
MessageBto
(
0
,
1
,
"修改列装:"
+
packingLog
.
getRemark
(),
userIds
,
0
);
messageService
.
add
(
messageBto
);
}
else
{
throw
new
ApiException
(
"传入的列装id不是型号"
);
...
...
@@ -772,7 +775,9 @@ public class PackingController {
// packingLibrary.setMatchingRange(packingLibraryUpdateVo.getMatchingRange());
updatePacking
(
packingLibrary
,
packingLibraryUpdateVo
);
List
<
PackingLibrary
>
currentChild
=
getCurrentChild
(
packingLibrary
);
// List<PackingLibrary> currentChild = getCurrentChild(packingLibrary);
List
<
PackingLibrary
>
currentChild
=
new
ArrayList
<>();
getCurrentChild2
(
currentChild
,
packingLibrary
);
//修改子列装
// List<PackingLibrary> packingLibraryChilds = packingLibrary.getChilds();
// if(packingLibraryChilds.size()>0){
...
...
@@ -1066,4 +1071,16 @@ public class PackingController {
}
return
packingLibraries
;
}
public
void
getCurrentChild2
(
List
<
PackingLibrary
>
packingLibraries
,
PackingLibrary
packingLibrary
){
packingLibraries
.
add
(
packingLibrary
);
//查询所有的第一级子
List
<
PackingLibrary
>
byParentId
=
packingLibraryService
.
findByParentId
(
packingLibrary
.
getId
());
if
(
byParentId
.
size
()>
0
){
byParentId
.
forEach
(
packingLibrary1
->
{
getCurrentChild2
(
packingLibraries
,
packingLibrary1
);
});
}
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/subject/domin/PackingLibrary.java
浏览文件 @
f95aa9e1
...
...
@@ -286,6 +286,10 @@ public class PackingLibrary {
@ApiModelProperty
(
value
=
"试用装备的序列号"
)
private
List
<
String
>
deviceSeqNumberList
;
@Transient
@ApiModelProperty
(
value
=
"等级"
)
private
Integer
level
;
public
void
addChildNode
(
PackingLibrary
packingLibraryEntity
)
{
childs
.
add
(
packingLibraryEntity
);
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
f95aa9e1
...
...
@@ -673,7 +673,10 @@ public class RepairController {
//子任务完结
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
//阅知
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "业务办结", ids, 1);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"接收维修装备型号为"
+
repairDetailEntities
.
stream
()
.
map
(
RepairDetail:
:
getModel
).
collect
(
Collectors
.
toList
()),
ids
,
1
);
messageService
.
add
(
messageBto
);
}
else
{
//推到待上传签收单状态
...
...
@@ -834,7 +837,11 @@ public class RepairController {
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
//阅知
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "业务办结", ids, 1);
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailService
.
findByBillId
(
repairBill
.
getId
());
List
<
String
>
models
=
repairDetails
.
stream
().
map
(
RepairDetail:
:
getModel
).
collect
(
Collectors
.
toList
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"接收维修装备型号为:"
+
models
,
ids
,
1
);
messageService
.
add
(
messageBto
);
repairSendBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
repairSendBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
...
...
@@ -1189,6 +1196,7 @@ public class RepairController {
});
}
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
for
(
String
s
:
strings
)
{
if
(
s
.
length
()
>
1
)
{
//接收无误的装备
...
...
@@ -1202,6 +1210,7 @@ public class RepairController {
deviceLibraryEntity
.
setLifeStatus
(
2
);
}
deviceLibraryEntity
.
setManageStatus
(
1
);
deviceLibraries
.
add
(
deviceLibraryEntity
);
//添加装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收并发起入库", fileVoList, taskBto2.getId());
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"维修退回装备接收并发起入库"
,
fileVoList
,
taskBto2
.
getId
(),
taskBto2
.
getId
());
...
...
@@ -1214,6 +1223,7 @@ public class RepairController {
//更改装备状态
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
id
);
deviceLibraryEntity
.
setLifeStatus
(
11
);
deviceLibraries
.
add
(
deviceLibraryEntity
);
//添加装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收入库丢失", fileVoList, taskBto2.getId());
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"维修退回装备接收入库丢失"
,
fileVoList
,
taskBto2
.
getId
(),
taskBto2
.
getId
());
...
...
@@ -1241,8 +1251,10 @@ public class RepairController {
MessageBto
messageBto
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
messageService
.
add
(
messageBto
);
}
String
message
=
repairReceiveVo
.
getStatus
()
==
0
?
"业务办结"
:
"接收维修领取装备"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
message
,
ids
,
1
,
1
);
// String message = repairReceiveVo.getStatus() == 0 ? "业务办结" : "接收维修领取装备";
String
message
=
repairReceiveVo
.
getStatus
()
==
0
?
"送修任务已完结,装备型号为:"
:
"接收维修领取装备,型号为:"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto2
.
getId
(),
taskBto2
.
getBusinessType
(),
message
+
deviceLibraries
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
collect
(
Collectors
.
toList
()),
ids
,
1
,
1
);
messageService
.
add
(
messageBto
);
//遍历map依次发送阅知
messageMap
.
keySet
().
forEach
(
integer
->
{
...
...
@@ -1339,7 +1351,11 @@ public class RepairController {
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
//阅知
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
// MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "业务办结", ids, 1);
List
<
String
>
models
=
deviceRepairDetailService
.
findByBackBillId
(
repairBackBill
.
getId
()).
stream
().
map
(
RepairDetail:
:
getModel
)
.
collect
(
Collectors
.
toList
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"维修业务已办结,装备型号为"
+
models
,
ids
,
1
);
messageService
.
add
(
messageBto
);
repairBackBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
repairBackBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
...
...
@@ -2086,7 +2102,11 @@ public class RepairController {
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
//阅知
MessageBto
messageBto1
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
List
<
String
>
models
=
deviceRepairDetailService
.
findByBackBillId
(
repairBackBill
.
getId
()).
stream
().
map
(
RepairDetail:
:
getModel
)
.
collect
(
Collectors
.
toList
());
MessageBto
messageBto1
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"维修业务已办结,装备型号为"
+
models
,
ids
,
1
);
// MessageBto messageBto1 = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(), "业务办结", userIds, 1);
messageService
.
add
(
messageBto1
);
//装备日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
...
...
@@ -2201,7 +2221,11 @@ public class RepairController {
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
//业务办结阅知
MessageBto
messageBto1
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
List
<
String
>
models
=
repairDetailEntities
.
stream
().
map
(
RepairDetail:
:
getModel
).
collect
(
Collectors
.
toList
());
// MessageBto messageBto1 = new MessageBto(taskBto.getParentTaskId(), taskBto.getBusinessType(),
// "业务办结", userIds, 1);
MessageBto
messageBto1
=
new
MessageBto
(
taskBto
.
getParentTaskId
(),
taskBto
.
getBusinessType
(),
"送修业务已办结,装备型号为:"
+
models
,
userIds
,
1
);
messageService
.
add
(
messageBto1
);
//装备日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
...
...
@@ -2302,7 +2326,7 @@ public class RepairController {
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
//给同单位专管员和收件单位专管员推阅知
messageBto1
.
setContent
(
"
撤回任务
:"
+
title
);
messageBto1
.
setContent
(
"
送修任务撤回
:"
+
title
);
MessageBto
messageBto
=
new
MessageBto
(-
1
,
parentTask
.
getBusinessType
(),
messageBto1
.
getContent
(),
idList
,
1
);
BeanUtils
.
copyProperties
(
messageBto1
,
messageBto
);
messageBto
.
setTaskId
(-
1
);
...
...
@@ -2400,7 +2424,7 @@ public class RepairController {
.
collect
(
Collectors
.
toList
()));
//给同单位专管员和收件单位专管员推阅知
// messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4));
messageBto1
.
setContent
(
"
撤回任务
:"
+
title
);
messageBto1
.
setContent
(
"
维修退回任务撤回
:"
+
title
);
MessageBto
messageBto
=
new
MessageBto
(-
1
,
parentTask
.
getBusinessType
(),
messageBto1
.
getContent
(),
idList
,
1
);
BeanUtils
.
copyProperties
(
messageBto1
,
messageBto
);
messageBto
.
setTaskId
(-
1
);
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/service/RepairDetailService.java
浏览文件 @
f95aa9e1
...
...
@@ -27,6 +27,14 @@ public interface RepairDetailService extends RepairPublicService<RepairDetail> {
*/
List
<
RepairDetail
>
findByBillId
(
Integer
billId
);
/**
* 根据billid查询维修单的设备
*
* @param billId 维修退回单据id
* @return 所对应的装备信息
*/
List
<
RepairDetail
>
findByBackBillId
(
Integer
billId
);
/**
* 修改业务对应装备的状态
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairDetailServiceImpl.java
浏览文件 @
f95aa9e1
...
...
@@ -118,6 +118,13 @@ public class RepairDetailServiceImpl implements RepairDetailService {
return
repairDetails
;
}
@Override
public
List
<
RepairDetail
>
findByBackBillId
(
Integer
billId
)
{
List
<
RepairDetail
>
repairDetails
=
deviceRepairDetailDao
.
findByRepairBackBillId
(
billId
);
repairDetails
.
forEach
(
RepairDetail:
:
setConfigName
);
return
repairDetails
;
}
@Override
public
RepairDetail
updateIdAndStatus
(
Integer
id
,
Integer
status
)
{
Optional
<
RepairDetail
>
repairDetail
=
deviceRepairDetailDao
.
findById
(
id
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论