| | |
| | | { |
| | | item.remark = "触åå
¥åºä»»å¡,使ªæ¾å°å·¥åä¿¡æ¯ï¼"; |
| | | item.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | stationinfoRepository.Update(item, true); |
| | | stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true); |
| | | continue; |
| | | } |
| | | var geometry = Pipeline.QueryMateriel(work.drawingNo); |
| | | if (geometry == null) |
| | | { |
| | | item.remark = "æªæ¾å°è½¦è½®ä¿¡æ¯ï¼"; |
| | | item.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true); |
| | | continue; |
| | | } |
| | | |
| | | dt_stationinfo TargetLocation = null; |
| | | string tasktype = ""; |
| | | |
| | | if (item.quantity == 5) |
| | | //if (item.quantity == 5) |
| | | if (item.quantity == geometry.stackNoRange) |
| | | { |
| | | if (!string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) |
| | | tasktype = "TaskType_OutsourceInbound"; |
| | |
| | | tasktype = "TaskType_Inbound"; |
| | | |
| | | AGVTask.AddQueueTask(stationinfoRepository, agvtaskRepository, item, tasktype, work); |
| | | |
| | | #region MyRegion |
| | | //if (/*(mesinfo.quantity <= 50 &&*/ !string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) |
| | | //{ |
| | | // //todo 寻æ¾å¯æ¾è´§å¤åæ¾è´§å° |
| | | // tasktype = "TaskType_OutsourceInbound"; |
| | | // TargetLocation = GetEmptyLocation(stationinfoRepository); |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | // //todo: è°ç¨WMSæ¥å£åå»ºä»»å¡ |
| | | // tasktype = "TaskType_Inbound"; |
| | | // TargetLocation = GetLocation.GetEmptyLocation(stationinfoRepository, work, item); |
| | | //} |
| | | //if (TargetLocation != null) |
| | | //{ |
| | | // dt_agvtask agvtask = new dt_agvtask() |
| | | // { |
| | | // agv_fromaddress = item.stationCode, |
| | | // agv_id = Guid.NewGuid(), |
| | | // agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | // agv_grade = 1, |
| | | // agv_createtime = DateTime.Now, |
| | | // agv_taskstate = "Create", |
| | | // agv_materielid = item.stationType, |
| | | // agv_qty = item.quantity, |
| | | // agv_tasktype = tasktype, |
| | | // agv_toaddress = TargetLocation.stationCode, |
| | | // agv_userid = "ç³»ç»", |
| | | // bindSN = item.bindSN, |
| | | // agv_worktype = Convert.ToInt32(work.processCode), |
| | | // agv_materbarcode = work.materialCode, |
| | | // agv_Traytype = item.tray_type, |
| | | // jobID = item.Number, |
| | | // agv_TrayStatus = item.tray_status |
| | | // }; |
| | | // agvtaskRepository.Add(agvtask, true); |
| | | |
| | | // item.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // stationinfoRepository.Update(item, true); |
| | | |
| | | // TargetLocation.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // TargetLocation.stationType = agvtask.agv_materielid; |
| | | // TargetLocation.heatNumber = item.heatNumber; |
| | | // TargetLocation.billetID = item.billetID; |
| | | // TargetLocation.Number = agvtask.jobID; |
| | | // stationinfoRepository.Update(TargetLocation, true); |
| | | // WriteDBLog.Success("å建å
¥åºä»»å¡", $"ä»»å¡ç¼å·ï¼{agvtask.agv_tasknum}", "PCS"); |
| | | //} |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |