| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementAddDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.dto.*; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @GetMapping("/productlist") |
| | | @Log(title = "采购入库-入库管理-新增入库查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(ProcurementDto procurementDto) { |
| | | List<ProcurementDto> result =procurementRecordService.listProcurementBySalesLedgerId(procurementDto); |
| | | List<ProcurementDto> result = procurementRecordService.listProcurementBySalesLedgerId(procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "采购入库-入库管理-新增入库", businessType = BusinessType.INSERT) |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody ProcurementAddDto procurementDto) { |
| | | procurementDto.setType(1); |
| | | procurementDto.setTypeName("采购入库"); |
| | | return AjaxResult.success(procurementRecordService.add(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/addCustom") |
| | | @Log(title = "自定义入库-入库管理-新增入库", businessType = BusinessType.INSERT) |
| | | @Transactional |
| | | public AjaxResult addCustom(@RequestBody List<CustomStorage> customStorage) { |
| | | return procurementRecordService.addCustom(customStorage); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "采购入库-入库管理-修改入库", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updatePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.updatePro(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/updateManagement") |
| | | @Log(title = "采购入库-库存台账-修改", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updateManagement(@RequestBody ProcurementManagementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.updateManagement(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | | @Log(title = "采购入库-入库管理-删除入库", businessType = BusinessType.DELETE) |
| | | @Transactional |
| | | public AjaxResult deletePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.deletePro(procurementDto)); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "采购入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result =procurementRecordService.listPage(page, procurementDto); |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduction") |
| | | @Log(title = "生产入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | public AjaxResult listPageByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPageByProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByCustom") |
| | | @Log(title = "自定义入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | public AjaxResult listPageByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> result = procurementRecordService.listPageByCustom(page, customStorage); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopy") |
| | | @Log(title = "采购入库-库存管理-分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopy(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopyByProduction") |
| | | @Log(title = "生产入库-库存管理-分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopyByProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopyByCustom") |
| | | @Log(title = "自定义入库-库存管理-分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopyByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> result = procurementRecordService.listPageCopyByCustom(page, customStorage); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/getReportList") |
| | | @Log(title = "库存报表查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult getReportList(Page page, ProcurementPageDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.getReportList(page, procurementDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | | public void exportCopy(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementRecordService.export(response); |
| | | } |
| | | |
| | | |
| | | } |