| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.Log; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.Enum; |
| | | using WIDESEAWCS_ISystemServices; |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (conveyorLine != null) |
| | | { |
| | | AQMConveyorRgvommand aQMConveyor=AQMCommand(conveyorLine, "AQM001"); |
| | | //æ ¹æ®è®¾å¤æ¥æ¾åºå¯¹åºçç«å°ä¿¡æ¯ |
| | | /*List<AGVStation> aGVStations = _agvStationService.GetYljSide(conveyorLine.DeviceCode); |
| | | foreach (var Stations in aGVStations) |
| | | { |
| | | PlatformStatus aQMConveyor = StoticCommand(conveyorLine, Stations.ChildPosiDeviceCode); |
| | | if(aQMConveyor.HCJ_GoodsStatus==0) //å¯è¿è¡æ¾è´§ |
| | | { |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | //æ ¹æ®ç±»åæ¥æ¾ä»»å¡ |
| | | if (Stations.Station_material== (int)RGVEquipment.AbnormalOutbound) |
| | | { |
| | | //æ¥æ¾æ¯å¦æå¼å¸¸æ¬è¿ä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1); //è¿éè¦ä¼ å
¥å°å |
| | | } |
| | | else |
| | | { |
| | | //åºåºç«å°çä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2); |
| | | } |
| | | |
| | | |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | |
| | | /* |
| | | //å®å
¨é¨å¼é¨ç³è¯·+å®å
¨é¨ç¶æ 1 |
| | | if(aQMConveyor.DoorRequest==1) |
| | | { |
| | |
| | | //读åDBW8=1,DBW6=1,DBW10=1,DBW4=1,符ååï¼è¿è¡åå
¥åæ¢ç¶æDBW0=3 |
| | | AQMReturnnormal aQMReturnnormal=AQMStoticCommand(conveyorLine, "AQM001"); //夿 |
| | | |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | return conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == PLCmanipula && x.DeviceProParamName == DeviceProParamName && x.DeviceProParamType == DeviceProParamType); |
| | | } |
| | | |
| | | public PlatformStatus StoticCommand(CommonConveyorLine conveyorLine, string kladder) |
| | | { |
| | | PlatformStatus conveyorRgvCommand = new PlatformStatus(); |
| | | List<DeviceProDTO> deviceProDTO6 = conveyorLine.DeviceProDTOs |
| | | .Where(x => x.DeviceChildCode == kladder |
| | | && x.DeviceProParamType == "ReadDeviceCommand") |
| | | .ToList(); |
| | | foreach (var item in deviceProDTO6) |
| | | { |
| | | var paramName = item.DeviceProParamName; |
| | | var propertyInfo = typeof(PlatformStatus).GetProperty(paramName); |
| | | |
| | | if (propertyInfo != null) |
| | | { |
| | | if (item.DeviceDataType == "int") |
| | | { |
| | | var value = conveyorLine.Communicator.Read<short>(item.DeviceProAddress); |
| | | propertyInfo.SetValue(conveyorRgvCommand, value); |
| | | } |
| | | } |
| | | } |
| | | return conveyorRgvCommand; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |