|
|
@@ -562,6 +562,12 @@ module.exports = app => {
|
|
|
if (ctx.stage.status === auditConst.status.uncheck || ctx.stage.status === auditConst.status.checkNo) {
|
|
|
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' });
|
|
|
+ if (exprCount > 0) {
|
|
|
+ checkData.checkResult.error.push({ errorType: 'expr_no_calc', name: '修改数据后,未计算本期合同计量' })
|
|
|
+ }
|
|
|
+ }
|
|
|
ctx.body = { err: 0, msg: '', data: checkData.checkResult };
|
|
|
} catch (err) {
|
|
|
this.log(err);
|
|
|
@@ -724,6 +730,7 @@ module.exports = app => {
|
|
|
}
|
|
|
await ctx.service.stage.updateCheckCalcFlag(ctx.stage, true);
|
|
|
await ctx.service.stage.updateCacheTime(ctx.stage.id);
|
|
|
+ if (data.isExprCalc) await ctx.service.stage.updateExprCalcTime(ctx.stage);
|
|
|
ctx.body = responseData;
|
|
|
} catch (err) {
|
|
|
this.log(err);
|