Skip to content

Commit

Permalink
fix [Bug]: 公式计算错误 #7091
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Nov 15, 2024
1 parent 6ab379d commit 8f7d2d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/objectql/src/formula/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export const isFieldFormulaConfigQuoted = (configA: SteedosFieldFormulaTypeConfi
return !!configAQuoteds.length;
}

function includesAny(mainString, stringArray) {
return _.some(stringArray, (substr) => mainString.includes(substr));
}

/**
* 公式字段配置是否引用了某个对象和字段
* @param config 公式字段配置
Expand All @@ -47,6 +51,8 @@ export const isFieldFormulaConfigQuotingObjectAndFields =(config: SteedosFieldFo
return quote.object_name === objectName;
}
});
}else if(config.formula){
return includesAny(config.formula, fieldNames);
}
else {
return false;
Expand Down

0 comments on commit 8f7d2d4

Please sign in to comment.