|
|
@ -750,16 +750,17 @@ SELECT top 1 v.Id |
|
|
|
foreach (var group in groups) |
|
|
|
{ |
|
|
|
|
|
|
|
var olditem= await _assemblyCfgGroupRepository.FirstOrDefaultAsync(r=>r.IsDisable==true&&r.SpecExplain== group.Key.SpecExplain.Trim()&& r.ColorExplain == group.Key.ColorExplain.Trim()); |
|
|
|
var olditem= await _assemblyCfgGroupRepository.FirstOrDefaultAsync(r=>r.IsDisable==false&&r.SpecExplain== group.Key.SpecExplain.Trim()&& r.ColorExplain == group.Key.ColorExplain.Trim()); |
|
|
|
if (olditem != null) |
|
|
|
{ |
|
|
|
olditem.IsDisable = false; |
|
|
|
olditem.IsDisable = true; |
|
|
|
deleteAssemblyCfgGroups.Add(olditem); |
|
|
|
} |
|
|
|
string groupCode = group.Key.SpecExplain + group.Key.ColorExplain; |
|
|
|
AssemblyCfgGroup assemblyCfgGroup = new AssemblyCfgGroup(GuidGenerator.Create() , groupCode,"",true); |
|
|
|
assemblyCfgGroup.SpecExplain = group.Key.SpecExplain.Trim(); |
|
|
|
assemblyCfgGroup.ColorExplain = group.Key.ColorExplain.Trim(); |
|
|
|
assemblyCfgGroup.IsDisable = false; |
|
|
|
foreach (var item in group) |
|
|
|
{ |
|
|
|
var material3 = material3Lst.FirstOrDefault(r => r.MaterialNum == item.MaterialNum.Trim()); |
|
|
|