Pārlūkot izejas kodu

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

chen_yjin 1 nedēļu atpakaļ
vecāks
revīzija
b69638e6f8
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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];
                         }