Browse Source

导入总成组修改

HQ
lvzb 10 months ago
parent
commit
e5f2e386e6
  1. 5
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs

5
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs

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

Loading…
Cancel
Save