| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | import com.ycl.platform.service.ICheckTemplateService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:template:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(CheckTemplate checkTemplate) |
| | | public TableDataInfo list(CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | startPage(); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplate); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplateDTO); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:template:export')") |
| | | @Log(title = "考核模板", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, CheckTemplate checkTemplate) |
| | | public void export(HttpServletResponse response, CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplate); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplateDTO); |
| | | ExcelUtil<CheckTemplate> util = new ExcelUtil<CheckTemplate>(CheckTemplate.class); |
| | | util.exportExcel(response, list, "考核模板数据"); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:template:add')") |
| | | @Log(title = "考核模板", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody CheckTemplate checkTemplate) |
| | | public AjaxResult add(@RequestBody CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | return toAjax(checkTemplateService.insertCheckTemplate(checkTemplate)); |
| | | return toAjax(checkTemplateService.insertCheckTemplate(checkTemplateDTO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | return toAjax(checkTemplateService.deleteCheckTemplateByIds(ids)); |
| | | } |
| | | |
| | | @GetMapping("/pullList") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result pullList() { |
| | | return checkTemplateService.pullList(); |
| | | } |
| | | } |