File was renamed from ycl-server/src/main/java/com/ycl/platform/controller/DefaultResultController.java |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.DefaultResult; |
| | | import com.ycl.platform.service.IDefaultResultService; |
| | | import com.ycl.platform.domain.entity.ContractResult; |
| | | import com.ycl.platform.service.IContractResultService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | |
| | | * @date 2024-04-01 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/default/result") |
| | | public class DefaultResultController extends BaseController |
| | | @RequestMapping("/contract/result") |
| | | public class ContractResultController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDefaultResultService defaultResultService; |
| | | private IContractResultService defaultResultService; |
| | | |
| | | /** |
| | | * 查询合同考核结果列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:result:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DefaultResult defaultResult) |
| | | public TableDataInfo list(ContractResult contractResult) |
| | | { |
| | | startPage(); |
| | | List<DefaultResult> list = defaultResultService.selectDefaultResultList(defaultResult); |
| | | List<ContractResult> list = defaultResultService.selectDefaultResultList(contractResult); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:result:export')") |
| | | @Log(title = "合同考核结果", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DefaultResult defaultResult) |
| | | public void export(HttpServletResponse response, ContractResult contractResult) |
| | | { |
| | | List<DefaultResult> list = defaultResultService.selectDefaultResultList(defaultResult); |
| | | ExcelUtil<DefaultResult> util = new ExcelUtil<DefaultResult>(DefaultResult.class); |
| | | List<ContractResult> list = defaultResultService.selectDefaultResultList(contractResult); |
| | | ExcelUtil<ContractResult> util = new ExcelUtil<ContractResult>(ContractResult.class); |
| | | util.exportExcel(response, list, "合同考核结果数据"); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:result:add')") |
| | | @Log(title = "合同考核结果", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DefaultResult defaultResult) |
| | | public AjaxResult add(@RequestBody ContractResult contractResult) |
| | | { |
| | | return toAjax(defaultResultService.insertDefaultResult(defaultResult)); |
| | | return toAjax(defaultResultService.insertDefaultResult(contractResult)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:result:edit')") |
| | | @Log(title = "合同考核结果", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DefaultResult defaultResult) |
| | | public AjaxResult edit(@RequestBody ContractResult contractResult) |
| | | { |
| | | return toAjax(defaultResultService.updateDefaultResult(defaultResult)); |
| | | return toAjax(defaultResultService.updateDefaultResult(contractResult)); |
| | | } |
| | | |
| | | /** |