Przeglądaj źródła

Merge branch 'develop3.0' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0

CrazyIter 5 lat temu
rodzic
commit
10fd1520dd

+ 4 - 1
TEAMModelOS/ClientApp/src/api/syllabus.js

@@ -35,5 +35,8 @@ export default {
     // ͨ�ü��ϲ�ѯ�ӿ�
     FindCollection: function(data) {
         return post('/api/Common/FindCollection', data)
-    }
+    },// ͨ�ü��ϲ�ѯ�ӿ�
+    FindSyllabusCount: function(data) {
+        return post('/api/Volume/FindSyllabusCount', data)
+    },
 }

+ 0 - 1
TEAMModelOS/ClientApp/src/components/learnactivity/BaseHwForm.vue

@@ -208,7 +208,6 @@
 
                         params.target = target
                         this.isBtnLoading = true
-                        console.log('111111')
                         this.saveorUpdataHw({ homeWork: params, reset: isReset }).then(res => {
                             this.$Message.success((this.isEdit && this.editInfo.id) ? '修改成功!' : '添加成功!')
                             this.hwFormEdit = false

+ 2 - 4
TEAMModelOS/ClientApp/src/components/learnactivity/BaseVoteForm.vue

@@ -40,7 +40,7 @@
                     <span class="option-order">{{ index + 1 }}</span>
                     <div :ref="'voteOption'+index" style="text-align:left" class="option-editor" @click="optionClick(index)"></div>
                 </div>
-                <p style="float:right;color:#BDBDBD;cursor:pointer" @click="onAddOption"><Icon type="md-add" />添加选项</p>
+                <p style="float:right;color:#BDBDBD;cursor:pointer" @click="onAddOption" v-show="voteFormEdit"><Icon type="md-add" />添加选项</p>
             </FormItem>
 
             <!--<FormItem label="投票记录" prop="isReset" v-show="editable && isEdit">
@@ -195,11 +195,8 @@
             },
 
             initEditors() {
-                console.log(this.voteOptions)
-                console.log(this.$refs)
 
                 this.$nextTick(() => {
-                
                     // Editor默认配置
                     if (this.voteOptions.length > 0) {
                         this.voteOptions.forEach((item, i) => {
@@ -207,6 +204,7 @@
                             let editor = new E(that.$refs['voteOption' + i][0])
                             editor.customConfig = this.defaultConfig
 
+
                             // 选项编辑器失焦隐藏工具栏
                             editor.customConfig.onblur = function () {
                                 let allToolbars = document.getElementsByClassName('option-editor')

+ 1 - 1
TEAMModelOS/ClientApp/src/view/selflearning/ManageVote.vue

@@ -57,7 +57,7 @@
             <div class="hw-box-header">
                 <span>投票数据</span>
                 <div class="hw-box-header-tools">
-                    <span class="hw-box-header-tools-tool" @click="changeTableView"><Icon type="md-podium" />{{ isOptionView ? '学生清单视图' : '选项清单视图' }}</span>
+                    <span class="hw-box-header-tools-tool" @click="changeTableView" v-show="tableData.length"><Icon type="md-podium" />{{ isOptionView ? '学生清单视图' : '选项清单视图' }}</span>
                 </div>
             </div>
                 <div v-if="voteList.length === 0 || currentVote.state !== 300">

+ 47 - 19
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/Index.vue

@@ -1,4 +1,4 @@
- <style lang="less" scoped>
+<style lang="less" scoped>
     @import './Index.less';
 </style>
 
@@ -49,7 +49,7 @@
                              :key="index"
                              @click="hasModify ? handleConfirmSave({index},'2') : handleSubjectTap(index)">
                             <p class="gl-item-name">{{item.subjectName}}</p>
-                            <p class="gl-item-info"><span></span>册别数:{{ 0 }}</p>
+                            <p class="gl-item-info"><span></span>册别数:{{ tabIndex === 0  ? schoolVolCount[index] : privateVolCount[index]}}</p>
                         </div>
                     </div>
                 </vuescroll>
@@ -65,7 +65,7 @@
                             <span style="margin-left:5px">册别</span>
                         </span>
                         <div>
-                            <Icon type="md-add"  v-if="$access.can('admin.*|Volumn_Add') || tabIndex === 1" color="#fff" size="18" style="cursor:pointer;margin-right:10px" @click="onAddVolume" />
+                            <Icon type="md-add" v-if="$access.can('admin.*|Volumn_Add') || tabIndex === 1" color="#fff" size="18" style="cursor:pointer;margin-right:10px" @click="onAddVolume" />
                             <Poptip title="筛选册别" placement="bottom-end" @on-popper-show="onPopperShow" v-show="volumeList.length">
                                 <Icon type="ios-funnel" color="#fff" size="18" style="cursor:pointer;margin-right:10px" />
                                 <div class="funnel-box" slot="content">
@@ -112,9 +112,9 @@
                                     <Icon type="md-folder" title="内容资源数" style="margin-left:0" /> {{ item.itemCount }}
                                     <Icon type="md-cube" title="关联知识点数" /> {{ item.resourceCount }}
                                 </div>
-                                <span class="btn-edit"  v-if="$access.can('admin.*|Volumn_Edit') || tabIndex === 1" title="编辑" @click.stop="onEditVolume(item)"><Icon type="md-create" size="20" color="#d2d2d2" /></span>
-                                <span class="btn-users"  v-if="$access.can('admin.*|Volumn_Edit') || tabIndex === 1" title="共编使用者管理" @click.stop="onEditEditors(item)"><Icon type="md-people" size="22" color="#d2d2d2" /></span>
-                                <span class="btn-delete"  v-if="$access.can('admin.*|Volumn_Delete') || tabIndex === 1" title="删除" @click.stop="onDeleteVolume(item)"><Icon type="md-trash" size="22" color="#d2d2d2" /></span>
+                                <span class="btn-edit" v-if="$access.can('admin.*|Volumn_Edit') || tabIndex === 1" title="编辑" @click.stop="onEditVolume(item)"><Icon type="md-create" size="20" color="#d2d2d2" /></span>
+                                <span class="btn-users" v-if="$access.can('admin.*|Volumn_Edit') || tabIndex === 1" title="共编使用者管理" @click.stop="onEditEditors(item)"><Icon type="md-people" size="22" color="#d2d2d2" /></span>
+                                <span class="btn-delete" v-if="$access.can('admin.*|Volumn_Delete') || tabIndex === 1" title="删除" @click.stop="onDeleteVolume(item)"><Icon type="md-trash" size="22" color="#d2d2d2" /></span>
                             </div>
                         </div>
                     </div>
@@ -135,7 +135,7 @@
                             <!--<span class="tree-version">v1.0.0</span>-->
                         </div>
                         <div>
-                            <Button @click="onSaveSyllabus" :disabled="!hasModify"  v-if="$access.can('admin.*|Syllabus_Edit') || tabIndex === 1">存储变更</Button>
+                            <Button @click="onSaveSyllabus" :disabled="!hasModify" v-if="$access.can('admin.*|Syllabus_Edit') || tabIndex === 1">存储变更</Button>
                         </div>
                     </div>
                     <Tree :volume="currentVolume" :treeData="treeData" ref="treeRef" :editable="$access.can('admin.*|Syllabus_Edit') || tabIndex === 1" @onTreeUpdate="onTreeUpdate"></Tree>
@@ -161,7 +161,7 @@
         <Modal v-model="isEditEditors" width="760" footer-hide class="add-volume-modal">
             <div class="modal-header" slot="header">共编使用者管理</div>
             <div class="modal-content">
-                <AddEditors :editVolume="editVolume"  @addFinish="onFinishAddVolume"></AddEditors>
+                <AddEditors :editVolume="editVolume" @addFinish="onFinishAddVolume"></AddEditors>
             </div>
         </Modal>
 
@@ -192,12 +192,15 @@
                 isLoadSubject: false,
                 isLoadVolumes: false,
                 isLoadSyllabus: false,
+                volumnCounts: [],
                 currentPeriodIndex: null,
                 currentSubjectIndex: null,
                 currentVolume: null,
                 tabIndex: 0,
                 originData: {},
                 originSchoolData: {},
+                schoolVolCount: [],// 校本科目册别数量
+                privateVolCount: [],//个人科目册别数量
                 periodList: [],
                 gradeList: [],
                 semesterList: [],
@@ -228,9 +231,7 @@
         },
         created() {
             this.initSchoolData()
-
-            console.log("当前用户权限")
-            console.log(this.$access)
+            this.initSyllabusCount()
         },
         methods: {
             // 获取当前学校学段学科等基本信息
@@ -249,6 +250,27 @@
                     }
                 })
             },
+
+            // 获取当前册别数量
+            initSyllabusCount() {
+                if (this.volumnCounts.length) {
+                    this.schoolVolCount = this.volumnCounts[this.currentPeriodIndex].map(i => i[0])
+                    this.privateVolCount = this.volumnCounts[this.currentPeriodIndex].map(i => i[1])
+                } else {
+                    this.$api.syllabus.FindSyllabusCount({ schoolCode: this.schoolInfo.schoolCode }).then(res => {
+                        if (!res.error) {
+                            this.$nextTick(() => {
+                                this.volumnCounts = res.result.data
+                                this.schoolVolCount = res.result.data[this.currentPeriodIndex].map(i => i[0])
+                                this.privateVolCount = res.result.data[this.currentPeriodIndex].map(i => i[1])
+                            })
+                        } else {
+                            this.$Message.warning('获取数据失败')
+                        }
+                    })
+                }
+            },
+
             // 根据学科获取所有册别信息
             getVolumesData() {
                 let that = this
@@ -263,7 +285,7 @@
                         this.originVolumeList = list
                         this.handleVolumeTap(0, list.length > 0 ? list[0] : null)
                         this.searchVolume = ''
-                        setTimeout(function() {
+                        setTimeout(function () {
                             that.isLoadVolumes = false
                         }, 400)
                     } else {
@@ -278,7 +300,7 @@
                 this.$api.syllabus.GetTreeByVolume({ volumeCode: volumeCode }).then(res => {
                     if (!res.error && res.result.data) {
                         this.treeData = res.result.data
-                        setTimeout(function() {
+                        setTimeout(function () {
                             that.isLoadSyllabus = false
                         }, 400)
                     } else {
@@ -315,8 +337,9 @@
                     this.gradeList = this.periodList[index].grades // 切换学段后更新 年级 列表
                     this.semesterList = this.periodList[index].semesters // 切换学段后更新 学期 列表
                     this.handleSubjectTap(0)
+                    this.initSyllabusCount()
                     this.searchSubject = ''
-                    setTimeout(function() {
+                    setTimeout(function () {
                         that.isLoadSubject = false
                     }, 400)
                 }
@@ -324,11 +347,11 @@
 
             // 学科点击事件
             handleSubjectTap(index) {
-                    this.isLoadVolumes = true
-                    this.currentSubjectIndex = index
-                    this.currentParams.subjectCode = this.subjectList[index].subjectCode
-                    this.activeSubjectIndex = index
-                    this.getVolumesData()
+                this.isLoadVolumes = true
+                this.currentSubjectIndex = index
+                this.currentParams.subjectCode = this.subjectList[index].subjectCode
+                this.activeSubjectIndex = index
+                this.getVolumesData()
             },
 
             // 册别点击事件
@@ -349,6 +372,8 @@
                         this.$Message.success('册别已存在,已为您更新数据')
                     } else {
                         this.$Message.success('添加新册别成功')
+                        this.volumnCounts = []
+                        this.initSyllabusCount()
                     }
                     this.handleSubjectTap(this.currentSubjectIndex) // 获取最新册别数据
                 }
@@ -528,6 +553,9 @@
                     }
                 })
             }
+        },
+        mounted() {
+
         }
     }
 </script>

+ 3 - 1
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/AddVolume.vue

@@ -46,7 +46,6 @@
             }
         },
         created() {
-
         },
         methods: {
             // 提交添加
@@ -116,6 +115,8 @@
             originData: {
                 handler(newValue, oldValue) {
                     this.originDatas = newValue
+            console.log(this.originData)
+
                 }
             },
             periodIndex: {
@@ -125,6 +126,7 @@
                     this.formTop.grade = this.currentPeriod.grades[0].gradeCode
                     this.formTop.semester = this.currentPeriod.semesters[0].semesterCode
                     this.formTop.volume = ''
+                    console.log(this.currentPeriod)
                 }
             },
             subjectIndex: {

+ 5 - 94
TEAMModelOS/Controllers/Core/SchoolController.cs

@@ -47,7 +47,7 @@ namespace TEAMModelOS.Controllers.Syllabus
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             List<School> sc = await _cosmosrepository.FindByDict<School>(request.@params);
-            sc.ForEach(s =>
+            /*sc.ForEach(s =>
             {                
                 s.period.ForEach( p => {
                     p.subjects.ForEach(async j =>
@@ -93,105 +93,16 @@ namespace TEAMModelOS.Controllers.Syllabus
                         };
                         List<Knowledge> knowleges = await _cosmosrepository.FindByDict<Knowledge>(kMap);
                         List<SyllabusVolume> volumes = await _cosmosrepository.FindByDict<SyllabusVolume>(sMap);
-                        /*//册别数量
+                        *//*//册别数量
                         j.count[0] = volumeo.Count;
                         j.count[1] = volumes.Count;
                         //知识块数量
                         j.knowlegeCount[0] = knowlegeo.Count;
-                        j.knowlegeCount[1] = knowleges.Count;*/
+                        j.knowlegeCount[1] = knowleges.Count;*//*
                     });                   
                 });
-            });
+            });*/
             return builder.Data(sc).build();
