| | |
| | | { |
| | | return BaseDal.QueryFirst(x => x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly && x.TaskState == (int)TaskOutStatusEnum.OutNew && x.NextAddress == Nextaderr, TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ¯è½¦æ¯å¦æä»»å¡ï¼è¿è¡å¤æ |
| | | /// </summary> |
| | | public Dt_Task ObtainMuChetaskbool(AGVStation ZicheinnerSide) |
| | | { |
| | | Dt_Task dt_Task = BaseDal.QueryFirst(x => (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskState == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting) && x.NextAddress == ZicheinnerSide.MotherCarDeviceCode.ToString(), TaskOrderBy); |
| | | if (dt_Task != null) return dt_Task; |
| | | Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ZicheinnerSide.ChildPosiDeviceCode, TaskOrderBy); |
| | | if (dt_Task2 != null) return dt_Task2; |
| | | return null; |
| | | return BaseDal.QueryFirst(x => x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly && (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskType == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting), TaskOrderBy); |
| | | } |
| | | |
| | | public Dt_Task GetChariotTaskBool(string ChildPosiDeviceCode) |
| | | { |
| | | Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ChildPosiDeviceCode, TaskOrderBy); |
| | | if (dt_Task2 != null) return dt_Task2; |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åHCJç«å°æ¯å¦æä»»å¡ |
| | | /// </summary> |
| | | public Dt_Task GetHCJTaskBool(string ChildPosiDeviceCode,int HCJaddres) |
| | | { |
| | | Dt_Task dt_Task2 = BaseDal.QueryFirst(x => x.Roadway == ChildPosiDeviceCode && x.CurrentAddress== HCJaddres.ToString(), TaskOrderBy); |
| | | if (dt_Task2 != null) return dt_Task2; |
| | | return null; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ¯è½¦ç§»å¨ä»»å¡åç§»å¨ä¸çä»»å¡ |
| | | /// è·åæ¯è½¦ç§»å¨ä»»å¡åç§»å¨ä¸çä»»å¡ï¼å
¥åºï¼ |
| | | /// </summary> |
| | | /// <param name="DeviceCode"></param> |
| | | /// <returns></returns> |
| | | public Dt_Task MothermachinemovementTask2(string DeviceCode) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish && x.TaskState == (int)TaskInStatusEnum.RGV_InMothercarExecuting && x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly, TaskOrderBy); |
| | | return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InMothercarExecuting || x.RGVTaskType == (int)RGVTaskTypeEnum.TravelingOnly), TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ¯è½¦ç§»å¨ä»»å¡åç§»å¨ä¸çä»»å¡ï¼åºåºï¼ |
| | | /// </summary> |
| | | /// <param name="DeviceCode"></param> |
| | | public Dt_Task OutMothermaTask(string DeviceCode) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutNew || x.TaskState == (int)TaskOutStatusEnum.RGV_OutMothercarExecuting || x.RGVTaskType == (int)TaskOutStatusEnum.RGV_OutMothercarFinish), TaskOrderBy); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | return BaseDal.QueryFirst(x => x.Roadway == DeviceCode && (x.TaskState == (int)TaskInStatusEnum.RGV_InReleaseFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheExecuting || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheFinish || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseExecuting || x.TaskState == (int)TaskInStatusEnum.RGV_InZicheReleaseFinish) && x.RGVTaskType == (int)RGVTaskTypeEnum.PickingUp, TaskOrderBy); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | task.TaskState = (int)TaskOutStatusEnum.RGV_OutZicheReleaseFinish; |
| | | task.RGVTaskType = (int)RGVTaskTypeEnum.PickingUp; |
| | | task.Roadway = "RGV118"; |
| | | task.CurrentAddress = "1171"; |
| | | task.NextAddress = ""; |
| | | } |
| | | else |
| | | { |
| | |
| | | rGVstatus.msg = "æåWCSæ¥æ¶å°RGVç¼å·ä¸ºç©ºï¼è¯·æ£æ¥"; |
| | | return rGVstatus; |
| | | } |
| | | |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == item.rgvTag); |
| | | if (device == null) |
| | | { |
| | |
| | | rGVstatus.msg = "æ¥è¯¢çRGVå·²æçº¿"; |
| | | return rGVstatus; |
| | | } |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | |
| | | //å½åä½ç½® |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RGVCurrentlocation" && x.DeviceProParamType == "RGVCurrentlocation"); |
| | | |
| | | DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RGVCurrentlocation" && x.DeviceProParamType == "RGVCurrentlocation"); |
| | | |
| | | if (item.type == "pick") //åè´§ |
| | | { |
| | |
| | | return rGVstatus; |
| | | } |
| | | |
| | | int Currentlocation = conveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | int Currentlocation = Commonstacker.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | if (Currentlocation == aGVStation.Motherinlaw) //æ¯å¦å¨åè´§ä½ |
| | | { |
| | | rGVstatus.code = 0; |
| | |
| | | else if (item.type == "put") //æ¾è´§ |
| | | { |
| | | AGVStation aGVStation = _gvStationService.Corridorequipment(item.rgvTag); |
| | | int Currentlocation = conveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | int Currentlocation = Commonstacker.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | |
| | | DeviceProDTO? deviceProFh = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RgvEquipmentStatus" && x.DeviceProParamType == "RgvEquipmentStatus"); |
| | | int Itstock = conveyorLine.Communicator.Read<short>(deviceProFh.DeviceProAddress); |
| | | DeviceProDTO? deviceProFh = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == item.rgvTag && x.DeviceProParamName == "RgvEquipmentStatus" && x.DeviceProParamType == "RgvEquipmentStatus"); |
| | | int Itstock = Commonstacker.Communicator.Read<short>(deviceProFh.DeviceProAddress); |
| | | |
| | | if (aGVStation.Motherinlaw== Currentlocation && Itstock==0) |
| | | { |