main
黄海 7 months ago
parent 996a044594
commit 30bb4f891e

@ -14,6 +14,7 @@ import com.jfinal.ext.interceptor.POST;
import com.jfinal.kit.Kv;
import com.jfinal.kit.PropKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.ext.interceptor.GET;
import com.jfinal.kit.StrKit;
@ -123,4 +124,27 @@ public class MaxKbController extends Controller {
//提供下载
renderFile(new File(tmpFile), gather_regionc + "统计报表.xlsx");
}
/**
* ,
*/
// http://10.10.21.20:9000/QingLong/maxkb/getStandardSchoolList
@Before(GET.class)
public void getStandardSchoolList() {
renderJson(mkm.getStandardSchoolList());
}
/**
*
*
* @param type_id 10
* @param pageNum
* @param pageSize
*/
// http://10.10.21.20:9000/QingLong/maxkb/matchSchoolNameList?type_id=1&pageNum=1&pageSize=10
@Before(GET.class)
public void matchSchoolNameList(int type_id, int pageNum, int pageSize) {
Page<Record> page = mkm.matchSchoolNameList(type_id, pageNum, pageSize);
renderJson(page);
}
}

@ -4,6 +4,7 @@ import com.dsideal.QingLong.Const.DbConst;
import com.jfinal.kit.Kv;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
@ -281,6 +282,7 @@ public class MaxKbModel {
/**
* Excel
*
* @param gather_regionc
* @return
*/
@ -292,4 +294,32 @@ public class MaxKbModel {
SqlPara sqlPara = Db.getSqlPara("ExportExcel.SchoolClassStudentTeacherList", kv);
return Db.find(sqlPara);
}
/**
*
*
* @return
*/
public List<Record> getStandardSchoolList() {
String sql = "select organization_no,organization_name,gather_regionc from 教基1001 where a=1 and length(organization_no)=10 order by gather_regionc";
return Db.find(sql);
}
/**
*
* @param type_id
* @param pageNum
* @param pageSize
* @return
*/
public Page<Record> matchSchoolNameList(int type_id, int pageNum, int pageSize) {
Kv kv = Kv.create();
if (type_id == 1) {
kv.set("matchType1", 1);
} else if (type_id == 0) {
kv.set("matchType2", 0);
}
SqlPara sqlPara = Db.getSqlPara("ExportExcel.matchSchoolNameList", kv);
return Db.paginate(pageNum, pageSize, sqlPara);
}
}

@ -68,4 +68,17 @@
t.gather_regionc,
t.sort_order;
#end
-- 匹配的学校名称列表
#sql("matchSchoolNameList")
select distinct t1.teacher_school_name,t2.organization_no,t2.organization_name from t_crawler_resource as t1
left join 1001 as t2 on t1.teacher_school_name=t2.organization_name and t2.a=1 and length(t2.organization_no)=10
where 1=1
#if(matchType1)
and t2.organization_no is not null
#end
#if(matchType2)
and t2.organization_no is null
#end
#end
#end
Loading…
Cancel
Save