This commit is contained in:
@@ -20,17 +20,13 @@ namespace AyaNova.KPI
|
||||
public string ErrorMessage => _errorMessage;
|
||||
|
||||
public void BuildQuery(KPIRequestOptions options, long userId)
|
||||
{
|
||||
{
|
||||
var wotags = options.Criteria["wotags"].ToObject<List<string>>();
|
||||
bool wotagsany = options.Criteria["wotagsany"].ToObject<bool>();
|
||||
var woitemtags = options.Criteria["woitemtags"].ToObject<List<string>>();
|
||||
|
||||
string woTagsWhere = null;
|
||||
if (wotags.Count > 0)
|
||||
woTagsWhere = " AND " + DataListSqlFilterCriteriaBuilder.TagDataFilterToColumnCriteria("aworkorder.tags", DataListFilterComparisonOperator.Contains, string.Join(",", wotags));
|
||||
|
||||
string woItemTagsWhere = null;
|
||||
if (woitemtags.Count > 0)
|
||||
woItemTagsWhere = " AND " + DataListSqlFilterCriteriaBuilder.TagDataFilterToColumnCriteria("aworkorderitem.tags", DataListFilterComparisonOperator.Contains, string.Join(",", woitemtags));
|
||||
bool woitemtagsany = options.Criteria["woitemtagsany"].ToObject<bool>();
|
||||
string woTagsWhere = DataListSqlFilterCriteriaBuilder.KPITagFilterToSqlCriteria("aworkorder.tags", wotags, wotagsany);
|
||||
string woItemTagsWhere = DataListSqlFilterCriteriaBuilder.KPITagFilterToSqlCriteria("aworkorderitem.tags", woitemtags, woitemtagsany); ;
|
||||
|
||||
_dataQuery = @$"SELECT row_to_json(t) as res from (
|
||||
SELECT distinct(AWORKORDER.ID),
|
||||
|
||||
Reference in New Issue
Block a user