|
|
@@ -39,6 +39,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services |
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.Name), (x, b) => x.Name.Contains(inputDto.Name)) |
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.Type), (x, b) => x.Type==Convert.ToInt32(inputDto.Type)) |
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(inputDto.Vesion), (x, b) => x.DeviceVersionKey == inputDto.Vesion) |
|
|
|
//.WhereIF(inputDto.IsDefault!=null, (x, b) => x.IsDefault == inputDto.IsDefault) |
|
|
|
.WhereIF(inputDto.Status != null, (x, b) => x.Status == inputDto.Status) |
|
|
|
.OrderBy((x, b) => x.CreateAt, OrderByType.Desc) |
|
|
|
.Select((x, b) => new |
|
|
@@ -63,6 +64,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services |
|
|
|
ReadWrite = x.ReadWrite, |
|
|
|
Description= x.Description, |
|
|
|
IsDefault= x.IsDefault, |
|
|
|
EventType= x.EventType, |
|
|
|
}) |
|
|
|
.ToPageListAsync(inputDto.Current, inputDto.PageSize, total); |
|
|
|
return new PageUtil() |
|
|
@@ -164,6 +166,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services |
|
|
|
ReadWrite = inputDto.ReadWrite, |
|
|
|
Description=inputDto.Description, |
|
|
|
ProductId= inputDto.ProductId, |
|
|
|
EventType= inputDto.EventType, |
|
|
|
DataJson= inputDto.DataJson?.Replace("\n",""), |
|
|
|
}).CallEntityMethod(m => m.Create()).ExecuteCommandAsync(); |
|
|
|
return res > 0; |
|
|
@@ -195,6 +198,7 @@ namespace BPA.SAAS.Manage.Application.Device.Services |
|
|
|
data.BoolLabel = inputDto.BoolLabel; |
|
|
|
data.ReadWrite = inputDto.ReadWrite; |
|
|
|
data.Description= inputDto.Description; |
|
|
|
data.EventType = inputDto.EventType; |
|
|
|
data.DataJson= inputDto.DataJson?.Replace("\n", ""); |
|
|
|
data.Status = (CommonStatus)Enum.ToObject(typeof(CommonStatus), inputDto.Status); |
|
|
|
var res =await _db.Updateable(data).ExecuteCommandAsync(); |
|
|
|