main
黄海 1 year ago
parent 1482b99fc2
commit cc32b9badf

@ -1112,8 +1112,11 @@ public class ZbdcController extends Controller {
if (StrKit.isBlank(keyword)) keyword = "";
//上报单位ID
String bureau_id = SessionKit.get(getRequest(), getResponse(), "bureau_id");
BaseModel bm = new BaseModel();
Record orgBean = bm.getOrgInfoById(bureau_id);
String city_id = orgBean.getStr("city_id");
Page<Record> list = zm.listSchool(year, area_id, check_type_id, bureau_id, school_type_id, keyword, page, limit);
Page<Record> list = zm.listSchool(city_id,year, area_id, check_type_id, bureau_id, school_type_id, keyword, page, limit);
renderJson(CommonUtil.renderJsonForLayUI(list));
}

@ -2368,17 +2368,17 @@ public class ZbdcModel {
* @param limit
* @check_type_id int 0:,1: 2: -1:退,3:退,-2:
*/
public Page<Record> listSchool(int year, String area_id, int check_type_id, String bureau_id, int school_type_id, String keyword, int page, int limit) {
public Page<Record> 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 + ")";
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)";
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 + ")";
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 +2386,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.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.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;
@ -2409,6 +2409,7 @@ public class ZbdcModel {
sql += "and t1.school_type_id=" + school_type_id;
sql += Conditions;
}
System.out.println("======sql:==="+"select t1.*,t2.school_type_name "+sql);
Page<Record> p = Db.paginate(page, limit, "select t1.*,t2.school_type_name ", sql);
//是不是已提交

Loading…
Cancel
Save