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+"'";
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+