浏览代码

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

zhouj1203@hotmail.com 1 年之前
父节点
当前提交
1deb829143
共有 45 个文件被更改,包括 938 次插入716 次删除
  1. 59 48
      TEAMModelBI/ClientApp/src/view/index/index.vue
  2. 41 16
      TEAMModelBI/ClientApp/src/view/schoolServe/school.vue
  3. 1 1
      TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue
  4. 30 19
      TEAMModelBI/ClientApp/src/view/userInquire/details.vue
  5. 16 1
      TEAMModelBI/Controllers/BIProductAnalysis/ProductAnalysisController.cs
  6. 0 113
      TEAMModelBI/Properties/ServiceDependencies/teammodelbi-rc - Web Deploy/profile.arm.json
  7. 3 3
      TEAMModelBI/TEAMModelBI.csproj
  8. 0 174
      TEAMModelOS.FunctionV4/Properties/ServiceDependencies/TEAMModelFunction - Zip Deploy/profile.arm.json
  9. 0 9
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelFunction - Zip Deploy.json
  10. 1 7
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelOSFunction - Zip Deploy.json
  11. 1 6
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.json
  12. 1 7
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.local.json
  13. 3 0
      TEAMModelOS.FunctionV4/Properties/serviceDependencies.teammodelosfunction-test - Zip Deploy.json
  14. 3 3
      TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj
  15. 8 15
      TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs
  16. 1 0
      TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs
  17. 8 19
      TEAMModelOS.SDK/Models/Service/BI/BISchoolService.cs
  18. 189 0
      TEAMModelOS.SDK/Models/Service/StudentService.cs
  19. 3 3
      TEAMModelOS.SDK/TEAMModelOS.SDK.csproj
  20. 2 2
      TEAMModelOS/ClientApp/public/lang/en-US.js
  21. 2 2
      TEAMModelOS/ClientApp/public/lang/zh-CN.js
  22. 2 2
      TEAMModelOS/ClientApp/public/lang/zh-TW.js
  23. 3 2
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue
  24. 0 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/ArtView.vue
  25. 3 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue
  26. 44 7
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  27. 4 0
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue
  28. 16 2
      TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/Index.vue
  29. 1 1
      TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesContent.less
  30. 27 20
      TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesList.vue
  31. 33 4
      TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/WrongQues.vue
  32. 9 0
      TEAMModelOS/ClientApp/src/router/routes.js
  33. 15 0
      TEAMModelOS/ClientApp/src/view/dashboard/school/SchoolDashboard.vue
  34. 5 4
      TEAMModelOS/ClientApp/src/view/dashboardCenter/DashboardCenter.vue
  35. 1 1
      TEAMModelOS/ClientApp/src/view/iot/schooliot.vue
  36. 20 7
      TEAMModelOS/ClientApp/src/view/student-web/AppNew.vue
  37. 333 145
      TEAMModelOS/Controllers/Common/ActivityController.cs
  38. 0 11
      TEAMModelOS/Controllers/Common/SocialController.cs
  39. 1 28
      TEAMModelOS/Controllers/Common/VoteController.cs
  40. 33 0
      TEAMModelOS/Controllers/Student/StudentCommonController.cs
  41. 0 2
      TEAMModelOS/Controllers/Teacher/InitController.cs
  42. 10 24
      TEAMModelOS/Controllers/XTest/TestController.cs
  43. 4 4
      TEAMModelOS/TEAMModelOS.csproj
  44. 1 1
      TEAMModelOS/appsettings.Development.json
  45. 1 1
      TEAMModelOS/appsettings.json

+ 59 - 48
TEAMModelBI/ClientApp/src/view/index/index.vue

@@ -208,7 +208,7 @@
                 </div>
                 </div>
                 <div class="commonbox-versions" v-loading="loading.versions" element-loading-background="rgba(0, 0, 0, 0.2)">
                 <div class="commonbox-versions" v-loading="loading.versions" element-loading-background="rgba(0, 0, 0, 0.2)">
                   <div class="commonbox-versions-title">
                   <div class="commonbox-versions-title">
-                    <p class="versions-title-name">自訂版</p>
+                    <p class="versions-title-name">评测版</p>
                     <p class="versions-title-num">数量:
                     <p class="versions-title-num">数量:
                       <span>{{ versionsData.custom.num }}</span>
                       <span>{{ versionsData.custom.num }}</span>
                     </p>
                     </p>
