|
@@ -94,8 +94,8 @@ namespace TEAMModelOS.FunctionV4
|
|
List<StuActivity> tchActivities = new List<StuActivity>();
|
|
List<StuActivity> tchActivities = new List<StuActivity>();
|
|
(string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.OfflineRecord }, 0);
|
|
(string standard, List<string> tmdids, string school, List<string> update, int statistics) list = (null, null, null, new List<string> { StatisticsService.OfflineRecord }, 0);
|
|
if (tchList.IsNotEmpty())
|
|
if (tchList.IsNotEmpty())
|
|
- {
|
|
|
|
- list.tmdids = tchList.Select(x => x.id).ToList();
|
|
|
|
|
|
+ {
|
|
|
|
+ list.tmdids = tchList.Select(x => x.id).ToList();
|
|
School school = null;
|
|
School school = null;
|
|
if (!string.IsNullOrEmpty(study.school))
|
|
if (!string.IsNullOrEmpty(study.school))
|
|
{
|
|
{
|
|
@@ -133,6 +133,11 @@ namespace TEAMModelOS.FunctionV4
|
|
await StatisticsService.SendServiceBus(list, _configuration, _serviceBus,client);
|
|
await StatisticsService.SendServiceBus(list, _configuration, _serviceBus,client);
|
|
var messageWorkEnd = new ServiceBusMessage(new { id = tdata.id, progress = "finish", code = tdata.code }.ToJsonString());
|
|
var messageWorkEnd = new ServiceBusMessage(new { id = tdata.id, progress = "finish", code = tdata.code }.ToJsonString());
|
|
messageWorkEnd.ApplicationProperties.Add("name", "Study");
|
|
messageWorkEnd.ApplicationProperties.Add("name", "Study");
|
|
|
|
+ if (study.teacIds.Count == 0) {
|
|
|
|
+ study.teacIds = list.tmdids;
|
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(study, study.id, new PartitionKey($"{study.code}"));
|
|
|
|
+ }
|
|
|
|
+
|
|
if (changeRecords.Count > 0)
|
|
if (changeRecords.Count > 0)
|
|
{
|
|
{
|
|
long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageWorkEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
|
|
long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageWorkEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
|