-        }
-        [HttpPost("FindSyllabusCount")]
-        public async Task<BaseJosnRPCResponse> FindSyllabusVolumeAsync(JosnRPCRequest<Dictionary<string, object>> request) {
-            //List<List<List<List<int>>>> allCount = new List<List<List<List<int>>>>();
-            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
-            List<School> sc = await _cosmosrepository.FindByDict<School>(request.@params);
-            List<List<List<int>>> sCount = new List<List<List<int>>>();
-            for (int i = 0; i < sc.Count; i++) {
-                for (int j = 0; j < sc[i].period.Count; j++) {
-                    List<List<int>> pCount = new List<List<int>>();
-                    for (int k = 0; k < sc[i].period[j].subjects.Count; k++) {
-                        List<int> listCount = new List<int>() { 0, 0 };
-                        //查询校本册别
-                        Dictionary<string, object> eMap = new Dictionary<string, object>
-                        {
-                                { "scopeCode",  sc[i].schoolCode},
-                                { "periodCode", sc[i].period[j].periodCode},
-                                { "subjectCode", sc[i].period[j].subjects[k].subjectCode},
-                                { "type", 0},
-                                { "status", 1}
-                        };
-                        List<SyllabusVolume> volumeo = await _cosmosrepository.FindByDict<SyllabusVolume>(eMap);
-                        //查询私有册别
-                        Dictionary<string, object> sMap = new Dictionary<string, object>
-                        {
-                                { "TEAMModelId",  "habook#0001"},
-                                { "scopeCode",  sc[i].schoolCode},
-                                { "periodCode", sc[i].period[j].periodCode},
-                                { "subjectCode", sc[i].period[j].subjects[k].subjectCode},
-                                { "type", 1},
-                                { "status", 1}
-                        };
-                        List<SyllabusVolume> volumes = await _cosmosrepository.FindByDict<SyllabusVolume>(sMap);
-                        //册别数量
-                        listCount[0] = volumeo.Count;
-                        listCount[1] = volumes.Count;
-                        pCount.Add(listCount);
-                    }
-                    sCount.Add(pCount);
-                }
-            }            
-            return builder.Data(sCount).build();
-
-        }
-
-        [HttpPost("FindKnowlegeCount")]
-        public async Task<BaseJosnRPCResponse> FindKnowlegeAsync(JosnRPCRequest<Dictionary<string, object>> request)
-        {
-            //List<List<List<List<int>>>> allCount = new List<List<List<List<int>>>>();
-            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
-            List<School> sc = await _cosmosrepository.FindByDict<School>(request.@params);
-            List<List<List<int>>> sCount = new List<List<List<int>>>();
-            for (int i = 0; i < sc.Count; i++)
-            {
-                for (int j = 0; j < sc[i].period.Count; j++)
-                {
-                    List<List<int>> pCount = new List<List<int>>();
-                    for (int k = 0; k < sc[i].period[j].subjects.Count; k++)
-                    {
-                        List<int> listCount = new List<int>() { 0, 0 };
-                        //查询校本知识点
-                        Dictionary<string, object> KnowledgeMap = new Dictionary<string, object>
-                         {
-                                 { "scopeCode",  sc[i].schoolCode},
-                                 { "period", sc[i].period[j].periodCode},
-                                 { "subjectCode", sc[i].period[j].subjects[k].subjectCode},
-                                 { "type", 0},
-                                 { "status", 1}
-                         };
-                        List<Knowledge> knowlegeo = await _cosmosrepository.FindByDict<Knowledge>(KnowledgeMap);
-                        //查询私有知识点
-                        Dictionary<string, object> kMap = new Dictionary<string, object>
-                        {
-                                { "scopeCode",  "habook#0001"},
-                                 { "period", sc[i].period[j].periodCode},
-                                 { "subjectCode", sc[i].period[j].subjects[k].subjectCode},
-                                { "type", 0},
-                                { "status", 1}
-                        };
-                        List<Knowledge> knowleges = await _cosmosrepository.FindByDict<Knowledge>(kMap);
-                        listCount[0] = knowlegeo.Count;
-                        listCount[1] = knowleges.Count;
-                        pCount.Add(listCount);
-                    }
-                    sCount.Add(pCount);
-                }
-            }            
-            return builder.Data(sCount).build();
-
-        }
+        }               
     }
 }

