Files
raven/server/AyaNova/kpi/WorkOrderItemLaborQuantitySummary.cs
2022-02-25 00:05:20 +00:00

57 lines
2.0 KiB
C#

using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
using System.Linq;
using System;
namespace AyaNova.KPI
{
internal class WorkOrderItemLaborQuantitySummary : IAyaKPI
{
private string _metaQuery = null;
private string _dataQuery = null;
private string _errorMessage=null;
public AuthorizationRoles AllowedRoles { get => BizRoles.GetRoleSet(AyaType.WorkOrderItemLabor).ReadFullRecord; }
public string MetaQuery => _metaQuery;
public string DataQuery => _dataQuery;
public string ErrorMessage => _errorMessage;
public void BuildQuery(string criteria, DateTimeOffset clientTimeStamp)
{
//build data and meta queries
}
// public string GetVariantCriteria(string variant)
// {
// //Currently the only variant is a object type and id to indicate headoffice
// //ClientCriteria format for this list is "OBJECTID,AYATYPE"
// var crit = (variant ?? "").Split(',').Select(z => z.Trim()).ToArray();
// if (crit.Length > 1)
// {
// int nType = 0;
// if (!int.TryParse(crit[1], out nType)) return string.Empty;
// AyaType forType = (AyaType)nType;
// if (forType != AyaType.HeadOffice) return string.Empty;
// long lId = 0;
// if (!long.TryParse(crit[0], out lId)) return string.Empty;
// if (lId == 0) return string.Empty;
// //Have valid type, have an id, so filter away
// switch (forType)
// {
// case AyaType.HeadOffice:
// {
// return $"acustomer.headofficeid = {lId}";
// }
// }
// }
// return string.Empty;
// }
}//eoc
}//eons