| | |
| | | { |
| | | |
| | | |
| | | if (/*(mesinfo.quantity <= 50 && string.IsNullOrEmpty(mesinfo.area)) ||*/ item.stationCode.Contains("3")) //å°äº50ä»¶ç´æ¥åºåº |
| | | if (/*(mesinfo.quantity <= 50 &&*/ !string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) //å°äº50ä»¶ç´æ¥åºåº |
| | | { |
| | | //todo 寻æ¾å¯æ¾è´§å¤åæ¾è´§å° |
| | | tasktype = "TaskType_OutsourceInbound"; |
| | |
| | | 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"); |
| | |
| | | } |
| | | return TargetLocation; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 临æ¶ä½¿ç¨ |
| | | /// </summary> |
| | | /// <param name="stationinfoRepository"></param> |
| | | /// <returns></returns> |
| | | public static dt_stationinfo GetEmptyLocation1(Idt_stationinfoRepository stationinfoRepository) |
| | | { |
| | | return stationinfoRepository.Find(x => x.line == 1 && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == "3").OrderBy(x => x.column).FirstOrDefault();//è¡ååºåéåæ» |
| | | } |
| | | /// <summary> |
| | | /// å»å¤å |
| | | /// </summary> |
| | | /// <param name="stationinfoRepository"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public static dt_stationinfo GetEmptyLocation(Idt_stationinfoRepository stationinfoRepository) |
| | | { |
| | | dt_stationinfo TargetLocation = null; |