| | |
| | | return ApiResponse.success(taxesService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("列表查询") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:taxes:query") |
| | | public ApiResponse<List<Taxes>> findList (@RequestBody Taxes taxes) { |
| | | return ApiResponse.success(taxesService.findListForCompany(taxes)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:taxes:exportExcel") |
| | |
| | | ExcelExporter.build(Taxes.class).export(taxesService.findPage(pageWrap).getRecords(), "发票信息表", response); |
| | | } |
| | | |
| | | @ApiOperation("获取企业信息") |
| | | @GetMapping("/getCompanyDetail") |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:taxes:query") |
| | | public ApiResponse<Taxes> getCompanyDetail() { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作"); |
| | | } |
| | | return ApiResponse.success(taxesService.findById(loginUserInfo.getCompanyId())); |
| | | public ApiResponse<Taxes> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(taxesService.findById(id)); |
| | | } |
| | | |
| | | // @ApiOperation("获取企业信息") |
| | | // @GetMapping("/getCompanyDetail") |
| | | // @RequiresPermissions("business:taxes:query") |
| | | // public ApiResponse<Taxes> getCompanyDetail() { |
| | | // LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | // if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作"); |
| | | // } |
| | | // return ApiResponse.success(taxesService.findById(loginUserInfo.getCompanyId())); |
| | | // } |
| | | |
| | | @ApiOperation("提交委托投报开票") |
| | | @PostMapping("/entrustInvoicing") |
| | | public ApiResponse entrustInvoicing(@RequestBody EntrustInvoicingDTO entrustInvoicingDTOs) { |