MaiXinRong 2 лет назад
Родитель
Сommit
50557d56db
1 измененных файлов с 11 добавлено и 7 удалено
  1. 11 7
      app/lib/analysis_excel.js

+ 11 - 7
app/lib/analysis_excel.js

@@ -939,13 +939,17 @@ class AnalysisStageExcelTree extends AnalysisExcelTree {
             node.name = this.ctx.helper.replaceReturn(this.ctx.helper._.trimEnd(row[this.colsDef.name]));
             node.unit = this.ctx.helper.replaceReturn(this.ctx.helper._.trimEnd(row[this.colsDef.unit]));
             const xmj = this.cacheTree.addXmjNode(node);
-            xmj.deal_dgn_qty1 = aeUtils.toNumber(row[this.colsDef.deal_dgn_qty1]);
-            xmj.deal_dgn_qty2 = aeUtils.toNumber(row[this.colsDef.deal_dgn_qty2]);
-            xmj.c_dgn_qty1 = aeUtils.toNumber(row[this.colsDef.c_dgn_qty1]);
-            xmj.c_dgn_qty2 = aeUtils.toNumber(row[this.colsDef.c_dgn_qty2]);
-            xmj.postil = this.ctx.helper.replaceReturn(row[this.colsDef.postil]);
-            this.ctx.helper.checkDgnQtyPrecision(xmj);
-            return xmj;
+            if (xmj) {
+                xmj.deal_dgn_qty1 = aeUtils.toNumber(row[this.colsDef.deal_dgn_qty1]);
+                xmj.deal_dgn_qty2 = aeUtils.toNumber(row[this.colsDef.deal_dgn_qty2]);
+                xmj.c_dgn_qty1 = aeUtils.toNumber(row[this.colsDef.c_dgn_qty1]);
+                xmj.c_dgn_qty2 = aeUtils.toNumber(row[this.colsDef.c_dgn_qty2]);
+                xmj.postil = this.ctx.helper.replaceReturn(row[this.colsDef.postil]);
+                this.ctx.helper.checkDgnQtyPrecision(xmj);
+                return xmj;
+            } else {
+                return null;
+            }
         } catch (error) {
             if (error.stack) {
                 this.ctx.logger.error(error);