| | |
| | | import java.io.*; |
| | | import java.util.*; |
| | | |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.domain.FunddetailReqVo; |
| | | import com.ruoyi.project.domain.ServiceFund; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import freemarker.template.TemplateException; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import com.ruoyi.project.domain.vo.TaxMoneyVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @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)); |
| | | } |
| | |
| | | @ApiOperation("根据受益人编号获取费用申请明细信息") |
| | | @PostMapping("/getDataBybeneficiaryNo") |
| | | public AjaxResult getDataBybeneficiaryNo(@RequestBody FunddetailReqVo funddetailReqVo) { |
| | | // if (StringUtils.isEmpty(funddetailReqVo.getBeneficiaryNo())) { |
| | | // return AjaxResult.error("受益人编号不能为空"); |
| | | // } |
| | | List<ServiceFunddetail> dataBybeneficiaryNo = serviceFunddetailService.getDataBybeneficiaryNo(funddetailReqVo); |
| | | return AjaxResult.success(dataBybeneficiaryNo); |
| | | } |
| | | |
| | | /** |
| | | * 根据受益人编号获取税费金额 |
| | | * |
| | | * @param taxMoneyVo 受益人编号 |
| | | * @return |
| | | */ |
| | | @ApiOperation("根据受益人编号获取税费金额") |
| | | @PostMapping("/getTaxByBeneFiciaryNo") |
| | | public AjaxResult getTaxBeforeByBeneFiciaryNo(@RequestBody TaxMoneyVO taxMoneyVo) { |
| | | return AjaxResult.success(serviceFunddetailService.getTaxByBeneFiciaryNo(taxMoneyVo)); |
| | | } |
| | | |
| | | /** |
| | | * 根据税后金额获取税前金额 |
| | | * |
| | | * @param taxMoneyVo 税后工资 |
| | | * @return |
| | | */ |
| | | @ApiOperation("根据税后工资获取税前金额") |
| | | @PostMapping("/getTaxBeforeByAfterMoney") |
| | | public AjaxResult getTaxBeforeByAfterMoney(@RequestBody TaxMoneyVO taxMoneyVo) { |
| | | return AjaxResult.success(serviceFunddetailService.getTaxBeforeByAfterMoney(taxMoneyVo)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getFundDetail/{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)); |
| | | } |
| | | } |