diff --git a/WebRoot/Excel/69dd7d73-1179-4b2a-9dd4-574244895122.xlsx b/WebRoot/Excel/69dd7d73-1179-4b2a-9dd4-574244895122.xlsx new file mode 100644 index 00000000..ac686d31 Binary files /dev/null and b/WebRoot/Excel/69dd7d73-1179-4b2a-9dd4-574244895122.xlsx differ diff --git a/src/main/java/UnitTest/Swdt/Swdt.html b/src/main/java/UnitTest/Swdt/Swdt.html index 036f6ce2..83250cd6 100644 --- a/src/main/java/UnitTest/Swdt/Swdt.html +++ b/src/main/java/UnitTest/Swdt/Swdt.html @@ -62,6 +62,6 @@ a { (getOptions || markmap.deriveOptions)(jsonOptions), root2 ); - })(() => window.markmap,null,{"content":"初中物理八年级上(人教版)","children":[{"content":"
第一章  机械运动 99+
","children":[{"content":"
第1节 长度和时间的测... 11
","children":[{"content":"
第2节 运动的描述 80
","children":[{"content":"
第3节 运动的快慢 23
","children":[],"payload":{"lines":"4,5"}}],"payload":{"lines":"3,4"}}],"payload":{"lines":"2,3"}},{"content":"
第4节 测量平均速度 20
","children":[{"content":"
本章复习 67
","children":[],"payload":{"lines":"6,7"}}],"payload":{"lines":"5,6"}}],"payload":{"lines":"1,2"}},{"content":"
第二章  声现象 99+
","children":[{"content":"
第1节 声音的产生与传... 57
","children":[{"content":"
第2节 声音的特性 17
","children":[{"content":"
第3节 声的利用 36
","children":[],"payload":{"lines":"11,12"}}],"payload":{"lines":"10,11"}}],"payload":{"lines":"9,10"}},{"content":"
第4节 噪音的危害和控... 9
","children":[{"content":"
本章复习 51
","children":[],"payload":{"lines":"13,14"}}],"payload":{"lines":"12,13"}}],"payload":{"lines":"8,9"}},{"content":"
第三章  物态变化 99+
","children":[{"content":"
第1节 温度 28
","children":[{"content":"
第2节 熔化和凝固 87
","children":[{"content":"
第3节 汽化和液化 14
","children":[],"payload":{"lines":"18,19"}}],"payload":{"lines":"17,18"}}],"payload":{"lines":"16,17"}},{"content":"
第4节 升华和凝华 44
","children":[{"content":"
本章复习 10
","children":[],"payload":{"lines":"20,21"}}],"payload":{"lines":"19,20"}}],"payload":{"lines":"15,16"}},{"content":"
第四章  光现象 99+
","children":[{"content":"
第1节 光的直线传播 96
","children":[{"content":"
第2节 光的反射 36
","children":[{"content":"
第3节 平面镜成像 86
","children":[],"payload":{"lines":"25,26"}}],"payload":{"lines":"24,25"}}],"payload":{"lines":"23,24"}},{"content":"
第4节 光的折射 74
","children":[{"content":"
第5节 光的色散 19
","children":[{"content":"
本章复习 28
","children":[],"payload":{"lines":"28,29"}}],"payload":{"lines":"27,28"}}],"payload":{"lines":"26,27"}}],"payload":{"lines":"22,23"}},{"content":"
第五章  透镜及其应用 99+
","children":[{"content":"
第1节 透镜 95
","children":[{"content":"
第2节 生活中的透镜 12
","children":[{"content":"
第3节 凸透镜成像的规... 42
","children":[],"payload":{"lines":"33,34"}}],"payload":{"lines":"32,33"}}],"payload":{"lines":"31,32"}},{"content":"
第4节 眼睛和眼镜 86
","children":[{"content":"
第5节 显微镜和望远镜 29
","children":[{"content":"
本章复习 79
","children":[],"payload":{"lines":"36,37"}}],"payload":{"lines":"35,36"}}],"payload":{"lines":"34,35"}}],"payload":{"lines":"30,31"}},{"content":"
第六章  质量与密度 99+
","children":[{"content":"
第1节 质量 6
","children":[{"content":"
第2节 密度 9
","children":[{"content":"
第3节 测量物质的密度 49
","children":[],"payload":{"lines":"41,42"}}],"payload":{"lines":"40,41"}}],"payload":{"lines":"39,40"}},{"content":"
第4节 密度与社会生活 55
","children":[{"content":"
本章复习 2
","children":[],"payload":{"lines":"43,44"}}],"payload":{"lines":"42,43"}}],"payload":{"lines":"38,39"}},{"content":"
期中复习 99+
","children":[],"payload":{"lines":"45,46"}},{"content":"
期末复习 99+
","children":[],"payload":{"lines":"47,48"}},{"content":"
本册复习 99+
","children":[],"payload":{"lines":"49,50"}}],"payload":{"lines":"0,1"}},null) + })(() => window.markmap,null,{"content":"初中物理八年级上(人教版)","children":[{"content":"
第一章  机械运动 99+
","children":[{"content":"
第1节 长度和时间的测... 59
","children":[{"content":"
第2节 运动的描述 83
","children":[{"content":"
第3节 运动的快慢 91
","children":[],"payload":{"lines":"4,5"}}],"payload":{"lines":"3,4"}}],"payload":{"lines":"2,3"}},{"content":"
第4节 测量平均速度 10
","children":[{"content":"
本章复习 21
","children":[],"payload":{"lines":"6,7"}}],"payload":{"lines":"5,6"}}],"payload":{"lines":"1,2"}},{"content":"
第二章  声现象 99+
","children":[{"content":"
第1节 声音的产生与传... 85
","children":[{"content":"
第2节 声音的特性 58
","children":[{"content":"
第3节 声的利用 62
","children":[],"payload":{"lines":"11,12"}}],"payload":{"lines":"10,11"}}],"payload":{"lines":"9,10"}},{"content":"
第4节 噪音的危害和控... 81
","children":[{"content":"
本章复习 19
","children":[],"payload":{"lines":"13,14"}}],"payload":{"lines":"12,13"}}],"payload":{"lines":"8,9"}},{"content":"
第三章  物态变化 99+
","children":[{"content":"
第1节 温度 69
","children":[{"content":"
第2节 熔化和凝固 57
","children":[{"content":"
第3节 汽化和液化 11
","children":[],"payload":{"lines":"18,19"}}],"payload":{"lines":"17,18"}}],"payload":{"lines":"16,17"}},{"content":"
第4节 升华和凝华 98
","children":[{"content":"
本章复习 51
","children":[],"payload":{"lines":"20,21"}}],"payload":{"lines":"19,20"}}],"payload":{"lines":"15,16"}},{"content":"
第四章  光现象 99+
","children":[{"content":"
第1节 光的直线传播 49
","children":[{"content":"
第2节 光的反射 57
","children":[{"content":"
第3节 平面镜成像 89
","children":[],"payload":{"lines":"25,26"}}],"payload":{"lines":"24,25"}}],"payload":{"lines":"23,24"}},{"content":"
第4节 光的折射 83
","children":[{"content":"
第5节 光的色散 88
","children":[{"content":"
本章复习 36
","children":[],"payload":{"lines":"28,29"}}],"payload":{"lines":"27,28"}}],"payload":{"lines":"26,27"}}],"payload":{"lines":"22,23"}},{"content":"
第五章  透镜及其应用 99+
","children":[{"content":"
第1节 透镜 41
","children":[{"content":"
第2节 生活中的透镜 71
","children":[{"content":"
第3节 凸透镜成像的规... 9
","children":[],"payload":{"lines":"33,34"}}],"payload":{"lines":"32,33"}}],"payload":{"lines":"31,32"}},{"content":"
第4节 眼睛和眼镜 84
","children":[{"content":"
第5节 显微镜和望远镜 97
","children":[{"content":"
本章复习 73
","children":[],"payload":{"lines":"36,37"}}],"payload":{"lines":"35,36"}}],"payload":{"lines":"34,35"}}],"payload":{"lines":"30,31"}},{"content":"
第六章  质量与密度 99+
","children":[{"content":"
第1节 质量 45
","children":[{"content":"
第2节 密度 58
","children":[{"content":"
第3节 测量物质的密度 17
","children":[],"payload":{"lines":"41,42"}}],"payload":{"lines":"40,41"}}],"payload":{"lines":"39,40"}},{"content":"
第4节 密度与社会生活 94
","children":[{"content":"
本章复习 53
","children":[],"payload":{"lines":"43,44"}}],"payload":{"lines":"42,43"}}],"payload":{"lines":"38,39"}},{"content":"
期中复习 99+
","children":[],"payload":{"lines":"45,46"}},{"content":"
期末复习 99+
","children":[],"payload":{"lines":"47,48"}},{"content":"
本册复习 99+
","children":[],"payload":{"lines":"49,50"}}],"payload":{"lines":"0,1"}},null) diff --git a/src/main/java/UnitTest/Swdt/Swdt.md b/src/main/java/UnitTest/Swdt/Swdt.md index 2cddb375..937a2609 100644 --- a/src/main/java/UnitTest/Swdt/Swdt.md +++ b/src/main/java/UnitTest/Swdt/Swdt.md @@ -1,51 +1,51 @@ # 初中物理八年级上(人教版) -##
第一章  机械运动 99+
-###
第1节 长度和时间的测... 11
-####
第2节 运动的描述 80
-#####
第3节 运动的快慢 23
-###
第4节 测量平均速度 20
-####
本章复习 67
- -##
第二章  声现象 99+
-###
第1节 声音的产生与传... 57
-####
第2节 声音的特性 17
-#####
第3节 声的利用 36
-###
第4节 噪音的危害和控... 9
-####
本章复习 51
- -##
第三章  物态变化 99+
-###
第1节 温度 28
-####
第2节 熔化和凝固 87
-#####
第3节 汽化和液化 14
-###
第4节 升华和凝华 44
-####
本章复习 10
- -##
第四章  光现象 99+
-###
第1节 光的直线传播 96
-####
第2节 光的反射 36
-#####
第3节 平面镜成像 86
-###
第4节 光的折射 74
-####
第5节 光的色散 19
-#####
本章复习 28
- -##
第五章  透镜及其应用 99+
-###
第1节 透镜 95
-####
第2节 生活中的透镜 12
-#####
第3节 凸透镜成像的规... 42
-###
第4节 眼睛和眼镜 86
-####
第5节 显微镜和望远镜 29
-#####
本章复习 79
- -##
第六章  质量与密度 99+
-###
第1节 质量 6
-####
第2节 密度 9
-#####
第3节 测量物质的密度 49
-###
第4节 密度与社会生活 55
-####
本章复习 2
- -##
期中复习 99+
- -##
期末复习 99+
- -##
本册复习 99+
+##
第一章  机械运动 99+
+###
第1节 长度和时间的测... 59
+####
第2节 运动的描述 83
+#####
第3节 运动的快慢 91
+###
第4节 测量平均速度 10
+####
本章复习 21
+ +##
第二章  声现象 99+
+###
第1节 声音的产生与传... 85
+####
第2节 声音的特性 58
+#####
第3节 声的利用 62
+###
第4节 噪音的危害和控... 81
+####
本章复习 19
+ +##
第三章  物态变化 99+
+###
第1节 温度 69
+####
第2节 熔化和凝固 57
+#####
第3节 汽化和液化 11
+###
第4节 升华和凝华 98
+####
本章复习 51
+ +##
第四章  光现象 99+
+###
第1节 光的直线传播 49
+####
第2节 光的反射 57
+#####
第3节 平面镜成像 89
+###
第4节 光的折射 83
+####
第5节 光的色散 88
+#####
本章复习 36
+ +##
第五章  透镜及其应用 99+
+###
第1节 透镜 41
+####
第2节 生活中的透镜 71
+#####
第3节 凸透镜成像的规... 9
+###
第4节 眼睛和眼镜 84
+####
第5节 显微镜和望远镜 97
+#####
本章复习 73
+ +##
第六章  质量与密度 99+
+###
第1节 质量 45
+####
第2节 密度 58
+#####
第3节 测量物质的密度 17
+###
第4节 密度与社会生活 94
+####
本章复习 53
+ +##
期中复习 99+
+ +##
期末复习 99+
+ +##
本册复习 99+
diff --git a/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java b/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java index 61de5cc1..e9d6446f 100644 --- a/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java +++ b/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java @@ -1818,7 +1818,7 @@ public class CollectController extends Controller { JSONObject jo = JSONObject.parseObject(json); for (Map.Entry entry : jo.entrySet()) { String key = entry.getKey(); - if(key.startsWith("checkbox")) continue; + if (key.startsWith("checkbox")) continue; int data_type_id = _map.get(key); String value = entry.getValue().toString(); switch (data_type_id) { @@ -2163,5 +2163,17 @@ public class CollectController extends Controller { kv.set("is_third_party", cm.IS_THIRD_PARTY()); renderJson(kv); } + + /** + * 功能:更新Excel中Sheet表与学段的对应关系 + */ + @Before({POST.class}) + @IsLoginInterface({}) + public void updateSheetStage(int job_id, int sheet_index, int stage_id) { + cm.updateSheetStage(job_id, sheet_index, stage_id); + Kv kv = Kv.by("success", true); + kv.set("message", "保存成功!"); + renderJson(kv); + } } diff --git a/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java b/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java index bc3b1dcb..cfe95585 100644 --- a/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java +++ b/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java @@ -19,6 +19,7 @@ import com.hankcs.hanlp.seg.common.Term; import com.hankcs.hanlp.tokenizer.StandardTokenizer; import com.jfinal.aop.Before; import com.jfinal.ext.interceptor.GET; +import com.jfinal.ext.interceptor.POST; import com.jfinal.kit.Kv; import com.jfinal.kit.PropKit; import com.jfinal.kit.StrKit; @@ -148,6 +149,16 @@ public class CollectModel { } Db.batchSave("t_collect_job_sheet_col", writeList, 100); + //2024-04-07 增加模板中SHEET表与学段的初始化默认关系数据 + String sql = "delete from t_collect_sheet_stage where job_id=?"; //先删除一下,万无一失 + Db.update(sql, job_id); + for (Kv kv : kvList) { + int sheet_index = kv.getInt("sheet_index"); + sql = "insert into t_collect_sheet_stage(job_id,sheet_index,stage_id) values(?,?,?)"; + Db.update(sql, job_id, sheet_index, 4);//小学 + Db.update(sql, job_id, sheet_index, 5);//初中 + Db.update(sql, job_id, sheet_index, 6);//高中 + } return job_id; } @@ -3084,4 +3095,40 @@ public class CollectModel { String sql = "select * from t_base_organization where third_party_id=?"; return Db.findFirst(sql, bureau_id); } + + /** + * 功能:根据传入的学校ID,获取它有哪些学段 + * + * @param org_id + * @return 时间:2024-04-07 + */ + public List getSchoolStage(String org_id) { + String sql = "select school_type_id from t_base_organization as t1 where t1.org_id=?"; + int school_type_id = Db.queryInt(sql, org_id); + List stage_ids = new ArrayList<>(); + //如果不是学校,那么默认是全部保留 + if (school_type_id == -1) { + stage_ids.add(4); + stage_ids.add(5); + stage_ids.add(6); + return stage_ids; + } + sql = "select t1.stage_id,t2.stage_name,t1.school_type_id,t3.school_type_name from t_dm_schooltype_stage as t1 inner join t_dm_stage as t2 on t1.stage_id=t2.stage_id inner join t_dm_schooltype as t3 on t1.school_type_id=t3.school_type_id where t1.stage_id>=4 and t1.stage_id<=6 and t1.school_type_id=? order by t1.stage_id"; + List list = Db.find(sql, school_type_id); + + for (Record record : list) { + stage_ids.add(record.getInt("stage_id")); + } + return stage_ids; + } + + /** + * 功能:更新Excel中Sheet表与学段的对应关系 + */ + public void updateSheetStage(int job_id, int sheet_index, int stage_id) { + String sql = "delete from t_collect_sheet_stage where job_id=? and sheet_index=?"; + Db.update(sql, job_id, sheet_index); + sql = "insert into t_collect_sheet_stage(job_id,sheet_index,stage_id) values(?,?,?)"; + Db.update(sql, job_id, sheet_index, stage_id); + } } \ No newline at end of file