| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据托盘号查询库存明细数量 |
| | | /// </summary> |
| | | /// <param name="palletCode">托盘号</param> |
| | | /// <returns>库存明细数量</returns> |
| | | public async Task<WebResponseContent> GetStockDetailCountByPalletCodeAsync(string palletCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | if (string.IsNullOrWhiteSpace(palletCode)) |
| | | return content.Error("托盘号不能为空"); |
| | | |
| | | var stockInfo = StockInfoService.Repository.QueryFirst(s => s.PalletCode == palletCode); |
| | | if (stockInfo == null) |
| | | return content.Error("托盘不存在"); |
| | | |
| | | var count = await StockInfoDetailService.Repository.Db.Queryable<Dt_StockInfoDetail>() |
| | | .CountAsync(d => d.StockId == stockInfo.Id); |
| | | return content.OK("查询成功", new { PalletCode = palletCode, DetailCount = count }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据设备名称和托盘号解析MES设备配置 |
| | | /// </summary> |
| | | /// <param name="deviceName">设备名称</param> |