Browse Source

报表相关

MaiXinRong 2 years ago
parent
commit
49d28d7727
1 changed files with 8 additions and 8 deletions
  1. 8 8
      app/lib/stage_im.js

+ 8 - 8
app/lib/stage_im.js

@@ -310,8 +310,8 @@ class StageIm {
                         (!im.code || im.code === d.code) &&
                         (!im.code || im.code === d.code) &&
                         (!im.name || im.name === d.name) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
                         (!im.unit || im.unit === d.unit) &&
-                        (!im.pid || im.pid === d.pid) &&
-                        (!im.pos_name || im.pos_name === d.pos_name);
+                        ((!im.pid && !d.pid) || im.pid === d.pid) &&
+                        ((!im.pos_name && !d.pos_name) || im.pos_name === d.pos_name);
                 });
                 });
                 break;
                 break;
             case imType.zl.value:
             case imType.zl.value:
@@ -321,8 +321,8 @@ class StageIm {
                         (!im.name || im.name === d.name) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
                         (!im.unit || im.unit === d.unit) &&
                         self.ctx.helper.checkZero(self.ctx.helper.sub(im[self.up_field], d[self.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);
+                        ((!im.pid && !d.pid) || im.pid === d.pid) &&
+                        ((!im.pos_name && !d.pos_name) || im.pos_name === d.pos_name);
                 });
                 });
                 break;
                 break;
             case imType.bw.value:
             case imType.bw.value:
@@ -332,8 +332,8 @@ class StageIm {
                         (!im.name || im.name === d.name) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
                         (!im.unit || im.unit === d.unit) &&
                         self.ctx.helper.checkZero(self.ctx.helper.sub(im[self.up_field], d[self.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);
+                        ((!im.pid && !d.pid) || im.pid === d.pid) &&
+                        ((!im.pos_name && !d.pos_name) || im.pos_name === d.pos_name);
                 });
                 });
                 break;
                 break;
             case imType.bb.value:
             case imType.bb.value:
@@ -341,8 +341,8 @@ class StageIm {
                     return im.lid === d.lid &&
                     return im.lid === d.lid &&
                         (!im.name || im.name === d.name) &&
                         (!im.name || im.name === d.name) &&
                         (!im.unit || im.unit === d.unit) &&
                         (!im.unit || im.unit === d.unit) &&
-                        (!im.pid || im.pid === d.pid) &&
-                        (!im.pos_name || im.pos_name === d.pos_name);
+                        ((!im.pid && !d.pid) || im.pid === d.pid) &&
+                        ((!im.pos_name && !d.pos_name) || im.pos_name === d.pos_name);
                 });
                 });
                 break;
                 break;
         }
         }