|
@@ -508,6 +508,10 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
jsonElement.TryGetProperty("name", out JsonElement name);
|
|
|
jsonElement.TryGetProperty("order", out JsonElement order);
|
|
|
|
|
|
+ jsonElement.TryGetProperty("province", out JsonElement province);
|
|
|
+ jsonElement.TryGetProperty("city", out JsonElement city);
|
|
|
+ jsonElement.TryGetProperty("dist", out JsonElement dist);
|
|
|
+
|
|
|
//jsonElement.TryGetProperty("site", out JsonElement site);//分开部署,就不需要,一站多用时,取消注释
|
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
|
////分开部署,就不需要,一站多用时,取消注释
|
|
@@ -564,14 +568,16 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
else
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty($"{scId}") && string.IsNullOrEmpty($"{name}"))
|
|
|
- {
|
|
|
stringBuilder.Append($" where c.id='{scId}'");
|
|
|
- }
|
|
|
-
|
|
|
if (string.IsNullOrEmpty($"{scId}") && !string.IsNullOrEmpty($"{name}"))
|
|
|
- {
|
|
|
stringBuilder.Append($" where Contains(c.name,'{name}')");
|
|
|
- }
|
|
|
+ if (!string.IsNullOrEmpty($"{province}") && string.IsNullOrEmpty($"{city}") && string.IsNullOrEmpty($"{dist}"))
|
|
|
+ stringBuilder.Append($" where Contains(c.province,'{province}')");
|
|
|
+ if (!string.IsNullOrEmpty($"{city}") && !string.IsNullOrEmpty($"{city}") && string.IsNullOrEmpty($"{dist}"))
|
|
|
+ stringBuilder.Append($" where Contains(c.province,'{province}') and Contains(c.city,'{city}')");
|
|
|
+ if (!string.IsNullOrEmpty($"{dist}") && !string.IsNullOrEmpty($"{city}") && !string.IsNullOrEmpty($"{dist}"))
|
|
|
+ stringBuilder.Append($" where Contains(c.province,'{province}') and Contains(c.city,'{city}') and Contains(c.dist,'{dist}')");
|
|
|
+
|
|
|
if ($"{order}".Equals("desc"))
|
|
|
{
|
|
|
stringBuilder.Append(" order by c.createTime desc");
|