New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.DefaultScore; |
| | | import com.ycl.platform.service.IDefaultScoreService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 合同打分Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/default/score") |
| | | public class DefaultScoreController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDefaultScoreService defaultScoreService; |
| | | |
| | | /** |
| | | * 查询合同打分列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DefaultScore defaultScore) |
| | | { |
| | | startPage(); |
| | | List<DefaultScore> list = defaultScoreService.selectDefaultScoreList(defaultScore); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出合同打分列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:export')") |
| | | @Log(title = "合同打分", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DefaultScore defaultScore) |
| | | { |
| | | List<DefaultScore> list = defaultScoreService.selectDefaultScoreList(defaultScore); |
| | | ExcelUtil<DefaultScore> util = new ExcelUtil<DefaultScore>(DefaultScore.class); |
| | | util.exportExcel(response, list, "合同打分数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取合同打分详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(defaultScoreService.selectDefaultScoreById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同打分 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:add')") |
| | | @Log(title = "合同打分", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DefaultScore defaultScore) |
| | | { |
| | | return toAjax(defaultScoreService.insertDefaultScore(defaultScore)); |
| | | } |
| | | |
| | | /** |
| | | * 修改合同打分 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:edit')") |
| | | @Log(title = "合同打分", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DefaultScore defaultScore) |
| | | { |
| | | return toAjax(defaultScoreService.updateDefaultScore(defaultScore)); |
| | | } |
| | | |
| | | /** |
| | | * 删除合同打分 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:score:remove')") |
| | | @Log(title = "合同打分", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(defaultScoreService.deleteDefaultScoreByIds(ids)); |
| | | } |
| | | } |