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