|
@@ -27,14 +27,14 @@ class openmeetClassAction extends openapiAction
|
|
}
|
|
}
|
|
|
|
|
|
$sqlStr = /** @lang text */
|
|
$sqlStr = /** @lang text */
|
|
- "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state
|
|
|
|
|
|
+ "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, is_hand
|
|
FROM `[Q]meeting`
|
|
FROM `[Q]meeting`
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
and end_time > now()
|
|
and end_time > now()
|
|
and status = 1
|
|
and status = 1
|
|
and meeting_room = '".$rawData['room_name']."'
|
|
and meeting_room = '".$rawData['room_name']."'
|
|
union all
|
|
union all
|
|
- SELECT 2 as type, id, title, start_time, end_time, compere, meet_state
|
|
|
|
|
|
+ SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, is_hand
|
|
FROM `[Q]meeting_key`
|
|
FROM `[Q]meeting_key`
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
and end_time > now()
|
|
and end_time > now()
|
|
@@ -83,7 +83,7 @@ class openmeetClassAction extends openapiAction
|
|
} else {
|
|
} else {
|
|
m("meeting_key")->update(["meet_state"=>0], "id=".$meeting['id']);
|
|
m("meeting_key")->update(["meet_state"=>0], "id=".$meeting['id']);
|
|
}
|
|
}
|
|
- } else if (strtotime($meeting['start_time']) < strtotime(date("Y-m-d H:i:s"))) {
|
|
|
|
|
|
+ } else if (strtotime($meeting['start_time']) < strtotime(date("Y-m-d H:i:s")) && $meeting['is_hand'] != 2) {
|
|
if ($meeting['type'] == 1) {
|
|
if ($meeting['type'] == 1) {
|
|
m("meeting")->update(["meet_state"=>1], "id=".$meeting['id']);
|
|
m("meeting")->update(["meet_state"=>1], "id=".$meeting['id']);
|
|
} else {
|
|
} else {
|
|
@@ -93,7 +93,8 @@ class openmeetClassAction extends openapiAction
|
|
}
|
|
}
|
|
|
|
|
|
$nowMeetingSql = /** @lang text */
|
|
$nowMeetingSql = /** @lang text */
|
|
- "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees
|
|
|
|
|
|
+ "select * from (
|
|
|
|
+ SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees
|
|
FROM `[Q]meeting`
|
|
FROM `[Q]meeting`
|
|
where status = 1
|
|
where status = 1
|
|
and start_time < now()
|
|
and start_time < now()
|
|
@@ -102,11 +103,12 @@ class openmeetClassAction extends openapiAction
|
|
union all
|
|
union all
|
|
SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, null as attendees
|
|
SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, null as attendees
|
|
FROM `[Q]meeting_key`
|
|
FROM `[Q]meeting_key`
|
|
- where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'";
|
|
|
|
|
|
+ where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'
|
|
|
|
+ ) as t order by start_time";
|
|
$nowMeetingData = $this->db->getall($nowMeetingSql);
|
|
$nowMeetingData = $this->db->getall($nowMeetingSql);
|
|
|
|
|
|
|
|
|
|
- if (count($nowMeetingData) > 0) {
|
|
|
|
|
|
+ if (count($nowMeetingData) > 0 && $nowMeetingData[0]['meet_state'] != 2) {
|
|
$nowMeet = $nowMeetingData[0];
|
|
$nowMeet = $nowMeetingData[0];
|
|
|
|
|
|
$data['basic_information'] = [
|
|
$data['basic_information'] = [
|
|
@@ -122,18 +124,28 @@ class openmeetClassAction extends openapiAction
|
|
if ($nowMeet['type'] == 2) {
|
|
if ($nowMeet['type'] == 2) {
|
|
|
|
|
|
$topics = $this->db->getall("select `id`, `topic_title`, `topic_attendee`, `topic_state`, `topic_info` from `[Q]meeting_topics` where mid = {$nowMeet['id']} order by sort");
|
|
$topics = $this->db->getall("select `id`, `topic_title`, `topic_attendee`, `topic_state`, `topic_info` from `[Q]meeting_topics` where mid = {$nowMeet['id']} order by sort");
|
|
-
|
|
|
|
|
|
+ $j = count($topics);
|
|
|
|
+ $meetingTopic = array_fill(0, count($topics), null);
|
|
// 会议议题处理
|
|
// 会议议题处理
|
|
for ($i = 0; $i < count($topics); $i++) {
|
|
for ($i = 0; $i < count($topics); $i++) {
|
|
$info = $topics[$i];
|
|
$info = $topics[$i];
|
|
- $data['meetingTopic'][$i]['state'] = $info['topic_state'];
|
|
|
|
- $data['meetingTopic'][$i]['tip'] = m("meeting")->ytarra[$info['topic_state']];
|
|
|
|
- $data['meetingTopic'][$i]['text'] = $info['topic_title'];
|
|
|
|
|
|
+ // 用于排序(已结束放最后)
|
|
|
|
+ if ($info['topic_state'] == 3) {
|
|
|
|
+ $index = $j - $i - 1;
|
|
|
|
+ } else {
|
|
|
|
+ $index = $i - 2;
|
|
|
|
+ }
|
|
|
|
+ $meetingTopic[$index]['state'] = $info['topic_state'];
|
|
|
|
+ $meetingTopic[$index]['tip'] = m("meeting")->ytarra[$info['topic_state']];
|
|
|
|
+ $meetingTopic[$index]['text'] = $info['topic_title'];
|
|
|
|
+
|
|
if ($info['topic_state'] == 2) {
|
|
if ($info['topic_state'] == 2) {
|
|
|
|
+ // 当前议题 + 参会人员
|
|
$data['participants'][] = [
|
|
$data['participants'][] = [
|
|
"topics" => $info['topic_title'],
|
|
"topics" => $info['topic_title'],
|
|
"personnel_list" => str_replace("\n", "<br />", $info['topic_info']),
|
|
"personnel_list" => str_replace("\n", "<br />", $info['topic_info']),
|
|
];
|
|
];
|
|
|
|
+ // 下一议题 + 参会人员
|
|
if (isset($topics[$i + 1])) {
|
|
if (isset($topics[$i + 1])) {
|
|
$data['participants'][] = [
|
|
$data['participants'][] = [
|
|
"topics" => $topics[$i + 1]['topic_title'],
|
|
"topics" => $topics[$i + 1]['topic_title'],
|
|
@@ -142,14 +154,16 @@ class openmeetClassAction extends openapiAction
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ $data['meetingTopic'] = $meetingTopic;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// 普通会议,议题为空
|
|
// 普通会议,议题为空
|
|
$data['meetingTopic'] = [];
|
|
$data['meetingTopic'] = [];
|
|
|
|
+ // 基础会议人员信息
|
|
$data['participants'] = [
|
|
$data['participants'] = [
|
|
[
|
|
[
|
|
"topics"=>$nowMeet['title'],
|
|
"topics"=>$nowMeet['title'],
|
|
- "personnel_list"=>$nowMeet['attendees'],
|
|
|
|
|
|
+ "personnel_list"=>str_replace("\n", "<br />", $nowMeet['attendees']),
|
|
]
|
|
]
|
|
];
|
|
];
|
|
}
|
|
}
|