Browse Source

永久材料报表数据问题

MaiXinRong 10 months ago
parent
commit
7ab9dc6f29
2 changed files with 3 additions and 2 deletions
  1. 2 2
      app/service/report_memory.js
  2. 1 0
      app/service/stage.js

+ 2 - 2
app/service/report_memory.js

@@ -1292,8 +1292,8 @@ module.exports = app => {
 
                 const data = await this.ctx.service.stageYjcl.getStageData(this.ctx.stage);
                 for (const d of data) {
-                    d.end_qty = this.ctx.helper.add(d.pre_qty, qty);
-                    d.end_tp = this.ctx.helper.add(d.pre_tp, tp);
+                    d.end_qty = this.ctx.helper.add(d.pre_qty, d.qty);
+                    d.end_tp = this.ctx.helper.add(d.pre_tp, d.tp);
                 }
                 return data;
             } catch (err) {

+ 1 - 0
app/service/stage.js

@@ -816,6 +816,7 @@ module.exports = app => {
                         }
                     }
                 }
+                await transaction.delete(this.ctx.service.stageYjcl.tableName, {sid: id});
                 await transaction.delete(this.ctx.service.stageBonus.tableName, { sid: id });
                 await transaction.delete(this.ctx.service.stageOther.tableName, { sid: id });
                 // 同步删除进度里所选的期