+ 53 - 0
TEAMModelOS/Controllers/Syllabus/KnowledgeController.cs

@@ -13,6 +13,7 @@ using TEAMModelOS.SDK.Helper.Security.ShaHash;
 using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 using TEAMModelOS.SDK.Module.AzureTable.Interfaces;
+using TEAMModelOS.Service.Models.Core;
 using TEAMModelOS.Service.Models.Syllabus;
 using TEAMModelOS.Service.Services.Syllabus.Interface;
 
@@ -356,5 +357,57 @@ namespace TEAMModelOS.Controllers.Syllabus
             else { throw new BizException("参数未定义", ResponseCode.FAILED); }
             return schoolBlocks;
         }
+        [HttpPost("FindKnowlegeCount")]
+        public async Task<BaseJosnRPCResponse> FindKnowlegeAsync(JosnRPCRequest<Dictionary<string, object>> request)
+        {
+            //List<List<List<List<int>>>> allCount = new List<List<List<List<int>>>>();
+            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
+            List<School> sc = await _cosmos.FindByDict<School>(request.@params);
+            //查询校本所有知识块
+            Dictionary<string, object> scMap = new Dictionary<string, object>
+            {
+                 { "type", 0},
+                 { "status", 1}
+            };
+            List<Knowledge> knowlegeo = await _cosmos.FindByDict<Knowledge>(scMap);
+            List<List<List<int>>> sCount = new List<List<List<int>>>();
+            for (int i = 0; i < sc.Count; i++)
+            {
+                for (int j = 0; j < sc[i].period.Count; j++)
+                {
+                    List<List<int>> pCount = new List<List<int>>();
+                    for (int k = 0; k < sc[i].period[j].subjects.Count; k++)
+                    {
+                        List<int> listCount = new List<int>() { 0, 0 };
+                        //查询校本知识块
+                        //计数校本知识块与私有知识块
+                        int n = 0;
+                        int s = 0;
+                        for (int m = 0; m < knowlegeo.Count; m++)
+                        {
+                            if (sc[i].schoolCode.Equals(knowlegeo[m].scopeCode) &&
+                                sc[i].period[j].periodCode.Equals(knowlegeo[m].period) &&
+                                sc[i].period[j].subjects[k].subjectCode.Equals(knowlegeo[m].subjectCode))
+                            {
+                                n++;
+                            }
+                            if (knowlegeo[m].scopeCode.Equals("habook#0001") &&
+                                sc[i].period[j].periodCode.Equals(knowlegeo[m].period) &&
+                                sc[i].period[j].subjects[k].subjectCode.Equals(knowlegeo[m].subjectCode))
+                            {
+                                s++;
+                            }
+                        }
+                        //册别数量
+                        listCount[0] = n;
+                        listCount[1] = s;
+                        pCount.Add(listCount);
+                    }
+                    sCount.Add(pCount);
+                }
+            }
+            return builder.Data(sCount).build();
+
+        }
     }
 }

