Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
d8ac23a1
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,发现更多精彩内容 >>
提交
d8ac23a1
编写于
7月 17, 2020
作者:
hlwwx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
'增加了会议模块增加根据会议室id查询,某一时间段(一天)一个会议的使用情况'
上级
ac5e19f7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
92 addition
and
0 deletion
+92
-0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/factory/MeetingFactory.java
...om/x/meeting/assemble/control/factory/MeetingFactory.java
+15
-0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/ActionListOnDayByRoomID.java
...semble/control/jaxrs/meeting/ActionListOnDayByRoomID.java
+58
-0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/MeetingAction.java
...meeting/assemble/control/jaxrs/meeting/MeetingAction.java
+19
-0
未找到文件。
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/factory/MeetingFactory.java
浏览文件 @
d8ac23a1
...
...
@@ -170,6 +170,21 @@ public class MeetingFactory extends AbstractFactory {
cq
.
select
(
root
.
get
(
Meeting_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
}
public
List
<
String
>
listWithDateAndRoom
(
Date
start
,
Date
end
,
String
roomId
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
Meeting
.
class
);
CriteriaBuilder
cb
=
em
.
getCriteriaBuilder
();
CriteriaQuery
<
String
>
cq
=
cb
.
createQuery
(
String
.
class
);
Root
<
Meeting
>
root
=
cq
.
from
(
Meeting
.
class
);
//Predicate p = cb.greaterThanOrEqualTo(root.get(Meeting_.startTime), start);
//p = cb.and(p, cb.lessThanOrEqualTo(root.get(Meeting_.startTime), end));
Predicate
p
=
cb
.
greaterThanOrEqualTo
(
root
.
get
(
Meeting_
.
completedTime
),
start
);
p
=
cb
.
and
(
p
,
cb
.
lessThanOrEqualTo
(
root
.
get
(
Meeting_
.
completedTime
),
end
));
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Meeting_
.
room
),
roomId
));
cq
.
select
(
root
.
get
(
Meeting_
.
id
)).
where
(
p
);
return
em
.
createQuery
(
cq
).
getResultList
();
}
public
List
<
String
>
listWithPersonWithDate
(
String
person
,
Date
start
,
Date
end
)
throws
Exception
{
EntityManager
em
=
this
.
entityManagerContainer
().
get
(
Meeting
.
class
);
...
...
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/ActionListOnDayByRoomID.java
0 → 100644
浏览文件 @
d8ac23a1
package
com.x.meeting.assemble.control.jaxrs.meeting
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.tools.SortTools
;
import
com.x.meeting.assemble.control.Business
;
import
com.x.meeting.assemble.control.WrapTools
;
import
com.x.meeting.assemble.control.wrapout.WrapOutMeeting
;
import
com.x.meeting.core.entity.Meeting
;
class
ActionListOnDayByRoomID
extends
BaseAction
{
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
,
Integer
year
,
Integer
month
,
Integer
day
,
String
roomId
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
YEAR
,
year
);
calendar
.
set
(
Calendar
.
MONTH
,
month
-
1
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
day
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
0
);
Date
start
=
calendar
.
getTime
();
/** 一天内 */
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
1
);
calendar
.
add
(
Calendar
.
MILLISECOND
,
-
1
);
Date
end
=
calendar
.
getTime
();
List
<
String
>
ids
=
new
ArrayList
<>();
ids
=
business
.
meeting
().
listWithDateAndRoom
(
start
,
end
,
roomId
);
List
<
Wo
>
wos
=
Wo
.
copier
.
copy
(
emc
.
list
(
Meeting
.
class
,
ids
));
WrapTools
.
decorate
(
business
,
wos
,
effectivePerson
);
WrapTools
.
setAttachment
(
business
,
wos
);
SortTools
.
asc
(
wos
,
false
,
"startTime"
);
result
.
setData
(
wos
);
return
result
;
}
}
public
static
class
Wo
extends
WrapOutMeeting
{
private
static
final
long
serialVersionUID
=
4609263020989488356L
;
public
static
WrapCopier
<
Meeting
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Meeting
.
class
,
Wo
.
class
,
null
,
Wo
.
Excludes
);
}
}
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/MeetingAction.java
浏览文件 @
d8ac23a1
...
...
@@ -19,6 +19,7 @@ import javax.ws.rs.core.MediaType;
import
com.google.gson.JsonElement
;
import
com.x.base.core.project.annotation.JaxrsDescribe
;
import
com.x.base.core.project.annotation.JaxrsMethodDescribe
;
import
com.x.base.core.project.annotation.JaxrsParameterDescribe
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.HttpMediaType
;
...
...
@@ -427,6 +428,24 @@ public class MeetingAction extends BaseAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"列示指定会议室id、指定日期的会议."
,
action
=
ActionListOnDayByRoomID
.
class
)
@GET
@Path
(
"list/year/{year}/month/{month}/day/{day}/{roomId}"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listOnDayByRoomID
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"年份"
)
@PathParam
(
"year"
)
Integer
year
,
@JaxrsParameterDescribe
(
"月份"
)
@PathParam
(
"month"
)
Integer
month
,
@JaxrsParameterDescribe
(
"日"
)
@PathParam
(
"day"
)
Integer
day
,
@JaxrsParameterDescribe
(
"会议室记录ID"
)
@PathParam
(
"roomId"
)
String
roomId
)
{
ActionResult
<
List
<
ActionListOnDayByRoomID
.
Wo
>>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionListOnDayByRoomID
().
execute
(
effectivePerson
,
year
,
month
,
day
,
roomId
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"列示等待我确认的会议."
,
action
=
ActionWaitConfirm
.
class
)
@GET
@Path
(
"list/wait/confirm"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录