Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
275a512b
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
275a512b
编写于
8月 31, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#332 develop
上级
c46d2113
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
116 addition
and
104 deletion
+116
-104
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AeiObjects.java
...cessplatform/service/processing/processor/AeiObjects.java
+116
-104
未找到文件。
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AeiObjects.java
浏览文件 @
275a512b
...
@@ -5,6 +5,7 @@ import java.util.Comparator;
...
@@ -5,6 +5,7 @@ import java.util.Comparator;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.script.Bindings
;
import
javax.script.Bindings
;
...
@@ -249,7 +250,7 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -249,7 +250,7 @@ public class AeiObjects extends GsonPropertyObject {
if
(
null
==
this
.
workLogs
)
{
if
(
null
==
this
.
workLogs
)
{
List
<
WorkLog
>
os
=
this
.
business
.
entityManagerContainer
().
listEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
List
<
WorkLog
>
os
=
this
.
business
.
entityManagerContainer
().
listEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
this
.
work
.
getJob
());
this
.
work
.
getJob
());
/
* 保持和前端得到的相同排序 */
/
/ 保持和前端得到的相同排序
this
.
workLogs
=
os
.
stream
()
this
.
workLogs
=
os
.
stream
()
.
sorted
(
Comparator
.
comparing
(
WorkLog:
:
getFromTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
))
.
sorted
(
Comparator
.
comparing
(
WorkLog:
:
getFromTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
))
.
thenComparing
(
WorkLog:
:
getArrivedTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
thenComparing
(
WorkLog:
:
getArrivedTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
...
@@ -298,9 +299,8 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -298,9 +299,8 @@ public class AeiObjects extends GsonPropertyObject {
}
}
public
List
<
TaskCompleted
>
getJoinInquireTaskCompleteds
()
throws
Exception
{
public
List
<
TaskCompleted
>
getJoinInquireTaskCompleteds
()
throws
Exception
{
return
this
.
getTaskCompleteds
().
stream
().
filter
(
o
->
{
return
this
.
getTaskCompleteds
().
stream
().
filter
(
o
->
BooleanUtils
.
isNotFalse
(
o
.
getJoinInquire
()))
return
BooleanUtils
.
isNotFalse
(
o
.
getJoinInquire
());
.
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
public
List
<
Read
>
getReads
()
throws
Exception
{
public
List
<
Read
>
getReads
()
throws
Exception
{
...
@@ -538,7 +538,6 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -538,7 +538,6 @@ public class AeiObjects extends GsonPropertyObject {
this
.
commitDocumentVersion
();
this
.
commitDocumentVersion
();
this
.
commitRecord
();
this
.
commitRecord
();
this
.
commitAttachment
();
this
.
commitAttachment
();
// this.getWorkDataHelper().update(this.getData());
this
.
commitData
();
this
.
commitData
();
this
.
commitDynamicEntity
();
this
.
commitDynamicEntity
();
this
.
entityManagerContainer
().
commit
();
this
.
entityManagerContainer
().
commit
();
...
@@ -721,9 +720,9 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -721,9 +720,9 @@ public class AeiObjects extends GsonPropertyObject {
private
void
executeMapping
()
throws
Exception
{
private
void
executeMapping
()
throws
Exception
{
for
(
Mapping
m
:
this
.
getMappings
())
{
for
(
Mapping
m
:
this
.
getMappings
())
{
/
* 仅处理最后work转workCompleted的事件 */
/
/ 仅处理最后work转workCompleted的事件
if
((!
this
.
getCreateWorkCompleteds
().
isEmpty
())
||
(!
this
.
getUpdateTaskCompleteds
().
isEmpty
()))
{
if
((!
this
.
getCreateWorkCompleteds
().
isEmpty
())
||
(!
this
.
getUpdateTaskCompleteds
().
isEmpty
()))
{
List
<
WorkCompleted
>
list
=
new
ArrayList
<
WorkCompleted
>();
List
<
WorkCompleted
>
list
=
new
ArrayList
<>();
list
.
addAll
(
this
.
getCreateWorkCompleteds
());
list
.
addAll
(
this
.
getCreateWorkCompleteds
());
list
.
addAll
(
this
.
getUpdateWorkCompleteds
());
list
.
addAll
(
this
.
getUpdateWorkCompleteds
());
for
(
WorkCompleted
workCompleted
:
list
)
{
for
(
WorkCompleted
workCompleted
:
list
)
{
...
@@ -733,7 +732,7 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -733,7 +732,7 @@ public class AeiObjects extends GsonPropertyObject {
this
.
entityManagerContainer
().
beginTransaction
(
cls
);
this
.
entityManagerContainer
().
beginTransaction
(
cls
);
JpaObject
o
=
this
.
entityManagerContainer
().
find
(
workCompleted
.
getJob
(),
cls
);
JpaObject
o
=
this
.
entityManagerContainer
().
find
(
workCompleted
.
getJob
(),
cls
);
if
(
null
==
o
)
{
if
(
null
==
o
)
{
o
=
(
JpaObject
)
cls
.
newInstance
();
o
=
cls
.
newInstance
();
o
.
setId
(
workCompleted
.
getJob
());
o
.
setId
(
workCompleted
.
getJob
());
this
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
this
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
}
}
...
@@ -914,7 +913,7 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -914,7 +913,7 @@ public class AeiObjects extends GsonPropertyObject {
commitTaskCompletedCreatePart
();
commitTaskCompletedCreatePart
();
// 更新已办
// 更新已办
commitTaskCompletedUpdatePart
();
commitTaskCompletedUpdatePart
();
// 删除已办
// 删除已办
*/
commitTaskCompletedDeletePart
();
commitTaskCompletedDeletePart
();
}
}
}
}
...
@@ -946,22 +945,19 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -946,22 +945,19 @@ public class AeiObjects extends GsonPropertyObject {
private
void
commitTaskCompletedDeletePart
()
{
private
void
commitTaskCompletedDeletePart
()
{
this
.
getDeleteTaskCompleteds
().
stream
().
forEach
(
o
->
{
this
.
getDeleteTaskCompleteds
().
stream
().
forEach
(
o
->
{
TaskCompleted
obj
;
try
{
try
{
TaskCompleted
deleteTaskCompleted
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
TaskCompleted
.
class
);
if
(
null
!=
deleteTaskCompleted
)
{
this
.
business
.
entityManagerContainer
().
remove
(
deleteTaskCompleted
,
CheckRemoveType
.
all
);
// 要删除此已经办前此人其他的已办lastest标记为true
// 要删除此已经办前此人其他的已办lastest标记为true
TaskCompleted
lastest
=
this
.
getTaskCompleteds
().
stream
()
this
.
getTaskCompleteds
().
stream
()
.
filter
(
p
->
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
())
.
filter
(
p
->
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
())
&&
(!
StringUtils
.
equals
(
o
.
getId
(),
p
.
getId
())))
&&
(!
StringUtils
.
equals
(
o
.
getId
(),
p
.
getId
())))
.
sorted
(
Comparator
.
sorted
(
Comparator
.
comparing
(
TaskCompleted:
:
getStartTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
comparing
(
TaskCompleted:
:
getStartTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
reversed
())
.
reversed
())
.
findFirst
().
orElse
(
null
);
.
findFirst
().
ifPresent
(
q
->
q
.
setLatest
(
true
));
if
(
null
!=
lastest
)
{
lastest
.
setLatest
(
true
);
}
obj
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
TaskCompleted
.
class
);
if
(
null
!=
obj
)
{
this
.
business
.
entityManagerContainer
().
remove
(
obj
,
CheckRemoveType
.
all
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
...
@@ -985,27 +981,33 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -985,27 +981,33 @@ public class AeiObjects extends GsonPropertyObject {
private
void
commitReadCreatePart
()
{
private
void
commitReadCreatePart
()
{
// 去重可能的在同一次提交中产生的对同一个人的多份Read
// 去重可能的在同一次提交中产生的对同一个人的多份Read
this
.
getCreateReads
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
())).
entrySet
()
this
.
getCreateReads
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
())).
entrySet
()
.
forEach
(
entry
->
{
.
forEach
(
Read
obj
=
entry
.
getValue
().
stream
()
entry
->
entry
.
sorted
(
Comparator
.
comparing
(
Read:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
getValue
().
stream
().
sorted
(
.
reversed
().
thenComparing
(
Comparator
Comparator
.
comparing
(
Read:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
comparing
(
Read:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
findFirst
().
get
();
.
reversed
()
.
thenComparing
(
Comparator
.
comparing
(
Read:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
findFirst
().
ifPresent
(
o
->
{
try
{
try
{
Read
existed
=
this
.
getReads
().
stream
().
filter
(
p
->
StringUtils
.
equals
(
obj
.
getJob
(),
p
.
getJob
())
Optional
<
Read
>
existOptional
=
this
.
getReads
().
stream
()
&&
StringUtils
.
equals
(
obj
.
getPerson
(),
p
.
getPerson
())).
findFirst
().
orElse
(
null
);
.
filter
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
()))
.
findFirst
();
// 不存在内容重复的待阅
// 不存在内容重复的待阅
if
(
null
==
existed
)
{
if
(!
existOptional
.
isPresent
()
)
{
this
.
business
.
entityManagerContainer
().
persist
(
obj
,
CheckPersistType
.
all
);
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
/* 创建待阅的参阅 */
// 创建待阅的参阅
this
.
createReview
(
new
Review
(
this
.
getWork
(),
obj
.
getPerson
()));
this
.
createReview
(
new
Review
(
this
.
getWork
(),
o
.
getPerson
()));
}
else
{
}
else
{
obj
.
copyTo
(
existed
,
JpaObject
.
FieldsUnmodify
);
o
.
copyTo
(
existOptional
.
get
()
,
JpaObject
.
FieldsUnmodify
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
}
}
});
}));
}
}
private
void
commitReadUpdatePart
()
{
private
void
commitReadUpdatePart
()
{
...
@@ -1047,18 +1049,19 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1047,18 +1049,19 @@ public class AeiObjects extends GsonPropertyObject {
private
void
commitReadCompletedCreatePart
()
{
private
void
commitReadCompletedCreatePart
()
{
this
.
getCreateReadCompleteds
().
stream
().
forEach
(
o
->
{
this
.
getCreateReadCompleteds
().
stream
().
forEach
(
o
->
{
ReadCompleted
obj
;
try
{
try
{
// 已阅唯一
// 已阅唯一
obj
=
this
.
getReadCompleteds
().
stream
().
filter
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
Optional
<
ReadCompleted
>
optional
=
this
.
getReadCompleteds
().
stream
()
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
())).
findFirst
().
orElse
(
null
);
.
filter
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
if
(
null
==
obj
)
{
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
()))
.
findFirst
();
if
(!
optional
.
isPresent
())
{
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
// 创建已阅参阅
// 创建已阅参阅
this
.
createReview
(
new
Review
(
this
.
getWork
(),
o
.
getPerson
()));
this
.
createReview
(
new
Review
(
this
.
getWork
(),
o
.
getPerson
()));
}
else
{
}
else
{
// 如果逻辑上相同的已阅已经存在,覆盖内容.
// 如果逻辑上相同的已阅已经存在,覆盖内容.
o
.
copyTo
(
o
bj
,
JpaObject
.
FieldsUnmodify
);
o
.
copyTo
(
o
ptional
.
get
()
,
JpaObject
.
FieldsUnmodify
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
...
@@ -1106,28 +1109,27 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1106,28 +1109,27 @@ public class AeiObjects extends GsonPropertyObject {
private
void
commitReviewCreatePart
()
{
private
void
commitReviewCreatePart
()
{
// 去重可能的在同一次提交中产生的对同一个人的多份Review
// 去重可能的在同一次提交中产生的对同一个人的多份Review
this
.
getCreateReviews
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
()))
this
.
getCreateReviews
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
()))
.
entrySet
()
.
forEach
(
entry
->
{
.
entrySet
()
Review
obj
=
entry
.
getValue
().
stream
()
.
forEach
(
entry
->
entry
.
getValue
().
stream
()
.
sorted
(
Comparator
.
comparing
(
Review:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
sorted
(
Comparator
.
comparing
(
Review:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
reversed
().
thenComparing
(
Comparator
.
comparing
(
Review:
:
getId
,
.
reversed
().
thenComparing
(
Comparator
.
nullsLast
(
String:
:
compareTo
))))
Comparator
.
comparing
(
Review:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
findFirst
().
get
();
.
findFirst
().
ifPresent
(
o
->
{
try
{
try
{
// 参阅唯一
Optional
<
Review
>
existOptional
=
this
.
getReviews
().
stream
()
Review
existed
=
this
.
getReviews
().
stream
()
.
filter
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
.
filter
(
p
->
StringUtils
.
equals
(
obj
.
getJob
(),
p
.
getJob
())
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
()))
&&
StringUtils
.
equals
(
obj
.
getPerson
(),
p
.
getPerson
()))
.
findFirst
();
.
findFirst
().
orElse
(
null
);
if
(!
existOptional
.
isPresent
())
{
if
(
null
==
existed
)
{
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
this
.
business
.
entityManagerContainer
().
persist
(
obj
,
CheckPersistType
.
all
);
}
else
{
}
else
{
// 如果逻辑上相同的已阅已经存在,覆盖内容.
// 如果逻辑上相同的已阅已经存在,覆盖内容.
obj
.
copyTo
(
existed
,
JpaObject
.
FieldsUnmodify
);
o
.
copyTo
(
existOptional
.
get
()
,
JpaObject
.
FieldsUnmodify
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
}
}
}
);
})
);
}
}
private
void
commitReviewUpdatePart
()
{
private
void
commitReviewUpdatePart
()
{
...
@@ -1159,7 +1161,7 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1159,7 +1161,7 @@ public class AeiObjects extends GsonPropertyObject {
||
ListTools
.
isNotEmpty
(
this
.
getDeleteDocumentVersions
())
||
ListTools
.
isNotEmpty
(
this
.
getDeleteDocumentVersions
())
||
ListTools
.
isNotEmpty
(
this
.
getUpdateDocumentVersions
()))
{
||
ListTools
.
isNotEmpty
(
this
.
getUpdateDocumentVersions
()))
{
this
.
entityManagerContainer
().
beginTransaction
(
DocumentVersion
.
class
);
this
.
entityManagerContainer
().
beginTransaction
(
DocumentVersion
.
class
);
/
* 保存版式文件 */
/
/ 保存版式文件
this
.
getCreateDocumentVersions
().
stream
().
forEach
(
o
->
{
this
.
getCreateDocumentVersions
().
stream
().
forEach
(
o
->
{
try
{
try
{
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
this
.
business
.
entityManagerContainer
().
persist
(
o
,
CheckPersistType
.
all
);
...
@@ -1177,9 +1179,8 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1177,9 +1179,8 @@ public class AeiObjects extends GsonPropertyObject {
});
});
// 删除版式文件
// 删除版式文件
this
.
getDeleteDocumentVersions
().
stream
().
forEach
(
o
->
{
this
.
getDeleteDocumentVersions
().
stream
().
forEach
(
o
->
{
DocumentVersion
obj
;
try
{
try
{
obj
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
DocumentVersion
.
class
);
DocumentVersion
obj
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
DocumentVersion
.
class
);
if
(
null
!=
obj
)
{
if
(
null
!=
obj
)
{
this
.
business
.
entityManagerContainer
().
remove
(
obj
,
CheckRemoveType
.
all
);
this
.
business
.
entityManagerContainer
().
remove
(
obj
,
CheckRemoveType
.
all
);
}
}
...
@@ -1230,9 +1231,8 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1230,9 +1231,8 @@ public class AeiObjects extends GsonPropertyObject {
this
.
entityManagerContainer
().
beginTransaction
(
Attachment
.
class
);
this
.
entityManagerContainer
().
beginTransaction
(
Attachment
.
class
);
// 保存,更新附件是不可能的,删除附件
// 保存,更新附件是不可能的,删除附件
this
.
getDeleteAttachments
().
stream
().
forEach
(
o
->
{
this
.
getDeleteAttachments
().
stream
().
forEach
(
o
->
{
Attachment
obj
;
try
{
try
{
obj
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
Attachment
.
class
);
Attachment
obj
=
this
.
business
.
entityManagerContainer
().
find
(
o
.
getId
(),
Attachment
.
class
);
if
(
null
!=
obj
)
{
if
(
null
!=
obj
)
{
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
Attachment
.
class
,
StorageMapping
mapping
=
ThisApplication
.
context
().
storageMappings
().
get
(
Attachment
.
class
,
obj
.
getStorage
());
obj
.
getStorage
());
...
@@ -1251,11 +1251,11 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1251,11 +1251,11 @@ public class AeiObjects extends GsonPropertyObject {
private
void
commitData
()
throws
Exception
{
private
void
commitData
()
throws
Exception
{
List
<
Attachment
>
os
=
ListUtils
.
subtract
(
this
.
getAttachments
(),
this
.
getDeleteAttachments
());
List
<
Attachment
>
os
=
ListUtils
.
subtract
(
this
.
getAttachments
(),
this
.
getDeleteAttachments
());
os
=
ListUtils
.
sum
(
os
,
this
.
getCreateAttachments
());
os
=
ListUtils
.
sum
(
os
,
this
.
getCreateAttachments
());
Data
d
ata
=
this
.
getData
().
removeWork
().
removeAttachmentList
().
setAttachmentList
(
os
);
Data
d
=
this
.
getData
().
removeWork
().
removeAttachmentList
().
setAttachmentList
(
os
);
if
(
ListTools
.
isNotEmpty
(
this
.
getCreateWorkCompleteds
()))
{
if
(
ListTools
.
isNotEmpty
(
this
.
getCreateWorkCompleteds
()))
{
d
ata
.
setWork
(
this
.
getCreateWorkCompleteds
().
get
(
0
));
d
.
setWork
(
this
.
getCreateWorkCompleteds
().
get
(
0
));
}
else
{
}
else
{
d
ata
.
setWork
(
this
.
getWork
());
d
.
setWork
(
this
.
getWork
());
}
}
this
.
getWorkDataHelper
().
update
(
data
);
this
.
getWorkDataHelper
().
update
(
data
);
}
}
...
@@ -1401,18 +1401,26 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1401,18 +1401,26 @@ public class AeiObjects extends GsonPropertyObject {
private
void
messageCreateRead
()
{
private
void
messageCreateRead
()
{
// 去重可能的在同一次提交中产生的对同一个人的多份Read
// 去重可能的在同一次提交中产生的对同一个人的多份Read
this
.
getCreateReads
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
())).
entrySet
()
this
.
getCreateReads
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
())).
entrySet
()
.
forEach
(
entry
->
{
.
forEach
(
Read
obj
=
entry
.
getValue
().
stream
()
entry
->
entry
.
sorted
(
Comparator
.
comparing
(
Read:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
getValue
().
stream
().
sorted
(
.
reversed
().
thenComparing
(
Comparator
Comparator
.
comparing
(
Read:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
comparing
(
Read:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
findFirst
().
get
();
.
reversed
()
.
thenComparing
(
Comparator
.
comparing
(
Read:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
findFirst
().
ifPresent
(
o
->
{
try
{
try
{
MessageFactory
.
read_create
(
obj
);
if
(
this
.
getReads
().
stream
()
.
noneMatch
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
())))
{
// 不存在内容重复的待阅
MessageFactory
.
read_create
(
o
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
}
}
}
);
})
);
}
}
private
void
messageDeleteReadCompleted
()
throws
Exception
{
private
void
messageDeleteReadCompleted
()
throws
Exception
{
...
@@ -1436,18 +1444,22 @@ public class AeiObjects extends GsonPropertyObject {
...
@@ -1436,18 +1444,22 @@ public class AeiObjects extends GsonPropertyObject {
private
void
messageCreateReview
()
{
private
void
messageCreateReview
()
{
// 去重可能的在同一次提交中产生的对同一个人的多份Review
// 去重可能的在同一次提交中产生的对同一个人的多份Review
this
.
getCreateReviews
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
()))
this
.
getCreateReviews
().
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getJob
()
+
"#"
+
o
.
getPerson
()))
.
entrySet
()
.
forEach
(
entry
->
{
.
entrySet
()
Review
obj
=
entry
.
getValue
().
stream
()
.
forEach
(
entry
->
entry
.
getValue
().
stream
()
.
sorted
(
Comparator
.
comparing
(
Review:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
sorted
(
Comparator
.
comparing
(
Review:
:
getCreateTime
,
Comparator
.
nullsFirst
(
Date:
:
compareTo
))
.
reversed
().
thenComparing
(
Comparator
.
comparing
(
Review:
:
getId
,
.
reversed
().
thenComparing
(
Comparator
.
nullsLast
(
String:
:
compareTo
))))
Comparator
.
comparing
(
Review:
:
getId
,
Comparator
.
nullsLast
(
String:
:
compareTo
))))
.
findFirst
().
get
();
.
findFirst
().
ifPresent
(
o
->
{
try
{
try
{
MessageFactory
.
review_create
(
obj
);
if
(
this
.
getReviews
().
stream
().
noneMatch
(
p
->
StringUtils
.
equals
(
o
.
getJob
(),
p
.
getJob
())
&&
StringUtils
.
equals
(
o
.
getPerson
(),
p
.
getPerson
())))
{
// 不存在内容重复的待阅
MessageFactory
.
review_create
(
o
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
}
}
}
);
})
);
}
}
private
void
messageDeleteAttachment
()
throws
Exception
{
private
void
messageDeleteAttachment
()
throws
Exception
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录