| | |
| | | return content.Error($"ä¸ä¸ªéè´åæ®éé¢ä¸å
许ç»ç两个ä»åºï¼è¯·éæ°éæ©ä»åºï¼ä¸ä¸ä¸ªç»çä»åºä¸º{isWarehouse.WarehouseCode}"); |
| | | } |
| | | |
| | | if (inboundOrder.BusinessType == "11" && inboundOrder.IsTestMaterials == 1 && (palletDto.WarehouseType != "1076" || palletDto.WarehouseType != "5057")) |
| | | if (inboundOrder.BusinessType == "11" && inboundOrder.IsTestMaterials == 1 && palletDto.WarehouseType != "1076" && palletDto.WarehouseType != "5057") |
| | | { |
| | | return content.Error($"è¯¥åæ®ä¸ºè¯äº§ç©æï¼éè¦å
¥åºå°è¯äº§ä»ï¼è¯·éæ°æ ¹æ®ååºéæ©è¯äº§ä»åºè¿è¡ç»çå
¥åº"); |
| | | } |
| | |
| | | { |
| | | return content.Error($"æªæ¾å°è¯¥æ¡ç {palletDto.Barcode}éè°å
¥æºä»çä¿¡æ¯"); |
| | | } |
| | | |
| | | if(allocateMaterialInfo.WarehouseCode != palletDto.WarehouseType) |
| | | { |
| | | return content.Error($"该æ¡ç è°å
¥ä»åºä¸º{allocateMaterialInfo.WarehouseCode},ä¸éæ©ç{palletDto.WarehouseType}ä»åºä¸ä¸è´"); |
| | | } |
| | | stockInfo.Details.Add(new Dt_StockInfoDetail |
| | | { |
| | | StockId = stockInfo == null ? 0 : stockInfo.Id, |
| | |
| | | { |
| | | if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1)) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 3; |
| | | } |
| | | else |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 0; |
| | | } |
| | | } |
| | | else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0) |
| | | { |
| | |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id && inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 3 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | |
| | | _stockInfoRepository.Db.Updateable<Dt_StockInfoDetail>().SetColumns(it => new Dt_StockInfoDetail |
| | | { |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt() |
| | |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 4 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | return content.Error("åä¼ MES失败"); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1)) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 1; |
| | | } |
| | | else if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 3; |
| | | } |
| | | else |
| | | { |
| | | inboundOrder.ReturnToMESStatus = 0; |
| | | } |
| | | } |
| | | else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0) |
| | | { |
| | |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if(inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 3}) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | |
| | | _stockInfoRepository.Db.Updateable<Dt_StockInfoDetail>().SetColumns(it => new Dt_StockInfoDetail |
| | | { |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt() |
| | |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }) |
| | | .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand(); |
| | | |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 4 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | | _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 0 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | return content.Error("åä¼ MES失败"); |
| | | } |
| | | } |