|
@@ -258,7 +258,6 @@ module.exports = app => {
|
|
|
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
- console.log(checkData.opinion);
|
|
|
await transaction.update(this.tableName, {id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time});
|
|
|
// 计算并合同支付最终数据
|
|
|
const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
@@ -363,6 +362,8 @@ module.exports = app => {
|
|
|
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
+ // 计算并合同支付最终数据
|
|
|
+ const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
await transaction.update(this.tableName, {id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time});
|
|
|
// 同步 期信息
|
|
|
await transaction.update(this.ctx.service.stage.tableName, {
|
|
@@ -370,6 +371,7 @@ module.exports = app => {
|
|
|
contract_tp: tpData.contract_tp,
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
times: times + 1,
|
|
|
+ yf_tp: yfPay.tp,
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
// 拷贝新一次审核流程列表
|
|
@@ -430,8 +432,20 @@ module.exports = app => {
|
|
|
});
|
|
|
const preAuditor = auditors2[auditorIndex - 1];
|
|
|
|
|
|
+ const tpData = await this.ctx.service.stageBills.getSumTotalPrice(this.ctx.stage);
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
+ // 计算并合同支付最终数据
|
|
|
+ const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
+ // 同步 期信息
|
|
|
+ await transaction.update(this.ctx.service.stage.tableName, {
|
|
|
+ id: stageId,
|
|
|
+ contract_tp: tpData.contract_tp,
|
|
|
+ qc_tp: tpData.qc_tp,
|
|
|
+ times: times + 1,
|
|
|
+ yf_tp: yfPay.tp,
|
|
|
+ cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
+ });
|
|
|
await transaction.update(this.tableName, {id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time});
|
|
|
// 顺移气候审核人流程顺序
|
|
|
this.initSqlBuilder();
|