+ 71 - 19
TEAMModelOS/Controllers/Syllabus/VolumeController.cs

@@ -91,32 +91,33 @@ namespace TEAMModelOS.Controllers.Syllabus
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             List<SyllabusVolume> volumes ;
+            List<Syllabuses> syllabuses = await azureCosmosDBRepository.FindAll<Syllabuses>();
             if (request.@params.TryGetValue("scopeCode", out _))
             {
                 volumes = await azureCosmosDBRepository.FindByDict<SyllabusVolume>(request.@params);
                 //处理单个册别下面的资源和题目
-                volumes.ForEach(async v => {
-                    Dictionary<string, object> Map = new Dictionary<string, object>
-                        {
-                                { "volumeCode",  v.id},
-                        };
+                volumes.ForEach(v => {
+                    
                     HashSet<string> rCount = new HashSet<string>();
                     HashSet<string> iCount = new HashSet<string>();
-                    List<Syllabuses> syllabuses = await azureCosmosDBRepository.FindByDict<Syllabuses>(Map);
+                    
                     syllabuses.ForEach(s => {
-                        s.children.ForEach(c => {
-                            if (c.resources.IsNotEmpty()) {
-                                c.resources.ForEach(r => {
-                                    rCount.Add(r);
-                                });
-                            }
-                            if (c.items.IsNotEmpty())
-                            {
-                                c.items.ForEach(i => {
-                                    iCount.Add(i);
-                                });
-                            }
-                        });
+                        if (v.volumeCode.Equals(s.volumeCode)) {
+                            s.children.ForEach(c => {
+                                if (c.resources.IsNotEmpty())
+                                {
+                                    c.resources.ForEach(r => {
+                                        rCount.Add(r);
+                                    });
+                                }
+                                if (c.items.IsNotEmpty())
+                                {
+                                    c.items.ForEach(i => {
+                                        iCount.Add(i);
+                                    });
+                                }
+                            });
+                        }                      
                     });
                     v.resourceCount = rCount.Count;
                     v.itemCount = iCount.Count;
@@ -128,5 +129,56 @@ namespace TEAMModelOS.Controllers.Syllabus
             }
             return builder.Data(volumes).build();
         }
+
+        [HttpPost("FindSyllabusCount")]
+        public async Task<BaseJosnRPCResponse> FindSyllabusVolumeAsync(JosnRPCRequest<Dictionary<string, object>> request)
+        {
+            //List<List<List<List<int>>>> allCount = new List<List<List<List<int>>>>();
+            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
+            List<School> sc = await azureCosmosDBRepository.FindByDict<School>(request.@params);
+            //查询校本所有册别数据
+            Dictionary<string, object> scMap = new Dictionary<string, object>
+            {
+                 { "status", 1}
+            };
+            List<SyllabusVolume> volumeo = await azureCosmosDBRepository.FindByDict<SyllabusVolume>(scMap);
+            List<List<List<int>>> sCount = new List<List<List<int>>>();
+            for (int i = 0; i < sc.Count; i++)
+            {
+                for (int j = 0; j < sc[i].period.Count; j++)
+                {
+                    List<List<int>> pCount = new List<List<int>>();
+                    for (int k = 0; k < sc[i].period[j].subjects.Count; k++)
+                    {
+                        List<int> listCount = new List<int>() { 0, 0 };
+                        //查询校本册别
+                        //计数校本数量
+                        int n = 0;
+                        int s = 0;
+                        for (int m = 0; m < volumeo.Count; m++) {
+                            if (volumeo[m].type == 0 && sc[i].schoolCode.Equals(volumeo[m].scopeCode) &&
+                                sc[i].period[j].periodCode.Equals(volumeo[m].periodCode) &&
+                                sc[i].period[j].subjects[k].subjectCode.Equals(volumeo[m].subjectCode))
+                            {
+                                n++;
+                            }
+                            if (volumeo[m].type == 1 && sc[i].schoolCode.Equals(volumeo[m].scopeCode) &&
+                                sc[i].period[j].periodCode.Equals(volumeo[m].periodCode) &&
+                                sc[i].period[j].subjects[k].subjectCode.Equals(volumeo[m].subjectCode)&& volumeo[m].TEAMModelId.Equals("habook#0001"))
+                            {
+                                s++;
+                            }
+                        }
+                        //册别数量
+                        listCount[0] = n;
+                        listCount[1] = s;
+                        pCount.Add(listCount);
+                    }
+                    sCount.Add(pCount);
+                }
+            }
+            return builder.Data(sCount).build();
+
+        }       
     }
 }