package com.yuanchu.mom.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yuanchu.mom.annotation.ValueAuth; import com.yuanchu.mom.dto.InternalMeetingDto; import com.yuanchu.mom.pojo.InternalMeeting; import com.yuanchu.mom.service.InternalMeetingService; import com.yuanchu.mom.utils.JackSonUtil; import com.yuanchu.mom.vo.Result; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.Map; /** *

* 内审会议表 前端控制器 *

* * @author * @since 2024-11-12 02:50:44 */ @Api(tags = "内审会议") @AllArgsConstructor @RestController @RequestMapping("/internalMeeting") public class InternalMeetingController { private InternalMeetingService internalMeetingService; /** * 内审会议分页查询 * @param data * @return */ @ValueAuth @ApiOperation(value = "内审会议分页查询") @PostMapping("/pageInternalMeeting") public Result> pageInternalMeeting(@RequestBody Map data) throws Exception { Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); InternalMeeting internalMeeting = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalMeeting.class); return Result.success(internalMeetingService.pageInternalMeeting(page, internalMeeting)); } /** * 内审会议新增 * @return */ @ValueAuth @ApiOperation(value = "内审会议新增") @PostMapping("/addInternalMeeting") public Result addInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ return Result.success(internalMeetingService.addInternalMeeting(internalMeeting)); } /** * 内审会议修改 * @return */ @ValueAuth @ApiOperation(value = "内审会议修改") @PostMapping("/updateInternalMeeting") public Result updateInternalMeeting(@RequestBody InternalMeetingDto internalMeeting){ return Result.success(internalMeetingService.updateInternalMeeting(internalMeeting)); } /** * 内审会议删除 * @return */ @ValueAuth @ApiOperation(value = "内审会议删除") @GetMapping("/delInternalMeeting") public Result delInternalMeeting(Integer meetingId){ return Result.success(internalMeetingService.delInternalMeeting(meetingId)); } /** * 内审会议查看详情 * @return */ @ValueAuth @ApiOperation(value = "内审会议查看详情") @GetMapping("/getInternalMeetingOne") public Result getInternalMeetingOne(Integer meetingId){ return Result.success(internalMeetingService.getInternalMeetingOne(meetingId)); } /** * 导出内审会议 * @return */ @ValueAuth @ApiOperation(value = "导出内审会议") @GetMapping("/exportInternalMeeting") public void exportInternalMeeting(Integer meetingId, HttpServletResponse response){ internalMeetingService.exportInternalMeeting(meetingId, response); } }