|
@@ -46,6 +46,14 @@ using DinkToPdf.Contracts;
|
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Student;
|
|
using TEAMModelOS.SDK.Models.Cosmos.Student;
|
|
using MathNet.Numerics.RootFinding;
|
|
using MathNet.Numerics.RootFinding;
|
|
|
|
+using DocumentFormat.OpenXml.Wordprocessing;
|
|
|
|
+using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData;
|
|
|
|
+using OfficeOpenXml;
|
|
|
|
+using Microsoft.AspNetCore.Components.Web;
|
|
|
|
+using Microsoft.AspNetCore.Cors.Infrastructure;
|
|
|
|
+using MathNet.Numerics.Distributions;
|
|
|
|
+using TEAMModelOS.Models.Dto;
|
|
|
|
+using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers
|
|
namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
@@ -168,7 +176,8 @@ namespace TEAMModelOS.Controllers
|
|
Dictionary<string, int> ansCount = new Dictionary<string, int>();
|
|
Dictionary<string, int> ansCount = new Dictionary<string, int>();
|
|
foreach (StudentArtResult result in artResults) {
|
|
foreach (StudentArtResult result in artResults) {
|
|
var score = result.results.Where(c => c.quotaId.Equals("quota_21")).Select(z => z.score).ToList();
|
|
var score = result.results.Where(c => c.quotaId.Equals("quota_21")).Select(z => z.score).ToList();
|
|
- if (!score.Contains(-1)) {
|
|
|
|
|
|
+ bool flag = score.Exists(c => c == -1);
|
|
|
|
+ if (!flag) {
|
|
if (ansCount.ContainsKey(result.school))
|
|
if (ansCount.ContainsKey(result.school))
|
|
{
|
|
{
|
|
ansCount[result.school] = ansCount[result.school] + 1;
|
|
ansCount[result.school] = ansCount[result.school] + 1;
|
|
@@ -242,6 +251,292 @@ namespace TEAMModelOS.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
|
+ [HttpPost("find-student-activity")]
|
|
|
|
+ public async Task<IActionResult> findStudentActivity(JsonElement json)
|
|
|
|
+ {
|
|
|
|
+ var client = _azureCosmos.GetCosmosClient();
|
|
|
|
+ string stusql = "select * from c where c.pk = 'Art' and c.pId in ('2f74d38e-80c1-4c55-9dd0-de0d8f6fdf6d','306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2')";
|
|
|
|
+ List<ArtEvaluation> art = new List<ArtEvaluation>();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Common).GetItemQueryIterator<ArtEvaluation>(queryText: stusql))
|
|
|
|
+ {
|
|
|
|
+ art.Add(item);
|
|
|
|
+ }
|
|
|
|
+ var artId = art.Select(c => c.id).ToList();
|
|
|
|
+ string artResultSql = $"select * from c where c.pk = 'ArtResult' and c.artId in ({string.Join(",", artId.Select(o => $"'{o}'"))})";
|
|
|
|
+ List<StudentArtResult> artResults = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryIterator<StudentArtResult>(queryText: artResultSql))
|
|
|
|
+ {
|
|
|
|
+ artResults.Add(item);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ string sql = $"select c.id, c.name from c";
|
|
|
|
+ List<(string id, string name)> sc = new();
|
|
|
|
+ await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
|
|
|
|
+ .GetItemQueryStreamIterator(queryText: sql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
|
|
|
|
+ {
|
|
|
|
+ using var sc_json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
|
+ if (sc_json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
|
+ {
|
|
|
|
+ var accounts = sc_json.RootElement.GetProperty("Documents").EnumerateArray();
|
|
|
|
+ while (accounts.MoveNext())
|
|
|
|
+ {
|
|
|
|
+ JsonElement account = accounts.Current;
|
|
|
|
+ sc.Add((account.GetProperty("id").GetString(), account.GetProperty("name").GetString()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //Dictionary<string, int> optCount = new Dictionary<string, int>();
|
|
|
|
+ //Dictionary<string, int> ansCount = new Dictionary<string, int>();
|
|
|
|
+ /* List<(string stuId, List<(string type, double score)> stuType)> stus = new();
|
|
|
|
+ foreach (StudentArtResult result in artResults)
|
|
|
|
+ {
|
|
|
|
+ List<(string type, double score)> stuTtpe = new();
|
|
|
|
+ foreach (ArtQuotaResult artQuotas in result.results)
|
|
|
|
+ {
|
|
|
|
+ if (artQuotas.quotaId.Equals("quota_21")) {
|
|
|
|
+ stuTtpe.Add((artQuotas.subjectId, artQuotas.score > 0 ? 1 : 0));
|
|
|
|
+ }
|
|
|
|
+ if (artQuotas.quotaId.Equals("quota_22") && artQuotas.subjectId.Equals("subject_music")) {
|
|
|
|
+ stuTtpe.Add(("zy", artQuotas.score > 0 ? 1 : 0));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ stus.Add((result.studentId, stuTtpe));
|
|
|
|
+ }*/
|
|
|
|
+ var stuList = artResults.Select(p => new {
|
|
|
|
+
|
|
|
|
+ id = p.studentId,
|
|
|
|
+ name = p.studentName,
|
|
|
|
+ school = sc.Where(x => x.id.Equals(p.school)).FirstOrDefault().name,
|
|
|
|
+ info = p.results.Select(c => new
|
|
|
|
+ {
|
|
|
|
+ c.score,
|
|
|
|
+ c.quotaId,
|
|
|
|
+ c.quotaName,
|
|
|
|
+ c.subjectId
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ return Ok(new { stuList });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ [HttpPost("read-excel-art")]
|
|
|
|
+ //[Authorize(Roles = "IES")]
|
|
|
|
+ //[AuthToken(Roles = "teacher,admin,business")]
|
|
|
|
+ [RequestSizeLimit(102_400_000_00)] //最大10000m左右
|
|
|
|
+ public async Task<IActionResult> ReadExcel([FromForm] IFormFile file)
|
|
|
|
+ {
|
|
|
|
+ ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
|
|
|
|
+ var client = _azureCosmos.GetCosmosClient();
|
|
|
|
+ //string stusql = "select * from c where c.pk = 'Art' and c.pId in ('2f74d38e-80c1-4c55-9dd0-de0d8f6fdf6d','306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2')";
|
|
|
|
+ string stusql = "select * from c where c.pk = 'Art' and c.pId = '306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2'";
|
|
|
|
+ List<ArtEvaluation> art = new List<ArtEvaluation>();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Common).GetItemQueryIterator<ArtEvaluation>(queryText: stusql))
|
|
|
|
+ {
|
|
|
|
+ art.Add(item);
|
|
|
|
+ }
|
|
|
|
+ var artId = art.Select(c => c.id).ToList();
|
|
|
|
+ string artResultSql = $"select * from c where c.pk = 'ArtResult' and c.artId in ({string.Join(",", artId.Select(o => $"'{o}'"))})";
|
|
|
|
+ List<StudentArtResult> artResults = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryIterator<StudentArtResult>(queryText: artResultSql))
|
|
|
|
+ {
|
|
|
|
+ artResults.Add(item);
|
|
|
|
+ }
|
|
|
|
+ List<(string code,string sId)> students = new();
|
|
|
|
+ using ExcelPackage package = new(file.OpenReadStream());
|
|
|
|
+ ExcelWorksheets sheet = package.Workbook.Worksheets;
|
|
|
|
+ List<string> baseTitle = new List<string>();
|
|
|
|
+ //科目标题的栏位序列
|
|
|
|
+ int subjectTitelIndex = -1;
|
|
|
|
+ //读取Exam_
|
|
|
|
+ var art_sheet = sheet.Where(z => z.Name.Equals("art_cz")).FirstOrDefault();
|
|
|
|
+ List<(string code, string stuId, double score)> stus = new();
|
|
|
|
+ if (art_sheet != null)
|
|
|
|
+ {
|
|
|
|
+ var rows = art_sheet.Dimension.Rows;
|
|
|
|
+ var columns = art_sheet.Dimension.Columns;
|
|
|
|
+ for (int r = 2; r <= rows; r++)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ var stuId = art_sheet.GetValue(r, 5).ToString();
|
|
|
|
+ var code = art_sheet.GetValue(r, 2).ToString();
|
|
|
|
+ var score = art_sheet.GetValue(r, 7);
|
|
|
|
+
|
|
|
|
+ stus.Add((code, stuId, (double)score));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ await foreach (var (school, id) in stuTask(client, artResults, stus))
|
|
|
|
+ {
|
|
|
|
+ students.Add((school, id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(examImport, new Azure.Cosmos.PartitionKey(examImport.code));
|
|
|
|
+ return Ok(new { code = 200, students });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [HttpPost("fix_exam_paper")]
|
|
|
|
+ //[Authorize(Roles = "IES")]
|
|
|
|
+ //[AuthToken(Roles = "teacher,admin,business")]
|
|
|
|
+ [RequestSizeLimit(102_400_000_00)] //最大10000m左右
|
|
|
|
+ public async Task<IActionResult> fixExamPaper([FromForm] IFormFile file)
|
|
|
|
+ {
|
|
|
|
+ ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
|
|
|
|
+ var client = _azureCosmos.GetCosmosClient();
|
|
|
|
+ //string stusql = "select * from c where c.pk = 'Art' and c.pId in ('2f74d38e-80c1-4c55-9dd0-de0d8f6fdf6d','306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2')";
|
|
|
|
+ string stusql = "select * from c where c.pk = 'Art' and c.pId = '306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2'";
|
|
|
|
+ List<ArtEvaluation> art = new List<ArtEvaluation>();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Common).GetItemQueryIterator<ArtEvaluation>(queryText: stusql))
|
|
|
|
+ {
|
|
|
|
+ art.Add(item);
|
|
|
|
+ }
|
|
|
|
+ var examId = art.SelectMany(c => c.settings).Where(z => z.id.Equals("quota_21")).SelectMany(a => a.task).Where(p => p.type == 1 && !string.IsNullOrEmpty(p.acId)).Select(o => o.acId).ToList();
|
|
|
|
+ string examSQL = $"select * from c where c.pk = 'ExamClassResult' and c.examId in ({string.Join(",", examId.Select(o => $"'{o}'"))})";
|
|
|
|
+ List<ExamClassResult> classResults = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Common).GetItemQueryIterator<ExamClassResult>(queryText: examSQL))
|
|
|
|
+ {
|
|
|
|
+ classResults.Add(item);
|
|
|
|
+ }
|
|
|
|
+ string stuSql = $"select * from c where c.pk = 'Activity' and c.id in ({string.Join(",", examId.Select(o => $"'{o}'"))})";
|
|
|
|
+ List<StuActivity> stus = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryIterator<StuActivity>(queryText: stuSql))
|
|
|
|
+ {
|
|
|
|
+ stus.Add(item);
|
|
|
|
+ }
|
|
|
|
+ List<(string code, string sId)> students = new();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ await foreach (var (school, id) in stuTask(client, stus, classResults))
|
|
|
|
+ {
|
|
|
|
+ students.Add((school, id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(examImport, new Azure.Cosmos.PartitionKey(examImport.code));
|
|
|
|
+ return Ok(new { code = 200, students });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private async IAsyncEnumerable<(string school,string id)> stuTask(CosmosClient client,List<StudentArtResult> artResults, List<(string code, string stuId, double score)> stus) {
|
|
|
|
+
|
|
|
|
+ foreach (StudentArtResult result in artResults)
|
|
|
|
+ {
|
|
|
|
+ string value = "";
|
|
|
|
+ string code = "";
|
|
|
|
+ try {
|
|
|
|
+ bool flag = false;
|
|
|
|
+ foreach (ArtQuotaResult artQuotas in result.results)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ if (artQuotas.quotaId.Equals("quota_22") && artQuotas.subjectId.Equals("subject_painting"))
|
|
|
|
+ {
|
|
|
|
+ if (artQuotas.score < 0)
|
|
|
|
+ {
|
|
|
|
+ artQuotas.score = stus.Where(c => c.code.Equals(result.school) && c.stuId.Equals(result.studentId)).FirstOrDefault().score;
|
|
|
|
+ flag = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (flag) {
|
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync(result, result.id, new PartitionKey(result.code));
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ code = result.school;
|
|
|
|
+ value = result.studentId;
|
|
|
|
+ }
|
|
|
|
+ yield return (code, value);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private async IAsyncEnumerable<(string school, string id)> stuTask(CosmosClient client, List<StuActivity> stus, List<ExamClassResult> classResults)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ foreach (ExamClassResult classResult in classResults)
|
|
|
|
+ {
|
|
|
|
+ string value = "";
|
|
|
|
+ string code = "";
|
|
|
|
+ try {
|
|
|
|
+ int n = 0;
|
|
|
|
+ var activity = stus.Where(c => c.id.Equals(classResult.examId)).ToList();
|
|
|
|
+ List<(string studentId, string blob)> stuBlob = new();
|
|
|
|
+ foreach (StuActivity stu in activity) {
|
|
|
|
+ List<string> tas = stu.code.Split('-').ToList();
|
|
|
|
+ JsonElement dict = stu.paper;
|
|
|
|
+ dict[0].TryGetProperty("blob", out JsonElement element);
|
|
|
|
+ string blob = element.ToString();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ /*foreach (var stuId in classResult.studentIds) {
|
|
|
|
+
|
|
|
|
+ classResult.paper = stus.Where(c => c.school.Equals(classResult.school) && c.);
|
|
|
|
+ n++;
|
|
|
|
+ }*/
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ yield return (code, value);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
|
+ [HttpPost("find-xg-activity")]
|
|
|
|
+ public async Task<IActionResult> findXgActivity(JsonElement element)
|
|
|
|
+ {
|
|
|
|
+ var client = _azureCosmos.GetCosmosClient();
|
|
|
|
+ string musicSql = $"select c.id from c join A0 in c.results where A0.quotaId = 'quota_21' \r\n" +
|
|
|
|
+ $"and c.school = 'qyszgh' \r\n" +
|
|
|
|
+ $"and A0.subjectId = 'subject_music' \r\n" +
|
|
|
|
+ $"and c.artId = '92fb6d6e-4b6f-403a-b4ac-71095d58d43b'\r\n" +
|
|
|
|
+ $"and A0.score > 0";
|
|
|
|
+ List<string> musicResults = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryStreamIterator(queryText: musicSql))
|
|
|
|
+ {
|
|
|
|
+ using var sc_json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
|
+ if (sc_json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
|
+ {
|
|
|
|
+ var accounts = sc_json.RootElement.GetProperty("Documents").EnumerateArray();
|
|
|
|
+ while (accounts.MoveNext())
|
|
|
|
+ {
|
|
|
|
+ JsonElement account = accounts.Current;
|
|
|
|
+ musicResults.Add(account.GetProperty("id").GetString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ string paintingSql = $"select c.id from c join A0 in c.results where A0.quotaId = 'quota_21' \r\n" +
|
|
|
|
+ $"and c.school = 'qyszgh' \r\n" +
|
|
|
|
+ $"and A0.subjectId = 'subject_painting' \r\n" +
|
|
|
|
+ $"and c.artId = '92fb6d6e-4b6f-403a-b4ac-71095d58d43b'\r\n" +
|
|
|
|
+ $"and A0.score > 0";
|
|
|
|
+ List<string> painResults = new();
|
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryStreamIterator(queryText: paintingSql))
|
|
|
|
+ {
|
|
|
|
+ using var sc_json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
|
+ if (sc_json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
|
+ {
|
|
|
|
+ var accounts = sc_json.RootElement.GetProperty("Documents").EnumerateArray();
|
|
|
|
+ while (accounts.MoveNext())
|
|
|
|
+ {
|
|
|
|
+ JsonElement account = accounts.Current;
|
|
|
|
+ painResults.Add(account.GetProperty("id").GetString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var guiyi = painResults.Except(musicResults);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return Ok(new { guiyi });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
[ProducesDefaultResponseType]
|
|
[ProducesDefaultResponseType]
|
|
[HttpPost("update-time")]
|
|
[HttpPost("update-time")]
|
|
public async Task<IActionResult> FixTime(JsonElement json)
|
|
public async Task<IActionResult> FixTime(JsonElement json)
|
|
@@ -260,25 +555,40 @@ namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
infos.Add(item);
|
|
infos.Add(item);
|
|
}
|
|
}
|
|
|
|
+ //List<Task<ItemResponse<ArtEvaluation>>> tasks = new List<Task<ItemResponse<ArtEvaluation>>>();
|
|
|
|
+ /*foreach (ArtEvaluation evaluation in art)
|
|
|
|
+ {
|
|
|
|
+ foreach (var tas in evaluation.settings)
|
|
|
|
+ {
|
|
|
|
+ if (tas.id.Equals("quota_22"))
|
|
|
|
+ {
|
|
|
|
+ foreach (var quot in tas.task)
|
|
|
|
+ {
|
|
|
|
+ if (quot.subject.Equals("subject_music"))
|
|
|
|
+ {
|
|
|
|
+ quot.workEnd = 1704902400000;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //evaluation.endTime = 1704902400000;
|
|
|
|
+ tasks.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(evaluation, evaluation.id, new PartitionKey(evaluation.code)));
|
|
|
|
+ }
|
|
|
|
+ await tasks.TaskPage(10);*/
|
|
List<Task<ItemResponse<ArtEvaluation>>> tasks = new List<Task<ItemResponse<ArtEvaluation>>>();
|
|
List<Task<ItemResponse<ArtEvaluation>>> tasks = new List<Task<ItemResponse<ArtEvaluation>>>();
|
|
- foreach (ArtEvaluation evaluation in art) {
|
|
|
|
- evaluation.endTime = 1704902400000;
|
|
|
|
|
|
+ foreach (ArtEvaluation evaluation in art)
|
|
|
|
+ {
|
|
|
|
+ evaluation.endTime = 1706716800000;
|
|
tasks.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(evaluation, evaluation.id, new PartitionKey(evaluation.code)));
|
|
tasks.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(evaluation, evaluation.id, new PartitionKey(evaluation.code)));
|
|
}
|
|
}
|
|
await tasks.TaskPage(10);
|
|
await tasks.TaskPage(10);
|
|
List<Task<ItemResponse<ExamInfo>>> taskInfo = new List<Task<ItemResponse<ExamInfo>>>();
|
|
List<Task<ItemResponse<ExamInfo>>> taskInfo = new List<Task<ItemResponse<ExamInfo>>>();
|
|
foreach (ExamInfo info in infos)
|
|
foreach (ExamInfo info in infos)
|
|
{
|
|
{
|
|
- info.endTime = 1704902400000;
|
|
|
|
|
|
+ info.endTime = 1706716800000;
|
|
taskInfo.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(info, info.id, new PartitionKey(info.code)));
|
|
taskInfo.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(info, info.id, new PartitionKey(info.code)));
|
|
}
|
|
}
|
|
- await tasks.TaskPage(10);
|
|
|
|
- /* List<Task<ItemResponse<ArtEvaluation>>> tasks = new List<Task<ItemResponse<ArtEvaluation>>>();
|
|
|
|
- foreach (ArtEvaluation info in infos) {
|
|
|
|
- info.status = 1;
|
|
|
|
- tasks.Add( client.GetContainer(Constant.TEAMModelOS, Constant.Common).ReplaceItemAsync(info, info.id, new PartitionKey(info.code)));
|
|
|
|
- }
|
|
|
|
- await tasks.TaskPage(10);*/
|
|
|
|
|
|
+ await taskInfo.TaskPage(10);
|
|
return Ok();
|
|
return Ok();
|
|
}
|
|
}
|
|
[ProducesDefaultResponseType]
|
|
[ProducesDefaultResponseType]
|