Browse Source

上报检查调整

MaiXinRong 1 day atrás
parent
commit
050fcded2a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/controller/stage_controller.js

+ 2 - 1
app/controller/stage_controller.js

@@ -563,7 +563,8 @@ module.exports = app => {
                     await this._innerCheckChangeBillsOver(ctx, checkData);
                     await this._innerCheckChangeBillsOver(ctx, checkData);
                 }
                 }
                 if (!ctx.stage.update_expr_calc_time || (ctx.stage.update_calc_time && ctx.stage.update_expr_calc_time < ctx.stage.update_calc_time)) {
                 if (!ctx.stage.update_expr_calc_time || (ctx.stage.update_calc_time && ctx.stage.update_expr_calc_time < ctx.stage.update_calc_time)) {
-                    const exprCount = await ctx.service.expr.count({ tid: ctx.stage.tid, calc_module: 'stage' });
+                    const expr = await ctx.service.expr.getAllDataByCondition({ where: { tid: ctx.stage.tid, calc_module: 'stage' } });
+                    const exprCount = expr.filter(x => { return !!x.expr }).length;
                     if (exprCount > 0) {
                     if (exprCount > 0) {
                         checkData.checkResult.error.push({ errorType: 'expr_no_calc', name: '修改数据后,未计算本期合同计量' })
                         checkData.checkResult.error.push({ errorType: 'expr_no_calc', name: '修改数据后,未计算本期合同计量' })
                     }
                     }