From fadc9e200210538358029467a58db8e8c2632091 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 23 七月 2025 15:59:13 +0800 Subject: [PATCH] 修改 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/YcFinancialManagementController.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/YcFinancialManagementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/YcFinancialManagementController.java index c2e080c..08d042c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/YcFinancialManagementController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/YcFinancialManagementController.java @@ -72,6 +72,10 @@ @Log(title = "财务管理-添加", businessType = BusinessType.INSERT) @PostMapping(value = "/add") public R<Boolean> add(@RequestBody YcFinancialManagement dto) { + YcRevenueExpenditureType ycRevenueExpenditureType = ycRevenueExpenditureTypeService.getById(dto.getTypeId()); + if(Objects.nonNull(ycRevenueExpenditureType)){ + dto.setRevenueType(ycRevenueExpenditureType.getRevenueType()); + } return R.ok(ycFinancialManagementService.save(dto)); } @@ -108,7 +112,7 @@ @ApiOperation( value = "删除财务管理") @Log(title = "财务管理-删除", businessType = BusinessType.DELETE) @DeleteMapping(value = "/deleteById") - public R<Boolean> deleteById(@RequestParam("id") Long id) { + public R<Boolean> deleteById(@RequestParam("id") Integer id) { return R.ok(ycFinancialManagementService.removeById(id)); } -- Gitblit v1.7.1