@@ -3040,47 +3040,58 @@ export default {
       console.log()
       console.log()
       let marjorArr = []; let standardArr = []; let basicsArr = []; let customArr = [];
       let marjorArr = []; let standardArr = []; let basicsArr = []; let customArr = [];
        // 專業版
        // 專業版
-       schoolList ? schoolList.forEach((item) => {
-         (item.edition == null || item.edition.scaleVersion == null) 
-         && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') 
-         ? marjorArr.push(item) : '' }) : ''
+      //  schoolList ? schoolList.forEach((item) => {
+      //    (item.edition == null || item.edition.scaleVersion == null)  && item.code ==='BIRel'
+      //    && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') 
+      //    ? marjorArr.push(item) : '' }) : ''
+      //  11.14日修正  关于学校版本问题   根据edition   current /1基础   /2标准   /3专业
+      // schoolList ? schoolList.forEach((item) => {
+      //    item.edition   && item.edition.current === 3 && item.code ==='BIRel' ? marjorArr.push(item):''
+      //   //  item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') &&  item.service.includes('YPXSJ6NJ') && item.code ==='BIRel'  ?  marjorArr.push(item):''
+      //  }) : ''
        // 標準版
        // 標準版
-       schoolList ? schoolList.forEach((item) => { 
-        (item.edition == null || item.edition.scaleVersion == null) 
-        && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? standardArr.push(item) : '' }) : ''
+      //  schoolList ? schoolList.forEach((item) => { 
+      //   (item.edition == null || item.edition.scaleVersion == null) && item.code ==='BIRel'
+      //   && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? standardArr.push(item) : '' }) : ''
+      // schoolList ? schoolList.forEach((item) => { 
+      //   item.edition  && item.edition.current === 2 && item.code ==='BIRel' ? standardArr.push(item):''
+      //   // item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? standardArr.push(item):''
+      // }) : ''
        // 基礎版
        // 基礎版
-       schoolList ? schoolList.forEach((item) => { 
-        (item.edition == null || item.edition.scaleVersion == null) 
-        && !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') ? basicsArr.push(item) : '' }) : ''
-       // 自訂版
-       schoolList ? schoolList.forEach((item) => { 
-        item.edition !== null && item.edition.scaleVersion !== null ? customArr.push(item) : '' }) : ''           
-        // res.scInfos.forEach((item)=>{
-        //   //item.versions= item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版':item.service.includes('YMPCVCIM') ? '标准版':'基础版'}),
-        //   if (item.edition !== null) {
-        //         if (item.edition.scaleVersion !== null && item.edition.scaleVersion !== "") {
-        //           item.versions = item.edition.scaleVersion;
-        //         } else {
-        //           item.versions = item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? marjorArr.push(item) : item.service.includes('YMPCVCIM') ? standardArr.push(item) : '基础版';
-        //         }
-        //       } else {
-        //         item.versions = item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版' : item.service.includes('YMPCVCIM') ? '标准版' : '基础版';
-        //       }
-        // }),
+      //  schoolList ? schoolList.forEach((item) => { 
+      //   (item.edition == null || item.edition.scaleVersion == null) && item.code ==='BIRel'
+      //   && !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') ? basicsArr.push(item) : '' }) : ''
+      // schoolList ? schoolList.forEach((item) => { 
+      //   item.edition  &&  item.edition.current === 1 && item.code ==='BIRel' && !item.service.includes('B6V5J6NP') ? basicsArr.push(item):
+      //   item.edition ==null && item.code ==='BIRel' ? basicsArr.push(item):''
+      //   // !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? basicsArr.push(item):''
+      // }) : ''
+       // 评测版
+      //  schoolList ? schoolList.forEach((item) => { 
+      //   item.edition !== null && item.edition.current === 1 && item.code ==='BIRel' && item.service.includes('B6V5J6NP') ? 
+      //   customArr.push(item) : '' }) : ''    
+
+        schoolList ? schoolList.forEach((item) => {
+          item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') && item.service.includes('YMPCVCIM') && item.code ==='BIRel' ? marjorArr.push(item):
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) && item.code ==='BIRel' ? standardArr.push(item):
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP') && item.code ==='BIRel'   ? customArr.push(item):
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.code ==='BIRel'  ? basicsArr.push(item):''
+        }):''
+        //计算版本占比
         console.log(basicsArr,standardArr,marjorArr,customArr,'数组')
         console.log(basicsArr,standardArr,marjorArr,customArr,'数组')
         versionsData.value.basics.num = basicsArr.length >0 ?basicsArr.length :0
         versionsData.value.basics.num = basicsArr.length >0 ?basicsArr.length :0
-        versionsData.value.basics.proportion = (( basicsArr.length / schoolList.length) * 100).toFixed(1)
+        versionsData.value.basics.proportion = (( basicsArr.length /areaAspectsData.value[2].num) * 100).toFixed(1)
         versionsData.value.standard.num = standardArr.length >0 ? standardArr.length:0
         versionsData.value.standard.num = standardArr.length >0 ? standardArr.length:0
-        versionsData.value.standard.proportion = ((standardArr.length / schoolList.length) * 100).toFixed(1)
+        versionsData.value.standard.proportion = ((standardArr.length / areaAspectsData.value[2].num) * 100).toFixed(1)
         versionsData.value.major.num = marjorArr.length >0 ?marjorArr.length:0
         versionsData.value.major.num = marjorArr.length >0 ?marjorArr.length:0
-        versionsData.value.major.proportion = ((marjorArr.length / schoolList.length) * 100).toFixed(1)
+        versionsData.value.major.proportion = ((marjorArr.length / areaAspectsData.value[2].num) * 100).toFixed(1)
         versionsData.value.custom.num = customArr.length >0 ? customArr.length:0
         versionsData.value.custom.num = customArr.length >0 ? customArr.length:0
-        versionsData.value.custom.proportion = ((customArr.length / schoolList.length) * 100).toFixed(1)
+        versionsData.value.custom.proportion = ((customArr.length / areaAspectsData.value[2].num) * 100).toFixed(1)
         console.log(versionsData.value.basics.num,versionsData.value.basics.proportion,'基础')
         console.log(versionsData.value.basics.num,versionsData.value.basics.proportion,'基础')
         console.log(versionsData.value.standard.num,versionsData.value.standard.proportion,'标准')
         console.log(versionsData.value.standard.num,versionsData.value.standard.proportion,'标准')
         console.log(versionsData.value.major.num,versionsData.value.major.proportion,'专业')
         console.log(versionsData.value.major.num,versionsData.value.major.proportion,'专业')
         console.log( versionsData.value.custom.num,versionsData.value.custom.proportion,'自订')
         console.log( versionsData.value.custom.num,versionsData.value.custom.proportion,'自订')
-         let dataBasics = {
+        let dataBasics = {
               title: {
               title: {
                 text: '{a|' + versionsData.value.basics.proportion + '}{c|%}' + '\n' + '基础版占比',
                 text: '{a|' + versionsData.value.basics.proportion + '}{c|%}' + '\n' + '基础版占比',
                 x: 'center',
                 x: 'center',
@@ -3120,7 +3131,7 @@ export default {
                   },
                   },
                   data: [
                   data: [
                     {
                     {
-                      value: versionsData.value.basics.proportion,
+                      value: Number(versionsData.value.basics.proportion),
                       name: '',
                       name: '',
                       itemStyle: {
                       itemStyle: {
                         normal: {
                         normal: {
@@ -3146,7 +3157,7 @@ export default {
                       },
                       },
                     },
                     },
                     {
                     {
-                      value: 100 - 78,
+                      value: 100 - versionsData.value.basics.proportion,
                       name: '',
                       name: '',
                       label: {
                       label: {
                         normal: {
                         normal: {
@@ -3162,8 +3173,8 @@ export default {
                   ],
                   ],
                 },
                 },
               ],
               ],
-          }
-          let dataStandard = {
+        }
+        let dataStandard = {
               title: {
               title: {
                 text: '{a|' + versionsData.value.standard.proportion + '}{c|%}' + '\n' + '标准版占比',
                 text: '{a|' + versionsData.value.standard.proportion + '}{c|%}' + '\n' + '标准版占比',
                 x: 'center',
                 x: 'center',
@@ -3229,7 +3240,7 @@ export default {
                       },
                       },
                     },
                     },
                     {
                     {
-                      value: 100 - 78,
+                      value: 100 - versionsData.value.standard.proportion,
                       name: '',
                       name: '',
                       label: {
                       label: {
                         normal: {
                         normal: {
@@ -3245,8 +3256,8 @@ export default {
                   ],
                   ],
                 },
                 },
               ],
               ],
-            }
-          let dataMajor = {
+        }
+        let dataMajor = {
               title: {
               title: {
                 text: '{a|' + versionsData.value.major.proportion + '}{c|%}' + '\n' + '专业版占比',
                 text: '{a|' + versionsData.value.major.proportion + '}{c|%}' + '\n' + '专业版占比',
                 x: 'center',
                 x: 'center',
@@ -3312,7 +3323,7 @@ export default {
                       },
                       },
                     },
                     },
                     {
                     {
-                      value: 100 - 78,
+                      value: 100 - versionsData.value.major.proportion,
                       name: '',
                       name: '',
                       label: {
                       label: {
                         normal: {
                         normal: {
@@ -3328,10 +3339,10 @@ export default {
                   ],
                   ],
                 },
                 },
               ],
               ],
-            }
-          let dataCustom = {
+        }
+        let dataCustom = {
               title: {
               title: {
-                text: '{a|' + versionsData.value.custom.proportion + '}{c|%}' + '\n' + '自訂版占比',
+                text: '{a|' + versionsData.value.custom.proportion + '}{c|%}' + '\n' + '评测版占比',
                 x: 'center',
                 x: 'center',
                 y: 'center',
                 y: 'center',
                 textStyle: {
                 textStyle: {
@@ -3395,7 +3406,7 @@ export default {
                       },
                       },
                     },
                     },
                     {
                     {
-                      value: 100 - 78,
+                      value: 100 - versionsData.value.custom.proportion,
                       name: '',
                       name: '',
                       label: {
                       label: {
                         normal: {
                         normal: {
@@ -3411,11 +3422,11 @@ export default {
                   ],
                   ],
                 },
                 },
               ],
               ],
-          }
-          totalArea.value.pie1 = dataBasics
-          totalArea.value.pie2 = dataStandard
-          totalArea.value.pie3 = dataMajor
-          totalArea.value.pie4 = dataCustom
+        }
+        totalArea.value.pie1 = dataBasics
+        totalArea.value.pie2 = dataStandard
+        totalArea.value.pie3 = dataMajor
+        totalArea.value.pie4 = dataCustom
         loading.value.versions = false
         loading.value.versions = false
       }
       }
       }).catch((error) => {
       }).catch((error) => {

+ 41 - 16
TEAMModelBI/ClientApp/src/view/schoolServe/school.vue

@@ -565,12 +565,10 @@ export default {
         // sortable: true,
         // sortable: true,
          cellRenderer: (data) => (
          cellRenderer: (data) => (
           <>
           <>
-            <div style="color:#000000;" v-show={data.rowData.versions !=='基础版' && data.rowData.versions !=='标准版' && data.rowData.versions !=='专业版'}>{data.rowData.versions}</div>
             <div style="color:#e6a23c;" v-show={data.rowData.versions ==='专业版' ? true:false}>专业版</div>
             <div style="color:#e6a23c;" v-show={data.rowData.versions ==='专业版' ? true:false}>专业版</div>
             <div style="color:#67C23A;" v-show={data.rowData.versions ==='标准版' ? true:false}>标准版</div>
             <div style="color:#67C23A;" v-show={data.rowData.versions ==='标准版' ? true:false}>标准版</div>
             <div style="color:#409EFF;" v-show={data.rowData.versions ==='基础版' ? true:false}>基础版</div>
             <div style="color:#409EFF;" v-show={data.rowData.versions ==='基础版' ? true:false}>基础版</div>
-            
-            
+            <div style="color:#fab6b6;" v-show={data.rowData.versions ==='评测版' ? true:false}>评测版</div>
           </>
           </>
         ),
         ),
       },
       },
@@ -729,7 +727,7 @@ export default {
                       基础版
                       基础版
                     </ElCheckbox>
                     </ElCheckbox>
                     <ElCheckbox v-model={shouldFilter.value.custom} onChange={versionsEstimate}>
                     <ElCheckbox v-model={shouldFilter.value.custom} onChange={versionsEstimate}>
-                      自訂
+                      评测
                     </ElCheckbox>
                     </ElCheckbox>
                   </div>
                   </div>
                   {/* <div class="el-table-v2__demo-filter">
                   {/* <div class="el-table-v2__demo-filter">
@@ -800,7 +798,7 @@ export default {
         res.scInfos.forEach((item)=>{
         res.scInfos.forEach((item)=>{
          // debugger;
          // debugger;
           //item.versions= item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版':item.service.includes('YMPCVCIM') ? '标准版':'基础版'}),
           //item.versions= item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版':item.service.includes('YMPCVCIM') ? '标准版':'基础版'}),
-          if (item.edition !== null) {
+          /* if (item.edition !== null) {
                 if (item.edition.scaleVersion !== null && item.edition.scaleVersion !== "") {
                 if (item.edition.scaleVersion !== null && item.edition.scaleVersion !== "") {
                   item.versions = item.edition.scaleVersion;
                   item.versions = item.edition.scaleVersion;
                 } else {
                 } else {
@@ -808,7 +806,20 @@ export default {
                 }
                 }
               } else {
               } else {
                 item.versions = item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版' : item.service.includes('YMPCVCIM') ? '标准版' : '基础版';
                 item.versions = item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') ? '专业版' : item.service.includes('YMPCVCIM') ? '标准版' : '基础版';
-              }
+          } */
+          //11.14日修正  关于学校版本问题   根据edition   current /1基础   /2标准   /3专业
+           /* if(item.edition !== null){
+            item.edition.current === 1 && item.service.includes('B6V5J6NP') ? item.versions='评测版':
+            item.edition.current === 3 ?  item.versions='专业版':
+            item.edition.current === 2 ? item.versions='标准版':
+            item.edition.current === 1 ? item.versions='基础版':''
+          }else{
+            item.versions='基础版'
+          } */
+          item.versions =item.service.includes('YPXSJ6NJ') && item.service.includes('B6V5J6NP') && item.service.includes('YMPCVCIM') ? '专业版':
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? '标准版':
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP')   ?'评测版':
+          !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM')  ? '基础版':'基础版' 
         }),
         }),
         tableData.value.push(...res.scInfos),originalNum.value = res.scInfos.length,
         tableData.value.push(...res.scInfos),originalNum.value = res.scInfos.length,
         originalData.value = res.scInfos,tablesccnt.value = res.allCnt) 
         originalData.value = res.scInfos,tablesccnt.value = res.allCnt) 
@@ -1504,6 +1515,7 @@ export default {
     }
     }
     // ※版本判定:1.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM)=「標準版」 
     // ※版本判定:1.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM)=「標準版」 
     //             2.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM) + 五育看板(YPXSJ6NJ) =「專業版」  
     //             2.學校管理(IPDYZYLC) + 學情分析(YMPCVCIM) + 五育看板(YPXSJ6NJ) =「專業版」  
+    //  11.14日修正  关于学校版本问题   根据edition   current /1基础   /2标准   /3专业
     function versionsEstimate (val) {
     function versionsEstimate (val) {
       console.log(shouldFilter.value)
       console.log(shouldFilter.value)
       let arrState = shouldFilter.value
       let arrState = shouldFilter.value
@@ -1512,21 +1524,34 @@ export default {
       //debugger;
       //debugger;
       // debugger;
       // debugger;
        // 專業版
        // 專業版
-       arrState.major ? originalData.value.forEach((item) => {
-         (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") 
-         && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') 
-         ? marjorArr.push(item) : '' }) : ''
+        arrState.major ? originalData.value.forEach((item) => {
+          item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && item.service.includes('YPXSJ6NJ') ? 
+          marjorArr.push(item) : '' }) : '' 
+
+         {/* arrState.major ? originalData.value.forEach((item) => {
+          item.edition  && !item.edition.scaleVersion && item.edition.current === 3 ? marjorArr.push(item):''
+         }) : '' */}
+
        // 標準版
        // 標準版
-       arrState.standard ? originalData.value.forEach((item) => { 
-        (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") 
-        && item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? standardArr.push(item) : '' }) : ''
+        arrState.standard ? originalData.value.forEach((item) => { 
+        item.service.includes('IPDYZYLC') && item.service.includes('YMPCVCIM') && (!item.service.includes('YPXSJ6NJ')) ? 
+        standardArr.push(item) : '' }) : '' 
+        /* arrState.standard ? originalData.value.forEach((item) => { 
+          item.edition  && !item.edition.scaleVersion && item.edition.current === 2  ? standardArr.push(item):''
+        }) : '' */
        // 基礎版
        // 基礎版
        arrState.basics ? originalData.value.forEach((item) => { 
        arrState.basics ? originalData.value.forEach((item) => { 
-        (item.edition == null || item.edition.scaleVersion == null || item.edition.scaleVersion == "") 
-        && !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') ? basicsArr.push(item) : '' }) : ''
+        !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && !item.service.includes('B6V5J6NP') ? 
+        basicsArr.push(item) : '' }) : '' 
+
+        /* arrState.basics ? originalData.value.forEach((item) => { 
+          item.edition  && !item.edition.scaleVersion && item.edition.current === 1 ? basicsArr.push(item):
+          item.edition ==null ? basicsArr.push(item):''
+        }) : '' */
        // 自訂版
        // 自訂版
        arrState.custom ? originalData.value.forEach((item) => { 
        arrState.custom ? originalData.value.forEach((item) => { 
-        item.edition !== null && item.edition.scaleVersion !== null && item.edition.scaleVersion !== "" ? customArr.push(item) : '' }) : ''           
+        !item.service.includes('IPDYZYLC') && !item.service.includes('YMPCVCIM') && item.service.includes('B6V5J6NP') ? customArr.push(item) : '' }) : ''   
+        console.log(marjorArr,standardArr,basicsArr,customArr,'重组')        
       let versionArr = [...marjorArr, ...standardArr, ...basicsArr, ...customArr]
       let versionArr = [...marjorArr, ...standardArr, ...basicsArr, ...customArr]
       console.log(versionArr, '合并结果')
       console.log(versionArr, '合并结果')
       tableData.value = versionArr
       tableData.value = versionArr

+ 1 - 1
TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue

@@ -2832,7 +2832,7 @@ export default {
 .class-info,
 .class-info,
 .class-total {
 .class-total {
   width: 100%;
   width: 100%;
-  padding: 0.5% 1%;
+  padding: 1%;
   display: flex;
   display: flex;
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   justify-content: space-between;
   justify-content: space-between;

+ 30 - 19
TEAMModelBI/ClientApp/src/view/userInquire/details.vue

@@ -228,6 +228,10 @@
                                                 <span class="rightsbox-item-time-num">{{item.startDateText}}~{{item.endDateText}}</span>
                                                 <span class="rightsbox-item-time-num">{{item.startDateText}}~{{item.endDateText}}</span>
                                                 <span>共<span class="rightsbox-item-timenums">{{item.intervalTime}}</span>天</span>
                                                 <span>共<span class="rightsbox-item-timenums">{{item.intervalTime}}</span>天</span>
                                             </p>
                                             </p>
+                                            <p v-show="item.aprule.schoolinfo">
+                                                <span>学校:</span>
+                                                <span class="rightsbox-item-timenums">{{item.aprule.schoolinfo.name}}</span>
+                                            </p>
                                         </div>
                                         </div>
                                         <div class="rightsbox-item-expansion" v-show="item.prodCode ==='Z6ELB6EZ'">
                                         <div class="rightsbox-item-expansion" v-show="item.prodCode ==='Z6ELB6EZ'">
                                             <p class="expansion-title">产品扩充项</p>
                                             <p class="expansion-title">产品扩充项</p>
@@ -325,7 +329,7 @@
         <!--产品页面end-->
         <!--产品页面end-->
         <!--back-->
         <!--back-->
         <div class="back-btns">
         <div class="back-btns">
-            <el-button type="info" :icon="ArrowLeft" size="small" @click="backClick">返回搜索</el-button>
+            <el-button type="primary" :icon="ArrowLeft" size="small" @click="backClick">返回搜索</el-button>
         </div>
         </div>
         <!--back end-->
         <!--back end-->
         <!--所有登入时间dialog-->
         <!--所有登入时间dialog-->
@@ -676,14 +680,17 @@ let powerExtension=ref([
     {title:'USB錄影支援',key:'hdcam',state:false},
     {title:'USB錄影支援',key:'hdcam',state:false},
     {title:'蘇格拉底議課APP',key:'sokapp',state:false},
     {title:'蘇格拉底議課APP',key:'sokapp',state:false},
     {title:'蘇格拉底影片',key:'sokvdo',state:false},
     {title:'蘇格拉底影片',key:'sokvdo',state:false},
+    {title:'蘇格拉底桌面',key:'sokdesk',state:false},
+    {title:'蘇格拉底報告',key:'sokrpt',state:false},
+    {title:'蘇格拉底小數據',key:'soksdata',state:false},
     {title:'AI智能終端',key:'ezs',state:false},
     {title:'AI智能終端',key:'ezs',state:false},
     {title:'AI文句分析',key:'wordanls',state:false},
     {title:'AI文句分析',key:'wordanls',state:false},
     {title:'電子學生證',key:'dgistuid',state:false},
     {title:'電子學生證',key:'dgistuid',state:false},
-    {title:'蘇格拉底小數據',key:'soksdata',state:false},
     {title:'雲端診斷分析系統',key:'cloudas',state:false},
     {title:'雲端診斷分析系統',key:'cloudas',state:false},
     {title:'分組數',key:'cligroup',value:0,state:false},
     {title:'分組數',key:'cligroup',value:0,state:false},
     {title:'IRS連線授權數',key:'client_volume',value:0,state:false},
     {title:'IRS連線授權數',key:'client_volume',value:0,state:false},
     {title:'議課人數',key:'soknumber',value:0,state:false},
     {title:'議課人數',key:'soknumber',value:0,state:false},
+    {title:'智慧評分系統',key:'scorsys',state:false},
     {title:'IRS硬體遙控器',key:'irs',state:true},
     {title:'IRS硬體遙控器',key:'irs',state:true},
 ])
 ])
 let subjoinData=ref({
 let subjoinData=ref({
@@ -790,18 +797,21 @@ function initdata() {
         let apruleItem=item.aprule
         let apruleItem=item.aprule
         item.apruleArr=[]
         item.apruleArr=[]
         if(apruleItem !==null && item.prodCode ==='Z6ELB6EZ'){
         if(apruleItem !==null && item.prodCode ==='Z6ELB6EZ'){
-            apruleItem.hdcam ? powerExtension.value[0].state=true:powerExtension.value[0].state=false
-            apruleItem.sokapp ? powerExtension.value[1].state=true:powerExtension.value[1].state=false
-            apruleItem.sokvdo ? powerExtension.value[2].state=true:powerExtension.value[2].state=false
-            apruleItem.ezs ? powerExtension.value[3].state=true:powerExtension.value[3].state=false
-            apruleItem.wordanls ? powerExtension.value[4].state=true:powerExtension.value[4].state=false
-            apruleItem.dgistuid ? powerExtension.value[5].state=true:powerExtension.value[5].state=false
-            apruleItem.soksdata ? powerExtension.value[6].state=true:powerExtension.value[6].state=false
-            apruleItem.cloudas ? powerExtension.value[7].state=true:powerExtension.value[7].state=false
-            apruleItem.cligroup !==0 ? (powerExtension.value[8].state=true,powerExtension.value[8].value=apruleItem.cligroup):powerExtension.value[8].state=false
-            apruleItem.client_volume !==0 ? (powerExtension.value[9].state=true,powerExtension.value[9].value=apruleItem.client_volume):powerExtension.value[9].state=false
-            apruleItem.soknumber !==0 ? (powerExtension.value[10].state=true,powerExtension.value[10].value=apruleItem.soknumber):powerExtension.value[10].state=false
-            apruleItem.hasOwnProperty('irs') ? powerExtension.value[11].state=false:powerExtension.value[11].state=true
+            apruleItem.hdcam ? powerExtension.value[0].state=true:powerExtension.value[0].state=false //USB錄影支援
+            apruleItem.sokapp ? powerExtension.value[1].state=true:powerExtension.value[1].state=false //蘇格拉底議課APP
+            apruleItem.sokvdo ? powerExtension.value[2].state=true:powerExtension.value[2].state=false //蘇格拉底影片
+            apruleItem.sokdesk ? powerExtension.value[3].state=true:powerExtension.value[3].state=false //蘇格拉底桌面
+            apruleItem.sokrpt ? powerExtension.value[4].state=true:powerExtension.value[4].state=false //蘇格拉底報告
+            apruleItem.soksdata ? powerExtension.value[5].state=true:powerExtension.value[5].state=false //蘇格拉底小數據
+            apruleItem.ezs ? powerExtension.value[6].state=true:powerExtension.value[6].state=false //AI智能終端
+            apruleItem.wordanls ? powerExtension.value[7].state=true:powerExtension.value[7].state=false //AI文句分析
+            apruleItem.dgistuid ? powerExtension.value[8].state=true:powerExtension.value[8].state=false //電子學生證
+            apruleItem.cloudas ? powerExtension.value[9].state=true:powerExtension.value[9].state=false  //雲端診斷分析系統
+            apruleItem.cligroup !==0 ? (powerExtension.value[10].state=true,powerExtension.value[10].value=apruleItem.cligroup):powerExtension.value[10].state=false //分組數
+            apruleItem.client_volume !==0 ? (powerExtension.value[11].state=true,powerExtension.value[11].value=apruleItem.client_volume):powerExtension.value[11].state=false  //IRS連線授權數
+            apruleItem.soknumber !==0 ? (powerExtension.value[12].state=true,powerExtension.value[10].value=apruleItem.soknumber):powerExtension.value[12].state=false //議課人數
+            apruleItem.scorsys ? (powerExtension.value[13].state=true,powerExtension.value[13].value=apruleItem.soknumber):powerExtension.value[13].state=false //智慧評分系統
+            apruleItem.hasOwnProperty('irs') ? powerExtension.value[14].state=false:powerExtension.value[14].state=true  //IRS硬體遙控器
             item.apruleArr=powerExtension.value
             item.apruleArr=powerExtension.value
         }
         }
         //处理时间
         //处理时间
@@ -815,6 +825,7 @@ function initdata() {
         item.endDateText= item.endDate? proxy.$common.timestampToTime(item.endDate):0
         item.endDateText= item.endDate? proxy.$common.timestampToTime(item.endDate):0
         powerList.value.push(item)  
         powerList.value.push(item)  
     })
     })
+    console.log(powerList.value,'权益内容')
     //处理权益内 附加功能(HITeach附加 CC权限)
     //处理权益内 附加功能(HITeach附加 CC权限)
     let hiteachData=benefits.hiteach !==null ?benefits.hiteach:[] ; let ccData=benefits.hiteachcc !==null  ?benefits.hiteachcc:[]
     let hiteachData=benefits.hiteach !==null ?benefits.hiteach:[] ; let ccData=benefits.hiteachcc !==null  ?benefits.hiteachcc:[]
     console.log(hiteachData,ccData)
     console.log(hiteachData,ccData)
@@ -1070,13 +1081,13 @@ watch(()=>transferNum.value,(newnum)=>{
 }
 }
 
 
 .HiTeach{
 .HiTeach{
-    background: linear-gradient(to top right, #7d82fe, #6fa5fe);
+    background: linear-gradient(to top right, #0093E9, #80D0C7);
 }
 }
 .HiTA{
 .HiTA{
     background: linear-gradient(to top right, #ff6e72, #ff7390);
     background: linear-gradient(to top right, #ff6e72, #ff7390);
 }
 }
 .IES5{
 .IES5{
-    background: linear-gradient(to top right, #ff8f64, #ffaa64); 
+    background: linear-gradient(to top right, #FBAB7E, #F7CE68); 
 }
 }
 .Sokrates{
 .Sokrates{
     background: linear-gradient(to top right, #a55bfb, #bc5dfe); 
     background: linear-gradient(to top right, #a55bfb, #bc5dfe); 
@@ -1498,9 +1509,6 @@ watch(()=>transferNum.value,(newnum)=>{
 .nextbtn:hover .btn-ls-text {
 .nextbtn:hover .btn-ls-text {
   opacity: 0.8;
   opacity: 0.8;
 }
 }
-.btn-ls {
-  /* width: 100%; */
-}
 .btn-ls-text {
 .btn-ls-text {
   margin-top: 3px;
   margin-top: 3px;
   color: #303a5d;
   color: #303a5d;
@@ -1538,6 +1546,9 @@ watch(()=>transferNum.value,(newnum)=>{
     color: #73767a;
     color: #73767a;
     line-height: 40px;
     line-height: 40px;
 }
 }
+.login-total{
+    line-height: 40px;
+}
 </style>
 </style>
 <style>
 <style>
 .inquirebox-details .el-divider{
 .inquirebox-details .el-divider{

+ 16 - 1
TEAMModelBI/Controllers/BIProductAnalysis/ProductAnalysisController.cs

@@ -175,6 +175,16 @@ namespace TEAMModelBI.Controllers.ProductAnalysis
                 string dist = (jsonElement.TryGetProperty("dist", out JsonElement distJobj)) ? distJobj.GetString() : string.Empty; //區
                 string dist = (jsonElement.TryGetProperty("dist", out JsonElement distJobj)) ? distJobj.GetString() : string.Empty; //區
                 List<string> areaIds = (jsonElement.TryGetProperty("areaIds", out JsonElement areaIdsJobj)) ? areaIdsJobj.ToObject<List<string>>() : new List<string>(); //學區ID(array)
                 List<string> areaIds = (jsonElement.TryGetProperty("areaIds", out JsonElement areaIdsJobj)) ? areaIdsJobj.ToObject<List<string>>() : new List<string>(); //學區ID(array)
                 bool hasVirtual = (jsonElement.TryGetProperty("virtual", out JsonElement virtualJobj)) ? virtualJobj.GetBoolean() : true; //是否取得虛擬學校
                 bool hasVirtual = (jsonElement.TryGetProperty("virtual", out JsonElement virtualJobj)) ? virtualJobj.GetBoolean() : true; //是否取得虛擬學校
+                //國際站欄位調整
+                if(_option.Location.Contains("Global"))
+                {
+                    if(string.IsNullOrWhiteSpace(region) && !string.IsNullOrWhiteSpace(province))
+                    {
+                        region = province;
+                        province = string.Empty;
+                        dist = string.Empty;
+                    }
+                }
                 //地區特殊字去除
                 //地區特殊字去除
                 comeRemoveStr.ForEach(c => { region = region.Replace(c, ""); });
                 comeRemoveStr.ForEach(c => { region = region.Replace(c, ""); });
                 comeRemoveStr.ForEach(c => { province = province.Replace(c, ""); });
                 comeRemoveStr.ForEach(c => { province = province.Replace(c, ""); });
@@ -183,6 +193,11 @@ namespace TEAMModelBI.Controllers.ProductAnalysis
 
 
                 //CosmosDB資料取得
                 //CosmosDB資料取得
                 List<SimpleSchoolInfo> result = new List<SimpleSchoolInfo>();
                 List<SimpleSchoolInfo> result = new List<SimpleSchoolInfo>();
+                ///檢索條件全無對策
+                if(schoolIds.Count.Equals(0) && string.IsNullOrWhiteSpace(region) && string.IsNullOrWhiteSpace(province) && string.IsNullOrWhiteSpace(city) && string.IsNullOrWhiteSpace(dist) && areaIds.Count.Equals(0))
+                {
+                    return Ok(new { state = 200, data = result });
+                }
                 string schIdListStr = JsonSerializer.Serialize(schoolIds);
                 string schIdListStr = JsonSerializer.Serialize(schoolIds);
                 string areaIdsListStr = JsonSerializer.Serialize(areaIds);
                 string areaIdsListStr = JsonSerializer.Serialize(areaIds);
                 string Sql = $"SELECT c.id, c.name, c.region, c.province, c.city, c.dist, c.areaId FROM c WHERE (c.pk = 'Base' OR c.pk = 'School')";
                 string Sql = $"SELECT c.id, c.name, c.region, c.province, c.city, c.dist, c.areaId FROM c WHERE (c.pk = 'Base' OR c.pk = 'School')";
@@ -232,7 +247,7 @@ namespace TEAMModelBI.Controllers.ProductAnalysis
             }
             }
         }
         }
 
 
-        public List<string> comeRemoveStr = new List<string>() { "省", "市", "区", "州", "县", "旗", "盟", "自治", "區", "縣" };
+        public List<string> comeRemoveStr = new List<string>() { "省", "市", "区", "州", "县", "旗", "盟", "自治", "地區", "區", "縣" };
         private class SimpleSchoolInfo
         private class SimpleSchoolInfo
         {
         {
             public string id { get; set; }
             public string id { get; set; }

+ 0 - 113
TEAMModelBI/Properties/ServiceDependencies/teammodelbi-rc - Web Deploy/profile.arm.json

@@ -1,113 +0,0 @@
-{
-  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
-  "contentVersion": "1.0.0.0",
-  "metadata": {
-    "_dependencyType": "compute.appService.windows"
-  },
-  "parameters": {
-    "resourceGroupName": {
-      "type": "string",
-      "defaultValue": "TEAMModelChengdu",
-      "metadata": {
-        "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
-      }
-    },
-    "resourceGroupLocation": {
-      "type": "string",
-      "defaultValue": "",
-      "metadata": {
-        "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
-      }
-    },
-    "resourceName": {
-      "type": "string",
-      "defaultValue": "rc",
-      "metadata": {
-        "description": "Name of the main resource to be created by this template."
-      }
-    },
-    "resourceLocation": {
-      "type": "string",
-      "defaultValue": "[parameters('resourceGroupLocation')]",
-      "metadata": {
-        "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
-      }
-    }
-  },
-  "variables": {
-    "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-    "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
-  },
-  "resources": [
-    {
-      "type": "Microsoft.Resources/resourceGroups",
-      "name": "[parameters('resourceGroupName')]",
-      "location": "[parameters('resourceGroupLocation')]",
-      "apiVersion": "2019-10-01"
-    },
-    {
-      "type": "Microsoft.Resources/deployments",
-      "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-      "resourceGroup": "[parameters('resourceGroupName')]",
-      "apiVersion": "2019-10-01",
-      "dependsOn": [
-        "[parameters('resourceGroupName')]"
-      ],
-      "properties": {
-        "mode": "Incremental",
-        "template": {
-          "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
-          "contentVersion": "1.0.0.0",
-          "resources": [
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[parameters('resourceName')]",
-              "type": "Microsoft.Web/sites",
-              "apiVersion": "2015-08-01",
-              "tags": {
-                "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
-              },
-              "dependsOn": [
-                "[variables('appServicePlan_ResourceId')]"
-              ],
-              "kind": "app",
-              "properties": {
-                "name": "[parameters('resourceName')]",
-                "kind": "app",
-                "httpsOnly": true,
-                "reserved": false,
-                "serverFarmId": "[variables('appServicePlan_ResourceId')]",
-                "siteConfig": {
-                  "metadata": [
-                    {
-                      "name": "CURRENT_STACK",
-                      "value": "dotnetcore"
-                    }
-                  ]
-                }
-              },
-              "identity": {
-                "type": "SystemAssigned"
-              }
-            },
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[variables('appServicePlan_name')]",
-              "type": "Microsoft.Web/serverFarms",
-              "apiVersion": "2015-08-01",
-              "sku": {
-                "name": "S1",
-                "tier": "Standard",
-                "family": "S",
-                "size": "S1"
-              },
-              "properties": {
-                "name": "[variables('appServicePlan_name')]"
-              }
-            }
-          ]
-        }
-      }
-    }
-  ]
-}

+ 3 - 3
TEAMModelBI/TEAMModelBI.csproj

@@ -65,9 +65,9 @@
 		<SpaRoot>ClientApp\</SpaRoot>
 		<SpaRoot>ClientApp\</SpaRoot>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-		<Version>5.2311.8</Version>
-		<AssemblyVersion>5.2311.8.1</AssemblyVersion>
-		<FileVersion>5.2311.8.1</FileVersion>
+		<Version>5.2311.15</Version>
+		<AssemblyVersion>5.2311.15.1</AssemblyVersion>
+		<FileVersion>5.2311.15.1</FileVersion>
 		<Description>TEAMModelBI(BI)</Description>
 		<Description>TEAMModelBI(BI)</Description>
 		<PackageReleaseNotes>BI版本说明版本切换标记2022000908</PackageReleaseNotes>
 		<PackageReleaseNotes>BI版本说明版本切换标记2022000908</PackageReleaseNotes>
 		<PackageId>TEAMModelBI</PackageId>
 		<PackageId>TEAMModelBI</PackageId>

+ 0 - 174
TEAMModelOS.FunctionV4/Properties/ServiceDependencies/TEAMModelFunction - Zip Deploy/profile.arm.json

@@ -1,174 +0,0 @@
-{
-  "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
-  "contentVersion": "1.0.0.0",
-  "metadata": {
-    "_dependencyType": "compute.function.windows.appService"
-  },
-  "parameters": {
-    "resourceGroupName": {
-      "type": "string",
-      "defaultValue": "TEAMModelChengdu",
-      "metadata": {
-        "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
-      }
-    },
-    "resourceGroupLocation": {
-      "type": "string",
-      "defaultValue": "",
-      "metadata": {
-        "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
-      }
-    },
-    "resourceName": {
-      "type": "string",
-      "defaultValue": "TEAMModelFunction",
-      "metadata": {
-        "description": "Name of the main resource to be created by this template."
-      }
-    },
-    "resourceLocation": {
-      "type": "string",
-      "defaultValue": "[parameters('resourceGroupLocation')]",
-      "metadata": {
-        "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
-      }
-    }
-  },
-  "resources": [
-    {
-      "type": "Microsoft.Resources/resourceGroups",
-      "name": "[parameters('resourceGroupName')]",
-      "location": "[parameters('resourceGroupLocation')]",
-      "apiVersion": "2019-10-01"
-    },
-    {
-      "type": "Microsoft.Resources/deployments",
-      "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-      "resourceGroup": "[parameters('resourceGroupName')]",
-      "apiVersion": "2019-10-01",
-      "dependsOn": [
-        "[parameters('resourceGroupName')]"
-      ],
-      "properties": {
-        "mode": "Incremental",
-        "expressionEvaluationOptions": {
-          "scope": "inner"
-        },
-        "parameters": {
-          "resourceGroupName": {
-            "value": "[parameters('resourceGroupName')]"
-          },
-          "resourceGroupLocation": {
-            "value": "[parameters('resourceGroupLocation')]"
-          },
-          "resourceName": {
-            "value": "[parameters('resourceName')]"
-          },
-          "resourceLocation": {
-            "value": "[parameters('resourceLocation')]"
-          }
-        },
-        "template": {
-          "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
-          "contentVersion": "1.0.0.0",
-          "parameters": {
-            "resourceGroupName": {
-              "type": "string"
-            },
-            "resourceGroupLocation": {
-              "type": "string"
-            },
-            "resourceName": {
-              "type": "string"
-            },
-            "resourceLocation": {
-              "type": "string"
-            }
-          },
-          "variables": {
-            "storage_name": "[toLower(concat('storage', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId))))]",
-            "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
-            "storage_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', variables('storage_name'))]",
-            "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]",
-            "function_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/sites/', parameters('resourceName'))]"
-          },
-          "resources": [
-            {
-              "location": "[parameters('resourceLocation')]",
-              "name": "[parameters('resourceName')]",
-              "type": "Microsoft.Web/sites",
-              "apiVersion": "2015-08-01",
-              "tags": {
-                "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
-              },
-              "dependsOn": [
-                "[variables('appServicePlan_ResourceId')]",
-                "[variables('storage_ResourceId')]"
-              ],
-              "kind": "functionapp",
-              "properties": {
-                "name": "[parameters('resourceName')]",
-                "kind": "functionapp",
-                "httpsOnly": true,
-                "reserved": false,
-                "serverFarmId": "[variables('appServicePlan_ResourceId')]",
-                "siteConfig": {
-                  "alwaysOn": true
-                }
-              },
-              "identity": {
-                "type": "SystemAssigned"
-              },
-              "resources": [
-                {
-                  "name": "appsettings",
-                  "type": "config",
-                  "apiVersion": "2015-08-01",
-                  "dependsOn": [
-                    "[variables('function_ResourceId')]"
-                  ],
-                  "properties": {
-                    "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_name'), ';AccountKey=', listKeys(variables('storage_ResourceId'), '2017-10-01').keys[0].value, ';EndpointSuffix=', 'core.windows.net')]",
-                    "FUNCTIONS_EXTENSION_VERSION": "~3",
-                    "FUNCTIONS_WORKER_RUNTIME": "dotnet"
-                  }
-                }
-              ]
-            },
-            {
-              "location": "[parameters('resourceGroupLocation')]",
-              "name": "[variables('storage_name')]",
-              "type": "Microsoft.Storage/storageAccounts",
-              "apiVersion": "2017-10-01",
-              "tags": {
-                "[concat('hidden-related:', concat('/providers/Microsoft.Web/sites/', parameters('resourceName')))]": "empty"
-              },
-              "properties": {
-                "supportsHttpsTrafficOnly": true
-              },
-              "sku": {
-                "name": "Standard_LRS"
-              },
-              "kind": "Storage"
-            },
-            {
-              "location": "[parameters('resourceGroupLocation')]",
-              "name": "[variables('appServicePlan_name')]",
-              "type": "Microsoft.Web/serverFarms",
-              "apiVersion": "2015-08-01",
-              "sku": {
-                "name": "S1",
-                "tier": "Standard",
-                "family": "S",
-                "size": "S1"
-              },
-              "properties": {
-                "name": "[variables('appServicePlan_name')]"
-              }
-            }
-          ]
-        }
-      }
-    }
-  ]
-}

+ 0 - 9
TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelFunction - Zip Deploy.json

@@ -1,9 +0,0 @@
-{
-  "dependencies": {
-    "storage1": {
-      "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/teammodelstorage",
-      "type": "storage.azure",
-      "connectionId": "AzureWebJobsStorage"
-    }
-  }
-}

+ 1 - 7
TEAMModelOS.FunctionV4/Properties/serviceDependencies.TEAMModelOSFunction - Zip Deploy.json

@@ -1,9 +1,3 @@
 {
 {
-  "dependencies": {
-    "storage1": {
-      "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/teammodellog",
-      "type": "storage.azure",
-      "connectionId": "AzureWebJobsStorage"
-    }
-  }
+  "dependencies": {}
 }
 }

+ 1 - 6
TEAMModelOS.FunctionV4/Properties/serviceDependencies.json

@@ -1,8 +1,3 @@
 {
 {
-  "dependencies": {
-    "storage1": {
-      "type": "storage",
-      "connectionId": "AzureWebJobsStorage"
-    }
-  }
+  "dependencies": {}
 }
 }

+ 1 - 7
TEAMModelOS.FunctionV4/Properties/serviceDependencies.local.json

@@ -1,9 +1,3 @@
 {
 {
-  "dependencies": {
-    "storage1": {
-      "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/teammodellog",
-      "type": "storage.azure",
-      "connectionId": "AzureWebJobsStorage"
-    }
-  }
+  "dependencies": {}
 }
 }

+ 3 - 0
TEAMModelOS.FunctionV4/Properties/serviceDependencies.teammodelosfunction-test - Zip Deploy.json

@@ -0,0 +1,3 @@
+{
+  "dependencies": {}
+}

+ 3 - 3
TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj

@@ -5,9 +5,9 @@
 		<OutputType>Exe</OutputType>
 		<OutputType>Exe</OutputType>
 		<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
 		<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
 		<SignAssembly>true</SignAssembly>
 		<SignAssembly>true</SignAssembly>
-		<Version>5.2311.8</Version>
-		<AssemblyVersion>5.2311.8.1</AssemblyVersion>
-		<FileVersion>5.2311.8.1</FileVersion>
+		<Version>5.2311.15</Version>
+		<AssemblyVersion>5.2311.15.1</AssemblyVersion>
+		<FileVersion>5.2311.15.1</FileVersion>
 		<PackageId>TEAMModelOS.FunctionV4</PackageId>
 		<PackageId>TEAMModelOS.FunctionV4</PackageId>
 		<Authors>teammodel</Authors>
 		<Authors>teammodel</Authors>
 		<Company>醍摩豆(成都)信息技术有限公司</Company>
 		<Company>醍摩豆(成都)信息技术有限公司</Company>

+ 8 - 15
TEAMModelOS.SDK/DI/AzureCosmos/AzureCosmosExtensions.cs

@@ -65,7 +65,7 @@ namespace TEAMModelOS.SDK.DI
             int totalCount = 0;
             int totalCount = 0;
             await foreach (var item in container.GetItemQueryStreamIterator(
             await foreach (var item in container.GetItemQueryStreamIterator(
                 queryText: $"SELECT VALUE COUNT(1) From c {queryWhere}",
                 queryText: $"SELECT VALUE COUNT(1) From c {queryWhere}",
-                requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey(partitionkey), MaxItemCount = -1 }))
+                requestOptions: new QueryRequestOptions() { PartitionKey =!string.IsNullOrWhiteSpace(partitionkey) ? new PartitionKey(partitionkey) : null , MaxItemCount = -1 }))
             {
             {
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -114,17 +114,12 @@ namespace TEAMModelOS.SDK.DI
             }
             }
             return responses;
             return responses;
         }
         }
-        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, QueryDefinition  queryDefinition, string partitionkey, string? continuationToken = null, int? pageSize = null)
+        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, QueryDefinition  queryDefinition, string partitionkey= null, string continuationToken = null, int? pageSize = null)
         {
         {
             List<T> list = new List<T>();
             List<T> list = new List<T>();
             double RU = 0;
             double RU = 0;
-            if (string.IsNullOrWhiteSpace(partitionkey))
-            {
-                return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken });
-            }
-
             await foreach (var item in container.GetItemQueryStreamIterator(queryDefinition: queryDefinition, continuationToken: continuationToken,
             await foreach (var item in container.GetItemQueryStreamIterator(queryDefinition: queryDefinition, continuationToken: continuationToken,
-                requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey = new PartitionKey(partitionkey) }))
+                requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey =!string.IsNullOrWhiteSpace(partitionkey) ? new PartitionKey(partitionkey) : null }))
             {
             {
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 using var json = await JsonDocument.ParseAsync(item.ContentStream);
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
                 if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -154,18 +149,15 @@ namespace TEAMModelOS.SDK.DI
             return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken }); ;
             return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken }); ;
         }
         }
 
 
-        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, string sql, string partitionkey, string? continuationToken = null, int? pageSize = null)
+        public static async Task<CosmosDBResult<T>> GetList<T>(this CosmosContainer container, string sql, string partitionkey= null, string continuationToken = null, int? pageSize = null)
         {
         {
             List<T> list = new List<T>();
             List<T> list = new List<T>();
             double RU = 0;
             double RU = 0;
-            if (string.IsNullOrWhiteSpace(partitionkey))
+            try
             {
             {
-                return (new CosmosDBResult<T> { list = list, ru = RU, continuationToken = continuationToken });
-            }
 
 
-            try {
                 await foreach (var item in container.GetItemQueryStreamIterator(queryText: sql, continuationToken: continuationToken,
                 await foreach (var item in container.GetItemQueryStreamIterator(queryText: sql, continuationToken: continuationToken,
-                 requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey = new PartitionKey(partitionkey) }))
+                 requestOptions: new QueryRequestOptions { MaxItemCount = pageSize, PartitionKey =!string.IsNullOrWhiteSpace(partitionkey)?new PartitionKey(partitionkey) : null}))
                 {
                 {
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);
                     if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
                     if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -192,7 +184,8 @@ namespace TEAMModelOS.SDK.DI
                     }
                     }
                 }
                 }
             }
             }
-            catch (Exception ex) { 
+            catch (Exception ex)
+            {
                 Console.WriteLine(ex.ToString());
                 Console.WriteLine(ex.ToString());
             }
             }
             //记录日志,RU开销大于400(开发测试),1000(正式)
             //记录日志,RU开销大于400(开发测试),1000(正式)

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Activity.cs

@@ -511,6 +511,7 @@ namespace TEAMModelOS.SDK.Models
         public string email { get; set; }
         public string email { get; set; }
         public string tmdid { get; set; }
         public string tmdid { get; set; }
         public string picture { get; set; }
         public string picture { get; set; }
+        public string school { get; set; }
         /// <summary>
         /// <summary>
         /// 0 未确认,1 已确认  确认状态
         /// 0 未确认,1 已确认  确认状态
         /// </summary>
         /// </summary>

+ 8 - 19
TEAMModelOS.SDK/Models/Service/BI/BISchoolService.cs

@@ -36,28 +36,18 @@ namespace TEAMModelOS.SDK.Models.Service.BI
             }
             }
         }
         }
         /// <summary>
         /// <summary>
-        /// 計算學校版本公式
+        /// 計算學校版本公式 ※計算邏輯變更:廢止原size+scale判斷邏輯
         /// </summary>
         /// </summary>
         public static Edition calSchoolEdition(School school, List<string> services)
         public static Edition calSchoolEdition(School school, List<string> services)
         {
         {
-            int edition = 0;
-            if (school.size <= 100 && school.scale == 0)
-            {
-                edition = 1;
-            }
-            else if (school.size >= 300 && school.scale >= 500 && school.scale < 100 && services.Contains("YMPCVCIM"))
-            {
-                edition = 2;
-            }
-            else if (school.size >= 300 && school.scale >= 1000 && services.Contains("YMPCVCIM") && services.Count > 2)
-            {
-                edition = 3;
-            }
+            int edition = 1;
+            bool adminFlg = (services.Contains("IPDYZYLC")) ? true : false;
+            bool analFlg = (services.Contains("YMPCVCIM")) ? true : false;
+            bool fiveFlg = (services.Contains("YPXSJ6NJ")) ? true : false;
+            if (adminFlg && analFlg && fiveFlg) edition = 3;
+            else if (adminFlg && analFlg) edition = 2;
+            else edition = 1;
 
 
-            if (edition == 0)
-            {
-                edition = 1;
-            }
             if (school.edition != null)
             if (school.edition != null)
             {
             {
                 school.edition.current = edition;
                 school.edition.current = edition;
@@ -73,7 +63,6 @@ namespace TEAMModelOS.SDK.Models.Service.BI
                     current = edition,
                     current = edition,
                     record = edition
                     record = edition
                 };
                 };
-
                 school.edition = tempEdition;
                 school.edition = tempEdition;
             }
             }
             return school.edition;
             return school.edition;

+ 189 - 0
TEAMModelOS.SDK/Models/Service/StudentService.cs

@@ -22,6 +22,195 @@ namespace TEAMModelOS.SDK
 {
 {
     public class StudentService
     public class StudentService
     {
     {
+        public class StudentActivity
+        {
+
+            public string id { get; set; }
+            public string code { get; set; }
+
+            /// <summary>
+            /// 源数据的发布层级 类型 school  teacher
+            /// </summary>
+            public string owner { get; set; }
+          
+            public string pk {  get; set; }
+            //评测模式
+            public string source { get; set; }
+            public string name { get; set; }
+            public long startTime { get; set; }
+            public long endTime { get; set; }
+            public string scope { get; set; }
+            public string school { get; set; }
+            public string creatorId { get; set; }
+        
+            public List<string> subjects { get; set; }
+         
+            public List<string> classes { get; set; }
+            public List<string> stuLists { get; set; }
+            public List<string> tchLists { get; set; }
+            public long createTime { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
+            public Dictionary<string, JsonElement> ext { get; set; } = new Dictionary<string, JsonElement>();
+            /// 评分状态,0,未评分, 1已评分
+            public int sStatus { get; set; } = 0;
+            //评测 纸本1或者书面问答0
+            public int qamode { get; set; } = 0;
+            //标记作业活动是否比交
+            public bool mustSubmit { get; set; } = false;
+            //标记问卷是否重复提交 0 否 1 是
+            public int isSub { get; set; } = 0;
+            /// <summary>
+            /// 任务完成状态,-1 未参与,0,未完成, 1已完成
+            /// </summary>
+            public int taskStatus { get; set; } = -1;
+            public string recordUrl { get; set; }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="userId"></param>
+        /// <param name="userType"></param>
+        /// <param name="groupListIds"></param>
+        /// <param name="school"></param>
+        /// <param name="types">Exam ,Vote,Homework,Survey</param>
+        /// <param name="_azureCosmos"></param>
+        /// <param name="azureRedis"></param>
+        public static async void FindActivity(JsonElement request,string userId ,string userType, List<string>groupListIds,List<string> subjects, string school,List<string> types, AzureCosmosFactory _azureCosmos, AzureRedisFactory azureRedis)
+        {
+            string filed = "c.id ,c.code,c.owner,c.pk,c.qamode,c.name,c.school,c.startTime,c.endTime,c.classes,c.stuLists,c.tchLists,c.createTime,c.creatorId,c.ext,c.isSub,c.mustSubmit,c.sStatus,c.scope,c.source,c.subjects";
+            if (string.IsNullOrWhiteSpace(school))
+            {
+                if (request.TryGetProperty("school", out JsonElement schooljson))
+                {
+                    if (!schooljson.ValueKind.Equals(JsonValueKind.Undefined) && !schooljson.ValueKind.Equals(JsonValueKind.Null) && schooljson.ValueKind.Equals(JsonValueKind.String))
+                    {
+                        school = schooljson.GetString();
+                    }
+                }
+            }
+            long stime = DateTimeOffset.UtcNow.AddDays(-30).ToUnixTimeMilliseconds(), etime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); 
+            if (request.TryGetProperty("stime", out JsonElement _stime))
+            {
+                if (!_stime.ValueKind.Equals(JsonValueKind.Undefined) && !_stime.ValueKind.Equals(JsonValueKind.Null) && _stime.TryGetInt64(out long data))
+                {
+                    stime= data;   
+                }
+            }
+            if (request.TryGetProperty("etime", out JsonElement _etime))
+            {
+                if (!_etime.ValueKind.Equals(JsonValueKind.Undefined) && !_etime.ValueKind.Equals(JsonValueKind.Null) && _etime.TryGetInt64(out long data))
+                {
+                    etime= data;
+                }
+            }
+            string code = null;
+            string  groupListSQL =string .Empty ;
+
+
+            if (groupListIds.IsNotEmpty())
+            {
+                List<string >  arrayStr= new List<string>();
+                groupListIds.ForEach(z => {
+                    arrayStr.Add($"array_contains(c.classes,'{z}') ");
+                    arrayStr.Add($"array_contains(c.stuLists,'{z}') ");
+                    arrayStr.Add($"array_contains(c.tchLists,'{z}') ");
+                });
+                groupListSQL= $"and ({string.Join(" or ", arrayStr)})";
+            }
+            else
+            {
+                throw new Exception("名单为空");
+            }
+            
+            List<StudentActivity> activities = new List<StudentActivity>();
+            if (types.IsEmpty()|| types.Contains("Exam")) {
+                string subjectSQL = "";
+                string subjectJoin = "";
+                if (subjects.IsNotEmpty()) {
+                    subjectJoin = "join s in c.subjects";
+                    subjectSQL = $" and  c.id in ({string.Join(",",subjects.Select(z=>$"'{z}'"))}) ";
+                }
+                StringBuilder SQL = new StringBuilder( $"select { filed} from c {subjectJoin} where c.pk='Exam' {subjectSQL} {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && ! string.IsNullOrWhiteSpace(school)) {
+                   var resultSchool =   await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Exam-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+
+            if (types.IsEmpty()|| types.Contains("Vote"))
+            {
+               
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Vote' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Vote-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Survey"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Survey' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Survey-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Homework"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Homework' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='school' ", $"Homework-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+                //获取教师发布的活动(个人名单,学校名单)
+                {
+                    var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.owner='teacher' ");
+                    activities.AddRange(resultTeacher.list);
+                }
+            }
+            if (types.IsEmpty()|| types.Contains("Art"))
+            {
+
+                StringBuilder SQL = new StringBuilder($"select {filed} from c  where c.pk='Art' {groupListSQL} and c.createTime>={stime} and c.createTime <= {etime} and c.startTime <= {DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}");
+                //获取学校发布的活动
+                if (userType.Equals(Constant.ScopeStudent)  && !string.IsNullOrWhiteSpace(school))
+                {
+                    var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()}  and c.school='school' ", $"Art-{school}");
+                    activities.AddRange(resultSchool.list);
+                }
+            }
+            //作答 记录recordUrl  taskStatus
+        }
+
+       
+
+
+
+
         /// <summary>
         /// <summary>
         /// 
         /// 
         /// </summary>
         /// </summary>

+ 3 - 3
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -2,9 +2,9 @@
 
 
   <PropertyGroup>
   <PropertyGroup>
     <TargetFramework>net6.0</TargetFramework>
     <TargetFramework>net6.0</TargetFramework>
-    <Version>5.2311.8</Version>
-    <AssemblyVersion>5.2311.8.1</AssemblyVersion>
-    <FileVersion>5.2311.8.1</FileVersion>
+    <Version>5.2311.15</Version>
+    <AssemblyVersion>5.2311.15.1</AssemblyVersion>
+    <FileVersion>5.2311.15.1</FileVersion>
     <PackageReleaseNotes>发版</PackageReleaseNotes>
     <PackageReleaseNotes>发版</PackageReleaseNotes>
   </PropertyGroup>
   </PropertyGroup>
 
 

+ 2 - 2
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -5274,7 +5274,7 @@ const LANG_EN_US = {
             summary1: "Added Today",
             summary1: "Added Today",
             summary2: "Practiced",
             summary2: "Practiced",
             summary3: "Mastered",
             summary3: "Mastered",
-            summary4: "Total Questions No.",
+            summary4: "Total of smart wrong questions",
             summary5: "Last Review",
             summary5: "Last Review",
             summary6: "Recommended Review Time",
             summary6: "Recommended Review Time",
             summary7: "Last Practice",
             summary7: "Last Practice",
@@ -5285,7 +5285,7 @@ const LANG_EN_US = {
             chartText1: "Incorrectly Answered Question Difficulty Distribution",
             chartText1: "Incorrectly Answered Question Difficulty Distribution",
             chartText2: "Learning Difficulty Distribution",
             chartText2: "Learning Difficulty Distribution",
             button1: "Start Practice",
             button1: "Start Practice",
-            button2: "Search all incorrectly answered questions",
+            button2: "Search for wrong questions in collection",
             button3: "Start Reviewing",
             button3: "Start Reviewing",
             button4: "Start",
             button4: "Start",
             sundry1: "Quantity",
             sundry1: "Quantity",

+ 2 - 2
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -5272,7 +5272,7 @@ const LANG_ZH_CN = {
             summary1: "今日新增",
             summary1: "今日新增",
             summary2: "已练习",
             summary2: "已练习",
             summary3: "已熟练",
             summary3: "已熟练",
-            summary4: "总题数",
+            summary4: "智慧错题总题数",
             summary5: "最近一次复习",
             summary5: "最近一次复习",
             summary6: "建议复习时间",
             summary6: "建议复习时间",
             summary7: "最近一次练习",
             summary7: "最近一次练习",
@@ -5283,7 +5283,7 @@ const LANG_ZH_CN = {
             chartText1: "错题难度分布",
             chartText1: "错题难度分布",
             chartText2: "学习难度分布",
             chartText2: "学习难度分布",
             button1: "开始练习",
             button1: "开始练习",
-            button2: "查找所有错题",
+            button2: "查找在库错题",
             button3: "马上复习",
             button3: "马上复习",
             button4: "开始",
             button4: "开始",
             sundry1: "数量",
             sundry1: "数量",

+ 2 - 2
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -5275,7 +5275,7 @@ const LANG_ZH_TW = {
             summary1: "今日新增",
             summary1: "今日新增",
             summary2: "已練習",
             summary2: "已練習",
             summary3: "已熟練",
             summary3: "已熟練",
-            summary4: "總題數",
+            summary4: "智慧錯題總題數",
             summary5: "最近一次複習",
             summary5: "最近一次複習",
             summary6: "建議複習時間",
             summary6: "建議複習時間",
             summary7: "最近一次練習",
             summary7: "最近一次練習",
@@ -5286,7 +5286,7 @@ const LANG_ZH_TW = {
             chartText1: "錯題難度分佈",
             chartText1: "錯題難度分佈",
             chartText2: "學習難度分佈",
             chartText2: "學習難度分佈",
             button1: "開始練習",
             button1: "開始練習",
-            button2: "查詢所有錯題",
+            button2: "查詢在庫錯題",
             button3: "馬上複習",
             button3: "馬上複習",
             button4: "開始",
             button4: "開始",
             sundry1: "數量",
             sundry1: "數量",

+ 3 - 2
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -322,7 +322,7 @@
 					let hasStuDash = schoolVersions.productSum.service.find((i) => i.prodCode === "YPXSJ6NJ"); // 五育看板模块
 					let hasStuDash = schoolVersions.productSum.service.find((i) => i.prodCode === "YPXSJ6NJ"); // 五育看板模块
 					let hasAnalysis = schoolVersions.productSum.service.find((i) => i.prodCode === "YMPCVCIM"); // 学情分析模块 代表至少是标准版
 					let hasAnalysis = schoolVersions.productSum.service.find((i) => i.prodCode === "YMPCVCIM"); // 学情分析模块 代表至少是标准版
 					let isPro = hasStuDash && hasArtProd; // 同时购买了五育看板和艺术评测 代表是专业版本
 					let isPro = hasStuDash && hasArtProd; // 同时购买了五育看板和艺术评测 代表是专业版本
-					let isArtTest = this.$store.state.user.schoolProfile.school_base.modules?.includes('art') // modules里面有art代表 必定为评测版本
+					// let isArtTest = this.$store.state.user.schoolProfile.school_base.modules?.includes('art') // modules里面有art代表 必定为评测版本
 					this.hasArtProd = hasArtProd;
 					this.hasArtProd = hasArtProd;
 					if (isPro) {
 					if (isPro) {
 						this.isPro = true;
 						this.isPro = true;
@@ -331,7 +331,7 @@
 					} else if (hasAnalysis) {
 					} else if (hasAnalysis) {
 						this.edition = "standard";
 						this.edition = "standard";
 						this.systemLevel = this.$t("system.advanced");
 						this.systemLevel = this.$t("system.advanced");
-					} else if (isArtTest) {
+					} else if (hasArtProd) {
 						this.edition = "artTest";
 						this.edition = "artTest";
 						this.systemLevel = this.$t("system.artTest");
 						this.systemLevel = this.$t("system.artTest");
 					} else {
 					} else {
@@ -346,6 +346,7 @@
 					localStorage.setItem("edition", this.edition);
 					localStorage.setItem("edition", this.edition);
 					this.hasAnalysisAuth = this.getAnalysisAuth();
 					this.hasAnalysisAuth = this.getAnalysisAuth();
 				}
 				}
+
 				let bodyElement = document.body;
 				let bodyElement = document.body;
 				console.log(bodyElement.style, "body");
 				console.log(bodyElement.style, "body");
 				bodyElement.style.fontFamily = localStorage.local === "zh-tw" ? "微软雅黑" : "Hm";
 				bodyElement.style.fontFamily = localStorage.local === "zh-tw" ? "微软雅黑" : "Hm";

+ 0 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/ArtView.vue

@@ -112,7 +112,6 @@
             </div>
             </div>
 
 
           </div>
           </div>
-
         </div>
         </div>
       </template>
       </template>
       <!-- </div> -->
       <!-- </div> -->

+ 3 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue

@@ -578,7 +578,9 @@
                     this.activeIndex = index
                     this.activeIndex = index
                     if(isArt) {
                     if(isArt) {
                         this.examLists = item.exam
                         this.examLists = item.exam
-                        this.hwLists = item.homework
+                        // this.hwLists = item.homework
+                        // 2023.11.15 #2985 C527 艺术评测只显示基本技能,其他材料通过小程序端上传
+                        this.hwLists = item.homework.filter(hws => hws.quotaId === "quota_22")
                         if(this.examLists.length) {
                         if(this.examLists.length) {
                             this.showPaper = 0
                             this.showPaper = 0
                             localStorage.setItem("quotaId", item.exam[0].quotaId)
                             localStorage.setItem("quotaId", item.exam[0].quotaId)

+ 44 - 7
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -75,13 +75,21 @@
                 </div>
                 </div>
                 <div style="margin-top: 15px;" v-if="showType.includes('Vote')">
                 <div style="margin-top: 15px;" v-if="showType.includes('Vote')">
                     <span>{{ $t('studentWeb.vote.choiceTeacher') }}:</span>
                     <span>{{ $t('studentWeb.vote.choiceTeacher') }}:</span>
-                    <span class="tag-style tag-teacher" :class="{'tag-pointer': !nowTea}" style="cursor: pointer;" @click="changeTea(0)">{{ $t('studentWeb.type.all') }}</span>
-                    <span v-for="(tea, tIndex) in teachers" :key="tIndex" @click="changeTea(tIndex + 1, tea)"
+                    <span class="tag-style tag-teacher" :class="{'tag-pointer': !nowTea}" style="cursor: pointer;" @click="changeTea('teacher', 0)">{{ $t('studentWeb.type.all') }}</span>
+                    <span v-for="(tea, tIndex) in teachers" :key="tIndex" @click="changeTea('teacher', tIndex + 1, tea)"
                         class="tag-style tag-teacher" :class="{'tag-pointer': nowTea === (tIndex + 1)}" style="cursor: pointer;"
                         class="tag-style tag-teacher" :class="{'tag-pointer': nowTea === (tIndex + 1)}" style="cursor: pointer;"
                     >
                     >
                         {{ tea.name }}
                         {{ tea.name }}
                     </span>
                     </span>
                 </div>
                 </div>
+                <div style="margin-top: 15px; font-size: 16px;" v-if="!showType.includes('Vote') && courseNow.subjectList">
+                    <span>科目:</span>
+                    <span v-for="(sub, sIndex) in courseNow.subjectList" :key="sIndex" @click="changeTea('subject', sIndex)"
+                        class="tag-style tag-subject" :class="{'tag-pointer': nowSub === sIndex}" style="cursor: pointer;"
+                    >
+                        {{ sub.name }}
+                    </span>
+                </div>
             </div>
             </div>
             <!--活動清單分頁-->
             <!--活動清單分頁-->
             <div :class="['list-block', !showType.includes('Vote') ? 'list-block-1' : 'list-block-2']">
             <div :class="['list-block', !showType.includes('Vote') ? 'list-block-1' : 'list-block-2']">
@@ -461,7 +469,7 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 isListNoItem: false, //清單為空
                 isListNoItem: false, //清單為空
                 eventList: [], //活动数据
                 eventList: [], //活动数据
                 eventShow: [], //展示的活动数据
                 eventShow: [], //展示的活动数据
-                eventPageType: ["Learn", "Exam", "Homework", "Vote", "Survey"], //本頁出現的類型
+                eventPageType: ["Learn", "Exam", "Homework", "Vote", "Survey", "Art"], //本頁出現的類型
                 selectedEventStatusNow: {
                 selectedEventStatusNow: {
                     type: "all",
                     type: "all",
                     status: this.$t('studentWeb.event.allStatus')
                     status: this.$t('studentWeb.event.allStatus')
@@ -489,6 +497,7 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 isLoad: false,
                 isLoad: false,
                 teachers: [],
                 teachers: [],
                 nowTea: 0,
                 nowTea: 0,
+                nowSub: 0,
                 quotas: [],
                 quotas: [],
                 nowtime: null,
                 nowtime: null,
             };
             };
@@ -640,7 +649,6 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                              */
                              */
                             // 目前评测、作业都只传了一个值
                             // 目前评测、作业都只传了一个值
                             if(!this.showType.includes("Vote")) {
                             if(!this.showType.includes("Vote")) {
-                            // if(this.showType[0] === 'Exam') {
                                 // 只匹配班级id
                                 // 只匹配班级id
                                 return this.showType.includes(item.type) && item.classIds.includes(this.courseNow.groupId)
                                 return this.showType.includes(item.type) && item.classIds.includes(this.courseNow.groupId)
                                 // return this.showType.includes(item.type) && (item.classIds.includes(this.courseNow.list) || item.subjects.includes(this.courseNow.subject.id) || item.creatorId === this.courseNow.roster.teacherId)
                                 // return this.showType.includes(item.type) && (item.classIds.includes(this.courseNow.list) || item.subjects.includes(this.courseNow.subject.id) || item.creatorId === this.courseNow.roster.teacherId)
@@ -671,7 +679,26 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                                 }
                                 }
                             })
                             })
                         } else {
                         } else {
-                            this.eventShow = [...this.eventList]
+                            if(this.$route.query.aId && this.courseNow.subjectList) {
+                                let info = this.eventList.find(item => {
+                                    return item.id === this.$route.query.aId
+                                })
+                                if(info) {
+                                    this.nowSub = this.courseNow.subjectList.findIndex(item => {
+                                        return info.subjects.includes(item.id) || info.subjects.includes(item.bindId)
+                                    })
+                                }
+                            }
+                            // 2023.11.09 评测列表展示: 科目($sotre.state.user.curPeriod.subjects) + 班级
+                            this.eventShow = this.eventList.filter(eveList => {
+                                if(this.courseNow.subjectList) {
+                                    // 基本课程: 匹配科目
+                                    return eveList.subjects.includes(this.courseNow.subjectList[this.nowSub].id) || eveList.subjects.includes(this.courseNow.subjectList[this.nowSub].bindId)
+                                } else {
+                                    // 非基本课程: 匹配科目(学校) || 课程id(个人)
+                                    return eveList.scope === 'school' ? eveList.subjects.includes(this.courseNow.subject.id) : eveList.subjects.includes(this.courseNow.id)
+                                }
+                            })
                         }
                         }
                         
                         
                         if(this.eventShow.length) {
                         if(this.eventShow.length) {
@@ -699,6 +726,7 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                                     return item.id === this.$route.query.aId
                                     return item.id === this.$route.query.aId
                                 })
                                 })
                                 if(nowIn != -1) {
                                 if(nowIn != -1) {
+                                    console.log(nowIn);
                                     this.sentSelectedEventTitle(this.eventShow[nowIn])
                                     this.sentSelectedEventTitle(this.eventShow[nowIn])
                                 } else {
                                 } else {
                                     this.$Message.warning(this.$t("studentWeb.exam.message.nojoin"))
                                     this.$Message.warning(this.$t("studentWeb.exam.message.nojoin"))
@@ -841,6 +869,10 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 if (currentfilterArray.length !== 0) {
                 if (currentfilterArray.length !== 0) {
                     if(this.nowTea) {
                     if(this.nowTea) {
                         this.eventShow = currentfilterArray.filter(item => item.creatorId === this.teachers[this.nowTea - 1].id)
                         this.eventShow = currentfilterArray.filter(item => item.creatorId === this.teachers[this.nowTea - 1].id)
+                    } else if(this.courseNow.subjectList && !this.showType.includes("Vote")) {
+                        this.eventShow = currentfilterArray.filter(item => {
+                            return item.subjects.includes(this.courseNow.subjectList[this.nowSub].id) || item.subjects.includes(this.courseNow.subjectList[this.nowSub].bindId)
+                        })
                     } else {
                     } else {
                         this.eventShow = [...currentfilterArray]
                         this.eventShow = [...currentfilterArray]
                     }
                     }
@@ -1119,8 +1151,13 @@ import QuesNaire from "./EventContentTypeTemplate/QuesNaire";
                 let time = (new Date(new Date(new Date(date).toLocaleDateString()).getTime())).getTime()
                 let time = (new Date(new Date(new Date(date).toLocaleDateString()).getTime())).getTime()
                 this.getActivityInfo(time)
                 this.getActivityInfo(time)
             },
             },
-            changeTea(index, teacher) {
-                this.nowTea = index
+            changeTea(type, index, teacher) {
+                console.log(type, index, teacher);
+                if(type === 'subject') {
+                    this.nowSub = index
+                } else {
+                    this.nowTea = index
+                }
                 this.predealMockdatafirstItem()
                 this.predealMockdatafirstItem()
                 /* if(teacher) {
                 /* if(teacher) {
                     let list = this.eventShow.filter(item => item.creatorId === teacher.id)
                     let list = this.eventShow.filter(item => item.creatorId === teacher.id)

+ 4 - 0
TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue

@@ -45,6 +45,10 @@
                                     {{ item.teacherName }}
                                     {{ item.teacherName }}
                                 </span>
                                 </span>
                             </span>
                             </span>
+                            <span v-if="item.scope === 'school'">
+                                <span v-if="!item.subjectList" class="tag-style text-long" style="border-color: #499c8d; color: #499c8d;">{{ item.subject.name }}</span>
+                                <span v-else v-for="(sub, sIndex) in item.subjectList" :key="sIndex" class="tag-style text-long" style="border-color: #499c8d; color: #499c8d;">{{ sub.name }}</span>
+                            </span>
                             <!-- <span>{{ item.courseAddDate }}</span> -->
                             <!-- <span>{{ item.courseAddDate }}</span> -->
                         </p>
                         </p>
                     </div>
                     </div>

+ 16 - 2
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/Index.vue

@@ -52,10 +52,10 @@ export default {
             if(this.$store.state.config.srvAdr === 'China') {
             if(this.$store.state.config.srvAdr === 'China') {
                 if(this.$store.state.config.srvAdrType === 'product') {
                 if(this.$store.state.config.srvAdrType === 'product') {
                     url.name = 'https://malearn.teammodel.cn'
                     url.name = 'https://malearn.teammodel.cn'
-                    url.key = 'QUzQqbqbnLsTDTeaJy4Br6wUuqPoAlKpzRK2S6PGImRHAzFuySGAeA=='
+                    url.key = '2BcXFR_hvzG1pZjqIkaM7Dx74Hcu6m0PwwOacFpDpq44AzFuHJBRXA=='
                 } else {
                 } else {
                     url.name = 'https://malearn-rc.teammodel.cn'
                     url.name = 'https://malearn-rc.teammodel.cn'
-                    url.key = 'hESc0g7Q60FTEss4ZnVXPB61S1a8WlAXIq5ULl3T3oTxAzFunpLDwA=='
+                    url.key = 'lghWhJduNiAlo-e8isqEoROjdR7DAC-50XNtanIwHKYlAzFu1aog_A=='
                 }
                 }
             } else { //國際站:正式站、RC站 呼叫malearn正式站
             } else { //國際站:正式站、RC站 呼叫malearn正式站
                 if (this.$store.state.config.srvAdrType === 'product' || this.$store.state.config.srvAdrType === 'rc') {
                 if (this.$store.state.config.srvAdrType === 'product' || this.$store.state.config.srvAdrType === 'rc') {
@@ -97,4 +97,18 @@ export default {
         }
         }
     }
     }
 }
 }
+</style>
+
+<style lang="less">
+.wrong-index {
+    .tag-style {
+        font-size: 14px;
+        cursor: pointer;
+    }
+    
+    .tag-pointer {
+        background-color: #6b6ba9;
+        color: #fff;
+    }
+}
 </style>
 </style>

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesContent.less

@@ -1,7 +1,7 @@
 .count-box {
 .count-box {
     width: 100%;
     width: 100%;
     // padding: 25px;
     // padding: 25px;
-    padding-top: 2%;
+    padding-top: 1%;
 
 
     .count-header {
     .count-header {
         display: flex;
         display: flex;

+ 27 - 20
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesList.vue

@@ -225,23 +225,27 @@ export default {
         }
         }
     },
     },
     async created () {
     async created () {
-        this.MyName = this.$t("studentWeb.type.wrongTopic");
-        this.$emit("onNavNo", this.MyNo);
-        this.$emit("onNavName", this.MyName);
-        this.subjectList = [
-            { name: "上学期"},
-            { name: "下学期"},
-        ]
-        this.allPoint = [
-            { name: "字音"},
-            { name: "字形"},
-            { name: "文言文释义"},
-            { name: "拟人"}
-        ]
-        this.sasInfo = await this.getSas()
-        this.getErrorNum()
-        // 先获取题目的最近联练习时间
-        this.getExceTime()
+        if(this.courseNow.subjectList && !this.basicSubId) {
+            this.$router.go(-1)
+        } else {
+            this.MyName = this.$t("studentWeb.type.wrongTopic");
+            this.$emit("onNavNo", this.MyNo);
+            this.$emit("onNavName", this.MyName);
+            this.subjectList = [
+                { name: "上学期"},
+                { name: "下学期"},
+            ]
+            this.allPoint = [
+                { name: "字音"},
+                { name: "字形"},
+                { name: "文言文释义"},
+                { name: "拟人"}
+            ]
+            this.sasInfo = await this.getSas()
+            this.getErrorNum()
+            // 先获取题目的最近联练习时间
+            this.getExceTime()
+        }
     },
     },
     mounted () {
     mounted () {
         document.addEventListener('scroll', this.handlerScroll, true)
         document.addEventListener('scroll', this.handlerScroll, true)
@@ -260,7 +264,7 @@ export default {
         getErrorNum() {
         getErrorNum() {
             let param = {
             let param = {
                 stuId: this.userInfo.sub,
                 stuId: this.userInfo.sub,
-                subjectId: this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id,
+                subjectId: this.courseNow.subjectList ? this.basicSubId : (this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id),
                 teacherId: this.courseNow.teacherId
                 teacherId: this.courseNow.teacherId
             }
             }
             //if(this.userInfo.scope != 'tmduser') param.code = this.userInfo.azp
             //if(this.userInfo.scope != 'tmduser') param.code = this.userInfo.azp
@@ -276,7 +280,7 @@ export default {
         getExceTime() {
         getExceTime() {
             let param = {
             let param = {
                 sid: this.userInfo.scope === 'tmduser' ? this.userInfo.sub : `${this.userInfo.azp}-${this.userInfo.sub}`,
                 sid: this.userInfo.scope === 'tmduser' ? this.userInfo.sub : `${this.userInfo.azp}-${this.userInfo.sub}`,
-                unit_id: this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id, //单元id
+                unit_id: this.courseNow.subjectList ? this.basicSubId : (this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id), //单元id
                 mode: '2', //1:需要复习  2:题目练习时间   3:首页的最近练习时间
                 mode: '2', //1:需要复习  2:题目练习时间   3:首页的最近练习时间
                 // t: Date.now()
                 // t: Date.now()
             }
             }
@@ -297,7 +301,7 @@ export default {
             var queryData = { 
             var queryData = { 
                 stuId: this.userInfo.sub,
                 stuId: this.userInfo.sub,
                 // code: this.courseNow.school,
                 // code: this.courseNow.school,
-                subjectId: this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id,
+                subjectId: this.courseNow.subjectList ? this.basicSubId : (this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id),
                 count: 10,
                 count: 10,
                 // token: '',
                 // token: '',
             }
             }
@@ -557,6 +561,9 @@ export default {
         language() {
         language() {
             return localStorage.local
             return localStorage.local
         },
         },
+        basicSubId() {
+            return this.$route.params.subjectId
+        },
     },
     },
     watch: {
     watch: {
         checkAll: {
         checkAll: {

+ 33 - 4
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/WrongQues.vue

@@ -1,6 +1,12 @@
 <template>
 <template>
     <div class="count-box">
     <div class="count-box">
         <Loading v-show="isLoading" bgColor="rgba(0, 0, 0, 0.3)"></Loading>
         <Loading v-show="isLoading" bgColor="rgba(0, 0, 0, 0.3)"></Loading>
+        <div v-if="courseNow.subjectList" style="margin: 10px 20px; font-size: 16px;">
+            科目: 
+            <span class="tag-style tag-teacher" :class="{'tag-pointer': nowSub === index}" @click="nowSub = index" v-for="(item, index) in courseNow.subjectList" :key="index">
+                {{ item.name }}
+            </span>
+        </div>
         <div class="count-header">
         <div class="count-header">
             <div>
             <div>
                 <p class="count-text">
                 <p class="count-text">
@@ -41,8 +47,8 @@
                 </p>
                 </p>
             </div>
             </div>
             <div class="count-btn">
             <div class="count-btn">
-                <Button type="success" @click="findQues">{{ $t("studentWeb.wrongQues.button2") }}</Button>
-                <Button type="success" @click="openModal">{{ $t("studentWeb.wrongQues.button3") }}</Button>
+                <Button type="success" @click="findQues()">{{ $t("studentWeb.wrongQues.button2") }}</Button>
+                <Button type="success" @click="openModal()">{{ $t("studentWeb.wrongQues.button3") }}</Button>
             </div>
             </div>
         </div>
         </div>
         <!-- 先不展示 -->
         <!-- 先不展示 -->
@@ -120,6 +126,7 @@ export default {
             topicTotal: 0, //总题数
             topicTotal: 0, //总题数
             dayAdd: 0, //今日新增
             dayAdd: 0, //今日新增
             wellDone: 0, //已熟练
             wellDone: 0, //已熟练
+            nowSub: 0,
         }
         }
     },
     },
     computed: {
     computed: {
@@ -141,6 +148,9 @@ export default {
         findQues() {
         findQues() {
             this.$router.push({
             this.$router.push({
                 name: "AllQues",
                 name: "AllQues",
+                params: {
+                    subjectId: this.courseNow.subjectList ? this.courseNow.subjectList[this.nowSub].id : ''
+                },
             })
             })
         },
         },
         openModal() {
         openModal() {
@@ -160,7 +170,7 @@ export default {
             // 改用 get-error-item-today-cnt
             // 改用 get-error-item-today-cnt
             let param = {
             let param = {
                 stuId: this.userInfo.sub,
                 stuId: this.userInfo.sub,
-                subjectId: this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id,
+                subjectId: this.courseNow.subjectList ? this.courseNow.subjectList[this.nowSub].id : (this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id),
                 code: this.userInfo.scope != 'tmduser' ? this.userInfo.azp : null
                 code: this.userInfo.scope != 'tmduser' ? this.userInfo.azp : null
             }
             }
             this.$api.studentWeb.getErrorItemToday(param).then(res => {
             this.$api.studentWeb.getErrorItemToday(param).then(res => {
@@ -174,7 +184,7 @@ export default {
             this.isLoading = true
             this.isLoading = true
             let param = {
             let param = {
                 sid: this.userInfo.scope === 'tmduser' ? this.userInfo.sub : `${this.userInfo.azp}-${this.userInfo.sub}`,
                 sid: this.userInfo.scope === 'tmduser' ? this.userInfo.sub : `${this.userInfo.azp}-${this.userInfo.sub}`,
-                unit_id: this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id, //单元id
+                unit_id: this.courseNow.subjectList ? this.courseNow.subjectList[this.nowSub].id : (this.courseNow.subject.id ? this.courseNow.subject.id : this.courseNow.id), //单元id
                 mode: type ? '3' : '1',
                 mode: type ? '3' : '1',
                 // number: this.filtType.num,
                 // number: this.filtType.num,
                 // mode: 0, //0:错题复习,1:学习+复习
                 // mode: 0, //0:错题复习,1:学习+复习
@@ -297,6 +307,25 @@ export default {
             return Y + M + D;
             return Y + M + D;
         },
         },
     },
     },
+    watch: {
+        nowSub: {
+            handler(n, o) {
+                this.lastTime = { //最近练习
+                    time: '-',
+                    day: '-'
+                }
+                this.nextTime = { //下次练习
+                    time: '-',
+                    day:'-',
+                }
+                this.topicTotal = 0
+                this.wellDone = 0
+                this.dayAdd = 0
+                this.startReview('time')
+                this.getErrorNum()
+            },
+        },
+    }
 }
 }
 </script>
 </script>
 
 

+ 9 - 0
TEAMModelOS/ClientApp/src/router/routes.js

@@ -1150,6 +1150,15 @@ export const routes = [{
                 middleware: ['login', 'ability:admin,dashboard-read'],
                 middleware: ['login', 'ability:admin,dashboard-read'],
             }
             }
         },
         },
+        {
+            name: 'schoolDash',
+            path: '/schoolDash',
+            component: () => import('@/view/dashboard/school/SchoolDashboard.vue'),
+            meta: {
+                activeName: 'dashCenter',
+                middleware: ['login', 'ability:admin,dashboard-read'],
+            }
+        },
         {
         {
         name: 'artDashboard',
         name: 'artDashboard',
         path: '/artDashboard',
         path: '/artDashboard',

+ 15 - 0
TEAMModelOS/ClientApp/src/view/dashboard/school/SchoolDashboard.vue

@@ -0,0 +1,15 @@
+<template>
+    <div class="school-dash-container">
+        <!-- 这里放学校看板页面 -->
+    </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>

+ 5 - 4
TEAMModelOS/ClientApp/src/view/dashboardCenter/DashboardCenter.vue

@@ -12,7 +12,7 @@
 				</div>
 				</div>
 				<div class="bottom">
 				<div class="bottom">
 					<p class="menu-name">学校看板</p>
 					<p class="menu-name">学校看板</p>
-					<p class="menu-desc">掌握学校智慧课堂及醍摩豆智慧产品使用情况,掌握学校智慧课堂及醍摩豆智慧产品使用情况</p>
+					<p class="menu-desc">展现学校信息、教学资源和课程动态,学校整体风貌,方便学校领导掌握学校情况。</p>
 				</div>
 				</div>
 			</div>
 			</div>
 			<div class="menu-item" @click="goDash('teacher')">
 			<div class="menu-item" @click="goDash('teacher')">
@@ -23,7 +23,7 @@
 				</div>
 				</div>
 				<div class="bottom">
 				<div class="bottom">
 					<p class="menu-name">教学看板</p>
 					<p class="menu-name">教学看板</p>
-					<p class="menu-desc">掌握学校智慧教学大数据情况,掌握学校智慧教学大数据情况,掌握学校智慧教学大数据情况</p>
+					<p class="menu-desc">展示智慧课堂和教学法应用数据情况,关注教学质量与成果,助力学生全面发展。</p>
 				</div>
 				</div>
 			</div>
 			</div>
 			<div class="menu-item" @click="goDash('student')">
 			<div class="menu-item" @click="goDash('student')">
@@ -34,7 +34,7 @@
 				</div>
 				</div>
 				<div class="bottom">
 				<div class="bottom">
 					<p class="menu-name">五育看板</p>
 					<p class="menu-name">五育看板</p>
-					<p class="menu-desc">综合性的评价服务,跟踪学生的五育(德、智、体、美、劳)发展,了解学生全面发展情况。</p>
+					<p class="menu-desc">展示学生五育(德、智、体、美、劳)全面发展,传播优良校风,培育健全人格。</p>
 				</div>
 				</div>
 			</div>
 			</div>
 		</div>
 		</div>
@@ -47,7 +47,8 @@
 			goDash(val) {
 			goDash(val) {
 				switch (val) {
 				switch (val) {
 					case "school":
 					case "school":
-						this.$Message.warning('即将开放~')
+						// this.$Message.warning('即将开放~')
+						this.$router.push("schoolDash");
 						break;
 						break;
 					case "teacher":
 					case "teacher":
 						this.$router.push("researchDashboard");
 						this.$router.push("researchDashboard");

+ 1 - 1
TEAMModelOS/ClientApp/src/view/iot/schooliot.vue

@@ -28,7 +28,7 @@
              <!--time-->
              <!--time-->
              <div class="timebox">
              <div class="timebox">
                 <span class="timebox-text">{{ times.year }} <span style="display: inline-block; margin: 0 5px;color: #0fa2fe;">{{ times.day }}</span> </span>
                 <span class="timebox-text">{{ times.year }} <span style="display: inline-block; margin: 0 5px;color: #0fa2fe;">{{ times.day }}</span> </span>
-                <span class="icon iconfont icon-tuichuquanping" style="font-size: 22px;" :title="$t('researchCenter.dashboard.quit')"></span>
+                <span class="icon iconfont icon-tuichuquanping" style="font-size: 22px;" :title="$t('researchCenter.dashboard.quit')" @click="goBack"></span>
              </div>
              </div>
              <!--time end-->
              <!--time end-->
         <!--header end-->
         <!--header end-->

+ 20 - 7
TEAMModelOS/ClientApp/src/view/student-web/AppNew.vue

@@ -75,7 +75,8 @@
                     </Tooltip>
                     </Tooltip>
                     <!-- 作业 -->
                     <!-- 作业 -->
                     <Tooltip :content="$t('studentWeb.type.homework')">
                     <Tooltip :content="$t('studentWeb.type.homework')">
-                        <MenuItem name="6" to="/studentWeb/homeworkView" v-show="selectClass && !isScale">
+                        <MenuItem name="6" to="/studentWeb/homeworkView"
+                                v-show="getNowCourse && getNowCourse.id && !onlySystem && getNowCourse.subject && selectClass && !isScale">
                             <svg-icon icon-class="doc" class="tabIcon3" />
                             <svg-icon icon-class="doc" class="tabIcon3" />
                             <span class="no-show" v-show="MyNo != 6">{{ $t('studentWeb.type.homework') }}</span>
                             <span class="no-show" v-show="MyNo != 6">{{ $t('studentWeb.type.homework') }}</span>
                         </MenuItem>
                         </MenuItem>
@@ -96,7 +97,7 @@
                     <Tooltip :content="$t('studentWeb.type.wrongTopic')">
                     <Tooltip :content="$t('studentWeb.type.wrongTopic')">
                         <!-- <MenuItem v-if="userInfo.scope === 'student'" name="8" to="/studentWeb/practice/wrongQues" :title="$t('studentWeb.type.wrongTopic')" -->
                         <!-- <MenuItem v-if="userInfo.scope === 'student'" name="8" to="/studentWeb/practice/wrongQues" :title="$t('studentWeb.type.wrongTopic')" -->
                         <MenuItem name="8" to="/studentWeb/practice/wrongQues"
                         <MenuItem name="8" to="/studentWeb/practice/wrongQues"
-                                v-show="getNowCourse && getNowCourse.id && selectClass && !onlySystem && getNowCourse.subject && !isScale">
+                                v-show="selectClass && !isScale">
                             <Icon custom="iconfont icon-cuotiji" size="17" class="tabIcon1" />
                             <Icon custom="iconfont icon-cuotiji" size="17" class="tabIcon1" />
                             <span class="no-show" v-show="MyNo != 8">{{ $t('studentWeb.type.wrongTopic') }}</span>
                             <span class="no-show" v-show="MyNo != 8">{{ $t('studentWeb.type.wrongTopic') }}</span>
                         </MenuItem>
                         </MenuItem>
@@ -116,7 +117,8 @@
                     </MenuItem> -->
                     </MenuItem> -->
                     <!-- 成绩 -->
                     <!-- 成绩 -->
                     <Tooltip :content="$t('studentWeb.type.achievement')">
                     <Tooltip :content="$t('studentWeb.type.achievement')">
-                        <MenuItem name="7" to="/studentWeb/achievement" v-show="selectClass && !isScale">
+                        <MenuItem name="7" to="/studentWeb/achievement"
+                                v-show="getNowCourse && getNowCourse.id && !onlySystem && getNowCourse.subject && selectClass && !isScale">
                             <Icon custom="iconfont icon-chengjitongji" size="18" style="font-weight: bold" />
                             <Icon custom="iconfont icon-chengjitongji" size="18" style="font-weight: bold" />
                             <span class="no-show" v-show="MyNo != 7">{{ $t('studentWeb.type.achievement') }}</span>
                             <span class="no-show" v-show="MyNo != 7">{{ $t('studentWeb.type.achievement') }}</span>
                         </MenuItem>
                         </MenuItem>
@@ -403,7 +405,10 @@ export default {
         showSemester() {
         showSemester() {
             let routeArr = ["/studentWeb/homeView"]
             let routeArr = ["/studentWeb/homeView"]
             return routeArr.includes(this.$route.path)
             return routeArr.includes(this.$route.path)
-        }
+        },
+        subjectList() {
+            return this.$store.state.user.curPeriod.subjects || []
+        },
     },
     },
     watch: {
     watch: {
     },
     },
@@ -651,8 +656,14 @@ export default {
                         let adminClass = list.find(item => {
                         let adminClass = list.find(item => {
                             return item.groupId === this.user.studentProfile.classinfo.id
                             return item.groupId === this.user.studentProfile.classinfo.id
                         })
                         })
+                        let noCourseSubj = [...this.subjectList]
+                        res.schoolCourses.forEach(item => {
+                            noCourseSubj = noCourseSubj.filter(noCouSub => noCouSub.id != item.courseBase.subject.id)
+                        })
+                        console.log(noCourseSubj);
                         // 没有学校课程,需要添加'基本课程'
                         // 没有学校课程,需要添加'基本课程'
-                        if(!adminClass) {
+                        // 2023.11.10 有未分配的科目也需创建基本课程,里面包含所有未分配的科目
+                        if(!adminClass || noCourseSubj.length) {
                             if(!list.length) {
                             if(!list.length) {
                                 // 没加入任何课程,仅靠基本课程查看评测等
                                 // 没加入任何课程,仅靠基本课程查看评测等
                                 this.onlySystem = true
                                 this.onlySystem = true
@@ -676,8 +687,10 @@ export default {
                                 roomName: '',
                                 roomName: '',
                                 times: [], //排课
                                 times: [], //排课
                                 isSystem: list.length ? false : true,
                                 isSystem: list.length ? false : true,
+                                // subjectList: noCourseSubj,
                             }
                             }
-                            list.push(admClass)
+                            if(noCourseSubj.length) admClass.subjectList = noCourseSubj
+                            list.unshift(admClass)
                         }
                         }
                     }
                     }
                     console.log(list);
                     console.log(list);
@@ -782,7 +795,7 @@ export default {
         classChange(value) {
         classChange(value) {
             if(value) {
             if(value) {
                 // 没有课程 && 行政班未加入课程
                 // 没有课程 && 行政班未加入课程
-                if((this.onlySystem || this.courseList[this.selectClass - 1].isSystem) && this.noJumpRouter.includes(this.$route.path)) {
+                if((this.onlySystem || this.courseList[this.selectClass - 1].subjectList) && this.noJumpRouter.includes(this.$route.path)) {
                     this.$router.push({
                     this.$router.push({
                         path: '/studentWeb/examView'
                         path: '/studentWeb/examView'
                     })
                     })

+ 333 - 145
TEAMModelOS/Controllers/Common/ActivityController.cs

@@ -429,7 +429,7 @@ namespace TEAMModelOS.Controllers
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(website, new PartitionKey(website.code));
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(website, new PartitionKey(website.code));
                                     }
                                     }
                                 }
                                 }
-                                else { 
+                                else {
                                     website =JsonDocument.Parse(activityWebsiteResponse.Content).RootElement.ToObject<ActivityWebsite>();
                                     website =JsonDocument.Parse(activityWebsiteResponse.Content).RootElement.ToObject<ActivityWebsite>();
                                 }
                                 }
                             }
                             }
@@ -456,7 +456,7 @@ namespace TEAMModelOS.Controllers
                                             {
                                             {
                                                 if (!request.TryGetProperty("Contest", out JsonElement _contest))
                                                 if (!request.TryGetProperty("Contest", out JsonElement _contest))
                                                 {
                                                 {
-                                                    return Ok(new { code =3, msg = "赛课信息参数错误" });
+                                                    return Ok(new { code = 3, msg = "赛课信息参数错误" });
                                                 }
                                                 }
                                                 contest = _contest.ToObject<Contest>();
                                                 contest = _contest.ToObject<Contest>();
                                                 if (contest!=null) {
                                                 if (contest!=null) {
@@ -502,7 +502,7 @@ namespace TEAMModelOS.Controllers
                                 }
                                 }
                                 //保存活动基础信息
                                 //保存活动基础信息
                                 await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey(activity.code));
                                 await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey(activity.code));
-                                return Ok(new { activity, contest ,code=200});
+                                return Ok(new { activity, contest, code = 200 });
                             }
                             }
                             else
                             else
                             {
                             {
@@ -522,7 +522,7 @@ namespace TEAMModelOS.Controllers
                                 if (_scope.GetString().Equals("school")  && _owner.GetString().Equals(school))
                                 if (_scope.GetString().Equals("school")  && _owner.GetString().Equals(school))
                                 {
                                 {
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).DeleteItemStreamAsync(activity.id, new PartitionKey("Activity"));
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).DeleteItemStreamAsync(activity.id, new PartitionKey("Activity"));
-                                    return Ok(new { code = 201, activity }) ; //删除成功
+                                    return Ok(new { code = 201, activity }); //删除成功
                                 }
                                 }
                                 else {
                                 else {
                                     if ((_scope.GetString().Equals("area")  ||  _scope.GetString().Equals("public"))  && !_owner.GetString().Equals(school))
                                     if ((_scope.GetString().Equals("area")  ||  _scope.GetString().Equals("public"))  && !_owner.GetString().Equals(school))
@@ -550,7 +550,7 @@ namespace TEAMModelOS.Controllers
                             string sql = $"select value c from c where c.owner='{_areaId}' {yearSql}  ";
                             string sql = $"select value c from c where c.owner='{_areaId}' {yearSql}  ";
                             var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sql, "Activity");
                             var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sql, "Activity");
                             result.list.ForEach(z => {
                             result.list.ForEach(z => {
-                                var (blob_uri, blob_sas) = _azureStorage.GetBlobContainerSAS(z.owner,  BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List);
+                                var (blob_uri, blob_sas) = _azureStorage.GetBlobContainerSAS(z.owner, BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List);
                                 z.sas=blob_sas;
                                 z.sas=blob_sas;
                             });
                             });
                             return Ok(new { activities = result.list.OrderByDescending(z => z.stime) });
                             return Ok(new { activities = result.list.OrderByDescending(z => z.stime) });
@@ -669,7 +669,7 @@ namespace TEAMModelOS.Controllers
                                 }
                                 }
                             }
                             }
                             Teacher teacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>(tmdid, new PartitionKey("Base"));
                             Teacher teacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>(tmdid, new PartitionKey("Base"));
-                            string schoolOwnerIn =string.Empty;
+                            string schoolOwnerIn = string.Empty;
                             string schoolIdIn = string.Empty;
                             string schoolIdIn = string.Empty;
                             if (teacher.schools.IsNotEmpty()) {
                             if (teacher.schools.IsNotEmpty()) {
                                 schoolIdIn = $"and i.id in ({string.Join(",", teacher.schools.Select(z => $"'{z.schoolId}'"))})";
                                 schoolIdIn = $"and i.id in ({string.Join(",", teacher.schools.Select(z => $"'{z.schoolId}'"))})";
@@ -688,7 +688,7 @@ namespace TEAMModelOS.Controllers
                                     var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlSchool, "Activity");
                                     var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlSchool, "Activity");
                                     activities.AddRange(resultSchool.list);
                                     activities.AddRange(resultSchool.list);
                                 }
                                 }
-                              
+
                             }
                             }
                             string areaOwnerIn = string.Empty;
                             string areaOwnerIn = string.Empty;
                             var hasAreaSchools = teacher.schools.FindAll(z => !string.IsNullOrWhiteSpace(z.areaId));
                             var hasAreaSchools = teacher.schools.FindAll(z => !string.IsNullOrWhiteSpace(z.areaId));
@@ -699,14 +699,14 @@ namespace TEAMModelOS.Controllers
                             }
                             }
                             //获取所有区级的
                             //获取所有区级的
                             if (!string.IsNullOrWhiteSpace(areaOwnerIn) && !string.IsNullOrEmpty(schoolIdIn)) {
                             if (!string.IsNullOrWhiteSpace(areaOwnerIn) && !string.IsNullOrEmpty(schoolIdIn)) {
-                                
+
                                 string sqlOpen = $"select value c from c join i  in c.confirmedSchools where c.scope='area'  and c.joinMode='enroll' and (c.publish=1 or c.publish=2 ) and i.status=1 {yearSql}  {areaOwnerIn}   {schoolIdIn} ";
                                 string sqlOpen = $"select value c from c join i  in c.confirmedSchools where c.scope='area'  and c.joinMode='enroll' and (c.publish=1 or c.publish=2 ) and i.status=1 {yearSql}  {areaOwnerIn}   {schoolIdIn} ";
                                 var resultOpen = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlOpen, "Activity");
                                 var resultOpen = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlOpen, "Activity");
                                 activities.AddRange(resultOpen.list);
                                 activities.AddRange(resultOpen.list);
                             }
                             }
 
 
                             //获取所有学校的
                             //获取所有学校的
-                            if(!string.IsNullOrWhiteSpace(schoolOwnerIn))
+                            if (!string.IsNullOrWhiteSpace(schoolOwnerIn))
                             {
                             {
                                 string sqlSchool = $"select value c from c where c.scope='school'  and c.joinMode='enroll'  and (c.publish=1 or c.publish=2 ) {yearSql}  {schoolOwnerIn}  ";
                                 string sqlSchool = $"select value c from c where c.scope='school'  and c.joinMode='enroll'  and (c.publish=1 or c.publish=2 ) {yearSql}  {schoolOwnerIn}  ";
                                 var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlSchool, "Activity");
                                 var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<Activity>(sqlSchool, "Activity");
@@ -714,7 +714,7 @@ namespace TEAMModelOS.Controllers
                             }
                             }
 
 
                             activities.ForEach(z => {
                             activities.ForEach(z => {
-                                var (blob_uri, blob_sas) = _azureStorage.GetBlobContainerSAS(z.owner,  BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List);
+                                var (blob_uri, blob_sas) = _azureStorage.GetBlobContainerSAS(z.owner, BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List);
                                 z.sas=blob_sas;
                                 z.sas=blob_sas;
                             });
                             });
                             return Ok(new { activities = activities.OrderByDescending(z => z.stime) });
                             return Ok(new { activities = activities.OrderByDescending(z => z.stime) });
@@ -723,11 +723,11 @@ namespace TEAMModelOS.Controllers
                     case bool when $"{grant_type}".Equals("read-contest", StringComparison.OrdinalIgnoreCase):
                     case bool when $"{grant_type}".Equals("read-contest", StringComparison.OrdinalIgnoreCase):
                         {
                         {
                             Contest contest = null;
                             Contest contest = null;
-                            ReviewRuleTree reviewRule = null; 
+                            ReviewRuleTree reviewRule = null;
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Contest"));
                             Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Contest"));
                             if (response.Status==200) {
                             if (response.Status==200) {
-                                contest= JsonDocument.Parse(response.Content).RootElement.ToObject<Contest>() ;
+                                contest= JsonDocument.Parse(response.Content).RootElement.ToObject<Contest>();
                                 if (contest.modules.Contains("review")) {
                                 if (contest.modules.Contains("review")) {
                                     Azure.Response reviewRuleResponse = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("ReviewRule-disposable"));
                                     Azure.Response reviewRuleResponse = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("ReviewRule-disposable"));
                                     if (reviewRuleResponse.Status==200) {
                                     if (reviewRuleResponse.Status==200) {
@@ -748,16 +748,16 @@ namespace TEAMModelOS.Controllers
                             return Ok(new { code = 200, contest, reviewRule });
                             return Ok(new { code = 200, contest, reviewRule });
                         }
                         }
                     //获取评审的模板列表
                     //获取评审的模板列表
-                    case bool when $"{grant_type}".Equals("rule-list", StringComparison.OrdinalIgnoreCase): 
+                    case bool when $"{grant_type}".Equals("rule-list", StringComparison.OrdinalIgnoreCase):
                         {
                         {
                             if (!request.TryGetProperty("owner", out JsonElement _owner)) return BadRequest();
                             if (!request.TryGetProperty("owner", out JsonElement _owner)) return BadRequest();
-                            var  result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).GetList<ReviewRule>($"select value c from c where c.owner='{_owner}'", "ReviewRule-template");
+                            var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).GetList<ReviewRule>($"select value c from c where c.owner='{_owner}'", "ReviewRule-template");
                             List<ReviewRuleTree> reviewRules = new List<ReviewRuleTree>();
                             List<ReviewRuleTree> reviewRules = new List<ReviewRuleTree>();
                             foreach (var item in result.list)
                             foreach (var item in result.list)
                             {
                             {
                                 var tree = ActivityService.ListToTree(item.configs);
                                 var tree = ActivityService.ListToTree(item.configs);
-                                ReviewRuleTree reviewRule=new ReviewRuleTree
-                                {   id=item.id,
+                                ReviewRuleTree reviewRule = new ReviewRuleTree
+                                { id=item.id,
                                     desc=item.desc,
                                     desc=item.desc,
                                     name= item.name,
                                     name= item.name,
                                     owner= item.owner,
                                     owner= item.owner,
@@ -779,10 +779,10 @@ namespace TEAMModelOS.Controllers
                             ReviewRuleTree ruleTree = _reviewConfig.ToObject<ReviewRuleTree>();
                             ReviewRuleTree ruleTree = _reviewConfig.ToObject<ReviewRuleTree>();
                             if (!string.IsNullOrWhiteSpace(ruleTree.id))
                             if (!string.IsNullOrWhiteSpace(ruleTree.id))
                             {
                             {
-                                Activity activity=  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemAsync<Activity>(ruleTree.id, new PartitionKey("Activity"));
+                                Activity activity = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemAsync<Activity>(ruleTree.id, new PartitionKey("Activity"));
                                 var reviewRuleDB = await ActivityService.UpsertReviewRule(ruleTree, activity, _azureCosmos);
                                 var reviewRuleDB = await ActivityService.UpsertReviewRule(ruleTree, activity, _azureCosmos);
                                 var tree = ActivityService.ListToTree(reviewRuleDB.configs);
                                 var tree = ActivityService.ListToTree(reviewRuleDB.configs);
-                                var  reviewRule=new ReviewRuleTree
+                                var reviewRule = new ReviewRuleTree
                                 {
                                 {
                                     id=reviewRuleDB.id,
                                     id=reviewRuleDB.id,
                                     name= reviewRuleDB.name,
                                     name= reviewRuleDB.name,
@@ -805,7 +805,7 @@ namespace TEAMModelOS.Controllers
                                 return BadRequest();
                                 return BadRequest();
                             }
                             }
                             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).DeleteItemStreamAsync(_ruleId.GetString(), new PartitionKey("ReviewRule-template"));
                             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).DeleteItemStreamAsync(_ruleId.GetString(), new PartitionKey("ReviewRule-template"));
-                            return Ok(new { code=200});
+                            return Ok(new { code = 200 });
                         }
                         }
                     //学校确认参加本次活动
                     //学校确认参加本次活动
                     case bool when $"{grant_type}".Equals("school-confirm", StringComparison.OrdinalIgnoreCase):
                     case bool when $"{grant_type}".Equals("school-confirm", StringComparison.OrdinalIgnoreCase):
@@ -816,10 +816,10 @@ namespace TEAMModelOS.Controllers
                                 Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Activity"));
                                 Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Activity"));
                                 if (response.Status==200)
                                 if (response.Status==200)
                                 {
                                 {
-                                    Activity activity= JsonDocument.Parse(response.Content).RootElement.ToObject<Activity>();
+                                    Activity activity = JsonDocument.Parse(response.Content).RootElement.ToObject<Activity>();
                                     if (_confirm.GetInt32()==1 ||_confirm.GetInt32()==0)
                                     if (_confirm.GetInt32()==1 ||_confirm.GetInt32()==0)
                                     {
                                     {
-                                        var invitedSchool=  activity.invitedSchools.Find(z => z.id.Equals(school));
+                                        var invitedSchool = activity.invitedSchools.Find(z => z.id.Equals(school));
                                         if (invitedSchool!=null) {
                                         if (invitedSchool!=null) {
                                             var confirmedSchool = activity.confirmedSchools.Find(z => z.id.Equals(school));
                                             var confirmedSchool = activity.confirmedSchools.Find(z => z.id.Equals(school));
                                             if (confirmedSchool!=null)
                                             if (confirmedSchool!=null)
@@ -828,7 +828,7 @@ namespace TEAMModelOS.Controllers
                                             }
                                             }
                                             else {
                                             else {
                                                 School schoolbase = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>(school, new PartitionKey("Base"));
                                                 School schoolbase = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>(school, new PartitionKey("Base"));
-                                                activity.confirmedSchools= new List<ActivityConfirmedSchool>() { new ActivityConfirmedSchool { id=school, status=_confirm.GetInt32(),name=schoolbase.name,picture= schoolbase.picture} };
+                                                activity.confirmedSchools= new List<ActivityConfirmedSchool>() { new ActivityConfirmedSchool { id=school, status=_confirm.GetInt32(), name=schoolbase.name, picture= schoolbase.picture } };
                                             }
                                             }
                                             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey("Activity"));
                                             await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey("Activity"));
                                             return Ok(new { code = 200, activity });
                                             return Ok(new { code = 200, activity });
@@ -847,7 +847,7 @@ namespace TEAMModelOS.Controllers
                             break;
                             break;
                         }
                         }
                     //发布或取消发布活动
                     //发布或取消发布活动
-                    case bool when $"{grant_type}".Equals("update-publish", StringComparison.OrdinalIgnoreCase): 
+                    case bool when $"{grant_type}".Equals("update-publish", StringComparison.OrdinalIgnoreCase):
                         {
                         {
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("publish", out JsonElement _publish)) return BadRequest();
                             if (!request.TryGetProperty("publish", out JsonElement _publish)) return BadRequest();
@@ -859,7 +859,7 @@ namespace TEAMModelOS.Controllers
                                 {
                                 {
                                     activity.publish=_publish.GetInt32();
                                     activity.publish=_publish.GetInt32();
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey("Activity"));
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).UpsertItemAsync(activity, new PartitionKey("Activity"));
-                                    return Ok(new { code=200,activity});
+                                    return Ok(new { code = 200, activity });
                                 }
                                 }
                                 else {
                                 else {
                                     return Ok(new { code = 2, msg = "活动发布状态错误!" });
                                     return Ok(new { code = 2, msg = "活动发布状态错误!" });
@@ -874,36 +874,36 @@ namespace TEAMModelOS.Controllers
                         {
                         {
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             request.TryGetProperty("invite", out JsonElement _invite);
                             request.TryGetProperty("invite", out JsonElement _invite);
-                            request.TryGetProperty("remove", out JsonElement _remove) ;
+                            request.TryGetProperty("remove", out JsonElement _remove);
                             Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Activity"));
                             Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("Activity"));
                             if (response.Status==200)
                             if (response.Status==200)
                             {
                             {
                                 Activity activity = JsonDocument.Parse(response.Content).RootElement.ToObject<Activity>();
                                 Activity activity = JsonDocument.Parse(response.Content).RootElement.ToObject<Activity>();
                                 if (activity.joinMode.Equals("invite"))
                                 if (activity.joinMode.Equals("invite"))
                                 {
                                 {
-                                   
+
                                     var confirmedSchool = activity.confirmedSchools.Find(z => z.id.Equals(school)  && z.status==1);
                                     var confirmedSchool = activity.confirmedSchools.Find(z => z.id.Equals(school)  && z.status==1);
                                     if (confirmedSchool!= null  ||  activity.scope.Equals("school", StringComparison.OrdinalIgnoreCase))
                                     if (confirmedSchool!= null  ||  activity.scope.Equals("school", StringComparison.OrdinalIgnoreCase))
                                     {
                                     {
                                         List<InviteTeachers> inviteTeachersInvalid = new List<InviteTeachers>();
                                         List<InviteTeachers> inviteTeachersInvalid = new List<InviteTeachers>();
                                         List<InviteTeachers> removeTeachersInvalid = new List<InviteTeachers>();
                                         List<InviteTeachers> removeTeachersInvalid = new List<InviteTeachers>();
                                         ActivityTeacher activityTeacher = null;
                                         ActivityTeacher activityTeacher = null;
-                                        Azure.Response activityTeacherResponse =  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemStreamAsync(activity.id, new PartitionKey("ActivityTeacher"));
+                                        Azure.Response activityTeacherResponse = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemStreamAsync(activity.id, new PartitionKey("ActivityTeacher"));
                                         if (activityTeacherResponse.Status==200)
                                         if (activityTeacherResponse.Status==200)
                                         {
                                         {
                                             activityTeacher = JsonDocument.Parse(activityTeacherResponse.Content).RootElement.ToObject<ActivityTeacher>();
                                             activityTeacher = JsonDocument.Parse(activityTeacherResponse.Content).RootElement.ToObject<ActivityTeacher>();
                                         }
                                         }
                                         if (activityTeacher==null) {
                                         if (activityTeacher==null) {
-                                            activityTeacher= new ActivityTeacher() { id= activity.id, code="ActivityTeacher",pk="ActivityTeacher" };
+                                            activityTeacher= new ActivityTeacher() { id= activity.id, code="ActivityTeacher", pk="ActivityTeacher" };
                                         }
                                         }
-                                        if (_invite.ValueKind.Equals(JsonValueKind.Array)) { 
+                                        if (_invite.ValueKind.Equals(JsonValueKind.Array)) {
                                             List<InviteTeachers> inviteTeachers = _invite.ToObject<List<InviteTeachers>>();
                                             List<InviteTeachers> inviteTeachers = _invite.ToObject<List<InviteTeachers>>();
                                             foreach (var invite in inviteTeachers) {
                                             foreach (var invite in inviteTeachers) {
                                                 if (string.IsNullOrWhiteSpace(invite.school)  ||  !invite.school.Equals(school)) {
                                                 if (string.IsNullOrWhiteSpace(invite.school)  ||  !invite.school.Equals(school)) {
                                                     inviteTeachersInvalid.Add(invite);
                                                     inviteTeachersInvalid.Add(invite);
                                                     continue;
                                                     continue;
                                                 }
                                                 }
-                                                var inviteTeacher=  activityTeacher.inviteTeachers.Find(z => z.id.Equals(invite.id));
+                                                var inviteTeacher = activityTeacher.inviteTeachers.Find(z => z.id.Equals(invite.id));
                                                 if (inviteTeacher==null)
                                                 if (inviteTeacher==null)
                                                 {
                                                 {
                                                     activityTeacher.inviteTeachers.Add(invite);
                                                     activityTeacher.inviteTeachers.Add(invite);
@@ -927,7 +927,7 @@ namespace TEAMModelOS.Controllers
                                         }
                                         }
                                         var teachers = activityTeacher.inviteTeachers.FindAll(z => z.school.Equals(school));
                                         var teachers = activityTeacher.inviteTeachers.FindAll(z => z.school.Equals(school));
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).UpsertItemAsync(activityTeacher, new PartitionKey("ActivityTeacher"));
                                         await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).UpsertItemAsync(activityTeacher, new PartitionKey("ActivityTeacher"));
-                                        return Ok(new { inviteTeachers=teachers, inviteTeachersInvalid, removeTeachersInvalid });
+                                        return Ok(new { inviteTeachers = teachers, inviteTeachersInvalid, removeTeachersInvalid });
                                     }
                                     }
                                     else
                                     else
                                     {
                                     {
@@ -944,7 +944,7 @@ namespace TEAMModelOS.Controllers
                             }
                             }
                         }
                         }
                     //获取邀请的教师列表
                     //获取邀请的教师列表
-                    case bool when $"{grant_type}".Equals("invited-teachers", StringComparison.OrdinalIgnoreCase): 
+                    case bool when $"{grant_type}".Equals("invited-teachers", StringComparison.OrdinalIgnoreCase):
                         {
                         {
                             string owner = string.Empty;
                             string owner = string.Empty;
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
@@ -959,17 +959,17 @@ namespace TEAMModelOS.Controllers
                             else {
                             else {
                                 owner=$"{_activityOwner}";
                                 owner=$"{_activityOwner}";
                             }
                             }
-                            Activity activity =  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemAsync<Activity>(_activityId.GetString(), new PartitionKey("Activity"));
+                            Activity activity = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).ReadItemAsync<Activity>(_activityId.GetString(), new PartitionKey("Activity"));
                             int isAll = 0;
                             int isAll = 0;
                             if (!string.IsNullOrWhiteSpace(owner)) {
                             if (!string.IsNullOrWhiteSpace(owner)) {
-                                if (activity.owner.Equals(owner)) { 
-                                isAll = 1; 
+                                if (activity.owner.Equals(owner)) {
+                                    isAll = 1;
                                 }
                                 }
                             }
                             }
                             List<InviteTeachers> inviteTeachers = new List<InviteTeachers>();
                             List<InviteTeachers> inviteTeachers = new List<InviteTeachers>();
-                            Azure.Response  response =  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("ActivityTeacher"));
+                            Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemStreamAsync(_activityId.GetString(), new PartitionKey("ActivityTeacher"));
                             if (response.Status==200) {
                             if (response.Status==200) {
-                                ActivityTeacher activityTeacher  = JsonDocument.Parse(response.Content).RootElement.ToObject<ActivityTeacher>();
+                                ActivityTeacher activityTeacher = JsonDocument.Parse(response.Content).RootElement.ToObject<ActivityTeacher>();
                                 if (isAll==1)
                                 if (isAll==1)
                                 {
                                 {
                                     if (activityTeacher.inviteTeachers.IsNotEmpty()) {
                                     if (activityTeacher.inviteTeachers.IsNotEmpty()) {
@@ -980,7 +980,7 @@ namespace TEAMModelOS.Controllers
                                 {
                                 {
                                     if (!string.IsNullOrWhiteSpace(school))
                                     if (!string.IsNullOrWhiteSpace(school))
                                     {
                                     {
-                                        var teachers =  activityTeacher.inviteTeachers.FindAll(z => !string.IsNullOrWhiteSpace(z.school)  && z.school.Equals(school));
+                                        var teachers = activityTeacher.inviteTeachers.FindAll(z => !string.IsNullOrWhiteSpace(z.school)  && z.school.Equals(school));
                                         if (teachers.IsNotEmpty()) {
                                         if (teachers.IsNotEmpty()) {
                                             inviteTeachers.AddRange(teachers);
                                             inviteTeachers.AddRange(teachers);
                                         }
                                         }
@@ -993,71 +993,59 @@ namespace TEAMModelOS.Controllers
                     case bool when $"{grant_type}".Equals("add-remove-experts", StringComparison.OrdinalIgnoreCase):
                     case bool when $"{grant_type}".Equals("add-remove-experts", StringComparison.OrdinalIgnoreCase):
                         {
                         {
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
                             if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
-                            if (!request.TryGetProperty("experts", out JsonElement _experts) || !_experts.ValueKind.Equals(JsonValueKind.Array)) { return BadRequest(); }
-                            List<Expert> experts = _experts.ToObject<List<Expert>>();
-                            var tmdids = experts.Where(x => !string.IsNullOrWhiteSpace(x.tmdid)).Select(z => z.tmdid);
-                            var phones = experts.Where(x => !string.IsNullOrWhiteSpace(x.mobile)).Select(z => z.mobile);
-                            var emails = experts.Where(x => !string.IsNullOrWhiteSpace(x.email)).Select(z => z.email);
-                            List<string> keys = new List<string>();
-                            if (tmdids.Any())
-                            {
-                                keys.AddRange(tmdids);
-                            }
-                            if (phones.Any())
-                            {
-                                keys.AddRange(phones);
+                            List<Expert> upsert_experts = new List<Expert>();
+                            List<Expert> remove_experts = new List<Expert>();
+                            if (request.TryGetProperty("upsert_experts", out JsonElement _upsert_experts) && _upsert_experts.ValueKind.Equals(JsonValueKind.Array)) {
+                                upsert_experts = _upsert_experts.ToObject<List<Expert>>();
                             }
                             }
-                            if (emails.Any())
+                            if (request.TryGetProperty("remove_experts", out JsonElement _remove_experts) && _remove_experts.ValueKind.Equals(JsonValueKind.Array))
                             {
                             {
-                                keys.AddRange(emails);
+                                remove_experts = _remove_experts.ToObject<List<Expert>>();
                             }
                             }
                             ActivityExpert activityExpert = null;
                             ActivityExpert activityExpert = null;
-                            experts.ForEach(x => { x.status = 0;  x.iname = x.name; x.name = null; });
-                            List<CoreUser> coreUsers = new List<CoreUser>();
-                            if (keys.Any())
-                            {
-                                try
+                            if (upsert_experts.IsNotEmpty()) {
+                                var tmdids = upsert_experts.Where(x => !string.IsNullOrWhiteSpace(x.tmdid)).Select(z => z.tmdid);
+                                var phones = upsert_experts.Where(x => !string.IsNullOrWhiteSpace(x.mobile)).Select(z => z.mobile);
+                                var emails = upsert_experts.Where(x => !string.IsNullOrWhiteSpace(x.email)).Select(z => z.email);
+                                List<string> keys = new List<string>();
+                                if (tmdids.Any())
                                 {
                                 {
-                                    var content = new StringContent(keys.ToJsonString(), Encoding.UTF8, "application/json");
-                                    string json = await _coreAPIHttpService.GetUserInfos(content);
-                                    if (!string.IsNullOrWhiteSpace(json))
-                                    {
-                                        coreUsers = json.ToObject<List<CoreUser>>();
-                                    }
+                                    keys.AddRange(tmdids);
                                 }
                                 }
-                                catch (Exception ex)
+                                if (phones.Any())
                                 {
                                 {
-                                    await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n\n{keys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                                    keys.AddRange(phones);
                                 }
                                 }
-                            }
-                            if (coreUsers.IsNotEmpty())
-                            {
-                                foreach (var t in experts)
+                                if (emails.Any())
                                 {
                                 {
-                                    if (!string.IsNullOrWhiteSpace(t.tmdid))
+                                    keys.AddRange(emails);
+                                }
+
+                                upsert_experts.ForEach(x => { x.status = 0; x.iname = x.name; x.name = null; });
+                                List<CoreUser> coreUsers = new List<CoreUser>();
+                                if (keys.Any())
+                                {
+                                    try
                                     {
                                     {
-                                        CoreUser coreUser = coreUsers.Find(x => x.id.Equals(t.tmdid));
-                                        if (coreUser != null)
+                                        var content = new StringContent(keys.ToJsonString(), Encoding.UTF8, "application/json");
+                                        string json = await _coreAPIHttpService.GetUserInfos(content);
+                                        if (!string.IsNullOrWhiteSpace(json))
                                         {
                                         {
-                                            t.id = coreUser.id;
-                                            t.name = coreUser.name;
-                                            t.picture = coreUser.picture;
-                                            t.tmdid = coreUser.id;
-                                            if (!string.IsNullOrWhiteSpace(coreUser.mobile))
-                                            {
-                                                t.mobile = coreUser.mobile;
-                                            }
-                                            if (!string.IsNullOrWhiteSpace(coreUser.mail))
-                                            {
-                                                t.email = coreUser.mail;
-                                            }
+                                            coreUsers = json.ToObject<List<CoreUser>>();
                                         }
                                         }
                                     }
                                     }
-                                    if (string.IsNullOrWhiteSpace(t.id))
+                                    catch (Exception ex)
                                     {
                                     {
-                                        if (!string.IsNullOrWhiteSpace(t.mobile))
+                                        await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n\n{keys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
+                                    }
+                                }
+                                if (coreUsers.IsNotEmpty())
+                                {
+                                    foreach (var t in upsert_experts)
+                                    {
+                                        if (!string.IsNullOrWhiteSpace(t.tmdid))
                                         {
                                         {
-                                            CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mobile) && x.mobile.Equals(t.mobile));
+                                            CoreUser coreUser = coreUsers.Find(x => x.id.Equals(t.tmdid));
                                             if (coreUser != null)
                                             if (coreUser != null)
                                             {
                                             {
                                                 t.id = coreUser.id;
                                                 t.id = coreUser.id;
@@ -1074,14 +1062,224 @@ namespace TEAMModelOS.Controllers
                                                 }
                                                 }
                                             }
                                             }
                                         }
                                         }
+                                        if (string.IsNullOrWhiteSpace(t.id))
+                                        {
+                                            if (!string.IsNullOrWhiteSpace(t.mobile))
+                                            {
+                                                CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mobile) && x.mobile.Equals(t.mobile));
+                                                if (coreUser != null)
+                                                {
+                                                    t.id = coreUser.id;
+                                                    t.name = coreUser.name;
+                                                    t.picture = coreUser.picture;
+                                                    t.tmdid = coreUser.id;
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mobile))
+                                                    {
+                                                        t.mobile = coreUser.mobile;
+                                                    }
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mail))
+                                                    {
+                                                        t.email = coreUser.mail;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                        if (string.IsNullOrWhiteSpace(t.id))
+                                        {
+                                            if (!string.IsNullOrWhiteSpace(t.email))
+                                            {
+                                                CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mail) && x.mail.Equals(t.email));
+                                                if (coreUser != null)
+                                                {
+                                                    t.id = coreUser.id;
+                                                    t.name = coreUser.name;
+                                                    t.picture = coreUser.picture;
+                                                    t.tmdid = coreUser.id;
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mobile))
+                                                    {
+                                                        t.mobile = coreUser.mobile;
+                                                    }
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mail))
+                                                    {
+                                                        t.email = coreUser.mail;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                    Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync($"{_activityId}", new PartitionKey("ActivityExpert"));
+                                    if (response.Status == 200)
+                                    {
+                                        activityExpert = JsonDocument.Parse(response.Content).RootElement.Deserialize<ActivityExpert>();
+                                        upsert_experts.ForEach(x =>
+                                        {
+                                            Expert tch = null;
+                                            if (string.IsNullOrWhiteSpace(x.id))
+                                            {
+                                                tch = activityExpert.experts.Find(t => !string.IsNullOrWhiteSpace(t.iname) && t.iname.Equals(x.iname));
+                                            }
+                                            else
+                                            {
+                                                tch = activityExpert.experts.Find(t => !string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(t.id) && t.id.Equals(x.id));
+                                            }
+                                            if (tch != null)
+                                            {
+                                                tch.status = x.status;
+                                                tch.name = x.name;
+                                                tch.iname = x.iname;
+                                                tch.picture = x.picture;
+                                                tch.mobile = x.mobile;
+                                                tch.tmdid = x.tmdid;
+                                                tch.email = x.email;
+                                                tch.id = x.id;
+                                                tch.school = x.school;
+                                                //直接替换更新
+                                                tch.modules=x.modules;
+                                                tch.subjects=x.subjects;
+                                                //    x.modules.ForEach(y => {
+                                                //        if (!tch.modules.Contains(y))
+                                                //        {
+                                                //            tch.modules.Add(y);
+                                                //        }
+                                                //    });
+                                                //    x.subjects.ForEach(r => {
+                                                //        if (!string.IsNullOrWhiteSpace(r.subject)  && !string.IsNullOrWhiteSpace(r.period))
+                                                //        {
+                                                //            var sub = tch.subjects.Find(x => !string.IsNullOrWhiteSpace(x.subject)  && !string.IsNullOrWhiteSpace(x.period)  && x.subject.Equals(r.subject)  && x.period.Equals(r.period));
+                                                //            if (sub == null)
+                                                //            {
+                                                //                tch.subjects.Add(r);
+                                                //            }
+                                                //        }
+                                                //        if (!string.IsNullOrWhiteSpace(r.subject)  && string.IsNullOrWhiteSpace(r.period))
+                                                //        {
+                                                //            var sub = tch.subjects.Find(a => !string.IsNullOrWhiteSpace(a.subject)  && string.IsNullOrWhiteSpace(a.period)  && a.subject.Equals(r.subject));
+                                                //            if (sub == null)
+                                                //            {
+                                                //                tch.subjects.Add(r);
+                                                //            }
+                                                //        }
+                                                //    });
+                                            }
+                                            else
+                                            {
+                                                activityExpert.experts.Add(new Expert
+                                                {
+                                                    status = x.status,
+                                                    name = x.name,
+                                                    iname = x.iname,
+                                                    picture = x.picture,
+                                                    mobile = x.mobile,
+                                                    tmdid = x.tmdid,
+                                                    email = x.email,
+                                                    id = x.id,
+                                                    title = x.title,
+                                                    subjects = x.subjects,
+                                                    modules = x.modules,
+                                                    school=x.school,
+                                                });
+                                            }
+                                        });
+                                        await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
+                                    }
+                                    else
+                                    {
+                                        activityExpert = new ActivityExpert { id = $"{_activityId}", code = "ActivityExpert", pk = "ActivityExpert", experts = upsert_experts };
+                                        await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
+                                    }
+                                }
+                                else
+                                {
+                                    activityExpert = new ActivityExpert { id = $"{_activityId}", code = "ActivityExpert", pk = "ActivityExpert", experts = upsert_experts };
+                                    await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
+                                }
+                                if (remove_experts.IsNotEmpty()) {
+                                    if (activityExpert == null)
+                                    {
+                                        Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync($"{_activityId}", new PartitionKey("ActivityExpert"));
+                                        if (response.Status == 200) {
+                                            activityExpert = JsonDocument.Parse(response.Content).RootElement.Deserialize<ActivityExpert>();
+                                        }
+                                    }
+                                    if (activityExpert!=null) {
+                                        remove_experts.ForEach(z => {
+                                            if (!string.IsNullOrWhiteSpace(z.id))
+                                            {
+                                                activityExpert.experts.RemoveAll(x => !string.IsNullOrWhiteSpace(x.id)  && x.id.Equals(z.id));
+                                            }
+                                            else {
+                                                if (!string.IsNullOrWhiteSpace(z.mobile)) {
+                                                    activityExpert.experts.RemoveAll(x => !string.IsNullOrWhiteSpace(x.mobile)  && x.mobile.Equals(z.mobile));
+                                                }
+                                                if (!string.IsNullOrWhiteSpace(z.email))
+                                                {
+                                                    activityExpert.experts.RemoveAll(x => !string.IsNullOrWhiteSpace(x.email)  && x.email.Equals(z.email));
+                                                }
+                                                if (!string.IsNullOrWhiteSpace(z.tmdid))
+                                                {
+                                                    activityExpert.experts.RemoveAll(x => !string.IsNullOrWhiteSpace(x.tmdid)  && x.tmdid.Equals(z.tmdid));
+                                                }
+                                            }
+                                        });
+                                        await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
+                                    }
+                                }
+                            }
+                            return Ok(new { activityExpert,code=200 });
+                        }
+                    //评审专家列表
+                    case bool when $"{grant_type}".Equals("list-experts", StringComparison.OrdinalIgnoreCase):
+                        {
+                            if (!request.TryGetProperty("activityId", out JsonElement _activityId)) return BadRequest();
+                            ActivityExpert activityExpert = null;
+                            Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync($"{_activityId}", new PartitionKey("ActivityExpert"));
+                            if (response.Status == 200) {
+                                bool change = false;
+                                activityExpert = JsonDocument.Parse(response.Content).RootElement.Deserialize<ActivityExpert>();
+                                var experts =  activityExpert.experts.FindAll(z => string.IsNullOrWhiteSpace(z.id));
+                                var tmdids = experts.Where(x => !string.IsNullOrWhiteSpace(x.tmdid)).Select(z => z.tmdid);
+                                var phones = experts.Where(x => !string.IsNullOrWhiteSpace(x.mobile)).Select(z => z.mobile);
+                                var emails = experts.Where(x => !string.IsNullOrWhiteSpace(x.email)).Select(z => z.email);
+                                List<string> keys = new List<string>();
+                                if (tmdids.Any())
+                                {
+                                    keys.AddRange(tmdids);
+                                }
+                                if (phones.Any())
+                                {
+                                    keys.AddRange(phones);
+                                }
+                                if (emails.Any())
+                                {
+                                    keys.AddRange(emails);
+                                }
+                                List<CoreUser> coreUsers = new List<CoreUser>();
+                                if (keys.Any())
+                                {
+                                    try
+                                    {
+                                        var content = new StringContent(keys.ToJsonString(), Encoding.UTF8, "application/json");
+                                        string json = await _coreAPIHttpService.GetUserInfos(content);
+                                        if (!string.IsNullOrWhiteSpace(json))
+                                        {
+                                            coreUsers = json.ToObject<List<CoreUser>>();
+                                        }
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        await _dingDing.SendBotMsg($"{_option.Location},导入名单时,查验key信息错误{ex.Message}\n{ex.StackTrace}\n\n{keys.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
                                     }
                                     }
-                                    if (string.IsNullOrWhiteSpace(t.id))
+                                }
+                                if (coreUsers.IsNotEmpty())
+                                {
+                                    foreach (var t in experts)
                                     {
                                     {
-                                        if (!string.IsNullOrWhiteSpace(t.email))
+                                        if (!string.IsNullOrWhiteSpace(t.tmdid))
                                         {
                                         {
-                                            CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mail) && x.mail.Equals(t.email));
+                                            CoreUser coreUser = coreUsers.Find(x => x.id.Equals(t.tmdid));
                                             if (coreUser != null)
                                             if (coreUser != null)
                                             {
                                             {
+                                                change=true;
                                                 t.id = coreUser.id;
                                                 t.id = coreUser.id;
                                                 t.name = coreUser.name;
                                                 t.name = coreUser.name;
                                                 t.picture = coreUser.picture;
                                                 t.picture = coreUser.picture;
@@ -1096,67 +1294,60 @@ namespace TEAMModelOS.Controllers
                                                 }
                                                 }
                                             }
                                             }
                                         }
                                         }
-                                    }
-
-                                }
-                                Azure.Response response = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync($"{_activityId}", new PartitionKey("ActivityExpert"));
-                                if (response.Status == 200)
-                                {
-                                     activityExpert = JsonDocument.Parse(response.Content).RootElement.Deserialize<ActivityExpert>();
-                                    experts.ForEach(x =>
-                                    {
-                                        Expert tch = null;
-                                        if (string.IsNullOrWhiteSpace(x.id))
-                                        {
-                                            tch = activityExpert.experts.Find(t => !string.IsNullOrWhiteSpace(t.iname) && t.iname.Equals(x.iname));
-                                        }
-                                        else
+                                        if (string.IsNullOrWhiteSpace(t.id))
                                         {
                                         {
-                                            tch = activityExpert.experts.Find(t => !string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(t.id) && t.id.Equals(x.id));
-                                        }
-                                        if (tch != null)
-                                        {
-                                            tch.status = x.status;
-                                            tch.name = x.name;
-                                            tch.iname = x.iname;
-                                            tch.picture = x.picture;
-                                            tch.mobile = x.mobile;
-                                            tch.tmdid = x.tmdid;
-                                            tch.email = x.email;
-                                            tch.id = x.id;
+                                            if (!string.IsNullOrWhiteSpace(t.mobile))
+                                            {
+                                                CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mobile) && x.mobile.Equals(t.mobile));
+                                                if (coreUser != null)
+                                                {
+                                                    change=true;
+                                                    t.id = coreUser.id;
+                                                    t.name = coreUser.name;
+                                                    t.picture = coreUser.picture;
+                                                    t.tmdid = coreUser.id;
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mobile))
+                                                    {
+                                                        t.mobile = coreUser.mobile;
+                                                    }
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mail))
+                                                    {
+                                                        t.email = coreUser.mail;
+                                                    }
+                                                }
+                                            }
                                         }
                                         }
-                                        else
+                                        if (string.IsNullOrWhiteSpace(t.id))
                                         {
                                         {
-                                            activityExpert.experts.Add(new Expert
+                                            if (!string.IsNullOrWhiteSpace(t.email))
                                             {
                                             {
-                                                status = x.status,
-                                                name = x.name,
-                                                iname = x.iname,
-                                                picture = x.picture,
-                                                mobile = x.mobile,
-                                                tmdid = x.tmdid,
-                                                email = x.email,
-                                                id = x.id,
-                                                title = x.title,
-                                                subjects = x.subjects,
-                                            });
+                                                CoreUser coreUser = coreUsers.Find(x => !string.IsNullOrWhiteSpace(x.mail) && x.mail.Equals(t.email));
+                                                if (coreUser != null)
+                                                {
+                                                    change=true;
+                                                    t.id = coreUser.id;
+                                                    t.name = coreUser.name;
+                                                    t.picture = coreUser.picture;
+                                                    t.tmdid = coreUser.id;
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mobile))
+                                                    {
+                                                        t.mobile = coreUser.mobile;
+                                                    }
+                                                    if (!string.IsNullOrWhiteSpace(coreUser.mail))
+                                                    {
+                                                        t.email = coreUser.mail;
+                                                    }
+                                                }
+                                            }
                                         }
                                         }
-                                    });
-                                    await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
+                                    }
                                 }
                                 }
-                                else
-                                {
-                                      activityExpert = new ActivityExpert { id = $"{_activityId}", code = "ActivityExpert", pk = "ActivityExpert", experts = experts };
+                                if (change) {
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
                                     await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
                                 }
                                 }
                             }
                             }
-                            else {
-                                  activityExpert = new ActivityExpert { id = $"{_activityId}", code = "ActivityExpert", pk = "ActivityExpert", experts = experts };
-                                await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).UpsertItemAsync(activityExpert, new PartitionKey("ActivityExpert"));
-                            }
-                            return Ok(new { activityExpert});
+                            return Ok(new { activityExpert, code = 200 });
                         }
                         }
-
                 }
                 }
             } catch (Exception ex)
             } catch (Exception ex)
             {
             {
@@ -1269,9 +1460,6 @@ namespace TEAMModelOS.Controllers
             var serializeToken = tokenHandler.WriteToken(secToken);
             var serializeToken = tokenHandler.WriteToken(secToken);
             return Ok(new {  code =200,token =serializeToken, schools= teacherInfo.teacher.schools.Where(z=>z.status.Equals("join"))});
             return Ok(new {  code =200,token =serializeToken, schools= teacherInfo.teacher.schools.Where(z=>z.status.Equals("join"))});
         }
         }
-
-
-      
         /// <summary>
         /// <summary>
         /// 
         /// 
         /// </summary>
         /// </summary>

+ 0 - 11
TEAMModelOS/Controllers/Common/SocialController.cs

@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace TEAMModelOS.Controllers.Common
-{
-    public class SocialController
-    {
-    }
-}

+ 1 - 28
TEAMModelOS/Controllers/Common/VoteController.cs

@@ -535,33 +535,6 @@ namespace TEAMModelOS.Controllers
             (int msgid,int taskStatus) = await ActivityStudentService.Decide(_dingDing,_option, request, _azureCosmos, _azureRedis ,_azureStorage, userid, school, standard,_serviceBus,_configuration);
             (int msgid,int taskStatus) = await ActivityStudentService.Decide(_dingDing,_option, request, _azureCosmos, _azureRedis ,_azureStorage, userid, school, standard,_serviceBus,_configuration);
             return Ok(new { msgid, taskStatus });
             return Ok(new { msgid, taskStatus });
         }
         }
-        /// <summary>
-        /// 投票
-        /// </summary>
-        /// <redis>
-        /// 投票活动选项计数器 使用SortedSet(有序集合)ZSET 数据集合 使用命令 ZINCRBY  key:"Vote:Count:AAA",value:"A",score:1
-        /// 投票活动 投票记录  使用Hash(哈希表)使用命令 key:"Vote:Record:AAA",feild:15283771540-20210105,value:"{"opt":["A","C","A"],"time":1608274766154}"
-        /// </redis>
-        /// <param name="request">
-        /// !"id":"aaaa"
-        /// !"code":"Vote-hbcn"/"code":"Vote-1606285227"
-        /// !"option":{"A":5,"B":6}/{"1":5,"2":8}
-        /// !"userid":"15283771540"
-        /// </param>
-        /// <returns>
-        /// msgid=0投票失败,1投票成功,2不在时间范围内,3不在发布范围内,4投票周期内重复投票,5周期内的可投票数不足,6未设置投票项
-        /// </returns>
-        //[ProducesDefaultResponseType]
-        //[HttpPost("decide-mock")]
-        //public async Task<IActionResult> DecideMock(JsonElement request)
-        //{
-            
-        //    if (request.TryGetProperty("userid", out JsonElement userid)&& request.TryGetProperty("school", out JsonElement _school))
-        //    {
-        //        (int msgid, int taskStatus) = await ActivityStudentService.Decide(_dingDing,_option,request, _azureCosmos, _azureRedis, _azureStorage, $"{userid}",$"{_school}");
-        //        return Ok(new { msgid ,taskStatus });
-        //    }
-        //    else { return Ok(new { msgid = 0 }); }
-        //}
+       
     }
     }
 }
 }

+ 33 - 0
TEAMModelOS/Controllers/Student/StudentCommonController.cs

@@ -41,6 +41,39 @@ namespace TEAMModelOS.Controllers
             _option = option?.Value;
             _option = option?.Value;
         }
         }
 
 
+
+        /// <summary>
+        /// 查询活动所有活动类型的列表,学生端
+        /// </summary>
+        /// <param name="request">
+        ///加入的班级信息                      ?classes:[{"classid":"S-C-00001","scope":"school"},{"classid":"P-C-00004","scope":"private"}]
+        ///活动类型                            ?"type":"Vote"/"Exam"/"Homework"/"Learn"/"Survey"" // Vote投票 Survey问卷 Exam评测 Learn学习活动 Homework作业活动
+        ///时间筛选范围开始时间 默认30天之前   ?"stime":1608274766154  
+        ///时间筛选范围结束时间 默认当前时间   ?"etime":1608274766666 
+        ///是否展示列表的 Tips                 ? "tips":true/false
+        ///每页大小     ?"count":10/null/Undefined  
+        ///分页Token    ?"continuationToken":Undefined/null/"[{\"token\":\"+RID:~omxMAP3ipcSEEwAAAAAAAA==#RT:2#TRC:20#ISV:2#IEO:65551#QCF:1#FPC:AYQTAAAAAAAAiRMAAAAAAAA=\",\"range\":{\"min\":\"\",\"max\":\"FF\"}}]"
+        /// 当前状态    ?"progress":Undefined/null/"" 表示两种状态都要查询/ "going"/"finish" 表示查询进行中/ 或者已完成 学生端只能查询正在进行或已经结束 going 已发布|finish 已结束  
+        /// </param>
+        /// 
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("student-activity")]
+        [Authorize(Roles = "IES")]
+        [AuthToken(Roles = "teacher,admin,student")]
+
+#if !DEBUG
+        [Authorize(Roles = "IES")]
+#endif
+        public async Task<IActionResult> StudentActivity(JsonElement request)
+        {
+            var (id, name, pic, school) = HttpContext.GetAuthTokenInfo();
+
+            //(List<StuActivity> datas, string continuationToken) = await ActivityStudentService.FindActivity(request, id, school, _azureCosmos, _azureRedis);
+            //return Ok(new { datas, continuationToken });
+            return Ok();
+        }
+
         /// <summary>
         /// <summary>
         /// 查询活动所有活动类型的列表,学生端
         /// 查询活动所有活动类型的列表,学生端
         /// </summary>
         /// </summary>

+ 0 - 2
TEAMModelOS/Controllers/Teacher/InitController.cs

@@ -955,8 +955,6 @@ namespace TEAMModelOS.Controllers
                 //返回剩余空间
                 //返回剩余空间
                 (long usedSize, long teach, long total, long surplus, Dictionary<string, double?> catalog) space =
                 (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);
                     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}");
 
 
                 return Ok(new
                 return Ok(new
                 {
                 {

+ 10 - 24
TEAMModelOS/Controllers/XTest/TestController.cs

@@ -92,33 +92,19 @@ namespace TEAMModelOS.Controllers
             _searcher = searcher;
             _searcher = searcher;
             _httpTrigger = httpTrigger;
             _httpTrigger = httpTrigger;
         }
         }
+
+
+
         [ProducesDefaultResponseType]
         [ProducesDefaultResponseType]
-        [HttpPost("fix-semester")]
+        [HttpPost("test-ru")]
         public async Task<IActionResult> FixSemester(JsonElement json)
         public async Task<IActionResult> FixSemester(JsonElement json)
         {
         {
-            string sql = "select value c from c ";
-            var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetList<School>(sql, "Base");
-            List<School> schools = new List<School>();
-            foreach (var item in result.list) {
-                bool change = false; 
-                foreach (var p in item.period) {
-                    foreach (var s in p.semesters) {
-                        if (s.start==1 && (s.name.Equals("下学期") || s.name.Contains("二学期"))) {
-                            s.name="上学期";
-                            change = true;
-                        }
-                    }
-                    var list = p.semesters.FindAll(z => z.start!=1);
-                    if (list.Count==1) {
-                        list[0].name="下学期";
-                    }
-                }
-                if (change) {
-                    schools.Add(item);
-                    await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).UpsertItemAsync(item, new PartitionKey("Base"));
-                }
-            }
-            return Ok(schools);
+            var result4 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam'and c.owner='teacher'", null, pageSize: 200);
+            var result0 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam'and c.owner='teacher' and STARTSWITH(c.code,'Exam-')", null, pageSize: 200);
+            var result1 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam' and c.owner='teacher' and contains(c.code,'Exam-')", null, pageSize: 200);
+            var result2 =  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam' and  c.owner='school' and contains(c.code,'Exam-hbc')",null, pageSize:200);
+            var result3 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<ExamInfo>($"select value c from c where c.pk='Exam' and  c.owner='school' ", "Exam-hbcn",pageSize:200);
+            return Ok(new {ru4=result4.ru ,count4= result4.list.Count, ru0 = result0.ru,count0= result0.list.Count(),ru1 = result1.ru,count1=result1.list.Count(), ru2 = result2.ru, count2 = result2.list.Count() ,ru3=result3.ru,count3= result3.list.Count()});
         }
         }
         /// <summary>
         /// <summary>
         /// 测试五育画像数据推送
         /// 测试五育画像数据推送

+ 4 - 4
TEAMModelOS/TEAMModelOS.csproj

@@ -74,11 +74,11 @@
     <SpaRoot>ClientApp\</SpaRoot>
     <SpaRoot>ClientApp\</SpaRoot>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-    <Version>5.2311.8</Version>
-    <AssemblyVersion>5.2311.8.1</AssemblyVersion>
-    <FileVersion>5.2311.8.1</FileVersion>
+    <Version>5.2311.15</Version>
+    <AssemblyVersion>5.2311.15.1</AssemblyVersion>
+    <FileVersion>5.2311.15.1</FileVersion>
     <Description>TEAMModelOS(IES5)</Description>
     <Description>TEAMModelOS(IES5)</Description>
-    <PackageReleaseNotes>IES版本说明版本切换标记5.2311.8.1</PackageReleaseNotes>
+    <PackageReleaseNotes>IES版本说明版本切换标记5.2311.15.1</PackageReleaseNotes>
     <PackageId>TEAMModelOS</PackageId>
     <PackageId>TEAMModelOS</PackageId>
     <Authors>teammodel</Authors>
     <Authors>teammodel</Authors>
     <Company>醍摩豆(成都)信息技术有限公司</Company>
     <Company>醍摩豆(成都)信息技术有限公司</Company>

+ 1 - 1
TEAMModelOS/appsettings.Development.json

@@ -18,7 +18,7 @@
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
     //"HttpTrigger": "http://localhost:7071/api/"
     //"HttpTrigger": "http://localhost:7071/api/"
-    "Version": "5.2311.8.1"
+    "Version": "5.2311.15.1"
   },
   },
   "Azure": {
   "Azure": {
     // 测试站数据库
     // 测试站数据库

+ 1 - 1
TEAMModelOS/appsettings.json

@@ -18,7 +18,7 @@
     "Exp": 86400,
     "Exp": 86400,
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/",
     "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/",
-    "Version": "5.2311.8.1"
+    "Version": "5.2311.15.1"
   },
   },
   "Azure": {
   "Azure": {
     "Storage": {
     "Storage": {