浏览代码

修复索引报错问题

chen_yjin 4 周之前
父节点
当前提交
66117d6967
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      JLHHJSvr/Helper/MattressHelper.cs

+ 3 - 1
JLHHJSvr/Helper/MattressHelper.cs

@@ -2372,13 +2372,15 @@ namespace JLHHJSvr.Helper
                         foreach (var qdmx in bcpMxList)
                         {
                             var mtrlid = 0;
+                            var formulaid = 0;
                             var arr = mx.Value.Where((itm) => itm.mtrlid == qdmx.mtrlid).ToList();
                             if (arr.Count > 0)
                             {
                                 mtrlid = arr[0].erp_mtrlid.Value;
+                                formulaid = arr[0].formulaid.Value;
                             }
                             qdmx.erp_mtrlid = mtrlid;
-                            qdmx.formulaid = arr[0].formulaid;
+                            qdmx.formulaid = formulaid;
                         }
 
                         bcpMattress.mxlist = bcpMxList;