Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c11ce3d0
提交
c11ce3d0
authored
10月 10, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[业务模块]修改经办人为待办人,修改返回值为String处理判断的bug
上级
b87eaef2
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
156 行增加
和
42 行删除
+156
-42
UnifiedReturnConfig.java
...rc/main/java/com/tykj/dev/config/UnifiedReturnConfig.java
+1
-1
SelfCheckSchedulerTask.java
...ykj/dev/device/selfcheck/base/SelfCheckSchedulerTask.java
+50
-5
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+49
-20
SelfCheckBillServiceImpl.java
...vice/selfcheck/service/impl/SelfCheckBillServiceImpl.java
+5
-0
SelfCheckBill.java
...ykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
+4
-5
SelfCheckSaveVo.java
...tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
+3
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+43
-10
TaskUserVo.java
.../java/com/tykj/dev/device/task/subject/vo/TaskUserVo.java
+1
-1
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/UnifiedReturnConfig.java
浏览文件 @
c11ce3d0
...
@@ -46,7 +46,7 @@ public class UnifiedReturnConfig implements ResponseBodyAdvice<Object> {
...
@@ -46,7 +46,7 @@ public class UnifiedReturnConfig implements ResponseBodyAdvice<Object> {
ResultObj
<
Object
>
result
=
new
ResultObj
<>(
body
,
"成功 :)"
);
ResultObj
<
Object
>
result
=
new
ResultObj
<>(
body
,
"成功 :)"
);
// 如果返回的是字符串,则要对其做JSON序列化
// 如果返回的是字符串,则要对其做JSON序列化
if
(
returnType
.
getGenericParameterType
().
equals
(
String
.
class
))
{
if
(
body
.
getClass
().
equals
(
String
.
class
))
{
try
{
try
{
response
.
getHeaders
().
set
(
"Content-Type"
,
"application/json;charset=utf-8"
);
response
.
getHeaders
().
set
(
"Content-Type"
,
"application/json;charset=utf-8"
);
return
objectMapper
.
writeValueAsString
(
result
);
return
objectMapper
.
writeValueAsString
(
result
);
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/base/SelfCheckSchedulerTask.java
浏览文件 @
c11ce3d0
...
@@ -3,6 +3,8 @@ package com.tykj.dev.device.selfcheck.base;
...
@@ -3,6 +3,8 @@ package com.tykj.dev.device.selfcheck.base;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.TaskBeanConfig
;
import
com.tykj.dev.config.TaskBeanConfig
;
import
com.tykj.dev.config.service.SystemVariableService
;
import
com.tykj.dev.config.service.SystemVariableService
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
...
@@ -22,9 +24,7 @@ import org.springframework.stereotype.Component;
...
@@ -22,9 +24,7 @@ import org.springframework.stereotype.Component;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.InvocationHandler
;
import
java.lang.reflect.InvocationHandler
;
import
java.lang.reflect.Proxy
;
import
java.lang.reflect.Proxy
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.concurrent.ScheduledFuture
;
import
java.util.concurrent.ScheduledFuture
;
/**
/**
...
@@ -59,6 +59,8 @@ public class SelfCheckSchedulerTask {
...
@@ -59,6 +59,8 @@ public class SelfCheckSchedulerTask {
private
SystemVariableService
systemVariableService
=
SpringUtils
.
getBean
(
"systemVariableServiceImpl"
);
private
SystemVariableService
systemVariableService
=
SpringUtils
.
getBean
(
"systemVariableServiceImpl"
);
private
SelfCheckBillService
selfCheckBillService
=
SpringUtils
.
getBean
(
"selfCheckBillServiceImpl"
);
private
ScheduledFuture
scheduledFuture
;
private
ScheduledFuture
scheduledFuture
;
public
SelfCheckSchedulerTask
()
{
public
SelfCheckSchedulerTask
()
{
...
@@ -81,13 +83,41 @@ public class SelfCheckSchedulerTask {
...
@@ -81,13 +83,41 @@ public class SelfCheckSchedulerTask {
public
class
SelfCheckTask
implements
Runnable
{
public
class
SelfCheckTask
implements
Runnable
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
if
(
unitsDao
!=
null
&&
taskService
!=
null
)
{
if
(
unitsDao
!=
null
&&
taskService
!=
null
&&
selfCheckBillService
!=
null
)
{
List
<
Units
>
unitsList
=
unitsDao
.
findAll
();
List
<
Units
>
unitsList
=
unitsDao
.
findAll
();
unitsList
.
forEach
(
units
->
{
unitsList
.
forEach
(
units
->
{
//添加账单
SelfCheckBill
selfCheckBill
=
new
SelfCheckBill
();
selfCheckBill
.
setCheckStatus
(
3
);
selfCheckBill
.
setCheckUnit
(
units
.
getName
());
StringBuffer
title
=
new
StringBuffer
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)+
1
;
title
.
append
(
year
).
append
(
"年"
);
if
(
cron
.
equals
(
cron1
)){
title
.
append
(
month
).
append
(
"月自查任务"
);
selfCheckBill
.
setCycle
(
1
);
}
else
if
(
cron
.
equals
(
cron2
)){
title
.
append
(
getQuarter
(
month
)).
append
(
"自查任务"
);
selfCheckBill
.
setCycle
(
2
);
}
else
if
(
cron
.
equals
(
cron3
)){
title
.
append
(
"自查任务"
);
selfCheckBill
.
setCycle
(
3
);
}
else
{
title
.
append
(
"自查任务"
);
selfCheckBill
.
setCycle
(
0
);
}
selfCheckBill
.
setTitle
(
title
.
toString
());
SelfCheckBill
selfCheckBill1
=
selfCheckBillService
.
addEntity
(
selfCheckBill
);
//发起待自查任务
//发起待自查任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
0
);
userIds
.
add
(
0
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_SELF_CHECK
.
id
,
"自查业务"
,
null
,
"."
,
0
,
4
,
units
.
getUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_SELF_CHECK
.
id
,
"自查业务"
,
null
,
"."
,
selfCheckBill1
.
getId
()
,
4
,
units
.
getUnitId
(),
0
,
null
,
userIds
);
taskService
.
start
(
taskBto
);
taskService
.
start
(
taskBto
);
});
});
}
}
...
@@ -98,4 +128,19 @@ public class SelfCheckSchedulerTask {
...
@@ -98,4 +128,19 @@ public class SelfCheckSchedulerTask {
public
void
startTask
(){
public
void
startTask
(){
scheduledFuture
=
TaskBeanConfig
.
getThreadPoolTaskScheduler
().
schedule
(
new
SelfCheckTask
(),
triggerContext
->
new
CronTrigger
(
cron
).
nextExecutionTime
(
triggerContext
));
scheduledFuture
=
TaskBeanConfig
.
getThreadPoolTaskScheduler
().
schedule
(
new
SelfCheckTask
(),
triggerContext
->
new
CronTrigger
(
cron
).
nextExecutionTime
(
triggerContext
));
}
}
/**
* 当前月份属于本年第几个季度
*/
public
static
String
getQuarter
(
int
month
)
{
if
(
month
<=
3
)
{
return
"第一季度"
;
}
else
if
(
month
<=
6
)
{
return
"第二季度"
;
}
else
if
(
month
<=
9
)
{
return
"第三季度"
;
}
else
{
return
"第四季度"
;
}
}
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
c11ce3d0
...
@@ -254,10 +254,24 @@ public class SelfCheckController {
...
@@ -254,10 +254,24 @@ public class SelfCheckController {
@PostMapping
(
value
=
"/addBill"
)
@PostMapping
(
value
=
"/addBill"
)
public
ResponseEntity
addSelfExaminationBill
(
@RequestBody
SelfCheckSaveVo
selfCheckSaveVo
)
{
public
ResponseEntity
addSelfExaminationBill
(
@RequestBody
SelfCheckSaveVo
selfCheckSaveVo
)
{
//添加账单
//添加账单
SelfCheckBill
selfExaminationBillEntity
=
selfCheckSaveVo
.
toDo
();
SelfCheckBill
selfExaminationBillEntity
;
selfExaminationBillEntity
.
setTitle
(
userUtils
.
getCurrentUserUnitName
()
+
"发起的自查任务"
);
if
(
selfCheckSaveVo
.
getTaskId
()!=
null
){
TaskBto
taskBto
=
taskService
.
get
(
selfCheckSaveVo
.
getTaskId
());
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
selfExaminationBillEntity
.
setCheckTime
(
new
Date
());
selfExaminationBillEntity
.
setCheckDetail
(
selfCheckSaveVo
.
getCheckDetail
());
selfExaminationBillEntity
.
setCheckResult
(
selfCheckSaveVo
.
getCheckResult
());
selfExaminationBillEntity
.
setCheckStatus
(
0
);
selfExaminationBillEntity
.
setCheckedCount
(
selfCheckSaveVo
.
getCheckedCount
());
selfExaminationBillEntity
.
setCheckingCount
(
selfCheckSaveVo
.
getCheckingCount
());
selfExaminationBillEntity
.
setUserbId
(
selfCheckSaveVo
.
getUserbId
());
}
else
{
selfExaminationBillEntity
=
selfCheckSaveVo
.
toDo
();
selfExaminationBillEntity
.
setTitle
(
userUtils
.
getCurrentUserUnitName
()
+
"发起的自查任务"
);
selfExaminationBillEntity
.
setCheckUnit
(
userUtils
.
getCurrentUserUnitName
());
}
selfExaminationBillEntity
.
setUseraId
(
userUtils
.
getCurrentUserId
());
selfExaminationBillEntity
.
setUseraId
(
userUtils
.
getCurrentUserId
());
selfExaminationBillEntity
.
setCheckUnit
(
userUtils
.
getCurrentUserUnitName
());
selfExaminationBillEntity
.
setCreateUnitId
(
userUtils
.
getCurrentUnitId
());
selfExaminationBillEntity
.
setCreateUnitId
(
userUtils
.
getCurrentUnitId
());
if
(
selfCheckSaveVo
.
getNewDeviceList
()
!=
null
)
{
if
(
selfCheckSaveVo
.
getNewDeviceList
()
!=
null
)
{
//按新增不在系统的装备按rfid卡号拼接保存
//按新增不在系统的装备按rfid卡号拼接保存
...
@@ -271,17 +285,24 @@ public class SelfCheckController {
...
@@ -271,17 +285,24 @@ public class SelfCheckController {
}
}
SelfCheckBill
selfExaminationBillEntity1
=
selfExaminationBillService
.
addEntity
(
selfExaminationBillEntity
);
SelfCheckBill
selfExaminationBillEntity1
=
selfExaminationBillService
.
addEntity
(
selfExaminationBillEntity
);
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
String
deviceIdDetail
=
self
ExaminationBillEntity
.
getCheckDetail
();
String
deviceIdDetail
=
self
CheckSaveVo
.
getCheckDetail
();
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
//发起任务
if
(
selfCheckSaveVo
.
getTaskId
()!=
null
){
List
<
Integer
>
userIds
=
new
ArrayList
<>();
//获取任务
userIds
.
add
(
userId
);
TaskBto
taskBto
=
taskService
.
get
(
selfCheckSaveVo
.
getTaskId
());
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
//添加涉及人员
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
TaskBto
saveEntity
=
taskService
.
start
(
taskBto
);
//推至下一阶段
//存业务日志
taskService
.
moveToNext
(
taskBto
,
selfCheckSaveVo
.
getUserbId
());
// TaskLogBto taskLogBto = new TaskLogBto(saveEntity.getId(),"发起自查",null);
}
// taskLogService.addLog(taskLogBto);
else
{
//发起任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
taskService
.
start
(
taskBto
);
}
//添加装备日志
//添加装备日志
for
(
String
s:
strings
)
{
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
if
(
s
.
length
()>=
2
)
{
...
@@ -348,13 +369,21 @@ public class SelfCheckController {
...
@@ -348,13 +369,21 @@ public class SelfCheckController {
public
ResponseEntity
selectSelfExaminationBill
(
@RequestBody
SelfCheckSelectVo
selfCheckSelectVo
)
{
public
ResponseEntity
selectSelfExaminationBill
(
@RequestBody
SelfCheckSelectVo
selfCheckSelectVo
)
{
Page
<
SelfCheckBill
>
page
=
selfExaminationBillService
.
getPage
(
selfCheckSelectVo
,
selfCheckSelectVo
.
getPageable
());
Page
<
SelfCheckBill
>
page
=
selfExaminationBillService
.
getPage
(
selfCheckSelectVo
,
selfCheckSelectVo
.
getPageable
());
for
(
SelfCheckBill
s
:
page
.
getContent
())
{
for
(
SelfCheckBill
s
:
page
.
getContent
())
{
s
.
setCreateUnit
(
userPublicService
.
findByUnitsToname
(
s
.
getCreateUnitId
()));
if
(
s
.
getCreateUnitId
()!=
null
)
{
String
user
=
userPublicService
.
getOne
(
s
.
getUseraId
()).
getName
();
s
.
setCreateUnit
(
userPublicService
.
findByUnitsToname
(
s
.
getCreateUnitId
()));
String
user2
=
userPublicService
.
getOne
(
s
.
getUserbId
()).
getName
();
}
String
user3
=
userPublicService
.
getOne
(
s
.
getCreateUserId
()).
getName
();
if
(
s
.
getUseraId
()!=
null
)
{
s
.
setCheckUser
(
user
);
String
user
=
userPublicService
.
getOne
(
s
.
getUseraId
()).
getName
();
s
.
setConfirmUser
(
user2
);
s
.
setCheckUser
(
user
);
s
.
setCreateUser
(
user3
);
}
if
(
s
.
getUserbId
()!=
null
)
{
String
user2
=
userPublicService
.
getOne
(
s
.
getUserbId
()).
getName
();
s
.
setConfirmUser
(
user2
);
}
if
(
s
.
getCreateUserId
()!=
null
)
{
String
user3
=
userPublicService
.
getOne
(
s
.
getCreateUserId
()).
getName
();
s
.
setCreateUser
(
user3
);
}
}
}
return
ResultUtil
.
success
(
page
);
return
ResultUtil
.
success
(
page
);
}
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckBillServiceImpl.java
浏览文件 @
c11ce3d0
...
@@ -6,6 +6,7 @@ import com.tykj.dev.device.selfcheck.repository.SelfCheckBillDao;
...
@@ -6,6 +6,7 @@ import com.tykj.dev.device.selfcheck.repository.SelfCheckBillDao;
import
com.tykj.dev.device.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.service.SelfCheckBillService
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.vo.SelfCheckSelectVo
;
import
com.tykj.dev.device.selfcheck.subject.vo.SelfCheckSelectVo
;
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.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,6 +28,9 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -27,6 +28,9 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
@Autowired
@Autowired
private
SelfCheckBillDao
selfExaminationBillDao
;
private
SelfCheckBillDao
selfExaminationBillDao
;
@Autowired
private
UserUtils
userUtils
;
@Override
@Override
public
SelfCheckBill
addEntity
(
SelfCheckBill
selfExaminationBillEntity
)
{
public
SelfCheckBill
addEntity
(
SelfCheckBill
selfExaminationBillEntity
)
{
return
selfExaminationBillDao
.
save
(
selfExaminationBillEntity
);
return
selfExaminationBillDao
.
save
(
selfExaminationBillEntity
);
...
@@ -59,6 +63,7 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -59,6 +63,7 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
private
Specification
<
SelfCheckBill
>
getSelectSpecification
(
SelfCheckSelectVo
selfCheckSelectVo
)
{
private
Specification
<
SelfCheckBill
>
getSelectSpecification
(
SelfCheckSelectVo
selfCheckSelectVo
)
{
PredicateBuilder
<
SelfCheckBill
>
predicateBuilder
=
Specifications
.
and
();
PredicateBuilder
<
SelfCheckBill
>
predicateBuilder
=
Specifications
.
and
();
predicateBuilder
.
eq
(
"checkUnit"
,
userUtils
.
getCurrentUserUnitName
());
if
(
selfCheckSelectVo
!=
null
)
{
if
(
selfCheckSelectVo
!=
null
)
{
if
(
selfCheckSelectVo
.
getCheckStatus
()
!=
null
)
{
if
(
selfCheckSelectVo
.
getCheckStatus
()
!=
null
)
{
predicateBuilder
.
eq
(
"checkStatus"
,
selfCheckSelectVo
.
getCheckStatus
());
predicateBuilder
.
eq
(
"checkStatus"
,
selfCheckSelectVo
.
getCheckStatus
());
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
浏览文件 @
c11ce3d0
...
@@ -34,9 +34,9 @@ public class SelfCheckBill {
...
@@ -34,9 +34,9 @@ public class SelfCheckBill {
@ApiModelProperty
(
name
=
"主键id"
)
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 自查周期(
0:月度,1:季度,2:年度
)
* 自查周期(
1:月度,2:季度,3:年度,0:未设定周期
)
*/
*/
@ApiModelProperty
(
value
=
"自查周期(
0:月度,1:季度,2:年度
)"
)
@ApiModelProperty
(
value
=
"自查周期(
1:月度,2:季度,3:年度,0:未设定周期
)"
)
private
Integer
cycle
;
private
Integer
cycle
;
/**
/**
* 自查标题
* 自查标题
...
@@ -84,9 +84,9 @@ public class SelfCheckBill {
...
@@ -84,9 +84,9 @@ public class SelfCheckBill {
@ApiModelProperty
(
value
=
"自查详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
@ApiModelProperty
(
value
=
"自查详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增"
)
private
String
checkDetail
;
private
String
checkDetail
;
/**
/**
* 自查状态(0:待审核,1:审核失败,2:自查完成)
* 自查状态(0:待审核,1:审核失败,2:自查完成
,3:未检
)
*/
*/
@ApiModelProperty
(
value
=
"自查状态(0:待审核,1:审核失败,2:自查完成)"
)
@ApiModelProperty
(
value
=
"自查状态(0:待审核,1:审核失败,2:自查完成
,3:未检
)"
)
private
Integer
checkStatus
;
private
Integer
checkStatus
;
/**
/**
* 创建用户id
* 创建用户id
...
@@ -97,7 +97,6 @@ public class SelfCheckBill {
...
@@ -97,7 +97,6 @@ public class SelfCheckBill {
/**
/**
* 创建单位id
* 创建单位id
*/
*/
@CreatedBy
@ApiModelProperty
(
value
=
"创建单位id"
)
@ApiModelProperty
(
value
=
"创建单位id"
)
private
Integer
createUnitId
;
private
Integer
createUnitId
;
/**
/**
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
浏览文件 @
c11ce3d0
...
@@ -18,6 +18,9 @@ import java.util.List;
...
@@ -18,6 +18,9 @@ import java.util.List;
@Repository
@Repository
public
class
SelfCheckSaveVo
{
public
class
SelfCheckSaveVo
{
@ApiModelProperty
(
name
=
"任务id"
,
example
=
"1"
)
private
Integer
taskId
;
@ApiModelProperty
(
name
=
"审核人ID"
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"审核人ID"
,
example
=
"1"
)
private
Integer
userbId
;
private
Integer
userbId
;
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
c11ce3d0
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.task.subject.domin.TaskLog;
...
@@ -13,6 +13,7 @@ import com.tykj.dev.device.task.subject.domin.TaskLog;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
import
com.tykj.dev.device.task.subject.vo.TaskSelectVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.utils.TaskUtils
;
import
com.tykj.dev.device.task.utils.TaskUtils
;
import
com.tykj.dev.device.user.subject.entity.User
;
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.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
...
@@ -371,11 +372,27 @@ public class TaskServiceImpl implements TaskService {
...
@@ -371,11 +372,27 @@ public class TaskServiceImpl implements TaskService {
List
<
Integer
>
idList
=
taskUserVo
.
getUserReadDetailList
();
List
<
Integer
>
idList
=
taskUserVo
.
getUserReadDetailList
();
List
<
Integer
>
idList2
=
taskUserVo
.
getTopFlagDetailList
();
List
<
Integer
>
idList2
=
taskUserVo
.
getTopFlagDetailList
();
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
//筛选出userId大于0的
//获取涉及人员当前指针
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
().
stream
().
filter
(
integer
->
integer
>
0
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
if
(
userIds
.
size
()
>
0
)
{
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()<
userIds
.
size
())
{
//List最后一个id即为最新经办人
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
taskUserVo
.
setProcessingUser
(
userPublicService
.
getOne
(
userIds
.
get
(
userIds
.
size
()
-
1
)).
getName
());
//当前指针userId大于0,待办人即当前id
if
(
userId3
>
0
)
{
taskUserVo
.
setProcessingUser
(
userPublicService
.
getOne
(
userId3
).
getName
());
}
//当前指针userId等于0,待办人为所属单位下所有用户
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()!=
null
){
StringBuffer
stringBuffer
=
new
StringBuffer
();
List
<
User
>
users
=
userPublicService
.
getAllUser
();
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
});
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
}
else
{
taskUserVo
.
setProcessingUser
(
""
);
}
}
}
}
}
//判断当前用户是否已读
//判断当前用户是否已读
...
@@ -599,11 +616,27 @@ public class TaskServiceImpl implements TaskService {
...
@@ -599,11 +616,27 @@ public class TaskServiceImpl implements TaskService {
List
<
Integer
>
idList
=
taskUserVo
.
getUserReadDetailList
();
List
<
Integer
>
idList
=
taskUserVo
.
getUserReadDetailList
();
List
<
Integer
>
idList2
=
taskUserVo
.
getTopFlagDetailList
();
List
<
Integer
>
idList2
=
taskUserVo
.
getTopFlagDetailList
();
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
if
(
taskUserVo
.
getInvolveUserIdList
()
!=
null
&&
taskUserVo
.
getInvolveUserIdList
().
size
()
>
0
)
{
//筛选出userId大于0的
//获取涉及人员当前指针
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
().
stream
().
filter
(
integer
->
integer
>
0
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
userIds
=
taskUserVo
.
getInvolveUserIdList
();
if
(
userIds
.
size
()
>
0
)
{
if
(
userIds
.
size
()
>
0
&&
taskUserVo
.
getCurrentPoint
()<
userIds
.
size
())
{
//List最后一个id即为最新经办人
Integer
userId3
=
userIds
.
get
(
taskUserVo
.
getCurrentPoint
());
taskUserVo
.
setProcessingUser
(
userPublicService
.
getOne
(
userIds
.
get
(
userIds
.
size
()
-
1
)).
getName
());
//当前指针userId大于0,待办人即当前id
if
(
userId3
>
0
)
{
taskUserVo
.
setProcessingUser
(
userPublicService
.
getOne
(
userId3
).
getName
());
}
//当前指针userId等于0,待办人为所属单位下所有用户
else
if
(
userId3
==
0
&&
taskUserVo
.
getOwnUnit
()!=
null
){
StringBuffer
stringBuffer
=
new
StringBuffer
();
List
<
User
>
users
=
userPublicService
.
getAllUser
();
users
.
stream
().
filter
(
user
->
user
.
getUnitsId
().
equals
(
taskUserVo
.
getOwnUnit
())).
forEach
(
user
->
{
stringBuffer
.
append
(
user
.
getName
()).
append
(
","
);
});
stringBuffer
.
deleteCharAt
(
stringBuffer
.
length
()-
1
);
taskUserVo
.
setProcessingUser
(
stringBuffer
.
toString
());
}
else
{
taskUserVo
.
setProcessingUser
(
""
);
}
}
}
}
}
//判断当前用户是否已读
//判断当前用户是否已读
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/vo/TaskUserVo.java
浏览文件 @
c11ce3d0
...
@@ -67,7 +67,7 @@ public class TaskUserVo {
...
@@ -67,7 +67,7 @@ public class TaskUserVo {
@Transient
@Transient
private
Date
userTimeDate
;
private
Date
userTimeDate
;
@ApiModelProperty
(
value
=
"
处理
人"
)
@ApiModelProperty
(
value
=
"
待办
人"
)
@Transient
@Transient
private
String
processingUser
;
private
String
processingUser
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论