|  |  | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.core.utils.Constants; | 
 |  |  | import com.doumee.dao.business.dto.DirectInvoicingDTO; | 
 |  |  | import com.doumee.dao.business.dto.EntrustInvoicingDTO; | 
 |  |  | import com.doumee.dao.business.model.Taxes; | 
 |  |  | import com.doumee.dao.business.vo.TaxesInvoicingVO; | 
 |  |  | import com.doumee.service.business.TaxesService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | 
 |  |  |     @ApiOperation("提交委托投报开票") | 
 |  |  |     @PostMapping("/entrustInvoicing") | 
 |  |  |     public ApiResponse entrustInvoicing(@RequestBody EntrustInvoicingDTO entrustInvoicingDTOs) { | 
 |  |  |         LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |         if(!loginUserInfo.getType().equals(Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作"); | 
 |  |  |         } | 
 |  |  |         taxesService.entrustInvoicing(entrustInvoicingDTOs); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("提交直托投报开票") | 
 |  |  |     @PostMapping("/directInvoicing") | 
 |  |  |     public ApiResponse directInvoicing(@RequestBody DirectInvoicingDTO directInvoicingDTO) { | 
 |  |  |         LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |         if(!loginUserInfo.getType().equals(Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作"); | 
 |  |  |         } | 
 |  |  |         taxesService.directInvoicing(directInvoicingDTO); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "获取直保数据信息",notes = "") | 
 |  |  |     @GetMapping("/getDirectTaxes") | 
 |  |  |     @RequiresPermissions("business:taxes:query") | 
 |  |  |     public ApiResponse getDirectTaxes(@RequestParam Integer id) { | 
 |  |  |         LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |         if(!loginUserInfo.getType().equals(Constants.ONE)){ | 
 |  |  |             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作"); | 
 |  |  |         } | 
 |  |  |         return ApiResponse.success(taxesService.getDirectTaxes(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |