Explorar o código

上报检查调整

MaiXinRong hai 1 día
pai
achega
050fcded2a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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);
                 }
                 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) {
                         checkData.checkResult.error.push({ errorType: 'expr_no_calc', name: '修改数据后,未计算本期合同计量' })
                     }