| | |
| | | throw new Exception(); |
| | | } |
| | | |
| | | |
| | | //todo ä¼å 妿ªæ¥è¯¢å°ä»»å¡åå¤ç |
| | | //if (content.Data != null) |
| | | //{ |
| | |
| | | { |
| | | if(task.NextAddress == task.TargetAddress) |
| | | { |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskOutStatusEnum>(); |
| | | task.TaskState = nextStatus; |
| | | task.CurrentAddress = task.NextAddress; |
| | | task.NextAddress = task.NextAddress; |
| | | task.ModifyDate = DateTime.Now; |
| | | task.Modifier = "System"; |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskOutStatusEnum>(); |
| | | |
| | | task.TaskState = nextStatus; |
| | | Dt_Task_Hty task_Hty = _mapper.Map<Dt_Task_Hty>(task); |
| | | task_Hty.TaskId = 0; |
| | | //task_Hty.CarType = task.CarType; |
| | | task_Hty.PVI = task.PVI; |
| | | BaseDal.DeleteData(task); |
| | | _taskHtyRepository.AddData(task_Hty); |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | var routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress); |
| | | if (!routers.Any()) return WebResponseContent.Instance.Error($"æªæ¾å°è®¾å¤è·¯ç±ä¿¡æ¯"); |
| | | |
| | |
| | | _stationManagerRepository = stationManagerRepository; |
| | | } |
| | | |
| | | static Dictionary<string, string> TCRoadWay = new Dictionary<string, string>() |
| | | { |
| | | { "TC05", "SC02-SC04" }, |
| | | { "TC06", "SC06-SC08" }, |
| | | }; |
| | | //static Dictionary<string, string> TCRoadWay = new Dictionary<string, string>() |
| | | //{ |
| | | // { "TC05", "SC02-SC04" }, |
| | | // { "TC06", "SC06-SC08" }, |
| | | //}; |
| | | |
| | | public async Task Execute(IJobExecutionContext context) |
| | | { |
| | |
| | | public int TaskStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿çç¶æ |
| | | /// ä¿çç¶æ 0-ä¸ä¿ç 1-ä¿ç |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿çç¶æ")] |
| | | [ExporterHeader(DisplayName = "ä¿çç¶æ")] |
| | |
| | | var assemblyOrderInfo = _assemblyOrderInfoRepository.QueryFirst(x => x.workOrderNo == item.workOrderNo && x.orderType == item.workOrderType); |
| | | if (assemblyOrderInfo == null) throw new Exception($"æå¨é车失败:æªç¥æ»è£
å·¥åå·{item.workOrderNo}"); |
| | | |
| | | Dt_PalletStockInfo carinfo = null; |
| | | //Dt_PalletStockInfo carinfo = null; |
| | | VV_StockInfo OutStock = new VV_StockInfo(); |
| | | Dt_CarBodyInfo carbodyinfo = null; |
| | | //Dt_CarBodyInfo carbodyinfo = null; |
| | | if (!string.IsNullOrEmpty(item.pvi)) |
| | | { |
| | | // carinfo = _palletStockInfoRepository.QueryFirst(x => x.PVI == item.pvi && x.pbMaterial == item.pbMaterial); |
| | | //carbodyinfo = _carBodyRepository.QueryFirst(x => x.pbMaterial == item.pbMaterial && x.PVI == item.pvi); |
| | | OutStock = _VVStockInfoRepository.QueryFirst(X => X.PVI == item.pvi && X.pbMaterial == item.pbMaterial); |
| | | OutStock = _VVStockInfoRepository.QueryFirst(x => x.PVI == item.pvi && x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0); |
| | | if (OutStock == null) |
| | | { |
| | | throw new Exception($"æªæ¾å°æå®PVI车身信æ¯{item.pvi}"); |
| | |
| | | { |
| | | //carinfo = _palletStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | //carbodyinfo = _carBodyRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.BodyStatus == 0).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | OutStock = _VVStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.workOrderType == item.workOrderType).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | OutStock = _VVStockInfoRepository.QueryData(x => x.pbMaterial == item.pbMaterial && x.StockStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0 && x.workOrderType == item.workOrderType).OrderBy(x => x.biwInPassTime).FirstOrDefault(); |
| | | } |
| | | |
| | | if (OutStock == null) |
| | |
| | | foreach (var item in maxGroup) |
| | | { |
| | | var number = _taskRepository.QueryData(x => x.TargetAddress == item.Key).Count(); |
| | | if (item.Count() - number <= 0) |
| | | { |
| | | continue; |
| | | } |
| | | result.Add(item.Key, item.Count() - number); |
| | | } |
| | | |
| | |
| | | TaskNum = _taskRepository.GetTaskNo().Result, |
| | | Creater = "Systeam", |
| | | PVI = json.PVI, |
| | | |
| | | CarType = carInfo.CarType |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | |
| | | // å建并添å ä»»å¡å°æ°æ®åº |
| | | hasTask = new Dt_Task |
| | | { |
| | | Grade = 1, |
| | | Grade = 3, |
| | | Roadway = Outstation.Roadway, |
| | | TargetAddress = "RB043", |
| | | Dispatchertime = DateTime.Now, |
| | |
| | | { |
| | | //æ¶è£
ä¸ç产 å忢æå¨åºåº |
| | | var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == "2"); |
| | | if (area.AreaStatus != 1l) { return Task.CompletedTask; } |
| | | if (area.AreaStatus != 1) { return Task.CompletedTask; } |
| | | |
| | | var stockInfo = _palletStockInfoRepository.Db.Queryable<Dt_PalletStockInfo>() |
| | | //.Where(x => x.LockStatue == 0) |
| | | .Includes(x => x.CarBodyInfo) |
| | | .Where(x => x.CarBodyInfo.CarType == 1 && x.TaskStatus == 0) |
| | | .Where(x => x.CarBodyInfo.CarType == 1 && x.TaskStatus == 0 && x.LockOrder == 0 && x.StayStatus == 0) |
| | | .OrderBy(x => x.CreateDate) // æåº |
| | | .ToList(); // è·å第ä¸ä¸ªå
ç´ |
| | | |
| | |
| | | var location = _locationRepository.QueryFirst(x => x.LocationCode == stock.LocationCode); |
| | | location.LocationStatus = (int)LocationEnum.InStockDisable; |
| | | lockStock.TaskStatus = 1; |
| | | if (stationLists == null || stationLists.Count == 0) throw new Exception("åºåºç«å°æªé
ç½®ææªå¯ç¨"); |
| | | if (!stationLists.Any()) throw new Exception("åºåºç«å°æªé
ç½®ææªå¯ç¨"); |
| | | |
| | | Dt_StationManager Outstation = null; |
| | | |
| | |
| | | // å建并添å ä»»å¡å°æ°æ®åº |
| | | hasTask = new Dt_Task |
| | | { |
| | | Grade = 1, |
| | | Grade = 3, |
| | | Roadway = Outstation.Roadway, |
| | | TargetAddress = Outstation.stationChildCode, |
| | | Dispatchertime = DateTime.Now, |