From 7e5c34707b43165f937b4a6a02dee6d72592570c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Mon, 19 Aug 2024 16:41:02 +0800 Subject: [PATCH] 'commit' --- dsssoserver/.idea/workspace.xml | 119 ++++++++++++++++++ pom.xml | 2 +- src/main/java/com/dsideal/QingLong/Start.java | 15 +-- .../Zbdc/Controller/ZbdcController.java | 22 +++- .../QingLong/Zbdc/Model/ZbdcModel.java | 50 ++++++-- 5 files changed, 183 insertions(+), 25 deletions(-) create mode 100644 dsssoserver/.idea/workspace.xml diff --git a/dsssoserver/.idea/workspace.xml b/dsssoserver/.idea/workspace.xml new file mode 100644 index 00000000..d73898a9 --- /dev/null +++ b/dsssoserver/.idea/workspace.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + { + "associatedIndex": 5 +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1698113418566 + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 592fb2e0..047fef6b 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ com.jfinal jfinal - 5.1.9 + 5.2.1 diff --git a/src/main/java/com/dsideal/QingLong/Start.java b/src/main/java/com/dsideal/QingLong/Start.java index df977eda..ee2dc6c8 100644 --- a/src/main/java/com/dsideal/QingLong/Start.java +++ b/src/main/java/com/dsideal/QingLong/Start.java @@ -4,15 +4,12 @@ import cn.hutool.core.io.FileUtil; import com.dsideal.QingLong.Base.Controller.BaseController; import com.dsideal.QingLong.Classes.Controller.ClassController; import com.dsideal.QingLong.Collect.Controller.CollectController; -import com.dsideal.QingLong.Const.RedisKeyConst; import com.dsideal.QingLong.DataShare.Controller.DataShareController; -import com.dsideal.QingLong.DataShare.Model.DataShareModel; import com.dsideal.QingLong.Dm.Controller.DmController; import com.dsideal.QingLong.Global.Controller.GlobalController; import com.dsideal.QingLong.Gtzz.Controller.ExpertController; import com.dsideal.QingLong.Gtzz.Controller.GtzzController; import com.dsideal.QingLong.Gtzz.Controller.JianLiController; -import com.dsideal.QingLong.Gtzz.Model.RefreshTjWorker; import com.dsideal.QingLong.Handler.LoginHandler; import com.dsideal.QingLong.Handler.XssHandler; import com.dsideal.QingLong.Index.Controller.IndexController; @@ -27,11 +24,11 @@ import com.dsideal.QingLong.TeacherYd.Controller.TeacherYdController; import com.dsideal.QingLong.Util.CommonUtil; import com.dsideal.QingLong.Util.LogBackLogFactory; import com.dsideal.QingLong.Util.PkUtil; -import com.dsideal.QingLong.Util.RedisKit; import com.dsideal.QingLong.YunXiao.Controller.YunXiaoController; import com.dsideal.QingLong.Zbdc.Controller.ZbdcController; import com.dsideal.QingLong.Zjcq.Controller.ZjcqController; import com.jfinal.config.*; +import com.jfinal.kit.PathKit; import com.jfinal.kit.PropKit; import com.jfinal.kit.StrKit; import com.jfinal.plugin.activerecord.ActiveRecordPlugin; @@ -164,7 +161,7 @@ public class Start extends JFinalConfig { //遍历sql目录下所有的sql文件 File sqlDir; - String basePath = Start.class.getClassLoader().getResource(".").getPath(); + String basePath = PathKit.getRootClassPath(); sqlDir = new File(basePath + "/Sql"); File[] sqlFiles = sqlDir.listFiles(); for (File sqlFile : sqlFiles != null ? sqlFiles : new File[0]) { @@ -181,14 +178,6 @@ public class Start extends JFinalConfig { RedisPlugin redis = new RedisPlugin("Redis", PropKit.get("redis_ip"), PropKit.getInt("redis_port"), 10 * 1000); //启动redis组件 me.add(redis); - - // 用于缓存模块的pika服务(用于大数量数据REDIS会爆掉的那种key value数据库,持久化) - // 非必选项,可以在配置文件中注释掉 - if (!StrKit.isBlank(PropKit.get("pika_ip")) && !StrKit.isBlank(PropKit.get("pika_port"))) { - RedisPlugin pika = new RedisPlugin("Pika", PropKit.get("pika_ip"), PropKit.getInt("pika_port"), 10 * 1000); - //启动pika组件 - me.add(pika); - } } /** diff --git a/src/main/java/com/dsideal/QingLong/Zbdc/Controller/ZbdcController.java b/src/main/java/com/dsideal/QingLong/Zbdc/Controller/ZbdcController.java index 28a149e0..d7fb9073 100644 --- a/src/main/java/com/dsideal/QingLong/Zbdc/Controller/ZbdcController.java +++ b/src/main/java/com/dsideal/QingLong/Zbdc/Controller/ZbdcController.java @@ -356,6 +356,12 @@ public class ZbdcController extends Controller { int cz_hxzbrshshu = 0, cz_hxtgsmjshshu = 0;//实验室,仪器室,准备室,探究实验室 float cz_hxsysmj = 0, cz_hxyqsmj = 0; float cz_hxzbrsmj = 0, cz_hxtgsmjmj = 0; + //药品室个数与药品室面积 + int cz_hxypsshu = 0, cz_swypsshu = 0; + int gz_hxypsshu = 0, gz_swypsshu = 0; + float cz_hxypsmj = 0, cz_swypsmj = 0; + float gz_hxypsmj = 0, gz_swypsmj = 0; + if (!StrKit.isBlank(cz_hx)) { //初中化学 cz_hx = Base64.decodeStr(cz_hx).replace("\n", ""); @@ -368,6 +374,8 @@ public class ZbdcController extends Controller { cz_hxyqsmj = res.getFloat("qqrsmj"); cz_hxzbrsmj = res.getFloat("zbrsmj"); cz_hxtgsmjmj = res.getFloat("tgsmjmj"); + cz_hxypsshu = res.getInt("ypsshu");//药品室个数 + cz_hxypsmj = res.getFloat("ypsmj");//药品室面积 } //初中生物 int cz_swlshshshu = 0, cz_swyqshshu = 0; @@ -386,6 +394,8 @@ public class ZbdcController extends Controller { cz_swzbrsmj = res.getFloat("qqrsmj"); cz_swlsmj = res.getFloat("zbrsmj"); cz_swyqsmj = res.getFloat("tgsmjmj"); + cz_swypsshu = res.getInt("ypsshu");//药品室个数 + cz_swypsmj = res.getFloat("ypsmj");//药品室面积 } //初中音乐 int cz_yqjtrshshu = 0; @@ -446,6 +456,8 @@ public class ZbdcController extends Controller { gz_hxyqsmj = res.getFloat("qqrsmj"); gz_hxzbrsmj = res.getFloat("zbrsmj"); gz_hxtgsmjmj = res.getFloat("tgsmjmj"); + gz_hxypsshu = res.getInt("ypsshu");//药品室个数 + gz_hxypsmj = res.getFloat("ypsmj");//药品室面积 } //高中生物 @@ -465,6 +477,8 @@ public class ZbdcController extends Controller { gz_swzbrsmj = res.getFloat("qqrsmj"); gz_swlsmj = res.getFloat("zbrsmj"); gz_swyqsmj = res.getFloat("tgsmjmj"); + gz_swypsshu = res.getInt("ypsshu");//药品室个数 + gz_swypsmj = res.getFloat("ypsmj");//药品室面积 } //高中音乐 int gz_yqjtrshshu = 0; @@ -542,7 +556,11 @@ public class ZbdcController extends Controller { cz_wl, cz_hx, cz_sw, cz_yq, cz_ms, gz_wl, gz_hx, gz_sw, gz_yq, gz_ms, xx_ldjy, cz_ldjy, xx_ldjy_values, cz_ldjy_values, - xx_ck, cz_ck, gz_ck + xx_ck, cz_ck, gz_ck, + cz_hxypsshu, cz_hxypsmj, + gz_hxypsshu, gz_hxypsmj, + cz_swypsshu, cz_swypsmj, + gz_swypsshu, gz_swypsmj ); Kv kv = Kv.create(); kv.set("success", true); @@ -1116,7 +1134,7 @@ public class ZbdcController extends Controller { Record orgBean = bm.getOrgInfoById(bureau_id); String city_id = orgBean.getStr("city_id"); - Page list = zm.listSchool(city_id,year, area_id, check_type_id, bureau_id, school_type_id, keyword, page, limit); + Page list = zm.listSchool(city_id, year, area_id, check_type_id, bureau_id, school_type_id, keyword, page, limit); renderJson(CommonUtil.renderJsonForLayUI(list)); } diff --git a/src/main/java/com/dsideal/QingLong/Zbdc/Model/ZbdcModel.java b/src/main/java/com/dsideal/QingLong/Zbdc/Model/ZbdcModel.java index 6c7a21cf..0f49bfb8 100644 --- a/src/main/java/com/dsideal/QingLong/Zbdc/Model/ZbdcModel.java +++ b/src/main/java/com/dsideal/QingLong/Zbdc/Model/ZbdcModel.java @@ -311,7 +311,11 @@ public class ZbdcModel { String gz_wl, String gz_hx, String gz_sw, String gz_yq, String gz_ms, String xx_ldjy, String cz_ldjy, String xx_ldjy_values, String cz_ldjy_values, - String xx_ck, String cz_ck, String gz_ck + String xx_ck, String cz_ck, String gz_ck, + int cz_hxypsshu, float cz_hxypsmj, + int gz_hxypsshu, float gz_hxypsmj, + int cz_swypsshu, float cz_swypsmj, + int gz_swypsshu, float gz_swypsmj ) { String sql = "select * from t_zbdc_bureau_cgzb where year=? and bureau_id=?"; Record record = Db.findFirst(sql, year, bureau_id); @@ -481,6 +485,14 @@ public class ZbdcModel { r.set("cz_ldjy", cz_ldjy);//初中劳动教育 r.set("cz_ldjy_values", cz_ldjy_values);//初中劳动教育的每个SELECT下拉框默认值 r.set("cz_ck", cz_ck);// 初中创客 + + //初中化学药品室相关参数 + r.set("cz_hxypsshu", cz_hxypsshu); + r.set("cz_hyypsmj", cz_hxypsmj); + + //初中生物药品室相关参数 + r.set("gz_hxypsshu", gz_hxypsshu); + r.set("gz_hyypsmj", gz_hxypsmj); } if (stage_id == 6) { @@ -563,6 +575,14 @@ public class ZbdcModel { r.set("gz_hjddjzgnqshu", gz_hjddjzgnqshu); // 高中护眼灯已改造功能室数量 r.set("gz_hjddwjzgnqshu", gz_hjddwjzgnqshu); // 高中护眼灯未改造功能室数量 r.set("gz_ck", gz_ck);//创客 + + //高中化学药品室相关参数 + r.set("gz_hxypsshu", gz_hxypsshu); + r.set("gz_hxypsmj", gz_hxypsmj); + + //高中生物药品室相关参数 + r.set("gz_swypsshu", gz_swypsshu); + r.set("gz_swypsmj", gz_swypsmj); } if (!StrKit.isBlank(xx_kx)) r.set("xx_kx", xx_kx); @@ -880,7 +900,8 @@ public class ZbdcModel { 0, 0, 0, 0, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null, null, null, + 0,0,0,0,0,0,0,0); } sql = "select km_code,km_name from t_zbdc_templet where templet_id=?"; @@ -2368,17 +2389,17 @@ public class ZbdcModel { * @param limit * @check_type_id int 0:待上报,1:已通过 2:待审核, -1:已退回,3:退回已提交,-2:全部 */ - public Page listSchool(String city_id,int year, String area_id, int check_type_id, String bureau_id, int school_type_id, String keyword, int page, int limit) { + public Page listSchool(String city_id, int year, String area_id, int check_type_id, String bureau_id, int school_type_id, String keyword, int page, int limit) { String Conditions = ""; if (check_type_id != -2) { if (check_type_id != 0) { if (check_type_id != 3) { - Conditions = " and org_id in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + " and check_type_id=" + check_type_id + ") and city_id='"+city_id+"'"; + Conditions = " and org_id in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + " and check_type_id=" + check_type_id + ") and city_id='" + city_id + "'"; } else {//退回已提交 - Conditions = " and org_id in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + " and check_type_id=2 and is_tuihui_commit=1) and city_id='"+city_id+"'"; + Conditions = " and org_id in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + " and check_type_id=2 and is_tuihui_commit=1) and city_id='" + city_id + "'"; } } else { - Conditions = " and org_id not in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + ") and city_id='"+city_id+"'"; + Conditions = " and org_id not in (select bureau_id from t_zbdc_report where b_use=1 and year=" + year + ") and city_id='" + city_id + "'"; } } @@ -2386,12 +2407,12 @@ public class ZbdcModel { String sql; if (bureau_id.equals(PropKit.get("ZhuangBeiCenterId"))) { if (StrKit.isBlank(area_id) || area_id.equals("0")) { - sql = "from t_base_organization as t1 inner join t_dm_schooltype as t2 on t1.school_type_id=t2.school_type_id where t1.city_id='"+city_id+"' and t1.org_id=t1.bureau_id and t1.org_type_id=9 and t1.org_name like '%" + keyword + "%' "; + sql = "from t_base_organization as t1 inner join t_dm_schooltype as t2 on t1.school_type_id=t2.school_type_id where t1.city_id='" + city_id + "' and t1.org_id=t1.bureau_id and t1.org_type_id=9 and t1.org_name like '%" + keyword + "%' "; if (school_type_id > 0) sql += " and t1.school_type_id=" + school_type_id; sql += Conditions; } else { // 市查指定区县的 - sql = "from t_base_organization as t1 inner join t_dm_schooltype as t2 on t1.school_type_id=t2.school_type_id where t1.city_id='"+city_id+"' and t1.org_id=t1.bureau_id and t1.org_type_id=16 and t1.area_id='" + area_id + + sql = "from t_base_organization as t1 inner join t_dm_schooltype as t2 on t1.school_type_id=t2.school_type_id where t1.city_id='" + city_id + "' and t1.org_id=t1.bureau_id and t1.org_type_id=16 and t1.area_id='" + area_id + "' and t1.org_name like '%" + keyword + "%' "; if (school_type_id > 0) sql += "and t1.school_type_id=" + school_type_id; @@ -2686,7 +2707,8 @@ public class ZbdcModel { } /** - * 功能:1、将某个学校的某一学段科目的数据解析出来,并且详细信息记录到数据库中 + * 功能: + * 1、将某个学校的某一学段科目的数据解析出来,并且详细信息记录到数据库中 * 2、同时,将统计信息合并,返回给调用者,让调用者保存到主表中去 * * @param html @@ -2718,6 +2740,11 @@ public class ZbdcModel { int sysshshu = 0, qqrshshu = 0, zbrshshu = 0, fsjtrshu = 0, jtrshu = 0, tgsmjshu = 0; double sysmj = 0, qqrsmj = 0, zbrsmj = 0, fsjtrmj = 0, jtrmj = 0, tgsmjmj = 0; + //需要在化学和生物中增加药品室面积 + double ypsmj = 0; + int ypsshu = 0; + + Document doc = Jsoup.parseBodyFragment(html); Element body = doc.body(); Elements elements = body.getAllElements().getFirst().getElementsByTag("input"); @@ -2783,6 +2810,9 @@ public class ZbdcModel { } else if (prefix.substring(5).startsWith("jtr")) {//普通教室 jtrshu++; //普通教室 jtrmj += mj;//面积 + } else if (prefix.substring(5).startsWith("yps")) {//药品室面积 + ypsshu++;//药品室个数 + ypsmj += mj;//面积 } else { tgsmjshu++; //探究实验室 tgsmjmj += mj; @@ -2822,6 +2852,8 @@ public class ZbdcModel { record.set("fsjtrmj", fsjtrmj);//书法教室总面积 record.set("jtrmj", jtrmj);//普通教室总面积 record.set("tgsmjmj", tgsmjmj);//探究实验室总面积 + record.set("ypsmj", ypsmj);//药品室面积 + record.set("ypsshu", ypsshu);//药品室个数 return record; }