| | |
| | | import com.ruoyi.procurementrecord.mapper.CustomStorageMapper; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | 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 jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @date : 2025/7/7 14:32 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "采购入库") |
| | | @Tag(name = "采购入库") |
| | | @RequestMapping("/stockin") |
| | | @AllArgsConstructor |
| | | public class ProcurementRecordController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * 通过销售产品id获取入库数量 |
| | | * |
| | | * @param salesProductId |
| | | * @return |
| | | */ |
| | | @GetMapping("/getProcurementAmount") |
| | | @ApiOperation(value = "通过销售产品id获取入库数量") |
| | | @Operation(summary = "通过销售产品id获取入库数量") |
| | | public AjaxResult getProcurementAmount(@RequestParam("salesProductId") Long salesProductId) { |
| | | return AjaxResult.success(procurementRecordService.getProcurementAmount(salesProductId)); |
| | | } |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "采购入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | @Operation(summary = "入库查询") |
| | | public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listReport") |
| | | @ApiOperation(value = "查询库存图表数据") |
| | | @Operation(summary = "查询库存图表数据") |
| | | public AjaxResult listReport() { |
| | | return AjaxResult.success(procurementRecordService.getReportList()); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduction") |
| | | @Log(title = "生产入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | @Operation(summary = "入库查询") |
| | | 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 = "入库查询") |
| | | @Operation(summary = "入库查询") |
| | | public AjaxResult listPageByProductProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPageByProductProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | |
| | | |
| | | @GetMapping("/listPageByCustom") |
| | | @Log(title = "自定义入库-入库管理-入库查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "入库查询") |
| | | @Operation(summary = "入库查询") |
| | | public AjaxResult listPageByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> result = procurementRecordService.listPageByCustom(page, customStorage); |
| | | return AjaxResult.success(result); |
| | |
| | | |
| | | /** |
| | | * 库存管理采购导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | |
| | | |
| | | /** |
| | | * 库存管理生产导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyOne") |
| | |
| | | |
| | | /** |
| | | * 库存管理自定义导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyTwo") |
| | |
| | | |
| | | /** |
| | | * 入库,出库管理采购导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | |
| | | |
| | | /** |
| | | * 入库,出库管理生产导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | |
| | | procurementRecordService.export(response,2); |
| | | } |
| | | |
| | | @Autowired |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * 入库,出库管理自定义导出 |
| | | * |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |