修改
This commit is contained in:
@@ -169,6 +169,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
DictionaryCode = lst.Max(x => x.DictionaryCode),
|
||||
DictionaryType = lst.Max(x => x.DictionaryType),
|
||||
DateType = lst.Select(x => x.DateType).FirstOrDefault(),
|
||||
ForeignKeyValue = lst.Select(x => x.ForeignKeyValue).FirstOrDefault(),
|
||||
ForeignKeyText = lst.Select(x => x.ForeignKeyText).FirstOrDefault(),
|
||||
ForeignKeyTable = lst.Select(x => x.ForeignKeyTable).FirstOrDefault(),
|
||||
DataType = lst.Select(x => x.DataType).FirstOrDefault(),
|
||||
Id =NewId.NextGuid()//新id,
|
||||
}).ToList();
|
||||
|
||||
@@ -189,10 +193,18 @@ namespace IRaCIS.Core.Application.Service
|
||||
var item = alllist.FirstOrDefault(y => y.ValueCN == x.ValueCN);
|
||||
if (item != null)
|
||||
{
|
||||
x.Code=x.Code.IsNullOrEmpty()?item.Code:x.Code;
|
||||
x.Code=item.Code;
|
||||
x.Value = x.Code.IsNullOrEmpty() ? item.Value : x.Value;
|
||||
x.DictionaryType = x.DictionaryType.IsNullOrEmpty() ? item.DictionaryType : x.DictionaryType;
|
||||
x.DictionaryCode = x.DictionaryCode.IsNullOrEmpty() ? item.DictionaryCode : x.DictionaryCode;
|
||||
x.DataType = x.DataType.IsNullOrEmpty() ? item.DataType : x.DataType;
|
||||
x.DateType = x.DateType.IsNullOrEmpty() ? item.DateType : x.DateType;
|
||||
x.DictionaryKey = x.DictionaryKey.IsNullOrEmpty() ? item.DictionaryKey : x.DictionaryKey;
|
||||
x.IsShowParent = x.IsShowParent==null ? item.IsShowParent : x.IsShowParent;
|
||||
x.ForeignKeyTable = x.ForeignKeyTable.IsNullOrEmpty() ? item.ForeignKeyTable : x.ForeignKeyTable;
|
||||
x.ForeignKeyText = x.ForeignKeyText.IsNullOrEmpty() ? item.ForeignKeyText : x.ForeignKeyText;
|
||||
x.ForeignKeyValue = x.ForeignKeyValue.IsNullOrEmpty() ? item.ForeignKeyValue : x.ForeignKeyValue;
|
||||
x.EnumType = x.EnumType.IsNullOrEmpty() ? item.EnumType : x.EnumType;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user