| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | |
| | | /** |
| | | * 通过销售产品id获取入库数量 |
| | | * @param salesProductId |
| | | * @return |
| | | */ |
| | | @GetMapping("/getProcurementAmount") |
| | | @ApiOperation(value = "通过销售产品id获取入库数量") |
| | | public AjaxResult getProcurementAmount(@RequestParam("salesProductId") Long salesProductId) { |
| | | return AjaxResult.success(procurementRecordService.getProcurementAmount(salesProductId)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/productlist") |
| | |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listReport") |
| | | @ApiOperation(value = "查询库存图表数据") |
| | | public AjaxResult listReport() { |
| | | return AjaxResult.success(procurementRecordService.getReportList()); |
| | | } |
| | | @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("/listPageByProductProduction") |
| | | @Log(title = "生产入库-入库管理-生产入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | public AjaxResult listPageByProductProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPageByProductProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("frozenStorageQuality") |
| | | @Log(title = "采购入库-库存管理-冻结不合格产品", businessType = BusinessType.UPDATE) |
| | | public AjaxResult frozenStorageQuality(@RequestBody List<Integer> frozenIds) { |
| | | boolean result = procurementRecordService.frozenStorageQuality(frozenIds); |
| | | if (result) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("thawStorageQuality") |
| | | @Log(title = "采购入库-库存管理-解冻不合格产品", businessType = BusinessType.UPDATE) |
| | | public AjaxResult thawStorageQuality(@RequestBody List<Integer> thawIds) { |
| | | boolean result = procurementRecordService.thawStorageQuality(thawIds); |
| | | if (result) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("frozenFinishedQuality") |
| | | @Log(title = "采购入库-库存管理-冻结不合格产品", businessType = BusinessType.UPDATE) |
| | | public AjaxResult frozenFinishedQuality(@RequestBody List<Integer> frozenIds) { |
| | | boolean result = procurementRecordService.frozenFinishedQuality(frozenIds); |
| | | if (result) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("thawFinishedQuality") |
| | | @Log(title = "采购入库-库存管理-解冻不合格产品", businessType = BusinessType.UPDATE) |
| | | public AjaxResult thawFinishedQuality(@RequestBody List<Integer> thawIds) { |
| | | boolean result = procurementRecordService.thawFinishedQuality(thawIds); |
| | | if (result) { |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/listPageCopyByProduction") |
| | | @Log(title = "生产入库-库存管理-分页查询", businessType = BusinessType.OTHER) |
| | |
| | | util.exportExcel(response, customStorages, "入库台账"); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/listPageProductionStock") |
| | | @Log(title = "库存管理-成品库存", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageProductionStock(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProductModel> result = procurementRecordService.listPageProductionStock(page,procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | } |