| | |
| | | using MailKit.Search; |
| | | using System.Reflection.Metadata; |
| | | using static WIDESEA_ITaskInfoService.ITaskService; |
| | | using WIDESEA_Common.Log; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | |
| | | else |
| | | { |
| | | |
| | | if ((generate.SourceAddress == "R01-003-041-011-01" || generate.SourceAddress == "R01-002-043-001-01" || generate.SourceAddress == "R02-003-043-011-01")) |
| | | if ((generate.SourceAddress == "R01-003-041-011-01" || generate.SourceAddress == "R01-002-043-001-01" || generate.SourceAddress == "R02-003-027-011-01")) |
| | | { |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | if(dt_StockInfo2 == null) |
| | |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.空æ, |
| | | Materialweight = 0, |
| | | Wlstatus = (int)InventoryMaterialStatus.空æ, |
| | | Mgeneratetime = DateTime.Now, |
| | | }; |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | } |
| | | } |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode && x.StockStatus== (int)StockStatusEmun.ç»çæå); |
| | | if (dt_StockInfo != null) |
| | | { |
| | | Dt_LocationInfo newLocation; |
| | | Dt_LocationInfo newSourceAddress; |
| | | newSourceAddress = _basicService.LocationInfoService.GetLocationplatform(generate.SourceAddress); |
| | | newLocation = _basicService.LocationInfoService.GetLocation(newSourceAddress.RoadwayNo); |
| | | int Locationtype = 9; //é»è®¤ä¸º9 |
| | | if(dt_StockInfo.MaterialType== (int)InventoryMaterialType.æå || (generate.SourceAddress == "R01-003-041-001-01" && dt_StockInfo.MaterialType == (int)InventoryMaterialType.åææ)) |
| | | { |
| | | Locationtype = 11; |
| | | |
| | | }else if(dt_StockInfo.MaterialType == (int)InventoryMaterialType.åææ) |
| | | { |
| | | Locationtype = 10; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int maxRetries = 20; |
| | | int retryCount = 0; |
| | | bool needRetry; |
| | | |
| | | do |
| | | { |
| | | needRetry = false; // é»è®¤ä¸éè¦éè¯ |
| | | retryCount++; |
| | | |
| | | |
| | | if (dt_StockInfo.MaterialType == (int)InventoryMaterialType.æå) |
| | | { |
| | | string[] targetCodes = dt_StockInfo.PalletCode.Split("*"); |
| | | Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.OrderName == targetCodes[0]); |
| | | if (dt_Inbound.Startingcolumn != 0 || dt_Inbound.Terminationcolumn != 0) |
| | | { |
| | | newLocation = _basicService.LocationInfoService.GetLocation2(newSourceAddress.RoadwayNo, Locationtype, dt_Inbound.Startingcolumn, dt_Inbound.Terminationcolumn); |
| | | } |
| | | else |
| | | { |
| | | newLocation = _basicService.LocationInfoService.GetLocation(newSourceAddress.RoadwayNo, Locationtype); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | newLocation = _basicService.LocationInfoService.GetLocation(newSourceAddress.RoadwayNo, Locationtype); |
| | | } |
| | | |
| | | |
| | | if (newLocation == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("æ æ³è·ååºä½"); |
| | | } |
| | | |
| | | // 2. æ£æ¥åºå |
| | | if (_stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == newLocation.LocationCode) !=null) |
| | | { |
| | | needRetry = true; |
| | | continue; // ç´æ¥è¿å
¥ä¸ä¸æ¬¡å¾ªç¯ï¼éè¯ï¼ |
| | | } |
| | | |
| | | // 3. æ£æ¥ä»»å¡ |
| | | if (BaseDal.QueryFirst(x => x.TargetAddress == newLocation.LocationCode) != null) |
| | | { |
| | | needRetry = true; |
| | | continue; |
| | | } |
| | | |
| | | // 4. æ£æ¥åå²ä»»å¡ |
| | | if (_taskHtyService.CrueeTaskHty(newLocation.LocationCode)) |
| | | { |
| | | needRetry = true; |
| | | continue; |
| | | } |
| | | |
| | | } while (needRetry && retryCount < maxRetries); |
| | | |
| | | // æ£æ¥æ¯å¦è¶
è¿æå¤§éè¯æ¬¡æ° |
| | | if (retryCount >= maxRetries) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æ æ³æ¾å°å¯ç¨åºä½ï¼å·²å°è¯ {retryCount} 次ï¼"); |
| | | } |
| | | |
| | | |
| | | |
| | | //string[] Pallet = PalletCode.Split("-"); |
| | | if (newLocation != null && newSourceAddress != null) |
| | | { |
| | |
| | | Creater = "WMS", |
| | | Depth = newLocation.Depth, |
| | | CreateDate = DateTime.Now, |
| | | MaterialType= dt_StockInfo.MaterialType |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (newLocation.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | newLocation.LocationStatus = newSourceAddress.LocationType == (int)LocationTypeEnum.EmptyOut ? LocationStatusEnum.PalletLock.ObjToInt() : LocationStatusEnum.Lock.ObjToInt(); |
| | | } |
| | | BaseDal.AddData(dt_Task); |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"该åºä½{newSourceAddress.LocationCode}çè´§ä½ç¶æå¼å¸¸ï¼ä¸å¯é"); |
| | | } |
| | | _basicService.LocationInfoService.UpdateData(newLocation); |
| | | BaseDal.AddData(dt_Task); |
| | | |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content = WebResponseContent.Instance.Error($"çæå
¥åºä»»å¡åºéï¼åºéä¿¡æ¯:{ex.Message}"); |
| | | throw; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static List<int> InventoryCode = new List<int>() { 0,1,2,4,5,6}; //0:å¾
æ£ 1ï¼åæ ¼ 2ï¼ä¸åæ ¼ 4ï¼éè´§ 5ï¼è¿å·¥ 6ï¼ç¹é |
| | | /// <summary> |
| | | /// è§£æåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent Queryinventory2(GenerateInv generate) |
| | | public WebResponseContent Queryinventory(GenerateInv generate) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | if(dt_StockInfo == null) |
| | | { |
| | | |
| | | string[] targetCodes = generate.PalletCode.Split("*"); |
| | | if(targetCodes.Length == 4) |
| | | { |
| | | Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.UpperOrderNo == targetCodes[0]); |
| | | if (dt_Inbound.OrderType == (int)OrderTypeEmun.åææ) //0ä¸ºåææç¼ç |
| | | { |
| | | Dt_StockInfo dt_Stock = new() |
| | | { |
| | | PalletCode = generate.PalletCode, |
| | | IsFull = true, |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.åææ, |
| | | Materialweight = decimal.Parse(targetCodes[3]), |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | string part2 = targetCodes[1].Substring(2, 8); //è§£æç©ææ¹æ¬¡æ¾è¯¦æ
|
| | | Dt_InboundOrder dt_Int = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.UpperOrderNo == part2); |
| | | |
| | | Dt_StockInfoDetail dt_StockInfoDetail = new() |
| | | string[] targetCodes = generate.PalletCode.Split("*"); |
| | | if (targetCodes.Length == 5) |
| | | { |
| | | Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.OrderName == targetCodes[0]); |
| | | |
| | | bool isContained = InventoryCode.Contains(int.Parse(targetCodes[4])); |
| | | if(!isContained) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"第äºä½ç©æç¶æç¼ç è§£æé误ï¼{generate.PalletCode}"); |
| | | } |
| | | |
| | | if (dt_Inbound != null) |
| | | { |
| | | string PalletCodetarget = string.Join("*", targetCodes.Take(3)); |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode.Contains(PalletCodetarget)); |
| | | if (dt_Inbound.OrderType == (int)InventoryMaterialType.åææ) //0ä¸ºåææç¼ç |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo == "2" && x.LocationStatus == (int)LocationStatusEnum.Free && x.Depth == 1 && x.EnableStatus == (int)EnableStatusEnum.Normal && x.LocationType == (int)LocationTypeEnum.MaterialsCube); |
| | | |
| | | if (dt_StockInfo == null) |
| | | { |
| | | StockId = dt_StockInfo2.Id, |
| | | MaterielCode = dt_Inbound.UpperOrderNo, //ç©æå· |
| | | MaterielName = dt_Inbound.OrderName, //ç©æåç§° |
| | | OrderNo = dt_Inbound.OrderNo, //ç©æè¯¦æ
|
| | | BatchNo = targetCodes[1], //ç©ææ¹æ¬¡ |
| | | BatchNoName = dt_Int.OrderNo, |
| | | SerialNumber = targetCodes[2], //å
å· |
| | | StockQuantity = decimal.Parse(targetCodes[3]), //éé |
| | | OutboundQuantity = 1, //åºåå· |
| | | Status = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | }; |
| | | _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); |
| | | _unitOfWorkManage.CommitTran(); |
| | | List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo == "2" && x.LocationStatus== (int)LocationStatusEnum.Free && x.Depth==1); |
| | | if (locationInfos.Count < 50) |
| | | Dt_StockInfo dt_Stock = new() |
| | | { |
| | | PalletCode = generate.PalletCode, |
| | | IsFull = true, |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.åææ, |
| | | Materialweight = decimal.Parse(targetCodes[3]), |
| | | Wlstatus = int.Parse(targetCodes[4]), |
| | | Mgeneratetime=DateTime.Now, |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | string part2 = targetCodes[1].Substring(0, 2); //è§£æç©ææ¹æ¬¡æ¾è¯¦æ
|
| | | Dt_InboundOrder dt_Int = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.UpperOrderNo == part2); |
| | | |
| | | Dt_StockInfoDetail dt_StockInfoDetail = new() |
| | | { |
| | | StockId = dt_StockInfo2.Id, |
| | | MaterielCode = dt_Inbound.OrderName, //ç©æå· |
| | | MaterielName = dt_Inbound.UpperOrderNo, //ç©æåç§° |
| | | OrderNo = dt_Inbound.OrderNo, //ç©æè¯¦æ
|
| | | BatchNo = targetCodes[1].ToString(), //ç©ææ¹æ¬¡ |
| | | SerialNumber = targetCodes[2].ToString(), //å
å· |
| | | BatchNoName = dt_Int.OrderNo, |
| | | StockQuantity = decimal.Parse(targetCodes[3].ToString()), //éé |
| | | OutboundQuantity = 1, //åºåå· |
| | | Status = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | |
| | | }; |
| | | _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); |
| | | _unitOfWorkManage.CommitTran(); |
| | | if (locationInfos.Count < 50) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (dt_StockInfo.StockStatus == (int)StockStatusEmun.ç»çæå) |
| | | { |
| | | if (locationInfos.Count < 50) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"åºåå·²æè¯¥æ¡ç ï¼æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else if (dt_Inbound.OrderType == (int)InventoryMaterialType.æå) |
| | | { |
| | | if (dt_StockInfo == null) |
| | | { |
| | | Dt_StockInfo dt_Stock = new() |
| | | { |
| | | PalletCode = generate.PalletCode, |
| | | IsFull = true, |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.æå, |
| | | Materialweight = decimal.Parse(targetCodes[3]), |
| | | Wlstatus = int.Parse(targetCodes[4]), |
| | | Mgeneratetime = DateTime.Now, |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | Dt_StockInfoDetail dt_StockInfoDetail = new() |
| | | { |
| | | StockId = dt_StockInfo2.Id, |
| | | MaterielCode = dt_Inbound.OrderName, //ç©æå· |
| | | MaterielName = dt_Inbound.UpperOrderNo, //ç©æåç§° |
| | | OrderNo = dt_Inbound.OrderNo, //ç©æè¯¦æ
|
| | | BatchNo = targetCodes[1].ToString(), //ç©ææ¹æ¬¡ |
| | | BatchNoName = "", |
| | | SerialNumber = targetCodes[2], //å
å· |
| | | StockQuantity = decimal.Parse(targetCodes[3]), //éé |
| | | OutboundQuantity = 1, //åºåå· |
| | | Status = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | }; |
| | | _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | if (dt_StockInfo.StockStatus == (int)StockStatusEmun.ç»çæå) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"åºåå·²æè¯¥æ¡ç ï¼æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | else if (dt_Inbound.OrderType == (int)OrderTypeEmun.æåæ) |
| | | { |
| | | Dt_StockInfo dt_Stock = new() |
| | | { |
| | | PalletCode = generate.PalletCode, |
| | | IsFull = true, |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.æå, |
| | | Materialweight = decimal.Parse(targetCodes[3]), |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | Dt_StockInfoDetail dt_StockInfoDetail = new() |
| | | { |
| | | StockId = dt_StockInfo2.Id, |
| | | MaterielCode = dt_Inbound.UpperOrderNo, //ç©æå· |
| | | MaterielName = dt_Inbound.OrderName, //ç©æåç§° |
| | | OrderNo = dt_Inbound.OrderNo, //ç©æè¯¦æ
|
| | | BatchNo = targetCodes[1], //ç©ææ¹æ¬¡ |
| | | BatchNoName = "", |
| | | SerialNumber = targetCodes[2], //å
å· |
| | | StockQuantity = decimal.Parse(targetCodes[3]), //éé |
| | | OutboundQuantity = 1, //åºåå· |
| | | Status = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | }; |
| | | _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"è§£æçæçæ¡ç é¿åº¦ä¸è¶³4,æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | return content = WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåï¼æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"å·²æåºåï¼å
¥åºå¤±è´¥ï¼{generate.PalletCode}"); |
| | | return content = WebResponseContent.Instance.Error($"è§£æçæçæ¡ç é¿åº¦ä¸è¶³4,æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content=WebResponseContent.Instance.Error($"ç³»ç»å··éå
¥åºæ¥å£è§£æé误ï¼é误ï¼{ex.Message}"); |
| | | return content=WebResponseContent.Instance.Error($"æçæ¡ç é误ï¼å¯¼è´ç³»ç»é误ï¼{ex.Message}"); |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent Queryinventory(GenerateInv generate) |
| | | public WebResponseContent Queryinventory2(GenerateInv generate) |
| | | { |
| | | try |
| | | { |
| | |
| | | StockStatus = (int)StockStatusEmun.ç»çæå, |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | MaterialType = (int)InventoryMaterialType.åææ, |
| | | MaterialType = (int)InventoryMaterialType.æå, |
| | | Materialweight = 0, |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockService.StockInfoService.Repository.AddData(dt_Stock); |
| | | |
| | | string part2 = generate.PalletCode.Substring(2, 8); |
| | | //string part2 = generate.PalletCode.Substring(2, 8); |
| | | |
| | | string part3 = generate.PalletCode.Split('#')[1]; |
| | | //string part3 = generate.PalletCode.Split('#')[1]; |
| | | Dt_StockInfo dt_StockInfo2 = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | Dt_StockInfoDetail dt_StockInfoDetail = new() |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error(); |
| | | return content = WebResponseContent.Instance.Error($"åºåå·²æè¯¥æ¡ç ï¼æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.UpperOrderNo == result); |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == generate.PalletCode); |
| | | List<Dt_LocationInfo> locationinfoData = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo == "2" && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() |
| | | && x.LocationType == (int)LocationTypeEnum.MaterialsCube); |
| | | if (dt_Inbound != null) |
| | | { |
| | | if (dt_StockInfo == null) |
| | |
| | | _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | else |
| | | { |
| | | if (dt_StockInfo.StockStatus == (int)StockStatusEmun.ç»çæå) |
| | | |
| | | |
| | | if (locationinfoData.Count > 40) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error(); |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (dt_StockInfo.StockStatus == (int)StockStatusEmun.ç»çæå) |
| | | { |
| | | if (locationinfoData.Count > 40) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"åºåå·²æè¯¥æ¡ç ï¼æ¡ç ä¿¡æ¯ï¼{generate.PalletCode}"); |
| | | } |
| | | } |
| | | |
| | |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent PalletQueryinventory() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | List<Dt_LocationInfo> locationinfoData = _basicService.LocationInfoService.Repository.QueryData(x => x.RoadwayNo=="2" && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() |
| | | && x.LocationType == (int)LocationTypeEnum.EmptyCube && x.EnableStatus == (int)EnableStatusEnum.Normal); |
| | | if (locationinfoData.Count < 20) |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 1); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.OK(data: 3); |
| | | } |
| | | } |
| | | } |
| | | } |