Procházet zdrojové kódy

修复床垫清单报错:关键字不在字典中

chen_yjin před 1 týdnem
rodič
revize
b69638e6f8
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      JLHHJSvr/Excutor/CreatPrdPfExcutor.cs

+ 2 - 2
JLHHJSvr/Excutor/CreatPrdPfExcutor.cs

@@ -145,12 +145,12 @@ namespace JLHHJSvr.Excutor
                         }
 
                         var _name = mx.bj_pzname_mx_mx;
-                        if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(bcpNames[mx.wip_type]))
+                        if (!string.IsNullOrEmpty(mx.wip_type) && bcpNames.ContainsKey(mx.wip_type) && !string.IsNullOrEmpty(bcpNames[mx.wip_type]))
                         {
                             _name = bcpNames[mx.wip_type];
                         }
                         var _dscrp = mx.bj_pzname_mx_mx;
-                        if (!string.IsNullOrEmpty(mx.wip_type) && !string.IsNullOrEmpty(bcpDscrp[mx.wip_type]))
+                        if (!string.IsNullOrEmpty(mx.wip_type) && bcpDscrp.ContainsKey(mx.wip_type) && !string.IsNullOrEmpty(bcpDscrp[mx.wip_type]))
                         {
                             _dscrp = bcpDscrp[mx.wip_type];
                         }