From 375a8a05f0ab97811beac5cbb4679c655088b358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Fri, 12 Jan 2024 13:11:29 +0800 Subject: [PATCH] 'commit' --- src/main/java/UnitTest/TestExportExcel.java | 8 ++- .../Collect/Controller/CollectController.java | 4 +- .../QingLong/Collect/Model/CollectModel.java | 55 +++++++++---------- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/main/java/UnitTest/TestExportExcel.java b/src/main/java/UnitTest/TestExportExcel.java index 1ccba284..db843bc5 100644 --- a/src/main/java/UnitTest/TestExportExcel.java +++ b/src/main/java/UnitTest/TestExportExcel.java @@ -26,7 +26,11 @@ public class TestExportExcel { String job_name = record.getStr("job_name"); int job_type = record.getInt("job_type");//任务类型:1:表单,2:EXCEL模板 String table_name = record.getStr("form_table_name");//表格名称 - - System.out.println("恭喜,所有操作成功完成!"); + if (job_type == 1) { + System.out.println(table_name); + System.out.println("恭喜,所有操作成功完成!"); + } else { + System.out.println("不是 Form填报任务,无法执行!"); + } } } \ No newline at end of file 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 d422fd44..2c275a51 100644 --- a/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java +++ b/src/main/java/com/dsideal/QingLong/Collect/Controller/CollectController.java @@ -715,7 +715,7 @@ public class CollectController extends Controller { @IsLoginInterface({}) @LayUiPageInfoInterface({"page", "limit"}) @EmptyInterface({"bureau_type_ids"}) - public void getBureauList(int query_type_id, String bureau_type_ids, int org_type_id, String org_name, int page, int limit) { + public void getBureauList(int query_type_id, String bureau_type_ids, String org_name, int page, int limit) { //操作人员 String person_id = SessionKit.get(getRequest(), getResponse(), "person_id"); //根据人员ID,获取人员所在的单位ID @@ -728,7 +728,7 @@ public class CollectController extends Controller { //0:查全市 //1:只查市直属 //2:查登录人员所在县区 - Page list = cm.getBureauList(query_type_id, bureau_type_ids, area_id, org_type_id, org_name, page, limit); + Page list = cm.getBureauList(query_type_id, bureau_type_ids, area_id, org_name, page, limit); renderJson(CommonUtil.renderJsonForLayUI(list)); } 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 b17bd120..1c271bc7 100644 --- a/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java +++ b/src/main/java/com/dsideal/QingLong/Collect/Model/CollectModel.java @@ -807,7 +807,7 @@ public class CollectModel { * @param org_type_id * @return */ - public Page getBureauList(int query_type_id, String bureau_type_ids, String area_id, int org_type_id, String org_name, int page, int limit) { + public Page getBureauList(int query_type_id, String bureau_type_ids, String area_id, String org_name, int page, int limit) { Kv kv = Kv.create(); //单位类型:1:教育局,2:学校,3:教辅单位 List bureau_type_list = Arrays.stream(bureau_type_ids.split(",")).toList(); @@ -835,28 +835,25 @@ public class CollectModel { org_type_id */ List OrgTypeList = new ArrayList<>(); - if (org_type_id != -1) OrgTypeList.add(org_type_id); - else { - if (query_type_id == 1) {//市 - for (String s : bureau_type_list) { - if (s.equals("1")) OrgTypeList.add(11);//县区教育局 - if (s.equals("2")) {//学校 - OrgTypeList.add(8); - OrgTypeList.add(9); - OrgTypeList.add(10); - } - if (s.equals("3")) OrgTypeList.add(5);//教辅单位 + if (query_type_id == 1) {//市 + for (String s : bureau_type_list) { + if (s.equals("1")) OrgTypeList.add(11);//县区教育局 + if (s.equals("2")) {//学校 + OrgTypeList.add(8); + OrgTypeList.add(9); + OrgTypeList.add(10); } - } else if (query_type_id == 2) {//区 - for (String s : bureau_type_list) { - if (s.equals("2")) {//学校 - OrgTypeList.add(15); - OrgTypeList.add(16); - } - if (s.equals("3")) { - OrgTypeList.add(12);//教辅单位 - OrgTypeList.add(14);//教辅单位 - } + if (s.equals("3")) OrgTypeList.add(5);//教辅单位 + } + } else if (query_type_id == 2) {//区 + for (String s : bureau_type_list) { + if (s.equals("2")) {//学校 + OrgTypeList.add(15); + OrgTypeList.add(16); + } + if (s.equals("3")) { + OrgTypeList.add(12);//教辅单位 + OrgTypeList.add(14);//教辅单位 } } } @@ -906,19 +903,19 @@ public class CollectModel { if (publish_job_type_id == 1) { if (xiaShuSchool == 1) { //query_type_id=1:只查市直属 - Page list = getBureauList(1, "2", null, 9, null, 1, 9999); + Page list = getBureauList(1, "2", null, null, 1, 9999); for (Record record : list.getList()) { bureauSet.add(record.getStr("org_id")); } } if (xiaShuJiaoFu == 1) { - Page list = getBureauList(1, "3", null, 5, null, 1, 9999); + Page list = getBureauList(1, "3", null, null, 1, 9999); for (Record record : list.getList()) { bureauSet.add(record.getStr("org_id")); } } if (xiaShuJiaoYuJu == 1) { - Page list = getBureauList(1, "1", null, 11, null, 1, 9999); + Page list = getBureauList(1, "1", null, null, 1, 9999); for (Record record : list.getList()) { bureauSet.add(record.getStr("org_id")); } @@ -928,13 +925,13 @@ public class CollectModel { else if (publish_job_type_id == 2) { if (xiaShuSchool == 1) { //query_type_id=2:查县区属 - Page list = getBureauList(2, "2", area_id, 9, null, 1, 9999); + Page list = getBureauList(2, "2", area_id, null, 1, 9999); for (Record record : list.getList()) { bureauSet.add(record.getStr("org_id")); } } if (xiaShuJiaoFu == 1) { - Page list = getBureauList(2, "3", area_id, 5, null, 1, 9999); + Page list = getBureauList(2, "3", area_id, null, 1, 9999); for (Record record : list.getList()) { bureauSet.add(record.getStr("org_id")); } @@ -1586,14 +1583,14 @@ public class CollectModel { //获取此县区的所有学校 Set targetSet = new HashSet<>(); if (xiaShuSchool == 1) { - Page list = getBureauList(2,"2", area_id, 16, null, 1, 9999); + Page list = getBureauList(2, "2", area_id, null, 1, 9999); for (Record record : list.getList()) { targetSet.add(record.getStr("org_id")); } } //获取此县区的所有教辅单位 if (xiaShuJiaoFu == 1) { - Page list = getBureauList(2,"3", area_id, 14, null, 1, 9999); + Page list = getBureauList(2, "3", area_id, null, 1, 9999); for (Record record : list.getList()) { targetSet.add(record.getStr("org_id")); }