| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import java.io.*; |
| | | import java.util.*; |
| | | |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.vo.TaxMoneyVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.project.domain.ServiceFunddetail; |
| | | import com.ruoyi.project.service.IServiceFunddetailService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.ServiceFunddetail; |
| | | import com.ruoyi.project.domain.vo.TaxMoneyVO; |
| | | import com.ruoyi.project.service.IServiceFunddetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 费用申请明细Controller |
| | |
| | | @ApiOperation("修改费用申请明细") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:edit')") |
| | | @Log(title = "费用申请明细", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | return toAjax(serviceFunddetailService.updateById(serviceFunddetail)); |
| | |
| | | @ApiOperation("删除费用申请明细") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:remove')") |
| | | @Log(title = "费用申请明细", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceFunddetailService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | |
| | | * 删除报销申请明细并修改金额 |
| | | */ |
| | | @ApiOperation("删除报销申请明细并修改金额") |
| | | @Log(title = "报销申请明细", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteDetail/{id}") |
| | | @GetMapping("/deleteDetail/{id}") |
| | | public AjaxResult deleteDetail(@PathVariable Long id) { |
| | | return AjaxResult.success(serviceFunddetailService.deleteDetail(id)); |
| | | } |
| | |
| | | public AjaxResult getFundDetail(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceFunddetailService.getFundDetail(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据条件算税") |
| | | @PostMapping("/calculateTax") |
| | | public AjaxResult calculateTax(@RequestBody List<ServiceFunddetail> serviceFunddetails) { |
| | | return AjaxResult.success(serviceFunddetailService.calculateTax(serviceFunddetails)); |
| | | } |
| | | |
| | | // /** |
| | | // * 绩效计算 |
| | | // * <p> |
| | | // * beneficiaryNO 受益人编号 |
| | | // */ |
| | | // @ApiOperation("绩效计算") |
| | | // @PostMapping(value = "/performance") |
| | | // public AjaxResult performance(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | // if (StringUtils.isBlank(serviceFunddetail.getBeneficiaryno())) { |
| | | // return AjaxResult.error("受益人编号为空"); |
| | | // } |
| | | // |
| | | // return AjaxResult.success(serviceFunddetailService.performance(serviceFunddetail)); |
| | | // } |
| | | |
| | | } |