|
@@ -1656,9 +1656,6 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
//if ($"{site}".Equals(BIConst.Global))
|
|
|
// cosmosClient = _azureCosmos.GetCosmosClient(name: BIConst.Global);
|
|
|
AnSchool school = new(); //学校基础基础信息
|
|
|
- List<string> serial = new(); //学校软体数量
|
|
|
- List<string> service = new(); //学校服务数量
|
|
|
- List<string> hard = new(); //学校硬件数量
|
|
|
|
|
|
var response = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{schoolId}", new PartitionKey("Base"));
|
|
|
if (response.Status == 200)
|
|
@@ -1685,19 +1682,19 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
using var json = await JsonDocument.ParseAsync(responseProduct.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("serial", out JsonElement _serial) && !_serial.ValueKind.Equals(JsonValueKind.Null))
|
|
|
{
|
|
|
- serial = _serial.ToObject<List<SchoolProductSumData>>().Select(x => x.prodCode).ToList();
|
|
|
+ school.serial = _serial.ToObject<List<SchoolProductSumData>>().Select(x => x.prodCode).ToList();
|
|
|
}
|
|
|
if (json.RootElement.TryGetProperty("service", out JsonElement _service) && !_service.ValueKind.Equals(JsonValueKind.Null))
|
|
|
{
|
|
|
- service = _service.ToObject<List<SchoolProductSumData>>().Select(x => x.prodCode).ToList();
|
|
|
+ school.service = _service.ToObject<List<SchoolProductSumData>>().Select(x => x.prodCode).ToList();
|
|
|
}
|
|
|
if (json.RootElement.TryGetProperty("hard", out JsonElement _hard) && !_hard.ValueKind.Equals(JsonValueKind.Null))
|
|
|
{
|
|
|
- hard = _hard.ToObject<List<SchoolProductSumDataHard>>().Select(x => x.prodCode).ToList();
|
|
|
+ school.hard = _hard.ToObject<List<SchoolProductSumDataHard>>().Select(x => x.prodCode).ToList();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return Ok(new { state = RespondCode.Ok, school, gradeCnt, subCnt, serial, service, hard });
|
|
|
+ return Ok(new { state = RespondCode.Ok, school, gradeCnt, subCnt });
|
|
|
}
|
|
|
|
|
|
/// <summary>
|