实现按原料是否有库存筛选

This commit is contained in:
2025-11-27 17:33:28 +08:00
parent e6b307b0dc
commit 3b12802900
7 changed files with 93 additions and 22 deletions

View File

@@ -75,8 +75,9 @@ func (s *inventoryServiceImpl) ListCurrentStock(ctx context.Context, req *dto.Li
// 1. 获取分页的原料列表
rawMatOpts := repository.RawMaterialListOptions{
Name: req.RawMaterialName,
OrderBy: req.OrderBy, // 注意:这里的排序可能需要调整,比如按原料名排序
Name: req.RawMaterialName,
OrderBy: req.OrderBy, // 注意:这里的排序可能需要调整,比如按原料名排序
HasStock: req.HasStock,
}
rawMaterials, total, err := s.rawMatRepo.ListRawMaterials(serviceCtx, rawMatOpts, req.Page, req.PageSize)
if err != nil {