| | |
| | | using System.Drawing.Drawing2D; |
| | | using WCS.Application.Entity; |
| | | using WCS.Application.Service.WcsDevice.Dto; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinComponentApiGetAuthorizerInfoResponse.Types.Authorizer.Types; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | |
| | | modPlc = plcList.FirstOrDefault(m => m.Text == "1层托盘输送线"); |
| | | if (modPlc == null) |
| | | throw Oops.Bah($"未查询到{input.Layer}楼层PLC信息"); |
| | | DbNum = ""; |
| | | DbNum = "DB1100"; |
| | | break; |
| | | case "2": |
| | | modPlc = plcList.FirstOrDefault(m => m.Text == "2层托盘输送线"); |
| | |
| | | modPlc = plcList.FirstOrDefault(m => m.Text == "3层托盘输送线"); |
| | | if (modPlc == null) |
| | | throw Oops.Bah($"未查询到{input.Layer}楼层PLC信息"); |
| | | DbNum = ""; |
| | | DbNum = "DB1100"; |
| | | break; |
| | | default: |
| | | throw Oops.Bah("楼层信息错误"); |
| | |
| | | .WhereIF(input.PlcId > 0, u => u.PlcId == input.PlcId) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StationNum), u => u.StationNum.Contains(input.StationNum.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Text), u => u.Text.Contains(input.Text.Trim())) |
| | | .WhereIF(input.DeviceType.HasValue, u => u.DeviceType == input.DeviceType) |
| | | //处理外键和TreeSelector相关字段的连接 |
| | | .LeftJoin<WcsPlc>((u, plcid) => u.PlcId == plcid.Id) |
| | | .Select((u, plcid) => new WcsDeviceOutput |