|
@@ -763,10 +763,13 @@ module.exports = app => {
|
|
|
|
|
|
async getStageByDataCollect(tenderId) {
|
|
|
const stages = await this.db.select(this.tableName, {
|
|
|
- columns: ['s_time', 'contract_tp', 'qc_tp', 'pc_tp', 'pre_contract_tp', 'pre_qc_tp'],
|
|
|
+ columns: ['status', 's_time', 'contract_tp', 'qc_tp', 'pc_tp', 'pre_contract_tp', 'pre_qc_tp'],
|
|
|
where: { tid: tenderId },
|
|
|
orders: [['order', 'desc']],
|
|
|
});
|
|
|
+ if (stages.length > 0 && stages[0].status === auditConst.status.uncheck) {
|
|
|
+ stages.splice(0, 1);
|
|
|
+ }
|
|
|
for (const s of stages) {
|
|
|
s.tp = this.ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]);
|
|
|
s.pre_tp = this.ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp);
|