| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.business.dto.ContractInvoiceQueryDTO; |
| | | import com.by4cloud.platformx.business.dto.ContractQueryDTO; |
| | | import com.by4cloud.platformx.business.dto.GenInvoiceInfoDTO; |
| | | import com.by4cloud.platformx.business.dto.*; |
| | | import com.by4cloud.platformx.business.entity.Contract; |
| | | import com.by4cloud.platformx.business.entity.ContractInvoice; |
| | | import com.by4cloud.platformx.business.entity.ContractOutBound; |
| | | import com.by4cloud.platformx.business.service.ContractInvoiceService; |
| | | import com.by4cloud.platformx.business.service.ContractService; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.common.security.annotation.Inner; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增发票 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增发票" , description = "新增发票" ) |
| | | @SysLog("新增发票" ) |
| | | @PostMapping |
| | | public R save(@RequestBody ContractInvoice contractInvoice) { |
| | | return contractInvoiceService.add(contractInvoice); |
| | | } |
| | | |
| | | /** |
| | | * 获取合同出库信息 |
| | | * @return |
| | | */ |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/toInvoice" ) |
| | | public R toInvoice(@RequestBody GenInvoiceInfoDTO genInvoiceInfoDTO) { |
| | | return contractInvoiceService.toInvoice(genInvoiceInfoDTO); |
| | | public R toInvoice(@RequestBody ToInvoiceDTO toInvoiceDTO) { |
| | | return contractInvoiceService.toInvoice(toInvoiceDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 重新开票 |
| | | * @return |
| | | */ |
| | | @GetMapping("/refresh/{invoiceId}") |
| | | public R refresh(@PathVariable("invoiceId")Long invoiceId) { |
| | | return contractInvoiceService.refresh(invoiceId); |
| | | } |
| | | |
| | | /** |
| | | * 手动推送bip |
| | | * @return |
| | | */ |
| | | @GetMapping("/bipPush/{invoiceId}") |
| | | public R bipPush(@PathVariable("invoiceId")Long invoiceId) { |
| | | return contractInvoiceService.bipPush(invoiceId); |
| | | } |
| | | |
| | | /** |
| | | * 手动推送bip |
| | | * @return |
| | | */ |
| | | @GetMapping("/bipPushPdf/{invoiceId}") |
| | | public R bipPushPdf(@PathVariable("invoiceId")Long invoiceId) { |
| | | return contractInvoiceService.bipPushPdf(invoiceId); |
| | | } |
| | | |
| | | /** |
| | | * 保存并推送 |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveAndPush") |
| | | public R saveAndPush(@RequestBody ContractInvoiceUpateDTO upateDTO) { |
| | | return contractInvoiceService.saveAndPush(upateDTO); |
| | | } |
| | | |
| | | /** |
| | | * 红票查询 |
| | | * @return |
| | | */ |
| | |
| | | return R.ok(contractInvoiceService.pageInvoice(page, queryDTO)); |
| | | } |
| | | |
| | | @GetMapping("/queryInvoice") |
| | | public R queryInvoice(@ParameterObject Page page, @ParameterObject InvoiceQueryDTO queryDTO) { |
| | | return contractInvoiceService.queryInvoice(page, queryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id查询" , description = "通过id查询" ) |
| | | @GetMapping("/{id}" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractInvoiceService.getById(id)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过key查询bip字典 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过key查询bip字典" , description = "通过key查询bip字典" ) |
| | | @GetMapping("/selectBipByKey/{dictKey}" ) |
| | | public R selectBipByKey(@PathVariable("dictKey" ) String dictKey) { |
| | | return contractInvoiceService.selectBipByKey(dictKey); |
| | | } |
| | | } |