| | |
| | | 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.NotRepeatCommit; |
| | | 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 lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 费用申请明细Controller |
| | |
| | | * @author ruoyi |
| | | * @date 2022-01-25 |
| | | */ |
| | | @Slf4j |
| | | @Api("费用申请明细") |
| | | @RestController |
| | | @RequestMapping("/project/funddetail") |
| | |
| | | @ApiOperation("新增费用申请明细") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:add')") |
| | | @Log(title = "费用申请明细", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @PostMapping("/add") |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | return toAjax(serviceFunddetailService.save(serviceFunddetail)); |
| | | boolean save = serviceFunddetailService.save(serviceFunddetail); |
| | | return AjaxResult.success(serviceFunddetail); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation("修改费用申请明细") |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:edit')") |
| | | @Log(title = "费用申请明细", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @RepeatSubmit |
| | | @PostMapping("/edit") |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult edit(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | log.info("修改的数据信息:{}", 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("根据受益人编号获取费用申请明细信息") |
| | | @ApiOperation("根据受益人身份证号获取费用申请明细信息") |
| | | @PostMapping("/getDataBybeneficiaryNo") |
| | | public AjaxResult getDataBybeneficiaryNo(@RequestBody FunddetailReqVo funddetailReqVo) { |
| | | List<ServiceFunddetail> dataBybeneficiaryNo = serviceFunddetailService.getDataBybeneficiaryNo(funddetailReqVo); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据受益人编号获取税费金额 |
| | | * 根据受益人身份证编号获取税费金额 |
| | | * |
| | | * @param taxMoneyVo 受益人编号 |
| | | * @param taxMoneyVo 身份证编号 |
| | | * @return |
| | | */ |
| | | @ApiOperation("根据受益人编号获取税费金额") |
| | | @ApiOperation("根据受益人身份证编号获取税费金额") |
| | | @PostMapping("/getTaxByBeneFiciaryNo") |
| | | public AjaxResult getTaxBeforeByBeneFiciaryNo(@RequestBody TaxMoneyVO taxMoneyVo) { |
| | | return AjaxResult.success(serviceFunddetailService.getTaxByBeneFiciaryNo(taxMoneyVo)); |
| | |
| | | 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)); |
| | | // } |
| | | |
| | | } |