Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
de55dca0
提交
de55dca0
authored
5月 14, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
eea9b06b
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
164 行增加
和
105 行删除
+164
-105
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+34
-39
BatchAllotController.java
...ykj/dev/device/allot/controller/BatchAllotController.java
+25
-7
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+7
-7
MatchingType.java
.../src/main/java/com/tykj/dev/config/base/MatchingType.java
+35
-0
SystemConfigRun.java
...c/main/java/com/tykj/dev/config/task/SystemConfigRun.java
+3
-0
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+2
-2
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+29
-20
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+1
-1
Task.java
...ain/java/com/tykj/dev/device/task/subject/domin/Task.java
+8
-1
MessageServiceImpl.java
...dev/device/user/read/service/impl/MessageServiceImpl.java
+20
-28
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
de55dca0
...
@@ -292,49 +292,44 @@ public class BackController {
...
@@ -292,49 +292,44 @@ public class BackController {
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
//不上传单据
//不上传单据
if
(
fileUploadVo
.
getStatus
()==
0
){
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToArchive
(
taskBto
);
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
AllotBackBill
allotBackBill
=
allotBackBillService
.
getOne
(
taskBto
.
getBillId
());
allotBackBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
allotBackBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
if
(
fileUploadVo
.
getSendUserbId
()!=
null
){
allotBackBill
.
setSendUserbId
(
fileUploadVo
.
getSendUserbId
());
allotBackBill
.
setAgent
(
userPublicService
.
getOne
(
fileUploadVo
.
getSendUserbId
()).
getName
());
}
}
else
{
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
taskService
.
moveToEnd
(
taskBto
);
if
(
fileUploadVo
.
getReceiveFiles
()!=
null
&&
fileUploadVo
.
getReceiveFiles
().
size
()>
0
){
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
fileUploadVo
.
getReceiveFiles
().
forEach
(
fileRet
->
{
AllotBackBill
allotBackBill
=
allotBackBillService
.
getOne
(
taskBto
.
getBillId
());
fileVoList
.
add
(
new
FileVo
(
"退回单"
,
fileRet
.
getName
(),
fileRet
.
getPreviewPath
()));
allotBackBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
allotBackBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
if
(
fileUploadVo
.
getSendUserbId
()!=
null
){
allotBackBill
.
setSendUserbId
(
fileUploadVo
.
getSendUserbId
());
allotBackBill
.
setAgent
(
userPublicService
.
getOne
(
fileUploadVo
.
getSendUserbId
()).
getName
());
}
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
if
(
fileUploadVo
.
getReceiveFiles
()!=
null
&&
fileUploadVo
.
getReceiveFiles
().
size
()>
0
){
fileUploadVo
.
getReceiveFiles
().
forEach
(
fileRet
->
{
fileVoList
.
add
(
new
FileVo
(
"退回单"
,
fileRet
.
getName
(),
fileRet
.
getPreviewPath
()));
});
allotBackBill
.
setReceiveFiles
(
FilesUtil
.
stringFileToList
(
fileUploadVo
.
getReceiveFiles
()));
}
allotBackBillService
.
update
(
allotBackBill
);
// fileVoList.add(new FileVo("退回单", allotBackBill.getBillFileName(), allotBackBill.getBillFileUrl()));
//添加装备日志
List
<
Integer
>
deviceIds
=
StringSplitUtil
.
split
(
allotBackBill
.
getBackCheckDetail
());
deviceIds
.
forEach
(
integer
->
{
//存装备日志
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"上传退回单据"
,
fileVoList
);
deviceLogService
.
addLog
(
deviceLogDto
);
});
});
if
(
fileUploadVo
.
getSendUserbId
()!=
null
)
{
allotBackBill
.
setReceiveFiles
(
FilesUtil
.
stringFileToList
(
fileUploadVo
.
getReceiveFiles
()));
List
<
Integer
>
idList1
=
new
ArrayList
<>();
}
idList1
.
add
(
fileUploadVo
.
getSendUserbId
());
allotBackBillService
.
update
(
allotBackBill
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
// fileVoList.add(new FileVo("退回单", allotBackBill.getBillFileName(), allotBackBill.getBillFileUrl()));
messageService
.
add
(
messageBto
);
//添加装备日志
}
List
<
Integer
>
deviceIds
=
StringSplitUtil
.
split
(
allotBackBill
.
getBackCheckDetail
());
//发送阅知信息
deviceIds
.
forEach
(
integer
->
{
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
//存装备日志
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBackBill
.
getSendUnit
())).
stream
()
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"上传退回单据"
,
fileVoList
);
.
map
(
User:
:
getUserId
)
deviceLogService
.
addLog
(
deviceLogDto
);
.
collect
(
Collectors
.
toList
()));
});
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
if
(
fileUploadVo
.
getSendUserbId
()!=
null
)
{
List
<
Integer
>
idList1
=
new
ArrayList
<>();
idList1
.
add
(
fileUploadVo
.
getSendUserbId
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"被选为签发人"
,
idList1
,
1
);
messageService
.
add
(
messageBto
);
messageService
.
add
(
messageBto
);
}
}
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
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
);
messageService
.
add
(
messageBto
);
return
ResponseEntity
.
ok
(
"上传成功"
);
return
ResponseEntity
.
ok
(
"上传成功"
);
}
}
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BatchAllotController.java
浏览文件 @
de55dca0
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.controller;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.service.AllotBillService
;
import
com.tykj.dev.device.allot.subject.vo.AllotBillSaveVo
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
...
@@ -12,9 +13,10 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -12,9 +13,10 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* @author dengdiyi
* @author dengdiyi
...
@@ -41,10 +43,26 @@ public class BatchAllotController {
...
@@ -41,10 +43,26 @@ public class BatchAllotController {
@Autowired
@Autowired
private
DeviceLogService
deviceLogService
;
private
DeviceLogService
deviceLogService
;
@ApiOperation
(
value
=
"发起批量配发"
)
@Autowired
@PostMapping
(
value
=
"/createBatchAllot"
)
private
AllotBillController
allotBillController
;
@ApiOperation
(
value
=
"发起批量配发(type 1:签字配发,2:签章配发)"
)
@PostMapping
(
value
=
"/createBatchAllot/{type}/{userId}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
createBatchAllot
(){
public
ResponseEntity
createBatchAllot
(
@PathVariable
(
"type"
)
int
type
,
@PathVariable
(
"userId"
)
int
userId
,
@RequestBody
List
<
AllotBillSaveVo
>
allotBillSaveVoList
){
return
ResponseEntity
.
ok
(
""
);
if
(
type
==
1
){
allotBillSaveVoList
.
forEach
(
allotBillSaveVo
->
allotBillController
.
addAllotBill
(
allotBillSaveVo
));
}
else
{
List
<
Integer
>
taskIds
=
new
ArrayList
<>();
//批量保存草稿
allotBillSaveVoList
.
forEach
(
allotBillSaveVo
->
{
String
s
=
(
String
)
allotBillController
.
saveAllotBill
(
allotBillSaveVo
).
getBody
();
taskIds
.
add
(
Integer
.
valueOf
(
s
.
substring
(
4
)));
});
//批量申请签章
taskIds
.
forEach
(
integer
->
allotBillController
.
applySign
(
integer
,
userId
));
}
return
ResponseEntity
.
ok
(
"发起成功"
);
}
}
}
}
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
de55dca0
...
@@ -36,13 +36,13 @@ public enum LogType {
...
@@ -36,13 +36,13 @@ public enum LogType {
ALLOT_3
(
9
,
ALLOT
.
id
,
ALLOT_DRAFT
.
id
,
ARCHIVE
.
id
,
"删除配发草稿"
),
ALLOT_3
(
9
,
ALLOT
.
id
,
ALLOT_DRAFT
.
id
,
ARCHIVE
.
id
,
"删除配发草稿"
),
ALLOT_4
(
10
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_FILE
.
id
,
END
.
id
,
"上传配发单"
),
ALLOT_4
(
10
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_FILE
.
id
,
END
.
id
,
"上传配发
回执
单"
),
ALLOT_5
(
11
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传配发单"
),
ALLOT_5
(
11
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传配发单"
),
ALLOT_6
(
12
,
ALLOT
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_CROSS_FILE
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_6
(
12
,
ALLOT
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_CROSS_FILE
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_7
(
13
,
ALLOT
.
id
,
WAIT_UPLOAD_CROSS_FILE
.
id
,
END
.
id
,
"上传配发单"
),
ALLOT_7
(
13
,
ALLOT
.
id
,
WAIT_UPLOAD_CROSS_FILE
.
id
,
END
.
id
,
"上传配发
回执
单"
),
RFID_1
(
14
,
TAG
.
id
,
ORIGIN_STATUS
.
id
,
RFID_BUSINESS_NEED_CONFIRM
.
id
,
"发起标签替换"
),
RFID_1
(
14
,
TAG
.
id
,
ORIGIN_STATUS
.
id
,
RFID_BUSINESS_NEED_CONFIRM
.
id
,
"发起标签替换"
),
...
@@ -149,9 +149,9 @@ public enum LogType {
...
@@ -149,9 +149,9 @@ public enum LogType {
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起装备退回"
),
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起装备退回"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"
退回装备接收成功
"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"
接收退回装备并上传退回签收单
"
),
ALLOT_BACK_3
(
59
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
END
.
id
,
"上传退回单"
),
ALLOT_BACK_3
(
59
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
END
.
id
,
"上传退回
签收
单"
),
ALLOT_BACK_4
(
60
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
"退回装备接收成功(缺失单据)"
),
ALLOT_BACK_4
(
60
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
"退回装备接收成功(缺失单据)"
),
...
@@ -259,10 +259,10 @@ public enum LogType {
...
@@ -259,10 +259,10 @@ public enum LogType {
WORK_H1
(
79
,
WORK_HANDOVER
.
id
,
ORIGIN_STATUS
.
id
,
WORKHANDOVER1011
.
id
,
"工作交接任务生成完成,等待上传交接单"
),
WORK_H1
(
79
,
WORK_HANDOVER
.
id
,
ORIGIN_STATUS
.
id
,
WORKHANDOVER1011
.
id
,
"工作交接任务生成完成,等待上传交接单"
),
WORK_H2
(
80
,
WORK_HANDOVER
.
id
,
WORKHANDOVER1011
.
id
,
END
.
id
,
"工作交接完成"
),
WORK_H2
(
80
,
WORK_HANDOVER
.
id
,
WORKHANDOVER1011
.
id
,
END
.
id
,
"工作交接完成"
),
ALLOT_8
(
82
,
ALLOT
.
id
,
ORIGIN_STATUS
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_8
(
82
,
ALLOT
.
id
,
ORIGIN_STATUS
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_9
(
83
,
ALLOT
.
id
,
ALLOTING
.
id
,
END
.
id
,
"接收配发装备"
),
ALLOT_9
(
83
,
ALLOT
.
id
,
ALLOTING
.
id
,
END
.
id
,
"接收配发装备
并上传配发签收单
"
),
ALLOT_10
(
84
,
ALLOT
.
id
,
WAIT_ALLOT
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_10
(
84
,
ALLOT
.
id
,
WAIT_ALLOT
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_11
(
85
,
ALLOT
.
id
,
ALLOTING
.
id
,
ARCHIVE
.
id
,
"拒绝接收配发装备"
),
ALLOT_11
(
85
,
ALLOT
.
id
,
ALLOTING
.
id
,
ARCHIVE
.
id
,
"拒绝接收配发装备"
),
ALLOT_BACK_5
(
86
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE_2
.
id
,
END
.
id
,
"上传退回单"
),
ALLOT_BACK_5
(
86
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE_2
.
id
,
END
.
id
,
"上传退回
回执
单"
),
REPAIR_SEND_10
(
87
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_FILE
.
id
,
"向(%receiveUnit)发起装备维修"
),
REPAIR_SEND_10
(
87
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_FILE
.
id
,
"向(%receiveUnit)发起装备维修"
),
REPAIR_BACK_7
(
88
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
REPAIR_BACK_7
(
88
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
STORAGE_4
(
89
,
STORAGE
.
id
,
WAIT_STORAGE
.
id
,
ARCHIVE
.
id
,
"删除入库草稿"
),
STORAGE_4
(
89
,
STORAGE
.
id
,
WAIT_STORAGE
.
id
,
ARCHIVE
.
id
,
"删除入库草稿"
),
...
@@ -275,7 +275,7 @@ public enum LogType {
...
@@ -275,7 +275,7 @@ public enum LogType {
REPAIR_SEND_12
(
97
,
REPAIR
.
id
,
WAIT_UPLOAD_SEND_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传送修单"
),
REPAIR_SEND_12
(
97
,
REPAIR
.
id
,
WAIT_UPLOAD_SEND_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传送修单"
),
ALLOT_BACK_6
(
98
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE_2
.
id
,
ARCHIVE
.
id
,
"取消上传退回单"
),
ALLOT_BACK_6
(
98
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_BACK_FILE_2
.
id
,
ARCHIVE
.
id
,
"取消上传退回单"
),
ALLOT_12
(
99
,
ALLOT
.
id
,
ALLOTING
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
"接收配发装备(缺失单据)"
),
ALLOT_12
(
99
,
ALLOT
.
id
,
ALLOTING
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
"接收配发装备(缺失单据)"
),
ALLOT_13
(
101
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
END
.
id
,
"上传配发单"
),
ALLOT_13
(
101
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
END
.
id
,
"上传配发
签收
单"
),
ALLOT_14
(
102
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传配发单"
),
ALLOT_14
(
102
,
ALLOT
.
id
,
WAIT_UPLOAD_ALLOT_RECEIVE_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传配发单"
),
ALLOT_BACK_7
(
103
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传退回单"
),
ALLOT_BACK_7
(
103
,
ALLOT_BACK
.
id
,
WAIT_UPLOAD_ALLOT_BACK_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传退回单"
),
REPAIR_SEND_13
(
104
,
REPAIR
.
id
,
WAIT_UPLOAD_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传送修单"
),
REPAIR_SEND_13
(
104
,
REPAIR
.
id
,
WAIT_UPLOAD_FILE
.
id
,
ARCHIVE
.
id
,
"取消上传送修单"
),
...
...
dev-config/src/main/java/com/tykj/dev/config/base/MatchingType.java
0 → 100644
浏览文件 @
de55dca0
package
com
.
tykj
.
dev
.
config
.
base
;
import
com.tykj.dev.config.domin.SystemConfig
;
import
lombok.AllArgsConstructor
;
/**
* @author dengdiyi
* 配套设备类型枚举
*/
@AllArgsConstructor
public
enum
MatchingType
{
/**
* 打印机
*/
PRINTER
(
1
,
"打印机"
),
/**
* 手持设备
*/
HANDHELD_DEVICES
(
2
,
"手持设备"
);
public
Integer
id
;
public
String
name
;
public
SystemConfig
toDo
(){
SystemConfig
systemConfig
=
new
SystemConfig
();
systemConfig
.
setValue
(
id
);
systemConfig
.
setLabel
(
name
);
systemConfig
.
setChineseName
(
"配套设备类型"
);
systemConfig
.
setEnglishName
(
"matchingType"
);
return
systemConfig
;
}
}
dev-config/src/main/java/com/tykj/dev/config/task/SystemConfigRun.java
浏览文件 @
de55dca0
...
@@ -53,6 +53,9 @@ public class SystemConfigRun implements CommandLineRunner {
...
@@ -53,6 +53,9 @@ public class SystemConfigRun implements CommandLineRunner {
for
(
Position
d:
Position
.
values
())
{
for
(
Position
d:
Position
.
values
())
{
systemConfigDao
.
save
(
d
.
toDo
());
systemConfigDao
.
save
(
d
.
toDo
());
}
}
for
(
MatchingType
d:
MatchingType
.
values
())
{
systemConfigDao
.
save
(
d
.
toDo
());
}
}
}
}
}
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
de55dca0
...
@@ -33,7 +33,6 @@ import com.tykj.dev.device.user.subject.entity.User;
...
@@ -33,7 +33,6 @@ import com.tykj.dev.device.user.subject.entity.User;
import
com.tykj.dev.device.user.subject.entity.bto.AreaUnit
;
import
com.tykj.dev.device.user.subject.entity.bto.AreaUnit
;
import
com.tykj.dev.device.user.subject.service.AuService
;
import
com.tykj.dev.device.user.subject.service.AuService
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
@@ -223,7 +222,7 @@ public class DeviceCheckController {
...
@@ -223,7 +222,7 @@ public class DeviceCheckController {
List
<
Task
>
childTask
=
taskRepo
.
findAllByParentTaskId
(
rootTask
.
getId
());
List
<
Task
>
childTask
=
taskRepo
.
findAllByParentTaskId
(
rootTask
.
getId
());
//核查组成员和名称 找到父亲级节点 然后找到父节点的统计节点
//核查组成员和名称 找到父亲级节点 然后找到父节点的统计节点
String
[]
checkArray
=
ctVo
.
getRemark
().
split
(
"|"
);
// x,a |x ,b
String
[]
checkArray
=
ctVo
.
getRemark
().
split
(
"
\\
|"
);
// x,a |x ,b
List
<
String
>
groupNames
=
new
ArrayList
<>();
List
<
String
>
groupNames
=
new
ArrayList
<>();
List
<
String
>
userNames
=
new
ArrayList
<>();
List
<
String
>
userNames
=
new
ArrayList
<>();
...
@@ -264,6 +263,7 @@ public class DeviceCheckController {
...
@@ -264,6 +263,7 @@ public class DeviceCheckController {
}
}
i
=
0
;
i
=
0
;
linkVo
.
setLcDetail
(
lcdList
);
linkVo
.
setLcDetail
(
lcdList
);
linkVo
.
setLeDetail
(
ledList
);
}
}
}
}
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
de55dca0
...
@@ -20,10 +20,7 @@ import com.tykj.dev.device.user.read.subject.bto.MessageBto;
...
@@ -20,10 +20,7 @@ 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.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
import
com.tykj.dev.misc.utils.PageUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -321,25 +318,37 @@ public class PackingController {
...
@@ -321,25 +318,37 @@ public class PackingController {
return
ResponseEntity
.
ok
(
"序列号区间总数为"
+
inputSeqs
.
size
()+
",与装备数量不匹配"
);
return
ResponseEntity
.
ok
(
"序列号区间总数为"
+
inputSeqs
.
size
()+
",与装备数量不匹配"
);
}
}
else
{
else
{
if
(
existSeqs
.
containsAll
(
inputSeqs
)){
Set
<
String
>
seqSet
=
new
HashSet
<>(
inputSeqs
);
hasApplySeqs
.
retainAll
(
inputSeqs
);
if
(
seqSet
.
size
()!=
inputSeqs
.
size
()){
if
(
hasApplySeqs
.
size
()==
0
)
{
List
<
String
>
strings
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
"ok"
);
Set
<
String
>
sameSeqs
=
new
HashSet
<>();
}
for
(
String
s
:
inputSeqs
){
else
{
if
(
strings
.
contains
(
s
)){
StringBuffer
stringBuffer
=
new
StringBuffer
();
sameSeqs
.
add
(
s
);
hasApplySeqs
.
forEach
(
s
->
stringBuffer
.
append
(
s
).
append
(
","
));
}
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
strings
.
add
(
s
);
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()+
"的装备已经发过申请"
);
}
}
return
ResponseEntity
.
ok
(
"序列号"
+
StringSplitUtil
.
stringListToString
(
new
ArrayList
<>(
sameSeqs
))+
"重复"
);
}
}
else
{
else
{
existSeqs
.
retainAll
(
inputSeqs
);
if
(
existSeqs
.
containsAll
(
inputSeqs
))
{
inputSeqs
.
removeAll
(
existSeqs
);
hasApplySeqs
.
retainAll
(
inputSeqs
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
if
(
hasApplySeqs
.
size
()
==
0
)
{
inputSeqs
.
forEach
(
s
->
stringBuffer
.
append
(
s
).
append
(
","
));
return
ResponseEntity
.
ok
(
"ok"
);
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
}
else
{
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()+
"的装备不存在"
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
hasApplySeqs
.
forEach
(
s
->
stringBuffer
.
append
(
s
).
append
(
","
));
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()
+
"的装备已经发过申请"
);
}
}
else
{
existSeqs
.
retainAll
(
inputSeqs
);
inputSeqs
.
removeAll
(
existSeqs
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
inputSeqs
.
forEach
(
s
->
stringBuffer
.
append
(
s
).
append
(
","
));
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()
+
"的装备不存在"
);
}
}
}
}
}
}
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
de55dca0
...
@@ -926,7 +926,7 @@ public class RepairController {
...
@@ -926,7 +926,7 @@ public class RepairController {
List
<
Integer
>
userIds
=
new
ArrayList
<>();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
if
(
repairReceiveVo
.
getStatus
()==
0
)
{
if
(
repairReceiveVo
.
getStatus
()==
0
)
{
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
"维修退回"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
"维修退回"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
taskBto2
=
taskService
.
start
(
taskBto1
);
taskBto2
=
taskService
.
start
(
taskBto1
);
}
}
else
{
else
{
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/domin/Task.java
浏览文件 @
de55dca0
...
@@ -18,7 +18,9 @@ import org.springframework.data.annotation.LastModifiedDate;
...
@@ -18,7 +18,9 @@ import org.springframework.data.annotation.LastModifiedDate;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* entity class for task
* entity class for task
...
@@ -133,7 +135,12 @@ public class Task {
...
@@ -133,7 +135,12 @@ public class Task {
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
TaskBto
taskBto
=
mapper
.
map
(
this
,
TaskBto
.
class
);
TaskBto
taskBto
=
mapper
.
map
(
this
,
TaskBto
.
class
);
//解析组合字段并添加
//解析组合字段并添加
taskBto
.
setInvolveUserIdList
(
StringSplitUtil
.
userIdSplit
(
this
.
involveUsers
));
List
<
Integer
>
ids
=
new
ArrayList
<>();
if
(
this
.
createUserId
!=
null
){
ids
.
add
(
this
.
createUserId
);
}
ids
.
addAll
(
StringSplitUtil
.
userIdSplit
(
this
.
involveUsers
));
taskBto
.
setInvolveUserIdList
(
ids
);
taskBto
.
setTopFlagDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
topFlagDetail
));
taskBto
.
setTopFlagDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
topFlagDetail
));
taskBto
.
setUserReadDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
userReadDetail
));
taskBto
.
setUserReadDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
userReadDetail
));
return
taskBto
;
return
taskBto
;
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/service/impl/MessageServiceImpl.java
浏览文件 @
de55dca0
...
@@ -97,35 +97,27 @@ public class MessageServiceImpl implements MessageService {
...
@@ -97,35 +97,27 @@ public class MessageServiceImpl implements MessageService {
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)).
reversed
())
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
messageUserVos
.
stream
().
map
(
MessageUserVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
messageUserVos
.
stream
().
map
(
MessageUserVo:
:
getId
).
collect
(
Collectors
.
toList
());
//休眠100ms保证用户第一次登录不会创建二条userRecord
UserRecord
userRecord
=
userRecordDao
.
findByUserId
(
userId
);
try
{
if
(
userRecord
==
null
)
{
Thread
.
sleep
(
200
);
UserRecord
userRecord2
=
new
UserRecord
();
}
catch
(
InterruptedException
e
)
{
userRecord2
.
setUserId
(
userId
);
e
.
printStackTrace
();
userRecord2
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
}
userRecord2
.
setNewReadIds
(
userRecord2
.
getReadIds
());
finally
{
userRecordService
.
save
(
userRecord2
);
UserRecord
userRecord
=
userRecordDao
.
findByUserId
(
userId
);
}
else
{
if
(
userRecord
==
null
)
{
if
(
userRecord
.
getReadIds
()
==
null
)
{
UserRecord
userRecord2
=
new
UserRecord
();
//更新阅知id
userRecord2
.
setUserId
(
userId
);
userRecord
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
userRecord2
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
userRecord
.
setNewReadIds
(
userRecord
.
getReadIds
());
userRecord2
.
setNewReadIds
(
userRecord2
.
getReadIds
());
userRecordService
.
save
(
userRecord
);
userRecordService
.
save
(
userRecord2
);
}
else
{
}
else
{
if
(
userRecord
.
getReadIds
()
==
null
)
{
List
<
Integer
>
integerList
=
StringSplitUtil
.
userIdSplit
(
userRecord
.
getReadIds
());
//更新阅知id
//更新阅知id
userRecord
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
userRecord
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
userRecord
.
setNewReadIds
(
userRecord
.
getReadIds
());
//和上一次比新增的id
userRecordService
.
save
(
userRecord
);
ids
.
removeAll
(
integerList
);
}
else
{
userRecord
.
setNewReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
List
<
Integer
>
integerList
=
StringSplitUtil
.
userIdSplit
(
userRecord
.
getReadIds
());
userRecordService
.
save
(
userRecord
);
//更新阅知id
userRecord
.
setReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
//和上一次比新增的id
ids
.
removeAll
(
integerList
);
userRecord
.
setNewReadIds
(
StringSplitUtil
.
idListToString
(
ids
));
userRecordService
.
save
(
userRecord
);
}
}
}
}
}
return
messageUserVos
;
return
messageUserVos
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论