huminmin
5 天以前 7a8827c634b53bb1cb861ebc1fd4ac6d1ae6cb5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
package com.ruoyi.collaborativeApproval.controller;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.approve.pojo.ApproveProcess;
import com.ruoyi.collaborativeApproval.mapper.MeetDraftMapper;
import com.ruoyi.collaborativeApproval.pojo.MeetApplication;
import com.ruoyi.collaborativeApproval.pojo.MeetDraft;
import com.ruoyi.collaborativeApproval.pojo.MeetingMinutes;
import com.ruoyi.collaborativeApproval.pojo.MeetingRoom;
import com.ruoyi.collaborativeApproval.service.MeetingService;
import com.ruoyi.collaborativeApproval.vo.SearchMeetingApplicationVo;
import com.ruoyi.collaborativeApproval.vo.SearchMeetingDraftVo;
import com.ruoyi.collaborativeApproval.vo.SearchMeetingRoomVo;
import com.ruoyi.collaborativeApproval.vo.SearchMeetingUseVo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletResponse;
import java.util.List;
 
/**
 * 关于会议controller
 *
 * @author buhuazhen
 * @date 2025/9/15
 * @email 3038525872@qq.com
 */
@RestController
@RequestMapping("/meeting")
@RequiredArgsConstructor
@Api(tags = "会议")
public class MeetingController {
    private final MeetingService meetingService;
 
    @PostMapping("/roomList")
    @Log(title = "获取会议室列表", businessType = BusinessType.OTHER)
    public R getMeetingRoomList(@RequestBody SearchMeetingRoomVo vo) {
 
        return R.ok(meetingService.getMeetingRoomList(vo));
    }
 
    @PostMapping("/saveRoom")
    @Log(title = "保存会议室", businessType = BusinessType.INSERT)
    public R saveRoom(@RequestBody MeetingRoom meetingRoom) {
        meetingService.saveMeetRoom(meetingRoom);
        return R.ok();
    }
 
    @GetMapping("/room/{id}")
    @Log(title = "获取会议室详情", businessType = BusinessType.OTHER)
    public R getRoomById(@PathVariable Long id) {
        return R.ok(meetingService.findMeetRoomById(id));
    }
 
    @DeleteMapping("/delRoom/{id}")
    @Log(title = "删除会议室", businessType = BusinessType.DELETE)
    public R deleteRoom(@PathVariable Long id) {
        meetingService.deleteMeetingRoom(id);
        return R.ok();
    }
 
    @GetMapping("/roomEnum")
    @Log(title = "获取会议室枚举", businessType = BusinessType.OTHER)
    public R getRoomEnum() {
        return R.ok(meetingService.getRoomEnum());
    }
 
    @PostMapping("/draftList")
    @Log(title = "获取会议稿列表", businessType = BusinessType.OTHER)
    public R getMeetingDraftList(@RequestBody SearchMeetingDraftVo vo) {
        return R.ok(meetingService.getMeetingDraftList(vo));
    }
 
    @PostMapping("/saveDraft")
    @Log(title = "保存会议稿", businessType = BusinessType.INSERT)
    public R saveMeetingDraft(@RequestBody MeetDraft meetDraft) {
        meetingService.saveMeetDraft(meetDraft);
        return R.ok();
    }
 
    @DeleteMapping("/delDraft/{id}")
    @Log(title = "删除会议稿", businessType = BusinessType.DELETE)
    public R deleteMeetingDraft(@PathVariable Long id) {
        meetingService.deleteMeetingDraft(id);
        return R.ok();
    }
 
    @PostMapping("/saveMeetingApplication")
    @Log(title = "保存会议审批", businessType = BusinessType.INSERT)
    public R saveMeetApplication(@RequestBody MeetApplication meetApplication) {
       return meetingService.saveMeetApplication(meetApplication);
    }
 
    @PostMapping("/applicationList")
    @Log(title = "获取会议审批列表", businessType = BusinessType.OTHER)
    public R getMeetingApplicationList(@RequestBody SearchMeetingApplicationVo vo) {
        return R.ok(meetingService.getMeetingApplicationList(vo));
    }
 
 
 
    @PostMapping("/meetingUseList")
    @Log(title = "获取会议列表", businessType = BusinessType.OTHER)
    public R meetingUseList(@RequestBody SearchMeetingUseVo vo) {
        return R.ok(meetingService.meetingUseList(vo));
    }
 
 
    @PostMapping("/meetingPublishList")
    @Log(title = "获取会议发布列表", businessType = BusinessType.OTHER)
    public R meetingPublishList(@RequestBody SearchMeetingApplicationVo vo) {
        return R.ok(meetingService.getMeetingPublishList(vo));
    }
 
 
    @GetMapping("/getMeetingMinutesByMeetingId/{id}")
    @Log(title = "获取会议纪要", businessType = BusinessType.OTHER)
    public R getMeetingMinutes(@PathVariable Long id) {
        return R.ok(meetingService.getMeetingMinutesById(id));
    }
 
    @PostMapping("/saveMeetingMinutes")
    @Log(title = "保存会议纪要", businessType = BusinessType.INSERT)
    public R saveMeetingMinutes(@RequestBody MeetingMinutes meetingMinutes) {
        meetingService.saveMeetingMinutes(meetingMinutes);
        return R.ok();
    }
 
    @GetMapping("/getMeetSummary")
    @Log(title = "获取会议看板", businessType = BusinessType.OTHER)
    public R getMeetSummary() {
        return R.ok(meetingService.getMeetSummary());
    }
 
    @GetMapping("/getMeetSummaryItems")
    @Log(title = "获取会议看板详情", businessType = BusinessType.OTHER)
    public R getMeetSummaryItems() {
        return R.ok(meetingService.getMeetSummaryItems());
    }
 
    @ApiOperation(value = "会议室设置导出")
    @PostMapping("/export")
    @Log(title = "导出会议室设置", businessType = BusinessType.EXPORT)
    public void export(HttpServletResponse response) {
        List<MeetingRoom> accountExpenses = meetingService.list();
        ExcelUtil<MeetingRoom> util = new ExcelUtil<MeetingRoom>(MeetingRoom.class);
        util.exportExcel(response, accountExpenses, "会议室设置导出");
    }
 
    private final MeetDraftMapper meetDraftMapper;
 
    @ApiOperation(value = "会议草稿导出")
    @PostMapping("/exportOne")
    @Log(title = "导出会议草稿", businessType = BusinessType.EXPORT)
    public void exportOne(HttpServletResponse response) {
        List<MeetDraft> accountExpenses = meetDraftMapper.selectList(new LambdaQueryWrapper<MeetDraft>());
        ExcelUtil<MeetDraft> util = new ExcelUtil<MeetDraft>(MeetDraft.class);
        util.exportExcel(response, accountExpenses, "会议草稿导出");
    }
 
}