Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
70295f20
提交
70295f20
authored
9月 25, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[业务模块]修改数组越界问题
上级
b3978a05
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
194 行增加
和
25 行删除
+194
-25
GlobalMap.java
dev-config/src/main/java/com/tykj/dev/config/GlobalMap.java
+25
-2
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+45
-13
DeviceInvisibleRange.java
...ain/java/com/tykj/dev/misc/base/DeviceInvisibleRange.java
+3
-3
DeviceLifeStatus.java
...rc/main/java/com/tykj/dev/misc/base/DeviceLifeStatus.java
+33
-1
DeviceType.java
...misc/src/main/java/com/tykj/dev/misc/base/DeviceType.java
+4
-0
MatchingRange.java
...c/src/main/java/com/tykj/dev/misc/base/MatchingRange.java
+20
-0
StorageType.java
...isc/src/main/java/com/tykj/dev/misc/base/StorageType.java
+36
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+28
-6
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/GlobalMap.java
浏览文件 @
70295f20
package
com
.
tykj
.
dev
.
config
;
package
com
.
tykj
.
dev
.
config
;
import
com.tykj.dev.misc.base.RepairStatusEnum
;
import
com.tykj.dev.misc.base.*
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
...
@@ -21,6 +20,12 @@ public class GlobalMap {
...
@@ -21,6 +20,12 @@ public class GlobalMap {
private
static
final
Map
<
Integer
,
LogType
>
logTypeMap
;
private
static
final
Map
<
Integer
,
LogType
>
logTypeMap
;
private
static
final
Map
<
Integer
,
DeviceLifeStatus
>
deviceLifeStatusMap
;
private
static
final
Map
<
Integer
,
MatchingRange
>
matchingRangeMap
;
private
static
final
Map
<
Integer
,
StorageType
>
storageTypeMap
;
static
{
static
{
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
...
@@ -28,6 +33,12 @@ public class GlobalMap {
...
@@ -28,6 +33,12 @@ public class GlobalMap {
.
collect
(
Collectors
.
toMap
(
repairStatusEnum
->
repairStatusEnum
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
repairStatusEnum
->
repairStatusEnum
.
id
,
Function
.
identity
()));
logTypeMap
=
Arrays
.
stream
(
LogType
.
values
())
logTypeMap
=
Arrays
.
stream
(
LogType
.
values
())
.
collect
(
Collectors
.
toMap
(
logType
->
logType
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
logType
->
logType
.
id
,
Function
.
identity
()));
deviceLifeStatusMap
=
Arrays
.
stream
(
DeviceLifeStatus
.
values
())
.
collect
(
Collectors
.
toMap
(
deviceLifeStatus
->
deviceLifeStatus
.
id
,
Function
.
identity
()));
matchingRangeMap
=
Arrays
.
stream
(
MatchingRange
.
values
())
.
collect
(
Collectors
.
toMap
(
matchingRange
->
matchingRange
.
id
,
Function
.
identity
()));
storageTypeMap
=
Arrays
.
stream
(
StorageType
.
values
())
.
collect
(
Collectors
.
toMap
(
storageType
->
storageType
.
id
,
Function
.
identity
()));
}
}
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
...
@@ -41,4 +52,16 @@ public class GlobalMap {
...
@@ -41,4 +52,16 @@ public class GlobalMap {
public
static
Map
<
Integer
,
LogType
>
getLogTypeMap
()
{
public
static
Map
<
Integer
,
LogType
>
getLogTypeMap
()
{
return
logTypeMap
;
return
logTypeMap
;
}
}
public
static
Map
<
Integer
,
DeviceLifeStatus
>
getDeviceLifeStatusMap
()
{
return
deviceLifeStatusMap
;
}
public
static
Map
<
Integer
,
StorageType
>
getStorageTypeMap
()
{
return
storageTypeMap
;
}
public
static
Map
<
Integer
,
MatchingRange
>
getMatchingRangeMap
()
{
return
matchingRangeMap
;
}
}
}
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
70295f20
package
com
.
tykj
.
dev
.
device
.
library
.
controller
;
package
com
.
tykj
.
dev
.
device
.
library
.
controller
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.repository.DeviceLogDao
;
import
com.tykj.dev.device.library.repository.DeviceLogDao
;
...
@@ -163,42 +164,73 @@ public class DeviceLibraryController {
...
@@ -163,42 +164,73 @@ public class DeviceLibraryController {
DeviceLibraryUpdateVo
libraryUpdateVo
=
deviceEditVo
.
getUpdateVoList
();
DeviceLibraryUpdateVo
libraryUpdateVo
=
deviceEditVo
.
getUpdateVoList
();
if
(
libraryUpdateVo
.
getInvisibleRange
()
!=
null
)
{
if
(
libraryUpdateVo
.
getInvisibleRange
()
!=
null
)
{
deviceLibraryEntity
.
setInvisibleRange
(
libraryUpdateVo
.
getInvisibleRange
());
deviceLibraryEntity
.
setInvisibleRange
(
libraryUpdateVo
.
getInvisibleRange
());
//添加装备日志 TODO
// String remark = "将装备的"+
// DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(),remark,null);
// deviceLogService.addLog(deviceLogDto);
}
}
if
(
libraryUpdateVo
.
getLifeStatus
()
!=
null
)
{
if
(
libraryUpdateVo
.
getLifeStatus
()
!=
null
&&!
libraryUpdateVo
.
getLifeStatus
().
equals
(
deviceLibraryEntity
.
getLifeStatus
()))
{
//添加装备日志
String
remark
=
"将装备的生命状态由"
+
GlobalMap
.
getDeviceLifeStatusMap
().
get
(
deviceLibraryEntity
.
getLifeStatus
()).
name
+
"改为"
+
GlobalMap
.
getDeviceLifeStatusMap
().
get
(
libraryUpdateVo
.
getLifeStatus
()).
name
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setLifeStatus
(
libraryUpdateVo
.
getLifeStatus
());
deviceLibraryEntity
.
setLifeStatus
(
libraryUpdateVo
.
getLifeStatus
());
}
}
if
(
libraryUpdateVo
.
getLocationUnit
()!=
null
){
if
(
libraryUpdateVo
.
getLocationUnit
()!=
null
&&!
libraryUpdateVo
.
getLocationUnit
().
equals
(
deviceLibraryEntity
.
getLocationUnit
())){
//添加装备日志
String
remark
=
"将装备的所在单位由"
+
deviceLibraryEntity
.
getLocationUnit
()+
"改为"
+
libraryUpdateVo
.
getLocationUnit
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setLocationUnit
(
libraryUpdateVo
.
getLocationUnit
());
deviceLibraryEntity
.
setLocationUnit
(
libraryUpdateVo
.
getLocationUnit
());
}
}
if
(
libraryUpdateVo
.
getManageStatus
()!=
null
){
if
(
libraryUpdateVo
.
getManageStatus
()!=
null
){
deviceLibraryEntity
.
setManageStatus
(
libraryUpdateVo
.
getManageStatus
());
deviceLibraryEntity
.
setManageStatus
(
libraryUpdateVo
.
getManageStatus
());
}
}
if
(
libraryUpdateVo
.
getMatchingRange
()!=
null
){
if
(
libraryUpdateVo
.
getMatchingRange
()!=
null
&&!
libraryUpdateVo
.
getMatchingRange
().
equals
(
deviceLibraryEntity
.
getMatchingRange
())){
//添加装备日志
String
remark
=
"将装备的配用范围由"
+
GlobalMap
.
getMatchingRangeMap
().
get
(
deviceLibraryEntity
.
getMatchingRange
()).
name
+
"改为"
+
GlobalMap
.
getMatchingRangeMap
().
get
(
libraryUpdateVo
.
getMatchingRange
()).
name
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setMatchingRange
(
libraryUpdateVo
.
getMatchingRange
());
deviceLibraryEntity
.
setMatchingRange
(
libraryUpdateVo
.
getMatchingRange
());
}
}
if
(
libraryUpdateVo
.
getModel
()!=
null
){
if
(
libraryUpdateVo
.
getModel
()!=
null
&&!
libraryUpdateVo
.
getModel
().
equals
(
deviceLibraryEntity
.
getModel
())){
//添加装备日志
String
remark
=
"将装备的型号由"
+
deviceLibraryEntity
.
getModel
()+
"改为"
+
libraryUpdateVo
.
getModel
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setModel
(
libraryUpdateVo
.
getModel
());
deviceLibraryEntity
.
setModel
(
libraryUpdateVo
.
getModel
());
}
}
if
(
libraryUpdateVo
.
getName
()!=
null
){
if
(
libraryUpdateVo
.
getName
()!=
null
&&!
libraryUpdateVo
.
getName
().
equals
(
deviceLibraryEntity
.
getName
())){
//添加装备日志
String
remark
=
"将装备的名称由"
+
deviceLibraryEntity
.
getName
()+
"改为"
+
libraryUpdateVo
.
getName
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setName
(
libraryUpdateVo
.
getName
());
deviceLibraryEntity
.
setName
(
libraryUpdateVo
.
getName
());
}
}
if
(
libraryUpdateVo
.
getOwnUnit
()!=
null
){
if
(
libraryUpdateVo
.
getOwnUnit
()!=
null
&&!
libraryUpdateVo
.
getOwnUnit
().
equals
(
deviceLibraryEntity
.
getOwnUnit
())){
//添加装备日志
String
remark
=
"将装备的所属单位由"
+
deviceLibraryEntity
.
getOwnUnit
()+
"改为"
+
libraryUpdateVo
.
getOwnUnit
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setOwnUnit
(
libraryUpdateVo
.
getOwnUnit
());
deviceLibraryEntity
.
setOwnUnit
(
libraryUpdateVo
.
getOwnUnit
());
}
}
if
(
libraryUpdateVo
.
getProdNumber
()!=
null
){
if
(
libraryUpdateVo
.
getProdNumber
()!=
null
&&!
libraryUpdateVo
.
getProdNumber
().
equals
(
deviceLibraryEntity
.
getProdNumber
())){
//添加装备日志
String
remark
=
"将装备生产序列号由"
+
deviceLibraryEntity
.
getProdNumber
()+
"改为"
+
libraryUpdateVo
.
getProdNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setProdNumber
(
libraryUpdateVo
.
getProdNumber
());
deviceLibraryEntity
.
setProdNumber
(
libraryUpdateVo
.
getProdNumber
());
}
}
if
(
libraryUpdateVo
.
getSecretLevel
()!=
null
){
if
(
libraryUpdateVo
.
getSecretLevel
()!=
null
){
deviceLibraryEntity
.
setSecretLevel
(
libraryUpdateVo
.
getSecretLevel
());
deviceLibraryEntity
.
setSecretLevel
(
libraryUpdateVo
.
getSecretLevel
());
}
}
if
(
libraryUpdateVo
.
getSeqNumber
()!=
null
){
if
(
libraryUpdateVo
.
getSeqNumber
()!=
null
&&!
libraryUpdateVo
.
getSeqNumber
().
equals
(
deviceLibraryEntity
.
getSeqNumber
())){
String
remark
=
"将装备序列号由"
+
deviceLibraryEntity
.
getSeqNumber
()+
"改为"
+
libraryUpdateVo
.
getSeqNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setSeqNumber
(
libraryUpdateVo
.
getSeqNumber
());
deviceLibraryEntity
.
setSeqNumber
(
libraryUpdateVo
.
getSeqNumber
());
}
}
if
(
libraryUpdateVo
.
getStorageType
()!=
null
){
if
(
libraryUpdateVo
.
getStorageType
()!=
null
&&!
libraryUpdateVo
.
getStorageType
().
equals
(
deviceLibraryEntity
.
getStorageType
())){
//添加装备日志
String
remark
=
"将装备的入库类型由"
+
GlobalMap
.
getStorageTypeMap
().
get
(
deviceLibraryEntity
.
getStorageType
()).
name
+
"改为"
+
GlobalMap
.
getStorageTypeMap
().
get
(
libraryUpdateVo
.
getStorageType
()).
name
;
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setStorageType
(
libraryUpdateVo
.
getStorageType
());
deviceLibraryEntity
.
setStorageType
(
libraryUpdateVo
.
getStorageType
());
}
}
if
(
libraryUpdateVo
.
getType
()!=
null
){
if
(
libraryUpdateVo
.
getType
()!=
null
){
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/DeviceInvisibleRange.java
浏览文件 @
70295f20
...
@@ -12,15 +12,15 @@ public enum DeviceInvisibleRange {
...
@@ -12,15 +12,15 @@ public enum DeviceInvisibleRange {
/**
/**
* 省一级
* 省一级
*/
*/
PACKING
(
1
,
"省一级"
),
SHEN
(
1
,
"省一级"
),
/**
/**
* 县一级
* 县一级
*/
*/
STORAGE
(
2
,
"县一级"
),
XIAN
(
3
,
"县一级"
),
/**
/**
* 市一级
* 市一级
*/
*/
ALLOT
(
3
,
"市一级"
);
SHI
(
2
,
"市一级"
);
public
Integer
id
;
public
Integer
id
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/DeviceLifeStatus.java
浏览文件 @
70295f20
...
@@ -36,7 +36,39 @@ public enum DeviceLifeStatus {
...
@@ -36,7 +36,39 @@ public enum DeviceLifeStatus {
/**
/**
* 清退
* 清退
*/
*/
SEND_BACK
(
6
,
"清退"
)
SEND_BACK
(
6
,
"清退"
),
/**
* 待退装
*/
WAIT_RETIRED
(
7
,
"待退装"
),
/**
* 退装
*/
RETIRED
(
8
,
"退装"
),
/**
* 待销毁
*/
WAIT_DESTROY
(
9
,
"待销毁"
),
/**
* 已销毁
*/
DESTROYED
(
10
,
"已销毁"
),
/**
* 丢失
*/
LOSE
(
11
,
"丢失"
),
/**
* 退役
*/
RETIRE
(
12
,
"退役"
),
/**
* 报废不在省库
*/
SCRAP_II
(
13
,
"报废不在省库"
),
/**
* 使用
*/
USE
(
14
,
"使用"
)
;
;
public
Integer
id
;
public
Integer
id
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/DeviceType.java
0 → 100644
浏览文件 @
70295f20
package
com
.
tykj
.
dev
.
misc
.
base
;
public
enum
DeviceType
{
}
dev-misc/src/main/java/com/tykj/dev/misc/base/MatchingRange.java
0 → 100644
浏览文件 @
70295f20
package
com
.
tykj
.
dev
.
misc
.
base
;
import
lombok.AllArgsConstructor
;
/**
* @author dengdiyi
* 配用范围枚举
*/
@AllArgsConstructor
public
enum
MatchingRange
{
/**
* 省对下纵向
*/
PROVINCIAL_VERTICAL
(
1
,
"省对下纵向"
);
public
Integer
id
;
public
String
name
;
}
dev-misc/src/main/java/com/tykj/dev/misc/base/StorageType.java
0 → 100644
浏览文件 @
70295f20
package
com
.
tykj
.
dev
.
misc
.
base
;
import
lombok.AllArgsConstructor
;
/**
* @author dengdiyi
* 入库类型枚举
*/
@AllArgsConstructor
public
enum
StorageType
{
/**
* 横向
*/
HORIZONTAL
(
1
,
"横向"
),
/**
* 纵向
*/
VERTICAL
(
2
,
"纵向"
),
/**
* 委托
*/
ENTRUST
(
3
,
"委托"
),
/**
* 代管
*/
ESCROW
(
4
,
"代管"
),
/**
* 其他
*/
OTHER
(
5
,
"其他"
);
public
Integer
id
;
public
String
name
;
}
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
70295f20
...
@@ -454,8 +454,9 @@ public class TaskServiceImpl implements TaskService {
...
@@ -454,8 +454,9 @@ public class TaskServiceImpl implements TaskService {
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
{
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
size
()
>
0
;
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
size
()
>
0
;
boolean
pointExists
=
taskBto
.
getCurrentPoint
()<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
oldUserId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
userConfirm
=
oldUserId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
return
involveExists
&&
userConfirm
;
return
involveExists
&&
pointExists
&&
userConfirm
;
})
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//替换用户id
//替换用户id
...
@@ -468,7 +469,12 @@ public class TaskServiceImpl implements TaskService {
...
@@ -468,7 +469,12 @@ public class TaskServiceImpl implements TaskService {
//查询跟踪
//查询跟踪
//涉及人员包括旧用户且指针对应UserId不是旧用户
//涉及人员包括旧用户且指针对应UserId不是旧用户
List
<
TaskBto
>
taskBtos1
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtos1
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
taskBto
.
getInvolveUserIdList
().
contains
(
oldUserId
)
&&
!
oldUserId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())))
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
contains
(
oldUserId
);
boolean
pointExists
=
taskBto
.
getCurrentPoint
()<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
oldUserId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
return
involveExists
&&
pointExists
&&
!
userConfirm
;
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//替换用户id
//替换用户id
taskBtos1
.
forEach
(
taskBto
->
{
taskBtos1
.
forEach
(
taskBto
->
{
...
@@ -503,10 +509,11 @@ public class TaskServiceImpl implements TaskService {
...
@@ -503,10 +509,11 @@ public class TaskServiceImpl implements TaskService {
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
{
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
size
()
>
0
;
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
size
()
>
0
;
boolean
pointExists
=
taskBto
.
getCurrentPoint
()<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
boolean
noUserHandle
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
0
;
boolean
noUserHandle
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
0
;
boolean
belongUnit
=
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
());
boolean
belongUnit
=
taskBto
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUnitId
());
return
involveExists
&&
(
userConfirm
||
(
noUserHandle
&&
belongUnit
));
return
involveExists
&&
pointExists
&&
(
userConfirm
||
(
noUserHandle
&&
belongUnit
));
})
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//查询所有的业务
//查询所有的业务
...
@@ -536,11 +543,21 @@ public class TaskServiceImpl implements TaskService {
...
@@ -536,11 +543,21 @@ public class TaskServiceImpl implements TaskService {
if
(
taskSelectVo
.
getSelectNum
()
==
3
)
{
if
(
taskSelectVo
.
getSelectNum
()
==
3
)
{
//涉及人员包括当前用户且指针对应UserId不是当前用户
//涉及人员包括当前用户且指针对应UserId不是当前用户
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtoList
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
taskBto
.
getInvolveUserIdList
().
contains
(
userId
)
&&
!
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())))
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
contains
(
userId
);
boolean
pointExists
=
taskBto
.
getCurrentPoint
()<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
userId
.
equals
(
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
()));
return
involveExists
&&
pointExists
&&!
userConfirm
;})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//涉及人员当前指针为-1,且所属单位为当前单位
//涉及人员当前指针为-1,且所属单位为当前单位
List
<
TaskBto
>
taskBtos1
=
taskBtos
.
stream
()
List
<
TaskBto
>
taskBtos1
=
taskBtos
.
stream
()
.
filter
(
taskBto
->
!
taskBto
.
getInvolveUserIdList
().
contains
(
userId
)
&&
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
-
1
&&
taskBto
.
getOwnUnit
().
equals
(
unitId
))
.
filter
(
taskBto
->
{
boolean
involveExists
=
taskBto
.
getInvolveUserIdList
().
contains
(
userId
);
boolean
pointExists
=
taskBto
.
getCurrentPoint
()<
taskBto
.
getInvolveUserIdList
().
size
();
boolean
userConfirm
=
taskBto
.
getInvolveUserIdList
().
get
(
taskBto
.
getCurrentPoint
())
==
-
1
;
boolean
unitConfirm
=
taskBto
.
getOwnUnit
().
equals
(
unitId
);
return
!
involveExists
&&
pointExists
&&
userConfirm
&&
unitConfirm
;
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
taskBtoList
.
addAll
(
taskBtos1
);
taskBtoList
.
addAll
(
taskBtos1
);
//查询所有业务
//查询所有业务
...
@@ -634,7 +651,12 @@ public class TaskServiceImpl implements TaskService {
...
@@ -634,7 +651,12 @@ public class TaskServiceImpl implements TaskService {
if
(
taskLogs
.
size
()==
0
){
if
(
taskLogs
.
size
()==
0
){
return
null
;
return
null
;
}
}
return
taskLogs
.
get
(
0
).
getCreateTime
();
if
(
taskLogs
.
size
()>
0
)
{
return
taskLogs
.
get
(
0
).
getCreateTime
();
}
else
{
return
null
;
}
}
else
{
}
else
{
return
null
;
return
null
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论