Ver código fonte

1、修复无法打开床垫清单问题

MY 4 dias atrás
pai
commit
f28b2e1d3f
1 arquivos alterados com 11 adições e 12 exclusões
  1. 11 12
      JLHHJSvr/Helper/InterfaceHelper.cs

+ 11 - 12
JLHHJSvr/Helper/InterfaceHelper.cs

@@ -391,24 +391,23 @@ namespace JLHHJSvr.Helper
                 resultList = erpHelper.GetERPList<erp_configure_code>("GetL1ConfigureCode", parameters);
             }
 
-
-            var resultDict = resultList.ToDictionary(r => r.name, r => r);
-
             for (var i = 0; i < interfaceList.Count; i++)
             {
-                var current = interfaceList[i];
-                current.printid = i + 1;
+                interfaceList[i].printid = i + 1;
 
-                if (resultDict.TryGetValue(current.bj_pzname, out var result))
+                foreach (var result in resultList)
                 {
-                    if (result.pzid > 0)
+                    if (interfaceList[i].bj_pzname == result.name)
                     {
-                        current.erp_pzid = result.pzid;
-                        current.erp_pzcode = result.pzcode;
-                        current.erp_pzname = result.name;
-                    }
+                        if (result.pzid > 0)
+                        {
+                            interfaceList[i].erp_pzid = result.pzid;
+                            interfaceList[i].erp_pzcode = result.pzcode;
+                            interfaceList[i].erp_pzname = result.name;
+                        }
 
-                    if (current.bj_inputtype != 2) current.bj_inputtype = result.inputtype;
+                        if (interfaceList[i].bj_inputtype != 2) interfaceList[i].bj_inputtype = result.inputtype;
+                    }
                 }
             }
         }