| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.purchase.dto.VatDto; |
| | | import com.ruoyi.purchase.service.PurchaseReportService; |
| | | import com.ruoyi.purchase.vo.PurchaseReportVo; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "采购报表") |
| | | @RequestMapping("/purchase/report") |
| | |
| | | public class AccountingReportController { |
| | | |
| | | private final ISupplierService supplierService; |
| | | private final PurchaseReportService purchaseReportService; |
| | | |
| | | |
| | | @GetMapping("/list") |
| | | @Log(title = "采购报表-项目利润", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(Page page) { |
| | | return AjaxResult.success(); |
| | | public R list(Page page, String customerName) { |
| | | return R.ok(purchaseReportService.list(page,customerName)); |
| | | } |
| | | |
| | | @Log(title = "采购报表-项目利润导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "采购报表-项目利润导出") |
| | | public void export(HttpServletResponse response) { |
| | | public void export(HttpServletResponse response, String customerName) { |
| | | List<PurchaseReportVo> list = purchaseReportService.list(new Page(1,-1),customerName).getRecords(); |
| | | ExcelUtil<PurchaseReportVo> util = new ExcelUtil<>(PurchaseReportVo.class); |
| | | util.exportExcel(response, list , "项目利润"); |
| | | |
| | | } |
| | | |
| | | @Log(title = "采购报表-增值税比对", businessType = BusinessType.OTHER) |
| | | @GetMapping("/listVat") |
| | | public AjaxResult listVat(Page page,String month) { |
| | | return AjaxResult.success(); |
| | | public R listVat(Page page,String month) { |
| | | return R.ok(purchaseReportService.listVat(page,month)); |
| | | } |
| | | |
| | | @Log(title = "采购报表-增值税比对", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportTwo") |
| | | @Operation(summary = "采购报表-增值税比对") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | public void exportTwo(HttpServletResponse response,String month) { |
| | | List<VatDto> list = purchaseReportService.listVat(new Page(1,-1),month).getRecords(); |
| | | ExcelUtil<VatDto> util = new ExcelUtil<>(VatDto.class); |
| | | util.exportExcel(response, list , "增值税比对"); |
| | | } |
| | | |
| | | @GetMapping("/supplierTransactions") |