Browse Source

1、修改垫层顺序问题

MY 3 ngày trước cách đây
mục cha
commit
271b976301
1 tập tin đã thay đổi với 48 bổ sung48 xóa
  1. 48 48
      JLHHJSvr/Helper/InterfaceHelper.cs

+ 48 - 48
JLHHJSvr/Helper/InterfaceHelper.cs

@@ -751,61 +751,61 @@ namespace JLHHJSvr.Helper
                 }
             }
 
-            var orderedKeys = new List<string>();
-            foreach (var kind in kindDict)
-            {
-                foreach (var cha in chastrSet)
-                {
-                    orderedKeys.Add($"{cha}-{kind.Value}");
-                }
-            }
-
-            foreach (var key in orderedKeys)
-            {
-                var parts = key.Split('-');
-                var cha = parts[0];
-                var kindName = parts[1];
-
-                var kindId = kindDict.FirstOrDefault(x => x.Value == kindName).Key;
-                var items = diancengList.Where(mx =>
-                    mx.chastr == cha &&
-                    mx.formulakind == kindId);
-
-                foreach (var mx in items)
-                {
-                    if (mx.formulakind == 999)
-                    {
-                        this.ProcessChuangWangPz(mx, interfaceList, mx.chastr, ++countDict[key]);
-                    }
-                    else if (mx.mtrlid > 0 && mx.formulakind == 1201)
-                    {
-                        this.ProcessDingbuLianMianPz(mx, interfaceList, mx.chastr, ++countDict[key]);
-                    }
-                    else if (mx.mtrlid > 0 && new int[] { 32, 12, 13, 14, 29 }.Contains(mx.formulakind.Value))
-                    {
-                        this.ProcessWangMianBLPz(mx, interfaceList, mx.chastr, kindDict[mx.formulakind.Value], ++countDict[key]);
-                    }
-                }
-            }
-
-            //foreach (var mx in diancengList)
+            //var orderedKeys = new List<string>();
+            //foreach (var kind in kindDict)
             //{
-            //    var key = $"{mx.chastr}-{kindDict[mx.formulakind.Value]}";
-
-            //    if (mx.formulakind == 999)
+            //    foreach (var cha in chastrSet)
             //    {
-            //        this.ProcessChuangWangPz(mx, interfaceList, mx.chastr, ++countDict[key]);
+            //        orderedKeys.Add($"{cha}-{kind.Value}");
             //    }
-            //    else if (mx.mtrlid > 0 && mx.formulakind == 1201)
-            //    {
-            //        this.ProcessDingbuLianMianPz(mx, interfaceList, mx.chastr, ++countDict[key]);
-            //    }
-            //    else if (mx.mtrlid > 0 && new int[] { 32, 12, 13, 14, 29 }.Contains(mx.formulakind.Value))
+            //}
+
+            //foreach (var key in orderedKeys)
+            //{
+            //    var parts = key.Split('-');
+            //    var cha = parts[0];
+            //    var kindName = parts[1];
+
+            //    var kindId = kindDict.FirstOrDefault(x => x.Value == kindName).Key;
+            //    var items = diancengList.Where(mx =>
+            //        mx.chastr == cha &&
+            //        mx.formulakind == kindId);
+
+            //    foreach (var mx in items)
             //    {
-            //        this.ProcessWangMianBLPz(mx, interfaceList, mx.chastr, kindDict[mx.formulakind.Value], ++countDict[key]);
+            //        if (mx.formulakind == 999)
+            //        {
+            //            this.ProcessChuangWangPz(mx, interfaceList, mx.chastr, ++countDict[key]);
+            //        }
+            //        else if (mx.mtrlid > 0 && mx.formulakind == 1201)
+            //        {
+            //            this.ProcessDingbuLianMianPz(mx, interfaceList, mx.chastr, ++countDict[key]);
+            //        }
+            //        else if (mx.mtrlid > 0 && new int[] { 32, 12, 13, 14, 29 }.Contains(mx.formulakind.Value))
+            //        {
+            //            this.ProcessWangMianBLPz(mx, interfaceList, mx.chastr, kindDict[mx.formulakind.Value], ++countDict[key]);
+            //        }
             //    }
             //}
 
+            foreach (var mx in diancengList)
+            {
+                var key = $"{mx.chastr}-{kindDict[mx.formulakind.Value]}";
+
+                if (mx.formulakind == 999)
+                {
+                    this.ProcessChuangWangPz(mx, interfaceList, mx.chastr, ++countDict[key]);
+                }
+                else if (mx.mtrlid > 0 && mx.formulakind == 1201)
+                {
+                    this.ProcessDingbuLianMianPz(mx, interfaceList, mx.chastr, ++countDict[key]);
+                }
+                else if (mx.mtrlid > 0 && new int[] { 32, 12, 13, 14, 29 }.Contains(mx.formulakind.Value))
+                {
+                    this.ProcessWangMianBLPz(mx, interfaceList, mx.chastr, kindDict[mx.formulakind.Value], ++countDict[key]);
+                }
+            }
+
             if (countDict["大侧-垫层"] > 0)
             {
                 interfaceList.Add(InserMattressInterfacePz("垫层", "大侧垫层生产说明", 1, new string[1]));