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