|
@@ -230,6 +230,8 @@ module.exports = app => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async getSumTp(stage) {
|
|
async getSumTp(stage) {
|
|
|
|
|
+ if (!stage || stage.length === 0) return {};
|
|
|
|
|
+
|
|
|
const stages = stage instanceof Array ? stage : [stage];
|
|
const stages = stage instanceof Array ? stage : [stage];
|
|
|
const condition = {};
|
|
const condition = {};
|
|
|
condition.sid = stage.length === 1 ? stage[0].id : stages.map(x => { return x.id; });
|
|
condition.sid = stage.length === 1 ? stage[0].id : stages.map(x => { return x.id; });
|