Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
8ee2eae9
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
8ee2eae9
编写于
6月 10, 2020
作者:
liyi_hz2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复在某些特殊情况下,日程管理会展示两条系统自建日历的问题
上级
cda067a6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
5 deletion
+25
-5
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/factory/CalendarFactory.java
.../x/calendar/assemble/control/factory/CalendarFactory.java
+8
-2
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWhatICanView.java
...semble/control/jaxrs/calendar/ActionListWhatICanView.java
+16
-2
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/service/CalendarService.java
.../x/calendar/assemble/control/service/CalendarService.java
+1
-1
未找到文件。
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/factory/CalendarFactory.java
浏览文件 @
8ee2eae9
...
...
@@ -104,7 +104,10 @@ public class CalendarFactory extends AbstractFactory {
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
cb
.
equal
(
root
.
get
(
Calendar_
.
source
),
source
));
}
if
(
StringUtils
.
isNotEmpty
(
createor
))
{
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
cb
.
equal
(
root
.
get
(
Calendar_
.
createor
),
createor
));
p
=
CriteriaBuilderTools
.
predicate_and
(
cb
,
p
,
cb
.
or
(
cb
.
equal
(
root
.
get
(
Calendar_
.
createor
),
createor
),
cb
.
equal
(
root
.
get
(
Calendar_
.
target
),
createor
)
));
}
Predicate
permission
=
null
;
...
...
@@ -140,7 +143,10 @@ public class CalendarFactory extends AbstractFactory {
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Calendar
>
root
=
cq
.
from
(
Calendar
.
class
);
Predicate
permission
=
cb
.
equal
(
root
.
get
(
Calendar_
.
createor
),
personName
);
Predicate
permission
=
cb
.
or
(
cb
.
equal
(
root
.
get
(
Calendar_
.
createor
),
personName
),
cb
.
equal
(
root
.
get
(
Calendar_
.
target
),
personName
)
);
cq
.
select
(
root
.
get
(
Calendar_
.
id
));
return
em
.
createQuery
(
cq
.
where
(
permission
)).
getResultList
();
}
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWhatICanView.java
浏览文件 @
8ee2eae9
...
...
@@ -11,6 +11,7 @@ import com.x.base.core.project.logger.LoggerFactory;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.calendar.assemble.control.ThisApplication
;
import
com.x.calendar.core.entity.Calendar
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
...
...
@@ -70,6 +71,7 @@ public class ActionListWhatICanView extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
calendarList
))
{
result
.
setCount
(
Long
.
parseLong
(
calendarList
.
size
()
+
""
));
WoCalendar
woCalendar
=
null
;
Boolean
existsSystemDefaultCalendar
=
false
;
for
(
Calendar
calendar
:
calendarList
)
{
woCalendar
=
WoCalendar
.
copier
.
copy
(
calendar
)
;
woCalendar
.
setManageable
(
ThisApplication
.
isCalendarManager
(
effectivePerson
,
calendar
)
);
...
...
@@ -79,8 +81,20 @@ public class ActionListWhatICanView extends BaseAction {
if
(
"UNIT"
.
equalsIgnoreCase
(
calendar
.
getType
()
)
)
{
wo
.
addUnitCalendar
(
woCalendar
);
}
else
{
if
(
calendar
.
getCreateor
().
equalsIgnoreCase
(
effectivePerson
.
getDistinguishedName
()
))
{
wo
.
addMyCalendar
(
woCalendar
);
if
(
calendar
.
getCreateor
().
equalsIgnoreCase
(
effectivePerson
.
getDistinguishedName
()
)
||
StringUtils
.
equalsAnyIgnoreCase
(
"SYSTEM"
,
calendar
.
getCreateor
()
))
{
if
(
StringUtils
.
equalsAnyIgnoreCase
(
"SYSTEM"
,
calendar
.
getCreateor
()
))
{
if
(
!
existsSystemDefaultCalendar
){
wo
.
addMyCalendar
(
woCalendar
);
existsSystemDefaultCalendar
=
true
;
}
else
{
//多了一个系统日历,删除当前这个日历
calendarServiceAdv
.
destory
(
calendar
.
getId
()
);
}
}
else
{
wo
.
addMyCalendar
(
woCalendar
);
}
}
else
{
wo
.
addFollowCalendar
(
woCalendar
);
}
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/service/CalendarService.java
浏览文件 @
8ee2eae9
...
...
@@ -174,7 +174,7 @@ public class CalendarService {
//创建一个自己的默认日历
Calendar
calendar
=
new
Calendar
();
calendar
.
setSource
(
"PERSON"
);
calendar
.
setCreateor
(
personName
);
calendar
.
setCreateor
(
"SYSTEM"
);
calendar
.
setColor
(
"#1462be"
);
calendar
.
setDescription
(
"我的默认日历"
);
calendar
.
setId
(
Calendar
.
createId
()
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录