diff --git a/LanSheng/LanShengModel/DeviceData.cs b/LanSheng/LanShengModel/DeviceData.cs index 485ce08..8407ced 100644 --- a/LanSheng/LanShengModel/DeviceData.cs +++ b/LanSheng/LanShengModel/DeviceData.cs @@ -1126,14 +1126,13 @@ namespace LanShengModel public DeviceData? WZ { get; set; } #endregion - public string[] GetNotNullColumns() + public static string[] GetNotNullColumns(IEnumerable datas) { var Result = new List(); var Type = typeof(DeviceData); foreach (var Propety in Type.GetProperties()) { - if(Propety.GetValue(this) != null) - { + if (datas.Any(x => Propety.GetValue(x) != null)) { Result.Add(Propety.Name); } } diff --git a/LanSheng/LanShengService/DeviceService.cs b/LanSheng/LanShengService/DeviceService.cs index d490e39..3e37573 100644 --- a/LanSheng/LanShengService/DeviceService.cs +++ b/LanSheng/LanShengService/DeviceService.cs @@ -121,7 +121,7 @@ namespace LanShengService await temp.AsInsertable.ExecuteCommandAsync(); await temp.AsUpdateable - .UpdateColumns(Values1001[0].GetNotNullColumns()) + .UpdateColumns(DeviceData.GetNotNullColumns(Values1001)) .ExecuteCommandAsync(); } @@ -134,7 +134,7 @@ namespace LanShengService await temp.AsInsertable.ExecuteCommandAsync(); await temp.AsUpdateable - .UpdateColumns(Values1103[0].GetNotNullColumns()) + .UpdateColumns(DeviceData.GetNotNullColumns(Values1103)) .ExecuteCommandAsync(); } @@ -147,7 +147,7 @@ namespace LanShengService await temp.AsInsertable.ExecuteCommandAsync(); await temp.AsUpdateable - .UpdateColumns(Values2001[0].GetNotNullColumns()) + .UpdateColumns(DeviceData.GetNotNullColumns(Values2001)) .ExecuteCommandAsync(); } @@ -160,7 +160,7 @@ namespace LanShengService await temp.AsInsertable.ExecuteCommandAsync(); await temp.AsUpdateable - .UpdateColumns(Values2103[0].GetNotNullColumns()) + .UpdateColumns(DeviceData.GetNotNullColumns(Values2103)) .ExecuteCommandAsync(); } } diff --git a/ZhongLian/ZhongLianModel/MaintenanceDO.cs b/ZhongLian/ZhongLianModel/MaintenanceDO.cs index bcdb999..5cf29a2 100644 --- a/ZhongLian/ZhongLianModel/MaintenanceDO.cs +++ b/ZhongLian/ZhongLianModel/MaintenanceDO.cs @@ -151,6 +151,12 @@ namespace ZhongLianModel [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")] public string[]? ProcessResultPhoto { get; set; } + /// + /// 备注照片图片 + /// + [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")] + public string[]? RemarkPhoto { get; set; } + /// /// 创建日期 ///