| | |
| | | WriteLog.Write_Log(name + "ç³è¯·æ¾æå¼å¸¸", "车轮SNå·ä¸ºç©º", "", $"è¯»åæ¡æ¶ä¿¡æ¯ï¼\n车轮SNå·ï¼{Wheel_id}为空"); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | var Work = workinfoRepository.Find(x => x.SN == Wheel_id && x.processCode == "17").FirstOrDefault(); |
| | | if (Work == null) |
| | | { |
| | |
| | | WriteLog.Write_Log(name + "ç³è¯·æ¾æå¼å¸¸", Wheel_id, "æ¥è¯¢æºå 工工å", $"è¯»åæ¡æ¶ä¿¡æ¯ï¼\n车轮SNå·ï¼{Wheel_id}æªæ¥è¯¢å°å·¥åä¿¡æ¯\nåå
¥æ¡æ¶ä¿¡æ¯ï¼\næ¯å¦å
è®¸ä¸æï¼{false}"); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region MyRegion |
| | | //var currentAreaNr = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "W_Are00aNr").First(), client); |
| | | //var currentAreaCode = PipelineJob.area_code(name); //æ ¹æ®ä¸æå£åå
åè·ååºå代ç |
| | | //var currentStation = stationinfoRepository.FindFirst(x => x.area == currentAreaCode && x.stationCode.Substring(x.stationCode.Length - 1, 1) == currentAreaNr.ToString()); |
| | | //if (!currentStation.enable || currentStation.location_state == LocationStateEnum.Empty.ToString()) |
| | | // client.WriteByOrder("W_Enabl_Load", false, name);//ä¿¡å·ä¸ºfalseæ¡æ¶åæ¢è¿å
¥ |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | var wheel = Pipeline.QueryMateriel(Work.drawingNo); |
| | | var wheel1 = Pipeline.QueryMateriel1(Work.drawingNo); |
| | |
| | | agvtask(stationinfoRepository, station, Work, "TaskType_Inbound"); |
| | | } |
| | | #endregion |
| | | |
| | | #region æçç±»åä¸ä¸è´éæ´æ¢æç |
| | | foreach (var Stationinfo in Stations) |
| | | { |
| | | if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) |
| | | { |
| | | client.WriteByOrder("W_Enabl_Load", false, name);//ä¿¡å·ä¸ºfalseæ¡æ¶åæ¢è¿å
¥ |
| | | Stationinfo.location_state = LocationStateEnum.Trayswitching.ToString(); |
| | | Stationinfo.remark = "æçç±»åä¸ä¸è´éæ´æ¢æç"; |
| | | stationinfoRepository.Update(Stationinfo, x => new { x.location_state }, true); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | Stations = stationinfoRepository.Find(x => x.area == Pipeline.area_code(name)).OrderBy(x => x.lastUpdateTime).ToList(); |
| | | |
| | | var PartStatus = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok |
| | | |
| | |
| | | agvtask(stationinfoRepository, stationinfo, Work, name == "3åå
䏿åº" ? "TaskType_OutsourceInbound" : "TaskType_Inbound"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æçç±»åä¸ä¸è´éæ´æ¢æç |
| | | if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) |
| | | { |
| | | client.WriteByOrder("W_Enabl_Load", false, name);//ä¿¡å·ä¸ºfalseæ¡æ¶åæ¢è¿å
¥ |
| | | Stationinfo.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | Stationinfo.tray_type = Stationinfo.tray_type == "SmallTray" ? "SmallTray/LargeTray" : "LargeTray/SmallTray"; |
| | | Stationinfo.remark = "æçç±»åä¸ä¸è´éæ´æ¢æç"; |
| | | stationinfoRepository.Update(Stationinfo, true); |
| | | continue; |
| | | } |
| | | #endregion |
| | | |
| | | var Pipelinedetails = plcRepository.Find(x => x.plcdetail_iotype == Pipelineplc.plcinfo_iotyep && x.plcdetail_number == Stationinfo.stationCode).ToList(); |
| | |
| | | } |
| | | if (Stationinfo != null) |
| | | { |
| | | #region æçç±»åä¸ä¸è´éæ´æ¢æç |
| | | //if (Stationinfo.tray_type != ((wheel == null ? wheel1.e : wheel.e) < 1100 ? "SmallTray" : "LargeTray")) |
| | | if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) |
| | | { |
| | | Stationinfo.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | Stationinfo.tray_type = Stationinfo.tray_type == "SmallTray" ? "SmallTray/LargeTray" : "LargeTray/SmallTray"; |
| | | Stationinfo.remark = "æçç±»åä¸ä¸è´éæ´æ¢æç"; |
| | | stationinfoRepository.Update(Stationinfo, true); |
| | | continue; |
| | | } |
| | | #endregion |
| | | var Pipelinedetails = plcRepository.Find(x => x.plcdetail_iotype == Pipelineplc.plcinfo_iotyep && x.plcdetail_number == Stationinfo.stationCode).ToList(); |
| | | var PalletSignal = (Int16)DBExtension.Read(Pipelinedetails.Where(x => x.plcdetail_name == "R_PalletSignal").First(), Pipeline_client);//读åæçä¿¡å·:1:æ,2æ |
| | | var MaterialSignal = (Int16)DBExtension.Read(Pipelinedetails.Where(x => x.plcdetail_name == "R_MaterialSignal").First(), Pipeline_client);//读åè´§ç©ä¿¡å·:1:æ,2æ |