| | |
| | | using HslCommunication.WebSocket; |
| | | using HslCommunication.WebSocket; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using SqlSugar; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢è´§ä½å¯¹åºçRFID |
| | | /// æ¥è¯¢è´§ä½å¯¹åºçRFIDååºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="locationCodes"></param> |
| | | /// <returns></returns> |
| | |
| | | |
| | | if (warehouseId == 1) |
| | | { |
| | | // æ¥è¯¢åæåºDt_StockInfo表ï¼è·åRFIDä¿¡æ¯ |
| | | // æ¥è¯¢åæåºDt_StockInfo表ï¼è·åRFIDååºåä¿¡æ¯ |
| | | var rawMaterialRfidList = _stockInfoRepository.QueryData() |
| | | .Where(x => locationCodes.Contains(x.LocationCode)) |
| | | .Select(x => new { x.LocationCode, x.RfidCode }) |
| | | .Select(x => new { |
| | | locationCode = x.LocationCode, |
| | | rfidCode = x.RfidCode, |
| | | paperRoll = x.MaterielName, // 纸å·åç§° |
| | | width = x.MaterielWide, // é¨å¹
ï¼å¹
å®½ï¼ |
| | | barcode = x.PalletCode, // çº¸å·æ¡ç |
| | | status = x.StockStatus, // ç¶æ |
| | | inDate = x.CreateDate // å
¥åºæ¶é´ï¼å建æ¶é´ï¼ |
| | | }) |
| | | .ToList(); |
| | | |
| | | var rfidList = rawMaterialRfidList.ToList(); |
| | | // è¿åç»æ |
| | | return WebResponseContent.Instance.OK(data: rfidList); |
| | | return WebResponseContent.Instance.OK(data: rawMaterialRfidList); |
| | | } |
| | | |
| | | if (warehouseId == 2) |
| | | { |
| | | // æ¥è¯¢æååºDt_ProStockInfo表ï¼è·åPalletCodeä¿¡æ¯ |
| | | var finishedProductRfidList =_proStockInfoRepository.QueryData() |
| | | // æ¿æ¢åæç .Select(x => new { ... Detail = x.proStockInfoDetails?.FirstOrDefault() ... }) 代ç å |
| | | var finishedProductRfidList = _proStockInfoRepository.Db.Queryable<Dt_ProStockInfo>() |
| | | .Includes(x => x.proStockInfoDetails) |
| | | .Where(x => locationCodes.Contains(x.LocationCode)) |
| | | .Select(x => new { x.LocationCode, RfidCode = x.PalletCode }) |
| | | .ToList() |
| | | .Select(x => new |
| | | { |
| | | locationCode = x.LocationCode, |
| | | rfidCode = x.PalletCode, |
| | | paperRoll = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].ProductName : string.Empty, |
| | | productName = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].ProductName : string.Empty, |
| | | width = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].StockQty : 0, |
| | | quantity = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].StockQty : 0, |
| | | barcode = x.PalletCode, |
| | | status = x.StockStatus, |
| | | inDate = x.CreateDate |
| | | }) |
| | | .ToList(); |
| | | |
| | | var rfidList = finishedProductRfidList.ToList(); |
| | | // è¿åç»æ |
| | | return WebResponseContent.Instance.OK(data: rfidList); |
| | | return WebResponseContent.Instance.OK(data: finishedProductRfidList); |
| | | } |
| | | // å¦ææ²¡æå¹é
çä»åºIDï¼è¿å空å表 |
| | | return WebResponseContent.Instance.OK(data: new List<object>()); |