| | |
| | | import com.ycl.platform.service.ICalculateRuleService; |
| | | 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; |
| | |
| | | * 核算规则Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | * @date 2024-04-03 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/check/calculateRule") |
| | | @RequestMapping("/calculate/rule") |
| | | public class CalculateRuleController extends BaseController |
| | | { |
| | | @Autowired |
| | |
| | | /** |
| | | * 查询核算规则列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:list')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(CalculateRule calculateRule) |
| | | public AjaxResult list(CalculateRule calculateRule) |
| | | { |
| | | startPage(); |
| | | List<CalculateRule> list = calculateRuleService.selectCalculateRuleList(calculateRule); |
| | | return getDataTable(list); |
| | | return success(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出核算规则列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:export')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:export')") |
| | | @Log(title = "核算规则", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, CalculateRule calculateRule) |
| | |
| | | /** |
| | | * 获取核算规则详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:query')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 新增核算规则 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:add')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:add')") |
| | | @Log(title = "核算规则", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody CalculateRule calculateRule) |
| | |
| | | /** |
| | | * 修改核算规则 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:edit')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:edit')") |
| | | @Log(title = "核算规则", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody CalculateRule calculateRule) |
| | |
| | | /** |
| | | * 删除核算规则 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:remove')") |
| | | @PreAuthorize("@ss.hasPermi('calculate:rule:remove')") |
| | | @Log(title = "核算规则", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |