| | |
| | | // 用于保存每个设备的初始状态 |
| | | var initialStates = new Dictionary<long, WcsDeviceOutput>(); |
| | | |
| | | var listPlc = _db.Queryable<WcsPlc>().Where(s => s.Type == PLCTypeEnum.StackingMachine || s.Type == PLCTypeEnum.ConveyorLine).ToList(); |
| | | var listPlc = _db.Queryable<WcsPlc>().Where(s => s.Type == PLCTypeEnum.StackingMachine || s.Type == PLCTypeEnum.ConveyorLine).Where(s => s.Enable == YesNoEnum.Y).ToList(); |
| | | var listPlcId = listPlc.Select(s => s.Id).ToList(); |
| | | var listPlcDevice = _db.Queryable<WcsDevice>().Where(s => s.DeviceType == DeviceTypeEnum.Business && listPlcId.Contains(s.PlcId)).Select<WcsDeviceOutput>().ToList(); |
| | | var listPlcDeviceId = listPlcDevice.Select(s => s.Id).ToList(); |