|
@@ -218,7 +218,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
await transaction.update(this.tableName, {id: audit.id, status: auditConst.status.checking, begin_time: new Date()});
|
|
|
// 计算原报最终数据
|
|
|
- const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
+ const [yfPay, sfPay] = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 复制一份下一审核人数据
|
|
|
await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times, 1, transaction);
|
|
|
await this.ctx.service.stageJgcl.updateHistory(this.ctx.stage, transaction);
|
|
@@ -231,6 +231,7 @@ module.exports = app => {
|
|
|
contract_tp: tpData.contract_tp,
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
yf_tp: yfPay.tp,
|
|
|
+ sf_tp: sfPay.tp,
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
|
|
@@ -274,7 +275,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
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);
|
|
|
+ const [yfPay, sfPay] = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 无下一审核人表示,审核结束
|
|
|
if (nextAudit) {
|
|
|
// 复制一份下一审核人数据
|
|
@@ -290,6 +291,7 @@ module.exports = app => {
|
|
|
contract_tp: tpData.contract_tp,
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
yf_tp: yfPay.tp,
|
|
|
+ sf_tp: sfPay.tp,
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
|
|
@@ -323,6 +325,7 @@ module.exports = app => {
|
|
|
contract_tp: tpData.contract_tp,
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
yf_tp: yfPay.tp,
|
|
|
+ sf_tp: sfPay.tp,
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
|
|
@@ -385,7 +388,7 @@ module.exports = app => {
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
// 计算并合同支付最终数据
|
|
|
- const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
+ const [yfPay, sfPay] = 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, {
|
|
@@ -394,6 +397,7 @@ module.exports = app => {
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
times: times + 1,
|
|
|
yf_tp: yfPay.tp,
|
|
|
+ sf_tp: sfPay.tp,
|
|
|
cache_time_r: this.ctx.stage.cache_time_l,
|
|
|
});
|
|
|
// 拷贝新一次审核流程列表
|
|
@@ -461,7 +465,7 @@ module.exports = app => {
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
// 计算并合同支付最终数据
|
|
|
- const yfPay = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
+ const [yfPay, sfPay] = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 同步 期信息
|
|
|
await transaction.update(this.ctx.service.stage.tableName, {
|
|
|
id: stageId,
|
|
@@ -469,6 +473,7 @@ module.exports = app => {
|
|
|
qc_tp: tpData.qc_tp,
|
|
|
times: times,
|
|
|
yf_tp: yfPay.tp,
|
|
|
+ sf_tp: sfPay.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});
|