| | |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsAlarmInfoRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.PlcIP.Contains(input.SearchKey) |
| | | u.StationNum.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PlcIP), u => u.PlcIP.Contains(input.PlcIP.Trim())) |
| | | .WhereIF(input.Status.HasValue, u => u.Status == input.Status) |
| | |
| | | if (value == null) |
| | | throw Oops.Bah("未找到复位地址,请在字典管理中设置"); |
| | | PLCUtil modUtil = new PLCUtil(modPlc); |
| | | switch (input.layer) |
| | | { |
| | | case 1: |
| | | break; |
| | | case 2: |
| | | { |
| | | modUtil.SetPlcDBValue(PLCDataTypeEnum.Bit, value.Value, "1"); |
| | | } |
| | | break; |
| | | case 3: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | //switch (input.layer) |
| | | //{ |
| | | // case 1: |
| | | // modUtil.SetPlcDBValue(PLCDataTypeEnum.Bit, value.Value, "1"); |
| | | // break; |
| | | // case 2: |
| | | // { |
| | | // modUtil.SetPlcDBValue(PLCDataTypeEnum.Bit, value.Value, "1"); |
| | | // } |
| | | // break; |
| | | // case 3: |
| | | // modUtil.SetPlcDBValue(PLCDataTypeEnum.Bit, value.Value, "1"); |
| | | // break; |
| | | // default: |
| | | // break; |
| | | //} |
| | | |
| | | modUtil.SetPlcDBValue(PLCDataTypeEnum.Bit, value.Value, "1"); |
| | | modUtil.Close(); |
| | | |
| | | } |