Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
43350ddc
提交
43350ddc
authored
3月 30, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
8aa3b67a
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
193 行增加
和
29 行删除
+193
-29
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+26
-8
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+19
-2
DeviceApplyBill.java
.../tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
+13
-0
DeviceApplySaveVo.java
...m/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
+3
-0
ReplyVo.java
...in/java/com/tykj/dev/device/apply/subject/vo/ReplyVo.java
+22
-0
UploadApplyFile.java
...com/tykj/dev/device/apply/subject/vo/UploadApplyFile.java
+3
-0
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+1
-1
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+14
-3
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+31
-0
DeviceLibrarySelectVo.java
.../dev/device/library/subject/vo/DeviceLibrarySelectVo.java
+18
-0
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+13
-0
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+6
-0
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+10
-3
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+6
-9
StorageBillSaveVo.java
...tykj/dev/device/storage/subject/vo/StorageBillSaveVo.java
+3
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+3
-3
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+2
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
43350ddc
...
...
@@ -183,8 +183,9 @@ public class AllotBillController {
saveEntity
=
taskService
.
start
(
taskBto
);
}
else
{
TaskBto
taskBto
=
taskService
.
get
(
allotBillSaveVo
.
getTaskId
());
taskBto
.
setOwnUnit
(
userPublicService
.
findUnitIdByName
(
allotBillSaveVo
.
getReceiveUnit
()));
saveEntity
=
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
ALLOTING
,
0
);
TaskBto
taskBto1
=
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskBto1
.
setOwnUnit
(
userPublicService
.
findUnitIdByName
(
allotBillSaveVo
.
getReceiveUnit
()));
saveEntity
=
taskService
.
moveToSpecial
(
taskBto1
,
StatusEnum
.
ALLOTING
,
0
);
}
if
(
allotBillSaveVo
.
getIsSigned
()==
null
||
allotBillSaveVo
.
getIsSigned
()!=
1
)
{
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_ALLOT_FILE
.
id
,
"配发业务"
,
saveEntity
.
getId
(),
saveEntity
.
getNodeIdDetail
()
+
saveEntity
.
getId
()
+
"."
,
saveEntity
.
getBillId
(),
3
,
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
()),
0
,
null
,
Collections
.
singletonList
(
0
));
...
...
@@ -192,7 +193,7 @@ public class AllotBillController {
}
}
else
{
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_CROSS_FILE
.
id
,
"配发业务"
,
null
,
"."
,
billId
,
3
,
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
()),
1
,
null
,
userIds
);
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_CROSS_FILE
.
id
,
"配发业务"
,
null
,
"."
,
billId
,
3
,
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
()),
1
,
"country"
,
userIds
);
saveEntity
=
taskService
.
start
(
taskBto2
);
}
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
...
...
@@ -430,7 +431,8 @@ public class AllotBillController {
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
messageService
.
add
(
messageBto
);
}
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"接收配发装备"
,
ids
,
1
);
String
message
=
allotReceiveVo
.
getStatus
()==
0
?
"业务办结"
:
"接收配发装备"
;
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
message
,
ids
,
1
);
messageService
.
add
(
messageBto
);
log
.
info
(
"[配发模块]:接收并发起入库"
);
myWebSocket
.
sendMessage1
();
...
...
@@ -534,9 +536,8 @@ public class AllotBillController {
//第一次保存
if
(
allotBillSaveVo
.
getTaskId
()==
null
){
//保存入库单
Integer
userId
=
userUtils
.
getCurrentUserId
();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
AllotBill
allotBill1
=
allotBillSaveVo
.
toDo
();
allotBill1
.
setAllotStatus
(
0
);
AllotBill
allotBill
=
allotBillService
.
addEntity
(
allotBill1
);
...
...
@@ -565,7 +566,8 @@ public class AllotBillController {
public
ResponseEntity
deleteAllotBill
(
@PathVariable
(
"taskId"
)
int
taskId
)
{
//任务封存
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
taskService
.
moveToArchive
(
taskBto
);
TaskBto
taskBto1
=
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToArchive
(
taskBto1
);
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"删除成功"
);
}
...
...
@@ -642,6 +644,13 @@ public class AllotBillController {
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
messageService
.
add
(
messageBto
);
}
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
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
);
messageService
.
add
(
messageBto
);
}
return
ResponseEntity
.
ok
(
"上传成功"
);
}
...
...
@@ -681,7 +690,9 @@ public class AllotBillController {
//业务完结
taskService
.
moveToEnd
(
taskBto
);
//主业务完结
taskService
.
moveToEnd
(
taskService
.
get
(
taskBto
.
getParentTaskId
()));
if
(
taskBto
.
getParentTaskId
()!=
null
)
{
taskService
.
moveToEnd
(
taskService
.
get
(
taskBto
.
getParentTaskId
()));
}
//装备日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVo
.
getAllotFiles
().
forEach
(
fileRet
->
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
fileRet
.
getName
(),
fileRet
.
getPreviewPath
())));
...
...
@@ -700,6 +711,13 @@ public class AllotBillController {
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为经办人"
,
idList
,
1
);
messageService
.
add
(
messageBto
);
}
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
userIds
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBill
.
getReceiveUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"OK"
);
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
43350ddc
...
...
@@ -144,9 +144,23 @@ public class DeviceApplyController {
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
}
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"发起装备申请"
,
userIds
);
String
message
;
switch
(
deviceApplySaveVo
.
getApplyType
()){
case
2
:
message
=
"发起退役申请"
;
break
;
case
3
:
message
=
"发起报废申请"
;
break
;
case
4
:
message
=
"发起销毁申请"
;
break
;
default
:
message
=
"发起装备申请"
;
}
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
message
,
userIds
);
messageService
.
add
(
messageBto
);
log
.
info
(
"[申请模块]:
发起装备申请"
);
log
.
info
(
"[申请模块]:
"
+
message
);
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
deviceApplyBillEntity
);
}
...
...
@@ -370,6 +384,9 @@ public class DeviceApplyController {
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
deviceApplyBill
.
setApplyStatus
(
4
);
deviceApplyBill
.
setBackFiles
(
FilesUtil
.
stringFileToList
(
uploadApplyFile
.
getBackFiles
()));
if
(
uploadApplyFile
.
getReplyVos
()!=
null
&&
uploadApplyFile
.
getReplyVos
().
size
()>
0
){
deviceApplyBill
.
setReplyVos
(
JacksonUtil
.
toJSon
(
uploadApplyFile
.
getReplyVos
()));
}
deviceApplyBillService
.
update
(
deviceApplyBill
);
return
ResponseEntity
.
ok
(
"上传成功"
);
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
domin
;
import
com.tykj.dev.device.apply.subject.vo.ReplyVo
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -37,6 +38,12 @@ public class DeviceApplyBill {
@ApiModelProperty
(
name
=
"主键id"
)
@Column
(
columnDefinition
=
"integer NOT NULL AUTO_INCREMENT"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"申请类型(1:装备申请,2:退役申请,3:报废申请,4:销毁申请)"
)
private
Integer
applyType
;
@ApiModelProperty
(
value
=
"申请后对应业务账单id以x拼接"
)
private
String
billIds
;
/**
* 申请文号
*/
...
...
@@ -138,6 +145,9 @@ public class DeviceApplyBill {
@Column
(
name
=
"reply_files"
,
columnDefinition
=
"TEXT"
)
private
String
replyFiles
;
@Column
(
name
=
"reply_vos"
,
columnDefinition
=
"TEXT"
)
private
String
replyVos
;
@Transient
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
...
...
@@ -149,4 +159,7 @@ public class DeviceApplyBill {
@Transient
private
List
<
FileRet
>
applyNumFileList
=
new
ArrayList
<>();
@Transient
private
List
<
ReplyVo
>
replyVoList
=
new
ArrayList
<>();
}
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/DeviceApplySaveVo.java
浏览文件 @
43350ddc
...
...
@@ -63,6 +63,9 @@ public class DeviceApplySaveVo {
@ApiModelProperty
(
value
=
"批复文号附件名"
)
private
List
<
FileRet
>
replyFiles
;
@ApiModelProperty
(
value
=
"申请类型(1:装备申请,2:退役申请,3:报废申请,4:销毁申请)"
)
private
Integer
applyType
;
public
DeviceApplyBill
toDo
()
{
DeviceApplyBill
deviceApplyBillEntity
=
new
DeviceApplyBill
();
BeanUtils
.
copyProperties
(
this
,
deviceApplyBillEntity
);
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/ReplyVo.java
0 → 100644
浏览文件 @
43350ddc
package
com
.
tykj
.
dev
.
device
.
apply
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author dengdiyi
*/
@Data
@ApiModel
(
"申请批复类"
)
public
class
ReplyVo
{
@ApiModelProperty
(
value
=
"列装id"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"数量"
,
example
=
"1"
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"序列号区间"
,
example
=
"1"
)
private
String
seqInterval
;
}
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/vo/UploadApplyFile.java
浏览文件 @
43350ddc
...
...
@@ -23,4 +23,7 @@ public class UploadApplyFile {
@ApiModelProperty
(
value
=
"申请回执单附件"
)
private
List
<
FileRet
>
backFiles
;
@ApiModelProperty
(
value
=
"申请批复装备"
)
private
List
<
ReplyVo
>
replyVos
;
}
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
43350ddc
...
...
@@ -231,7 +231,7 @@ public enum LogType {
SCRAP_2
(
91
,
SCRAP
.
id
,
WAIT_UPLOAD_SCRAP_FILE
.
id
,
END
.
id
,
"上传报废单据"
),
SELF_CHECK_5
(
92
,
SELF_CHECK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"终端自查"
),
SELF_CHECK_6
(
93
,
SELF_CHECK
.
id
,
WAIT_SELF_CHECK
.
id
,
END
.
id
,
"周期自查"
),
APPLY_4
(
94
,
APPLY
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_APPLY_FILE
.
id
,
"发起
装备
申请"
),
APPLY_4
(
94
,
APPLY
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_APPLY_FILE
.
id
,
"发起申请"
),
REPAIR_BACK_8
(
95
,
REPAIR_BACK
.
id
,
WAIT_UPLOAD_BACK_SEND_FILE
.
id
,
END
.
id
,
"上传领取单"
),
REPAIR_SEND_11
(
96
,
REPAIR
.
id
,
WAIT_UPLOAD_SEND_FILE
.
id
,
END
.
id
,
"上传送修单"
),
REPAIR_SEND_12
(
97
,
REPAIR
.
id
,
WAIT_UPLOAD_SEND_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传送修单"
),
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
43350ddc
...
...
@@ -17,6 +17,8 @@ import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
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.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
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.AuthenticationUtils
;
...
...
@@ -29,7 +31,6 @@ import com.tykj.dev.socket.MyWebSocket;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -70,6 +71,8 @@ public class DeviceDestroyController {
private
InputOutputDeviceService
inputOutputDeviceService
;
@Autowired
private
DeviceLibraryDao
deviceLibraryDao
;
@Autowired
private
MessageService
messageService
;
public
DeviceDestroyController
(
DeviceDestroyBillService
deviceDestroyBillServiceyBillService
,
TaskService
taskService
,
DeviceLibraryService
deviceLibraryService
,
UserPublicService
userPublicService
,
DeviceLogService
deviceLogService
,
TaskLogService
taskLogService
)
{
this
.
deviceDestroyBillService
=
deviceDestroyBillServiceyBillService
;
...
...
@@ -116,6 +119,10 @@ public class DeviceDestroyController {
handleDeviceDetail
(
deviceDestroyBillEntitySaved
,
null
,
0
);
//生成上传销毁单任务
TaskBto
task
=
taskService
.
start
(
initTaskBto
(
deviceDestroyBillEntitySaved
));
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
task
.
getId
(),
task
.
getBusinessType
(),
"发起销毁"
,
userIds
,
1
);
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
selectDestroyDetail
(
deviceDestroyBillEntitySaved
.
getId
()));
}
...
...
@@ -238,7 +245,7 @@ public class DeviceDestroyController {
}
deviceDestroyBillService
.
updateEntity
(
deviceDestroyBill
);
//任务完结
taskService
.
moveToEnd
(
task
Bto
);
taskService
.
moveToEnd
(
task
Service
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
())
);
//生成日志所需的文件列表
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
deviceDestroyBill
.
getDestroyFileName
()
!=
null
&&
deviceDestroyBill
.
getDestroyFileUrl
()
!=
null
?
...
...
@@ -251,6 +258,10 @@ public class DeviceDestroyController {
deviceLogService
.
addLog
(
new
DeviceLogDto
(
id
,
"上传销毁单"
,
billList
));
}
}
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
userIds
,
1
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"上传成功"
);
}
...
...
@@ -296,7 +307,7 @@ public class DeviceDestroyController {
userUtils
.
getCurrentUnitId
(),
1
,
""
,
ListUtil
.
createList
(
destroyBill
.
getStartUserAId
(),
destroyBill
.
getStartUserAId
()
));
ListUtil
.
createList
(
destroyBill
.
getStartUserAId
(),
0
));
return
taskBto
;
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
43350ddc
...
...
@@ -70,6 +70,20 @@ public class DeviceLibraryController {
return
ResponseEntity
.
ok
(
"修改成功"
);
}
@ApiOperation
(
value
=
"修改装备生命状态"
,
notes
=
"修改装备生命状态"
)
@PostMapping
(
"/updateLifeStatus/{lifeStatus}"
)
public
ResponseEntity
selectByIds
(
@RequestBody
List
<
Integer
>
ids
,
@PathVariable
(
"lifeStatus"
)
int
lifeStatus
){
List
<
DeviceLogDto
>
deviceLogDtos
=
new
ArrayList
<>();
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
integer
);
deviceLogDtos
.
add
(
new
DeviceLogDto
(
integer
,
"将生命状态由"
+
configCache
.
getLifeStatusMap
().
get
(
deviceLibrary
.
getLifeStatus
())
+
"改为"
+
configCache
.
getLifeStatusMap
().
get
(
lifeStatus
),
null
));
deviceLibrary
.
setLifeStatus
(
lifeStatus
);
deviceLibraryService
.
update
(
deviceLibrary
);
});
deviceLogService
.
addAllLog
(
deviceLogDtos
);
return
ResponseEntity
.
ok
(
"修改成功"
);
}
@ApiOperation
(
value
=
"根据装备id查询装备详情"
,
notes
=
"根据装备id查询装备详情"
)
@PostMapping
(
"/selectByIds"
)
public
ResponseEntity
selectByIds
(
@RequestBody
List
<
Integer
>
ids
){
...
...
@@ -210,9 +224,26 @@ public class DeviceLibraryController {
@ApiOperation
(
value
=
"模糊查询日常管理装备父子分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/feature/summary/daily"
)
public
ResponseEntity
selectDailyDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Boolean
hasModelDim
=
deviceLibrarySelectVo
.
getModelDim
()!=
null
;
Boolean
hasNameDim
=
deviceLibrarySelectVo
.
getNameDim
()!=
null
;
Boolean
hasSeqDim
=
deviceLibrarySelectVo
.
getSeqDim
()!=
null
;
Boolean
hasLocationUnitDim
=
deviceLibrarySelectVo
.
getLocationUnitDim
()!=
null
;
Boolean
hasOwnUnitDim
=
deviceLibrarySelectVo
.
getOwnUnitDim
()!=
null
;
Boolean
hasLifeStatusDim
=
deviceLibrarySelectVo
.
getLifeStatusDim
()!=
null
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getList
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
Boolean
containModelDim
=
!
hasModelDim
||
deviceLibrary
.
getModel
().
contains
(
deviceLibrarySelectVo
.
getModelDim
());
Boolean
containNameDim
=
!
hasNameDim
||
deviceLibrary
.
getName
().
contains
(
deviceLibrarySelectVo
.
getNameDim
());
Boolean
containSeqDim
=
!
hasSeqDim
||
deviceLibrary
.
getSeqNumber
().
contains
(
deviceLibrarySelectVo
.
getSeqDim
());
Boolean
containLocationUnitDim
=
!
hasLocationUnitDim
||
deviceLibrary
.
getLocationUnit
().
contains
(
deviceLibrarySelectVo
.
getLocationUnitDim
());
Boolean
containOwnUnitDim
=
!
hasOwnUnitDim
||
deviceLibrary
.
getOwnUnit
().
contains
(
deviceLibrarySelectVo
.
getOwnUnitDim
());
Boolean
containLifeStatusDim
=
!
hasLifeStatusDim
||
deviceLibrary
.
getLifeStatusName
().
contains
(
deviceLibrarySelectVo
.
getLifeStatusDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
;
}).
collect
(
Collectors
.
toList
());
}
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
deviceLibraryEntity
));
// List<Comparator<DeviceVo>> comparators = new ArrayList<>();
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySelectVo.java
浏览文件 @
43350ddc
...
...
@@ -80,4 +80,22 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"序列号区间"
)
private
String
seqInterval
;
@ApiModelProperty
(
value
=
"型号模糊查询字段"
)
private
String
modelDim
;
@ApiModelProperty
(
value
=
"名称模糊查询字段"
)
private
String
nameDim
;
@ApiModelProperty
(
value
=
"序列号模糊查询字段"
)
private
String
seqDim
;
@ApiModelProperty
(
value
=
"所在单位模糊查询字段"
)
private
String
locationUnitDim
;
@ApiModelProperty
(
value
=
"所属单位模糊查询字段"
)
private
String
ownUnitDim
;
@ApiModelProperty
(
value
=
"生命状态模糊查询字段"
)
private
String
lifeStatusDim
;
}
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
43350ddc
...
...
@@ -20,6 +20,9 @@ import com.tykj.dev.device.matching.subject.vo.*;
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.user.read.service.MessageService
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
...
...
@@ -85,6 +88,12 @@ public class MatchingDeviceController {
@Autowired
private
ConfigCache
configCache
;
@Autowired
private
UserPublicService
userPublicService
;
@Autowired
private
MessageService
messageService
;
@ApiOperation
(
value
=
"添加配套设备"
,
notes
=
"可以通过这个接口添加配套设备"
)
@PostMapping
(
value
=
"/add"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -119,6 +128,10 @@ public class MatchingDeviceController {
//set账单新增设备详情
m
.
setDeviceDetail
(
stringBuffer
.
toString
());
matchingDeviceBillService
.
update
(
m
);
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"添加成功"
);
}
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
43350ddc
...
...
@@ -208,6 +208,12 @@ public enum StatusEnum {
* 等待上传申请回执单
*/
WAIT_CONFIRM_APPLY_DEVICE
(
511
,
"待确认接收申请装备"
),
// /**
// * 等待上传申请回执单
// */
// WAIT_APPLY_FILE(520, "待上传申请回执单"),
/**
* 新增配套设备待审核
*/
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
43350ddc
...
...
@@ -134,7 +134,8 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
addRepairDevice
(
@RequestBody
List
<
Integer
>
ids
)
{
deviceLibraryService
.
isInStock
(
ids
);
ids
.
forEach
(
integer
->
{
List
<
Integer
>
detailIds
=
new
ArrayList
<>();
for
(
Integer
integer:
ids
)
{
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
integer
);
deviceLibraryEntity
.
setLifeStatus
(
4
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
...
...
@@ -149,11 +150,17 @@ public class RepairController {
repairDetail
.
setSeqNumber
(
deviceLibraryEntity
.
getSeqNumber
());
repairDetail
.
setType
(
deviceLibraryEntity
.
getType
());
repairDetail
.
setDeviceRepairBillId
(
0
);
deviceRepairDetailService
.
save
(
repairDetail
);
RepairDetail
repairDetail1
=
deviceRepairDetailService
.
save
(
repairDetail
);
detailIds
.
add
(
repairDetail1
.
getId
());
//存装备日志
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"将装备添加到待维修列表"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
});
}
//发送阅知信息
List
<
Integer
>
userIds
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
MessageBto
messageBto
=
new
MessageBto
(
0
,
5
,
"添加维修装备"
,
userIds
,
1
);
messageBto
.
setRecord
(
StringSplitUtil
.
idListToString
(
detailIds
));
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"添加成功"
);
}
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
43350ddc
...
...
@@ -213,6 +213,7 @@ public class StorageBillController {
MapperUtils
.
copyNoNullProperties
(
storageBill1
,
storageBill
);
storageBillEntity
=
storageBillService
.
update
(
storageBill
);
//结束Task
taskService
.
addInvolveUser
(
taskEntity1
,
userId
);
taskService
.
moveToEnd
(
taskEntity1
);
}
Integer
storageBillId
=
storageBillEntity
.
getId
();
...
...
@@ -275,15 +276,10 @@ public class StorageBillController {
storageBillService
.
update
(
storageBillEntity
);
//发送阅知信息
MessageBto
messageBto
=
new
MessageBto
();
messageBto
.
setContent
(
"
发起
装备入库"
);
messageBto
.
setContent
(
"
完成
装备入库"
);
messageBto
.
setTaskId
(
taskEntity1
.
getId
());
messageBto
.
setIsHighLight
(
1
);
if
(
storageBillEntity
.
getReceiveUserB
()==
null
)
{
messageBto
.
setInvolveUserIdList
(
userPublicService
.
findOtherUser
(
userId
));
}
else
{
messageBto
.
setInvolveUserIdList
(
new
ArrayList
<>(
Collections
.
singletonList
(
storageBillEntity
.
getReceiveUserbId
())));
}
messageBto
.
setInvolveUserIdList
(
userPublicService
.
findOtherUser
(
userId
));
messageBto
.
setBusinessType
(
taskEntity1
.
getBusinessType
());
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
...
...
@@ -371,7 +367,7 @@ public class StorageBillController {
//保存入库单
Integer
userId
=
userUtils
.
getCurrentUserId
();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
StorageBill
storageBill1
=
storageBillSaveVo
.
toDo
();
storageBill1
.
setStorageStatus
(
0
);
StorageBill
storageBill
=
storageBillService
.
addEntity
(
storageBill1
);
...
...
@@ -399,7 +395,8 @@ public class StorageBillController {
public
ResponseEntity
deleteStorageBill
(
@PathVariable
(
"taskId"
)
int
taskId
)
{
//任务封存
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
taskService
.
moveToArchive
(
taskBto
);
TaskBto
taskBto1
=
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToArchive
(
taskBto1
);
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"删除成功"
);
}
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/subject/vo/StorageBillSaveVo.java
浏览文件 @
43350ddc
...
...
@@ -28,6 +28,9 @@ public class StorageBillSaveVo {
@ApiModelProperty
(
value
=
"任务Id"
)
private
Integer
taskId
;
@ApiModelProperty
(
value
=
"导入申请任务Id集合"
)
private
List
<
Integer
>
applyTaskIds
;
// @NotNull(message = "applyNumber不能为空")
@ApiModelProperty
(
value
=
"申请文号"
)
private
String
applyNumber
;
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
43350ddc
...
...
@@ -21,7 +21,6 @@ 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.CustomOrder
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
...
@@ -868,8 +867,9 @@ public class TaskServiceImpl implements TaskService {
boolean
pointExists
=
taskBto
.
getCurrentPoint
()
<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()))
||
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())==
0
&&
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
()));
boolean
isDraft
=
taskBto
.
getBillStatus
()
==
201
||
taskBto
.
getBillStatus
()
==
333
||
taskBto
.
getBillStatus
()
==
810
||
taskBto
.
getBillStatus
()
==
322
||
taskBto
.
getBillStatus
()
==
722
;
boolean
isCreateUser
=
userId
.
equals
(
taskBto
.
getCreateUserId
());
return
unitExists
&&
pointExists
&&
!
userConfirm
&&
!
userConfirm2
&&
!
isDraft
&&
isCreateUser
;
// boolean isCreateUser = userId.equals(taskBto.getCreateUserId());
boolean
isCreateUnit
=
unitId
.
equals
(
userPublicService
.
findUnitIdByName
(
userPublicService
.
findUnitsNameByUserId
(
taskBto
.
getCreateUserId
())));
return
unitExists
&&
pointExists
&&
!
userConfirm
&&
!
userConfirm2
&&
!
isDraft
&&
isCreateUnit
;
})
.
collect
(
Collectors
.
toList
());
//涉及人员当前指针为-1,且所属单位为当前单位
...
...
dev-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
43350ddc
...
...
@@ -8,6 +8,7 @@ import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
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.ReplyVo
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
...
...
@@ -351,6 +352,7 @@ public class TaskSelectController {
deviceApplyBillEntity
.
setReplyFileList
(
FilesUtil
.
stringFileToList
(
deviceApplyBillEntity
.
getReplyFiles
()));
deviceApplyBillEntity
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
deviceApplyBillEntity
.
getApplyFiles
()));
deviceApplyBillEntity
.
setApplyNumFileList
(
FilesUtil
.
stringFileToList
(
deviceApplyBillEntity
.
getApplyNumFiles
()));
deviceApplyBillEntity
.
setReplyVoList
(
JacksonUtil
.
readValue
(
deviceApplyBillEntity
.
getReplyVos
(),
new
TypeReference
<
List
<
ReplyVo
>>(){}));
list
.
add
(
deviceApplyBillEntity
);
List
<
Integer
>
idList
=
StringSplitUtil
.
userIdSplit
(
deviceApplyBillEntity
.
getApplyDetail
());
List
<
Integer
>
packingIdList
=
new
ArrayList
<>();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论