增加维修单备注薄片

main
潘建东 9 months ago
parent 7ccee16059
commit 6ea71e8b30

@ -1126,14 +1126,13 @@ namespace LanShengModel
public DeviceData? WZ { get; set; }
#endregion
public string[] GetNotNullColumns()
public static string[] GetNotNullColumns(IEnumerable<DeviceData> datas)
{
var Result = new List<string>();
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);
}
}

@ -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();
}
}

@ -151,6 +151,12 @@ namespace ZhongLianModel
[SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")]
public string[]? ProcessResultPhoto { get; set; }
/// <summary>
/// 备注照片图片
/// </summary>
[SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")]
public string[]? RemarkPhoto { get; set; }
/// <summary>
/// 创建日期
/// </summary>

Loading…
Cancel
Save