|
@@ -36,6 +36,7 @@ using DocumentFormat.OpenXml.Drawing.Charts;
|
|
|
using static TEAMModelOS.Controllers.FixDataController;
|
|
|
using IdCode = TEAMModelOS.SDK.Models.IdCode;
|
|
|
using TEAMModelOS.SDK.Models.Service.BI;
|
|
|
+using TEAMModelOS.SDK.Services;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers
|
|
|
{
|
|
@@ -472,6 +473,9 @@ namespace TEAMModelOS.Controllers
|
|
|
var result = await table.ExecuteQuerySegmentedAsync(new TableQuery<OAuthShow>().Where(qurey), null);
|
|
|
List<OAuthShow> shows = result.Results;
|
|
|
string lang = !string.IsNullOrWhiteSpace(teacherInfo.teacher.lang) ? teacherInfo.teacher.lang : head_lang;
|
|
|
+ //返回剩余空间
|
|
|
+ (long usedSize, long teach, long total, long surplus, Dictionary<string, double?> catalog) space =
|
|
|
+ await BlobService.GetSurplusSpace(teacher.id, "private", _option.Location, _azureCosmos, _azureRedis, _azureStorage, _dingDing, _httpTrigger);
|
|
|
if (string.IsNullOrWhiteSpace(lang))
|
|
|
{
|
|
|
if (_option.Location.Contains("China"))
|
|
@@ -514,7 +518,9 @@ namespace TEAMModelOS.Controllers
|
|
|
status = 200,
|
|
|
teacherInfo.areas,
|
|
|
lessonLimit,
|
|
|
- teacherInfo.teacher.lessonShow
|
|
|
+ teacherInfo.teacher.lessonShow,
|
|
|
+ privateSpace= new { size = space.usedSize, catalog = space.catalog, teach = space.teach, surplus = space.surplus, total = space.total },
|
|
|
+ schoolSpace = new { size = 0, catalog = 0, teach = 0, surplus = 0, total = 0 }
|
|
|
});
|
|
|
}
|
|
|
catch (CosmosException ex)
|
|
@@ -869,7 +875,9 @@ namespace TEAMModelOS.Controllers
|
|
|
var area_result = await table.ExecuteQuerySegmentedAsync(new TableQuery<OAuthShow>().Where(area_tbqurey), null);
|
|
|
areaShows = area_result.Results;
|
|
|
}
|
|
|
-
|
|
|
+ //返回剩余空间
|
|
|
+ (long usedSize, long teach, long total, long surplus, Dictionary<string, double?> catalog) space =
|
|
|
+ await BlobService.GetSurplusSpace(school_base.id, "school", _option.Location, _azureCosmos, _azureRedis, _azureStorage, _dingDing, _httpTrigger);
|
|
|
//学校版本处理
|
|
|
_ = BISchoolService.UpSchoolEdition(client, _dingDing, services.Select(s => s.prodCode).ToList(), $"{school_code}");
|
|
|
|
|
@@ -898,7 +906,10 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
//serial = serials,
|
|
|
service = services
|
|
|
- }
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ privateSpace = new { size = 0, catalog = 0, teach = 0, surplus = 0, total = 0 } ,
|
|
|
+ schoolSpace = new { size = space.usedSize, catalog = space.catalog, teach = space.teach, surplus = space.surplus, total = space.total }
|
|
|
});
|
|
|
}
|
|
|
catch (CosmosException ex)
|