main
黄海 7 months ago
parent 30bb4f891e
commit 90dafeea71

@ -135,16 +135,26 @@ public class MaxKbController extends Controller {
}
/**
*
*
*
* @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);
public void matchSchoolNameList(int pageNum, int pageSize) {
Page<Record> page = mkm.matchSchoolNameList(pageNum, pageSize);
renderJson(page);
}
/**
*
*
* @param pageNum
* @param pageSize
*/
// http://10.10.21.20:9000/QingLong/maxkb/matchLessonSchoolName?pageNum=1&pageSize=10
public void matchLessonSchoolName(int pageNum, int pageSize) {
Page<Record> page = mkm.matchLessonSchoolName(pageNum, pageSize);
renderJson(page);
}
}

@ -307,19 +307,24 @@ public class MaxKbModel {
/**
*
* @param type_id
*
* @param pageNum
* @param pageSize
* @return
*/
public Page<Record> matchSchoolNameList(int pageNum, int pageSize) {
SqlPara sqlPara = Db.getSqlPara("ExportExcel.matchSchoolNameList");
return Db.paginate(pageNum, pageSize, sqlPara);
}
/**
*
* @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);
public Page<Record> matchLessonSchoolName(int pageNum, int pageSize) {
SqlPara sqlPara = Db.getSqlPara("ExportExcel.matchLessonSchoolName");
return Db.paginate(pageNum, pageSize, sqlPara);
}
}

@ -73,12 +73,19 @@
#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
where t2.organization_no is null
#end
-- 匹配课程名称与学校名称
#sql("matchLessonSchoolName")
select t1.lesson_id,t1.lesson_name, t1.teacher_school_name,t1.teacher_id,t1.teacher_name,t2.organization_name,
t1.subject_id,t1.stage_id,t1.scheme_id,t1.book_id,
t3.subject_name,t4.stage_name,t5.scheme_name,t6.book_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
inner join t_crawler_subject as t3 on t1.subject_id=t3.subject_id
inner join t_crawler_stage as t4 on t1.stage_id=t4.stage_id
inner join t_crawler_scheme as t5 on t1.scheme_id=t5.scheme_id
inner join t_crawler_book as t6 on t1.book_id=t6.book_id
where t2.organization_no is null
#end
#end
Loading…
Cancel
Save