| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountIncome; |
| | | import com.ruoyi.account.service.AccountFileService; |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.service.IQualityInspectFileService; |
| | | import com.ruoyi.quality.service.IQualityInspectParamService; |
| | | import com.ruoyi.quality.service.IQualityInspectService; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @RestController |
| | | @RequestMapping("/account/accountIncome") |
| | | @Tag(name = "财务管理--收入管理") |
| | | public class AccountIncomeController { |
| | | public class AccountIncomeController extends BaseController { |
| | | |
| | | @Resource |
| | | private AccountIncomeService accountIncomeService; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "新增") |
| | | public AjaxResult add(@RequestBody AccountIncome accountIncome) { |
| | | public R<?> add(@RequestBody AccountIncome accountIncome) { |
| | | accountIncome.setInputTime(new Date()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | accountIncome.setInputUser(loginUser.getNickName()); |
| | | return AjaxResult.success(accountIncomeService.save(accountIncome)); |
| | | return R.ok(accountIncomeService.save(accountIncome)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "删除") |
| | | public AjaxResult delQualityInspect(@RequestBody List<Integer> ids) { |
| | | public R<?> delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | return R.fail("请选择至少一条数据"); |
| | | } |
| | | //删除检验单 |
| | | return AjaxResult.success(accountIncomeService.removeBatchByIds(ids)); |
| | | return R.ok(accountIncomeService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | @Operation(summary = "修改") |
| | | public AjaxResult update(@RequestBody AccountIncome accountIncome) { |
| | | return AjaxResult.success(accountIncomeService.updateById(accountIncome)); |
| | | public R<?> update(@RequestBody AccountIncome accountIncome) { |
| | | return R.ok(accountIncomeService.updateById(accountIncome)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "分页查询") |
| | | public AjaxResult accountIncomeListPage(Page page, AccountIncome accountIncome) { |
| | | return AjaxResult.success(accountIncomeService.accountIncomeListPage(page, accountIncome)); |
| | | public R<?> accountIncomeListPage(Page page, AccountIncome accountIncome) { |
| | | return R.ok(accountIncomeService.accountIncomeListPage(page, accountIncome)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @Operation(summary = "详情") |
| | | public AjaxResult accountIncomeDetail(@PathVariable("id") Integer id) { |
| | | return AjaxResult.success(accountIncomeService.getById(id)); |
| | | public R<?> accountIncomeDetail(@PathVariable("id") Integer id) { |
| | | return R.ok(accountIncomeService.getById(id)); |
| | | } |
| | | |
| | | /** |