kgdxpr 2 years ago
commit 5cff60d152

@ -699,13 +699,23 @@ public class CollectController extends Controller {
/**
*
* query_type_id
* 0:
* 1:
* 2:
*
* bureau_type_ids
*
* 1:
* 2
* 3
* @return
*/
@Before({GET.class})
@IsLoginInterface({})
@LayUiPageInfoInterface({"page", "limit"})
public void getBureauList(int org_type_id, String org_name, int page, int limit, int query_type_id, int exclude_self) {
@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) {
//操作人员
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
//根据人员ID获取人员所在的单位ID
@ -718,7 +728,7 @@ public class CollectController extends Controller {
//0:查全市
//1:只查市直属
//2:查登录人员所在县区
Page<Record> list = cm.getBureauList(query_type_id, area_id, org_type_id, org_name, exclude_self, bureau_id, page, limit);
Page<Record> list = cm.getBureauList(query_type_id, bureau_type_ids, area_id, org_type_id, org_name, page, limit);
renderJson(CommonUtil.renderJsonForLayUI(list));
}

@ -799,12 +799,18 @@ public class CollectModel {
/**
*
* query_type_id:
* 0:
* 1:
* 2:
*
* @param org_type_id
* @return
*/
public Page<Record> getBureauList(int query_type_id, String area_id, int org_type_id, String org_name, int exclude_self, String bureau_id, int page, int limit) {
public Page<Record> getBureauList(int query_type_id, String bureau_type_ids, String area_id, int org_type_id, String org_name, int page, int limit) {
Kv kv = Kv.create();
//单位类型1:教育局2学校3教辅单位
List<String> bureau_type_list = Arrays.stream(bureau_type_ids.split(",")).toList();
//默认查全市
GlobalModel gm = new GlobalModel();
@ -815,42 +821,46 @@ public class CollectModel {
kv.set("area_id", area_id);
}
/*
5
8
9
10
11
12
14
15
16
query_type_id:
0:
1:
2:
4
5
8
9
10
11
12
14
15
16
org_type_id
*/
List<Integer> OrgTypeList = new ArrayList<>();
if (org_type_id != -1) OrgTypeList.add(org_type_id);
else {
if (query_type_id == 1) {
OrgTypeList.add(5);
OrgTypeList.add(8);
OrgTypeList.add(9);
OrgTypeList.add(10);
OrgTypeList.add(11);
} else if (query_type_id == 2) {
OrgTypeList.add(12);
OrgTypeList.add(14);
OrgTypeList.add(15);
OrgTypeList.add(16);
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);//教辅单位
}
} 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 (OrgTypeList.size() > 0) kv.set("OrgTypeList", OrgTypeList);
if (exclude_self == 1) kv.set("bureau_id", bureau_id);
if (!StrKit.isBlank(org_name)) kv.set("org_name", org_name);
SqlPara sqlPara = Db.getSqlPara("Collect.getBureauList", kv);
Page<Record> pageRecord = Db.paginate(page, limit, sqlPara);
@ -896,19 +906,19 @@ public class CollectModel {
if (publish_job_type_id == 1) {
if (xiaShuSchool == 1) {
//query_type_id=1:只查市直属
Page<Record> list = getBureauList(1, null, 9, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(1, "2", null, 9, null, 1, 9999);
for (Record record : list.getList()) {
bureauSet.add(record.getStr("org_id"));
}
}
if (xiaShuJiaoFu == 1) {
Page<Record> list = getBureauList(1, null, 5, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(1, "3", null, 5, null, 1, 9999);
for (Record record : list.getList()) {
bureauSet.add(record.getStr("org_id"));
}
}
if (xiaShuJiaoYuJu == 1) {
Page<Record> list = getBureauList(1, null, 11, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(1, "1", null, 11, null, 1, 9999);
for (Record record : list.getList()) {
bureauSet.add(record.getStr("org_id"));
}
@ -918,13 +928,13 @@ public class CollectModel {
else if (publish_job_type_id == 2) {
if (xiaShuSchool == 1) {
//query_type_id=2:查县区属
Page<Record> list = getBureauList(2, area_id, 9, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(2, "2", area_id, 9, null, 1, 9999);
for (Record record : list.getList()) {
bureauSet.add(record.getStr("org_id"));
}
}
if (xiaShuJiaoFu == 1) {
Page<Record> list = getBureauList(2, area_id, 5, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(2, "3", area_id, 5, null, 1, 9999);
for (Record record : list.getList()) {
bureauSet.add(record.getStr("org_id"));
}
@ -1576,14 +1586,14 @@ public class CollectModel {
//获取此县区的所有学校
Set<String> targetSet = new HashSet<>();
if (xiaShuSchool == 1) {
Page<Record> list = getBureauList(2, area_id, 16, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(2,"2", area_id, 16, null, 1, 9999);
for (Record record : list.getList()) {
targetSet.add(record.getStr("org_id"));
}
}
//获取此县区的所有教辅单位
if (xiaShuJiaoFu == 1) {
Page<Record> list = getBureauList(2, area_id, 14, null, 0, null, 1, 9999);
Page<Record> list = getBureauList(2,"3", area_id, 14, null, 1, 9999);
for (Record record : list.getList()) {
targetSet.add(record.getStr("org_id"));
}

@ -34,9 +34,6 @@
#if(area_id)
and area_id=#para(area_id)
#end
#if(bureau_id)
and org_id<>#para(bureau_id)
#end
#if(OrgTypeList)
and org_type_id in #para(OrgTypeList, "in")
#end

Loading…
Cancel
Save