|
@@ -309,6 +309,9 @@ module.exports = app => {
|
|
|
|
|
|
async getFinalUsedData(tid, cid) {
|
|
|
const stage = await this.ctx.service.stage.getLastestStage(tid, true);
|
|
|
+ if (!stage) { // 防止未创建期时调用
|
|
|
+ return [];
|
|
|
+ }
|
|
|
if (stage.status === audit.stage.status.checked) {
|
|
|
const sql = 'SELECT scf.* ' +
|
|
|
' FROM ' + this.ctx.service.stageChangeFinal.tableName + ' scf ' +
|