main
黄海 1 year ago
parent 6dd18173c6
commit da0a2bbf03

@ -675,13 +675,13 @@ public class ZbdcController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
public void listSchool(int year, int check_type_id, int school_type_id, String keyword, int page, int limit) {
public void listSchool(int year, String area_id, int check_type_id, int school_type_id, String keyword, int page, int limit) {
if (year == 0) year = DateTime.now().year();//如果没有传入获取的年份,那么就是系统的默认当前年份
if (StrKit.isBlank(keyword)) keyword = "";
//上报单位ID
String bureau_id = SessionKit.get(getRequest(), getResponse(), "bureau_id");
Page<Record> list = zm.listSchool(year, bureau_id, check_type_id, school_type_id, keyword, page, limit);
Page<Record> list = zm.listSchool(year,area_id, bureau_id, check_type_id, school_type_id, keyword, page, limit);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
@ -734,6 +734,7 @@ public class ZbdcController extends Controller {
/**
*
*
* @param year
* @param area_id
*/

@ -1449,7 +1449,7 @@ public class ZbdcModel {
* @param limit
* @check_type_id int 1: 0 -1:
*/
public Page<Record> listSchool(int year, String bureau_id, int check_type_id, int school_type_id, String keyword, int page, int limit) {
public Page<Record> listSchool(int year, String area_id, String bureau_id, int check_type_id, int school_type_id, String keyword, int page, int limit) {
String Conditions;
if (check_type_id >= 0) {
Conditions = " and org_id in ";
@ -1461,12 +1461,22 @@ public class ZbdcModel {
//如果当前人员是长春市教育局的审核员
String sql;
if (bureau_id.equals("5CE95FA9-B866-473D-862F-55C813CCCA4C")) {
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.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;
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.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.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;
sql += Conditions;
}
} else {//县区审核员
sql = "select * from t_base_organization where org_id=?";
String area_id = Db.findFirst(sql, bureau_id).getStr("area_id");
area_id = Db.findFirst(sql, bureau_id).getStr("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.org_id=t1.bureau_id and t1.org_type_id=16 and t1.area_id='" + area_id +

Loading…
Cancel
Save