ソースを参照

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

chen_yjin 1 週間 前
コミット
b69638e6f8
1 ファイル変更2 行追加2 行削除
  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];
                         }