zhouj1203@hotmail.com 1 year ago
parent
commit
5da3b9363b

+ 4 - 4
TEAMModelOS/ClientApp/src/view/artexam/WorkData.vue

@@ -204,16 +204,16 @@ export default {
         let students = this._.cloneDeep(this.curClass.members)
         students.forEach(s => {
           let work = data.find(w => w.stuId === s.id)
-          let hasWork = work && work.attachments?.length
+          let hasWork = work && work.attachments
           let hasZY = work && work.url
           let info = {
             id: s.id,
             name: s.name,
           }
           info.status = hasWork || hasZY ? 1 : 0
-          info.createTime = hasWork ? work.attachments[0].uploadTime : hasZY ? work.createTime : 0
-          info.count = hasWork ? work.attachments.length : hasZY ? 1 : 0
-          info.files = hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : hasWork ? work.attachments :  []
+          info.createTime = hasWork ? work.attachments.uploadTime : hasZY ? work.createTime : 0
+          info.count = hasWork ? 1 : hasZY ? 1 : 0
+            info.files = hasZY ? [{ type: 'zy', name: '评唱结果', url: work.url }] : hasWork ? [work.attachments] :  []
           this.workData.push(info)
         })
       }

+ 2 - 1
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -1172,7 +1172,8 @@ namespace TEAMModelOS.Controllers
             if (!request.TryGetProperty("periodType", out JsonElement periodType)) return BadRequest();
             var client = _azureCosmos.GetCosmosClient();
             //TODO 这里目前根据时间查询同一批次的考试内容,需要换成其他条件
-            string sql = "SELECT c.id FROM c where c.pk =  'Art' and (c.startTime = 1678978800000 or c.startTime = 1678982400000) and c.endTime = 1684382400000";
+            //string sql = "SELECT c.id FROM c where c.pk =  'Art' and (c.startTime = 1678978800000 or c.startTime = 1678982400000) and c.endTime = 1684382400000";
+            string sql = "select * from c where c.pk = 'Art' and c.id in ('2f74d38e-80c1-4c55-9dd0-de0d8f6fdf6d','306fa576-7ae4-4baa-ac24-0b5ad4dd1bc2')";
             List<string> superIds = new();
             ArtSetting setting = await client.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemAsync<ArtSetting>($"{id}", partitionKey: new PartitionKey("ArtSetting"));
             //获取区级本次发布任务获得所有活动ID集合

File diff suppressed because it is too large
+ 48 - 2
TEAMModelOS/Controllers/XTest/FixDataController.cs