Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
5da40544
提交
5da40544
authored
3月 13, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
50f3ecce
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
102 行增加
和
28 行删除
+102
-28
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+1
-1
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+1
-1
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+39
-0
CustomOrder.java
...isc/src/main/java/com/tykj/dev/misc/base/CustomOrder.java
+3
-2
CustomPage.java
...misc/src/main/java/com/tykj/dev/misc/base/CustomPage.java
+7
-8
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+2
-2
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+2
-2
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+40
-11
SelfCheckConfirmVo.java
...j/dev/device/selfcheck/subject/vo/SelfCheckConfirmVo.java
+3
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+2
-1
TaskSelectVo.java
...ava/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
+2
-0
没有找到文件。
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
5da40544
...
...
@@ -118,7 +118,7 @@ public class DeviceApplyController {
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
0
);
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_APPLY_FILE
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_APPLY_FILE
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userUtils
.
getCurrentUnitId
(),
1
,
"country"
,
userIds
);
}
else
{
//指定批复人
...
...
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
5da40544
...
...
@@ -54,7 +54,7 @@ public enum LogType {
SELF_CHECK_2
(
18
,
SELF_CHECK
.
id
,
WAIT_SELF_CHECK
.
id
,
SELF_CHECK_CONFIRM
.
id
,
"周期自查"
),
SELF_CHECK_3
(
19
,
SELF_CHECK
.
id
,
SELF_CHECK_CONFIRM
.
id
,
END
.
id
,
"
自查审核成功
"
),
SELF_CHECK_3
(
19
,
SELF_CHECK
.
id
,
SELF_CHECK_CONFIRM
.
id
,
END
.
id
,
"
上传自查单
"
),
SELF_CHECK_4
(
20
,
SELF_CHECK
.
id
,
SELF_CHECK_CONFIRM
.
id
,
ARCHIVE
.
id
,
"自查审核失败"
),
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
5da40544
...
...
@@ -12,6 +12,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.CustomOrder
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.GetTreeUtils
;
import
com.tykj.dev.misc.utils.PageUtil
;
...
...
@@ -152,12 +153,50 @@ public class DeviceLibraryController {
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
deviceLibraryEntity
));
List
<
Comparator
<
DeviceVo
>>
comparators
=
new
ArrayList
<>();
if
(
deviceLibrarySelectVo
.
getOrders
().
size
()
>
0
)
{
for
(
CustomOrder
c:
deviceLibrarySelectVo
.
getOrders
())
{
if
(
"model"
.
equals
(
c
.
getCoulmn
())){
if
(
"ASC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getModel
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)));
}
else
if
(
"DESC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getModel
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)).
reversed
());
}
}
else
if
(
"name"
.
equals
(
c
.
getCoulmn
())){
if
(
"ASC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getName
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)));
}
else
if
(
"DESC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getName
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)).
reversed
());
}
}
else
if
(
"seqNumber"
.
equals
(
c
.
getCoulmn
())){
if
(
"ASC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getSeqNumber
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)));
}
else
if
(
"DESC"
.
equals
(
c
.
getDirection
().
toString
()))
{
comparators
.
add
(
Comparator
.
comparing
(
DeviceVo:
:
getSeqNumber
,
Comparator
.
nullsFirst
(
String:
:
compareTo
)).
reversed
());
}
}
}
}
List
<
DeviceVo
>
containList
=
GetTreeUtils
.
parseTreeFromDown
(
resultList
,
DeviceLibrary:
:
getId
,
deviceLibraryEntity
->
Optional
.
ofNullable
(
nodeCollect
.
get
(
deviceLibraryEntity
.
getPartParentId
())),
DeviceLibrary:
:
addChildNode
).
stream
().
map
(
DeviceLibrary:
:
parseVo
).
sorted
(
Comparator
.
comparing
(
DeviceVo:
:
getLifeStatus
)).
collect
(
Collectors
.
toList
());
if
(
comparators
.
size
()==
1
){
containList
=
containList
.
stream
().
sorted
(
comparators
.
get
(
0
)).
collect
(
Collectors
.
toList
());
}
else
if
(
comparators
.
size
()==
2
){
containList
=
containList
.
stream
().
sorted
(
comparators
.
get
(
0
).
thenComparing
(
comparators
.
get
(
1
))).
collect
(
Collectors
.
toList
());
}
else
if
(
comparators
.
size
()==
3
){
containList
=
containList
.
stream
().
sorted
(
comparators
.
get
(
0
).
thenComparing
(
comparators
.
get
(
1
)).
thenComparing
(
comparators
.
get
(
2
))).
collect
(
Collectors
.
toList
());
}
map
.
put
(
"models"
,
resultList
.
stream
().
map
(
DeviceLibrary:
:
getModel
).
collect
(
Collectors
.
toSet
()));
map
.
put
(
"names"
,
resultList
.
stream
().
map
(
DeviceLibrary:
:
getName
).
collect
(
Collectors
.
toSet
()));
Set
<
Integer
>
status
=
resultList
.
stream
().
map
(
DeviceLibrary:
:
getLifeStatus
).
collect
(
Collectors
.
toSet
());
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/CustomOrder.java
浏览文件 @
5da40544
package
com
.
tykj
.
dev
.
misc
.
base
;
import
lombok.Data
;
import
org.springframework.data.domain.Sort
;
/**
* 描述:Jpa排序类
...
...
@@ -15,6 +14,8 @@ public class CustomOrder {
private
String
coulmn
;
private
Sort
.
Direction
direction
;
// private Sort.Direction direction;
private
String
direction
;
}
dev-misc/src/main/java/com/tykj/dev/misc/base/CustomPage.java
浏览文件 @
5da40544
...
...
@@ -3,7 +3,6 @@ package com.tykj.dev.misc.base;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.util.Assert
;
import
javax.validation.constraints.Min
;
...
...
@@ -25,7 +24,7 @@ public class CustomPage {
@Min
(
1
)
private
Integer
size
=
15
;
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
//
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private
List
<
CustomOrder
>
orders
=
new
ArrayList
<>();
public
Integer
getPage
()
{
...
...
@@ -65,12 +64,12 @@ public class CustomPage {
@JsonIgnore
public
PageRequest
getPageable
()
{
if
(
orders
.
size
()
!=
0
)
{
List
<
Sort
.
Order
>
orders
=
new
ArrayList
<>();
this
.
orders
.
stream
().
forEach
(
item
->
orders
.
add
(
new
Sort
.
Order
(
item
.
getDirection
(),
item
.
getCoulmn
())));
return
PageRequest
.
of
(
getPage
(),
getLimit
(),
Sort
.
by
(
orders
));
}
//
if (orders.size() != 0) {
//
List<Sort.Order> orders = new ArrayList<>();
//
this.orders.stream().forEach(item ->
//
orders.add(new Sort.Order(item.getDirection(), item.getCoulmn())));
//
return PageRequest.of(getPage(), getLimit(), Sort.by(orders));
//
}
return
PageRequest
.
of
(
getPage
(),
getLimit
());
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
5da40544
...
...
@@ -191,9 +191,9 @@ public enum StatusEnum {
WAIT_SELF_CHECK
(
400
,
"待自查"
),
/**
*
自查待审核
*
待上传自查单
*/
SELF_CHECK_CONFIRM
(
401
,
"
自查待审核
"
),
SELF_CHECK_CONFIRM
(
401
,
"
待上传自查单
"
),
/**
* 装备申请待批复
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
5da40544
...
...
@@ -297,7 +297,7 @@ public class RepairController {
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
if
(
level
==
1
)
{
ownUnit
=
userUtils
.
getCurrentUnitId
();
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_FILE
.
id
,
"维修业务"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
ownUnit
,
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_FILE
.
id
,
"维修业务"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
ownUnit
,
1
,
"country"
,
userIds
);
saveEntity
=
taskService
.
start
(
taskBto
);
}
else
{
ownUnit
=
userPublicService
.
findUnitIdByName
(
repairBill
.
getReceiveUnit
());
...
...
@@ -963,7 +963,7 @@ public class RepairController {
}
else
{
userIds
.
add
(
0
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
,
"维修退回"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
,
"维修退回"
,
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
taskBto2
=
taskService
.
start
(
taskBto1
);
}
for
(
DeviceDetailVo
d
:
repairReceiveVo
.
getDeviceList
())
{
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
5da40544
...
...
@@ -16,6 +16,8 @@ import com.tykj.dev.device.selfcheck.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
;
...
...
@@ -83,6 +85,9 @@ public class SelfCheckController {
@Autowired
private
SelfCheckSchedulerTask
selfCheckSchedulerTask
;
@Autowired
private
MessageService
messageService
;
/**
* 月度
*/
...
...
@@ -311,13 +316,24 @@ public class SelfCheckController {
//添加涉及人员
taskService
.
addInvolveUser
(
taskBto
,
userId
);
//推至下一阶段
taskService
.
moveToNext
(
taskBto
,
self
CheckSaveVo
.
getUserb
Id
());
taskService
.
moveToNext
(
taskBto
,
self
ExaminationBillEntity1
.
getUsera
Id
());
}
else
if
(
selfCheckSaveVo
.
getType
()==
1
){
taskBto
.
setCustomInfo
(
"扫码"
);
//添加涉及人员
taskService
.
addInvolveUser
(
taskBto
,
userId
);
if
(
selfCheckSaveVo
.
getUserbId
()!=
null
)
{
taskService
.
moveToEnd
(
taskBto
);
selfExaminationBillEntity1
.
setUserbId
(
selfCheckSaveVo
.
getUserbId
());
List
<
Integer
>
idList
=
new
ArrayList
<>();
idList
.
add
(
selfCheckSaveVo
.
getUserbId
());
//阅知
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"完成终端自查"
,
idList
,
0
);
messageService
.
add
(
messageBto
);
}
else
{
taskService
.
moveToNext
(
taskBto
,
selfExaminationBillEntity1
.
getUseraId
());
}
selfExaminationBillEntity1
.
setCheckStatus
(
2
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity1
);
}
...
...
@@ -329,22 +345,29 @@ public class SelfCheckController {
//发起任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
if
(
selfExaminationBillEntity1
.
getUserbId
()!=
null
){
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
}
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
//
if (selfExaminationBillEntity1.getUserbId()!=null){
//
userIds.add(selfExaminationBillEntity1.getUserbId());
//
}
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
if
(
selfCheckSaveVo
.
getType
()==
0
){
if
(
selfCheckSaveVo
.
getUserbId
()==
null
){
throw
new
ApiException
(
"审核人不能为空"
);
}
taskBto
.
setCustomInfo
(
"手动"
);
taskService
.
start
(
taskBto
);
}
else
if
(
selfCheckSaveVo
.
getType
()==
1
){
taskBto
.
setCustomInfo
(
"扫码"
);
if
(
selfCheckSaveVo
.
getUserbId
()!=
null
)
{
taskBto
.
setBillStatus
(
StatusEnum
.
END
.
id
);
taskBto
.
setCurrentPoint
(
0
);
taskService
.
start
(
taskBto
);
}
// taskBto.setCurrentPoint(0);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
if
(
selfCheckSaveVo
.
getUserbId
()!=
null
)
{
selfExaminationBillEntity1
.
setUserbId
(
selfCheckSaveVo
.
getUserbId
());
List
<
Integer
>
idList
=
new
ArrayList
<>();
idList
.
add
(
selfCheckSaveVo
.
getUserbId
());
//阅知
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"完成终端自查"
,
idList
,
0
);
messageService
.
add
(
messageBto
);
}
selfExaminationBillEntity1
.
setCheckStatus
(
2
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity1
);
}
...
...
@@ -378,11 +401,17 @@ public class SelfCheckController {
if
(
selfCheckConfirmVo
.
getStatus
()
==
0
)
{
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
selfExaminationBillEntity
.
setCheckStatus
(
2
);
selfExaminationBillEntity
.
setUserbId
(
selfCheckConfirmVo
.
getUserbId
());
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
//阅知
List
<
Integer
>
idList
=
new
ArrayList
<>();
idList
.
add
(
selfCheckConfirmVo
.
getUserbId
());
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"完成终端自查"
,
idList
,
0
);
messageService
.
add
(
messageBto
);
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"
自查审核成功
"
,
null
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
id
,
"
上传自查单
"
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/vo/SelfCheckConfirmVo.java
浏览文件 @
5da40544
...
...
@@ -28,4 +28,7 @@ public class SelfCheckConfirmVo {
@Min
(
value
=
0
,
message
=
"status不能小于0"
)
@ApiModelProperty
(
name
=
"需要修改的状态"
,
example
=
"0"
,
value
=
"0为审核通过,1为驳回"
)
private
Integer
status
;
@ApiModelProperty
(
name
=
"审核人ID"
,
example
=
"1"
)
private
Integer
userbId
;
}
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
5da40544
...
...
@@ -643,7 +643,8 @@ public class TaskServiceImpl implements TaskService {
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
noUserHandle
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
0
;
boolean
belongUnit
=
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
());
return
involveExists
&&
pointExists
&&
(
userConfirm
||
(
noUserHandle
&&
belongUnit
));
boolean
isCountry
=
taskSelectVo
.
getType
()==
1
?(
taskBto
.
getCustomInfo
()==
null
||
!
"country"
.
equals
(
taskBto
.
getCustomInfo
())):(
taskBto
.
getCustomInfo
()!=
null
&&
"country"
.
equals
(
taskBto
.
getCustomInfo
()));
return
involveExists
&&
pointExists
&&
(
userConfirm
||
(
noUserHandle
&&
belongUnit
))
&&
isCountry
;
})
.
collect
(
Collectors
.
toList
());
//查询所有的业务
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskSelectVo.java
浏览文件 @
5da40544
...
...
@@ -25,5 +25,7 @@ public class TaskSelectVo extends CustomPage {
private
Integer
selectNum
;
@ApiModelProperty
(
value
=
"业务类型id"
,
example
=
"1"
)
private
List
<
Integer
>
businessType
;
@ApiModelProperty
(
value
=
"待办类型(1:省内待办,2:省外待办)"
,
example
=
"1"
)
private
Integer
type
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论