| | |
| | | import com.ruoyi.dto.DateQueryDto; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/account/accountExpense") |
| | | @Api(tags = "财务管理--支出管理") |
| | | @Tag(name = "财务管理--支出管理") |
| | | public class AccountExpenseController { |
| | | |
| | | @Resource |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增") |
| | | @Operation(summary = "新增") |
| | | public AjaxResult add(@RequestBody AccountExpense accountExpense) { |
| | | accountExpense.setInputTime(new Date()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除") |
| | | @Operation(summary = "删除") |
| | | public AjaxResult delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改") |
| | | @Operation(summary = "修改") |
| | | public AjaxResult update(@RequestBody AccountExpense accountExpense) { |
| | | return AjaxResult.success(accountExpenseService.updateById(accountExpense)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("分页查询") |
| | | @Operation(summary = "分页查询") |
| | | public AjaxResult accountExpenseListPage(Page page, AccountExpense accountExpense) { |
| | | return AjaxResult.success(accountExpenseService.accountExpenseListPage(page, accountExpense)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("详情") |
| | | @Operation(summary = "详情") |
| | | public AjaxResult accountExpenseDetail(@PathVariable("id") Integer id) { |
| | | return AjaxResult.success(accountExpenseService.getById(id)); |
| | | } |
| | |
| | | * @param accountExpense |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出") |
| | | @Operation(summary = "导出") |
| | | public void accountExpenseExport(HttpServletResponse response,AccountExpense accountExpense) { |
| | | accountExpenseService.accountExpenseExport(response, accountExpense); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/report/forms") |
| | | @ApiOperation("财务报表图表查询") |
| | | @Operation(summary = "财务报表图表查询") |
| | | public AjaxResult report(DateQueryDto dateQueryDto) { |
| | | return AjaxResult.success(accountExpenseService.report(dateQueryDto)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/report/analysis") |
| | | @ApiOperation("财务报表-财务分析") |
| | | @Operation(summary = "财务报表-财务分析") |
| | | public AjaxResult analysis() { |
| | | return AjaxResult.success(accountExpenseService.analysis()); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/report/income") |
| | | @ApiOperation("财务报表图表收入年度查询") |
| | | @Operation(summary = "财务报表图表收入年度查询") |
| | | public AjaxResult reportIncome(ReportDateDto reportDateDto) { |
| | | return AjaxResult.success(accountIncomeService.reportIncome(reportDateDto)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/report/expense") |
| | | @ApiOperation("财务报表图表支出年度查询") |
| | | @Operation(summary = "财务报表图表支出年度查询") |
| | | public AjaxResult reportExpense(ReportDateDto reportDateDto) { |
| | | return AjaxResult.success(accountExpenseService.reportExpense(reportDateDto)); |
| | | } |