提单差异修改

dev
cjy 3 months ago
parent 22b21338f5
commit 5078e44e4b

@ -16,7 +16,7 @@ public static class SqlSugarDiffUtil
public static DiffLog GetDiff(List<DiffLogTableInfo> beforeData, List<DiffLogTableInfo> afterData)
{
string mianID = null;
if (beforeData != null)
if (beforeData != null && beforeData.Count>0)
{
var keyCoulumn = beforeData[0].Columns.FirstOrDefault(p => p.IsPrimaryKey == true);
if (keyCoulumn != null)
@ -24,7 +24,7 @@ public static class SqlSugarDiffUtil
mianID = keyCoulumn.Value.ToString();
}
}
else if (afterData != null)
else if (afterData != null && afterData.Count > 0)
{
var keyCoulumn = afterData[0].Columns.FirstOrDefault(p => p.IsPrimaryKey == true);
if (keyCoulumn != null)

@ -108,7 +108,7 @@ namespace DS.WMS.Core.Op.Method
}
}
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
tenantDb.Updateable(info).ExecuteCommand();
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
}
}

Loading…
Cancel
Save