Просмотр исходного кода

合同支付,不关联期时,计算问题

MaiXinRong 16 часов назад
Родитель
Сommit
cfb97900ce

+ 2 - 0
app/service/stage_bonus.js

@@ -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; });

+ 2 - 0
app/service/stage_jgcl.js

@@ -318,6 +318,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; });

+ 2 - 0
app/service/stage_other.js

@@ -282,6 +282,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; });

+ 2 - 0
app/service/stage_safe_prod.js

@@ -317,6 +317,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; });

+ 2 - 0
app/service/stage_temp_land.js

@@ -286,6 +286,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; });

+ 2 - 0
app/service/stage_yjcl.js

@@ -297,6 +297,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; });