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 个修改的文件
包含
104 行增加
和
45 行删除
+104
-45
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+0
-5
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
+23
-14
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
+0
-8
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
de55dca0
...
...
@@ -292,10 +292,6 @@ public class BackController {
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
//不上传单据
if
(
fileUploadVo
.
getStatus
()==
0
){
taskService
.
moveToArchive
(
taskBto
);
}
else
{
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveAllSonNodeToEnd
(
taskBto
.
getId
());
AllotBackBill
allotBackBill
=
allotBackBillService
.
getOne
(
taskBto
.
getBillId
());
...
...
@@ -334,7 +330,6 @@ public class BackController {
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"业务办结"
,
ids
,
1
);
messageService
.
add
(
messageBto
);
}
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;
import
com.tykj.dev.config.swagger.AutoDocument
;
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.DeviceLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
...
...
@@ -12,9 +13,10 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author dengdiyi
...
...
@@ -41,10 +43,26 @@ public class BatchAllotController {
@Autowired
private
DeviceLogService
deviceLogService
;
@ApiOperation
(
value
=
"发起批量配发"
)
@PostMapping
(
value
=
"/createBatchAllot"
)
@Autowired
private
AllotBillController
allotBillController
;
@ApiOperation
(
value
=
"发起批量配发(type 1:签字配发,2:签章配发)"
)
@PostMapping
(
value
=
"/createBatchAllot/{type}/{userId}"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
createBatchAllot
(){
return
ResponseEntity
.
ok
(
""
);
public
ResponseEntity
createBatchAllot
(
@PathVariable
(
"type"
)
int
type
,
@PathVariable
(
"userId"
)
int
userId
,
@RequestBody
List
<
AllotBillSaveVo
>
allotBillSaveVoList
){
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 {
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_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
,
"发起标签替换"
),
...
...
@@ -149,9 +149,9 @@ public enum LogType {
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
,
"退回装备接收成功(缺失单据)"
),
...
...
@@ -259,10 +259,10 @@ public enum LogType {
WORK_H1
(
79
,
WORK_HANDOVER
.
id
,
ORIGIN_STATUS
.
id
,
WORKHANDOVER1011
.
id
,
"工作交接任务生成完成,等待上传交接单"
),
WORK_H2
(
80
,
WORK_HANDOVER
.
id
,
WORKHANDOVER1011
.
id
,
END
.
id
,
"工作交接完成"
),
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_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_BACK_7
(
88
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
STORAGE_4
(
89
,
STORAGE
.
id
,
WAIT_STORAGE
.
id
,
ARCHIVE
.
id
,
"删除入库草稿"
),
...
...
@@ -275,7 +275,7 @@ public enum LogType {
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_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_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
,
"取消上传送修单"
),
...
...
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 {
for
(
Position
d:
Position
.
values
())
{
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;
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.util.AuthenticationUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
...
@@ -223,7 +222,7 @@ public class DeviceCheckController {
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
>
userNames
=
new
ArrayList
<>();
...
...
@@ -264,6 +263,7 @@ public class DeviceCheckController {
}
i
=
0
;
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;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
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.misc.utils.*
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -321,25 +318,37 @@ public class PackingController {
return
ResponseEntity
.
ok
(
"序列号区间总数为"
+
inputSeqs
.
size
()+
",与装备数量不匹配"
);
}
else
{
if
(
existSeqs
.
containsAll
(
inputSeqs
)){
hasApplySeqs
.
retainAll
(
inputSeqs
);
if
(
hasApplySeqs
.
size
()==
0
)
{
return
ResponseEntity
.
ok
(
"ok"
);
Set
<
String
>
seqSet
=
new
HashSet
<>(
inputSeqs
);
if
(
seqSet
.
size
()!=
inputSeqs
.
size
()){
List
<
String
>
strings
=
new
ArrayList
<>();
Set
<
String
>
sameSeqs
=
new
HashSet
<>();
for
(
String
s
:
inputSeqs
){
if
(
strings
.
contains
(
s
)){
sameSeqs
.
add
(
s
);
}
strings
.
add
(
s
);
}
return
ResponseEntity
.
ok
(
"序列号"
+
StringSplitUtil
.
stringListToString
(
new
ArrayList
<>(
sameSeqs
))+
"重复"
);
}
else
{
if
(
existSeqs
.
containsAll
(
inputSeqs
))
{
hasApplySeqs
.
retainAll
(
inputSeqs
);
if
(
hasApplySeqs
.
size
()
==
0
)
{
return
ResponseEntity
.
ok
(
"ok"
);
}
else
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
hasApplySeqs
.
forEach
(
s
->
stringBuffer
.
append
(
s
).
append
(
","
));
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()+
"的装备已经发过申请"
);
}
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()
-
1
);
return
ResponseEntity
.
ok
(
"该型号序列号为"
+
stringBuffer
.
toString
()
+
"的装备已经发过申请"
);
}
else
{
}
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
()+
"的装备不存在"
);
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 {
List
<
Integer
>
userIds
=
new
ArrayList
<>();
if
(
repairReceiveVo
.
getStatus
()==
0
)
{
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
);
}
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;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* entity class for task
...
...
@@ -133,7 +135,12 @@ public class Task {
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
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
.
setUserReadDetailList
(
StringSplitUtil
.
userIdSplit
(
this
.
userReadDetail
));
return
taskBto
;
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/service/impl/MessageServiceImpl.java
浏览文件 @
de55dca0
...
...
@@ -97,13 +97,6 @@ public class MessageServiceImpl implements MessageService {
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)).
reversed
())
.
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
messageUserVos
.
stream
().
map
(
MessageUserVo:
:
getId
).
collect
(
Collectors
.
toList
());
//休眠100ms保证用户第一次登录不会创建二条userRecord
try
{
Thread
.
sleep
(
200
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
UserRecord
userRecord
=
userRecordDao
.
findByUserId
(
userId
);
if
(
userRecord
==
null
)
{
UserRecord
userRecord2
=
new
UserRecord
();
...
...
@@ -127,7 +120,6 @@ public class MessageServiceImpl implements MessageService {
userRecordService
.
save
(
userRecord
);
}
}
}
return
messageUserVos
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论