소스 검색

1. 关联台账,中间计量,下载问题
2. 报表,中间计量相关

MaiXinRong 3 년 전
부모
커밋
b2ee1abcbf
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      app/controller/stage_rela_controller.js
  2. 3 3
      app/lib/stage_im.js

+ 1 - 0
app/controller/stage_rela_controller.js

@@ -14,6 +14,7 @@ const measureType = require('../const/tender').measureType;
 const tenderConst = require('../const/tender');
 const sendToWormhole = require('stream-wormhole');
 const path = require('path');
+const fs = require('fs');
 
 module.exports = app => {
 

+ 3 - 3
app/lib/stage_im.js

@@ -329,7 +329,7 @@ class StageIm {
                         (!im.code || im.code === d.code) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
-                        self.ctx.helper.checkZero(self.ctx.helper.sub(im[up_field], d[up_field])) &&
+                        self.ctx.helper.checkZero(self.ctx.helper.sub(im[self.up_field], d[self.up_field])) &&
                         (!im.pid || im.pid === d.pid) &&
                         (!im.pos_name || im.pos_name === d.pos_name);
                 });
@@ -340,7 +340,7 @@ class StageIm {
                         (!im.code || im.code === d.code) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
-                        self.ctx.helper.checkZero(self.ctx.helper.sub(im[up_field], d[up_field])) &&
+                        self.ctx.helper.checkZero(self.ctx.helper.sub(im[self.up_field], d[self.up_field])) &&
                         (!im.pid || im.pid === d.pid) &&
                         (!im.pos_name || im.pos_name === d.pos_name);
                 });
@@ -839,7 +839,7 @@ class StageIm {
             let im = nodeImData.find(function(d) {
                 return d.lid === node.id &&
                     d.code === p.b_code && p.name === d.name && p.unit === d.unit &&
-                    self.ctx.helper.checkZero(self.ctx.helper.sub(p[up_field], d[up_field]));
+                    self.ctx.helper.checkZero(self.ctx.helper.sub(p[self.up_field], d[self.up_field]));
             });
             if (!im) {
                 const peg = this._getPegNode(node);