package com.ruoyi.web.controller.project; import java.util.Arrays; import java.util.List; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.RepeatSubmit; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.project.domain.ServiceMeetingParticipant; import com.ruoyi.project.service.IServiceMeetingParticipantService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 参会人员Controller * * @author ls * @date 2025-12-28 */ @Api(description = "参会人员") @RestController @RequestMapping("/project/participant") public class ServiceMeetingParticipantController extends BaseController { @Autowired private IServiceMeetingParticipantService serviceMeetingParticipantService; /** * 查询参会人员列表 */ @ApiOperation("查询参会人员列表") // @PreAuthorize("@ss.hasPermi('project:participant:list')") @PostMapping("/list") public TableDataInfo list(ServiceMeetingParticipant serviceMeetingParticipant) { startPage(); List list = serviceMeetingParticipantService.queryList(serviceMeetingParticipant); return getDataTable(list); } /** * 导出参会人员列表 */ @ApiOperation("导出参会人员列表") // @PreAuthorize("@ss.hasPermi('project:participant:export')") @Log(title = "参会人员", businessType = BusinessType.EXPORT) @GetMapping("/export") public AjaxResult export(ServiceMeetingParticipant serviceMeetingParticipant) { List list = serviceMeetingParticipantService.queryList(serviceMeetingParticipant); ExcelUtil util = new ExcelUtil(ServiceMeetingParticipant.class); return util.exportExcel(list, "参会人员数据"); } /** * 获取参会人员详细信息 */ @ApiOperation("获取参会人员详细信息") // @PreAuthorize("@ss.hasPermi('project:participant:query')") @GetMapping(value = "/getInfo/{id}") public AjaxResult getInfo(@PathVariable("id") Integer id) { return AjaxResult.success(serviceMeetingParticipantService.getById(id)); } /** * 新增参会人员 */ @ApiOperation("新增参会人员") // @PreAuthorize("@ss.hasPermi('project:participant:add')") @Log(title = "参会人员", businessType = BusinessType.INSERT) @PostMapping("/add") @RepeatSubmit public AjaxResult add(@RequestBody ServiceMeetingParticipant serviceMeetingParticipant) { return toAjax(serviceMeetingParticipantService.save(serviceMeetingParticipant)); } /** * 修改参会人员 */ @ApiOperation("修改参会人员") // @PreAuthorize("@ss.hasPermi('project:participant:edit')") @Log(title = "参会人员", businessType = BusinessType.UPDATE) @PostMapping("/edit") @RepeatSubmit public AjaxResult edit(@RequestBody ServiceMeetingParticipant serviceMeetingParticipant) { return toAjax(serviceMeetingParticipantService.updateById(serviceMeetingParticipant)); } /** * 删除参会人员 */ @ApiOperation("删除参会人员") // @PreAuthorize("@ss.hasPermi('project:participant:remove')") @Log(title = "参会人员", businessType = BusinessType.DELETE) @GetMapping("/remove/{ids}") public AjaxResult remove(@PathVariable Integer[] ids) { return toAjax(serviceMeetingParticipantService.removeByIds(Arrays.asList(ids))); } }