|
|
|
@ -32,10 +32,13 @@ public class SyncDataEase {
|
|
|
|
|
NianJiLessonSummary();
|
|
|
|
|
//学校数量
|
|
|
|
|
schoolCount();
|
|
|
|
|
//学区top5
|
|
|
|
|
//areaTop5();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新数据
|
|
|
|
|
*
|
|
|
|
|
* @param cnt
|
|
|
|
|
* @param type
|
|
|
|
|
*/
|
|
|
|
@ -207,4 +210,36 @@ public class SyncDataEase {
|
|
|
|
|
String sql = Db.getSql("DataEase.updateSchoolCount");
|
|
|
|
|
Db.use(MYSQL_DB).update(sql, cnt, "参与学校数量");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新地区top5
|
|
|
|
|
*
|
|
|
|
|
* @param areaName 地区名称
|
|
|
|
|
* @param lessonCount 课程建设数量
|
|
|
|
|
* @param regSchoolCount 注册学校数量
|
|
|
|
|
* @param lessonSchoolCount 课程学校数量
|
|
|
|
|
*/
|
|
|
|
|
public static void updateAreaTop5(String areaName, int lessonCount, int regSchoolCount, int lessonSchoolCount, int sort_id) {
|
|
|
|
|
String sql = Db.getSql("DataEase.areaTop5");
|
|
|
|
|
Db.use(MYSQL_DB).update(sql, areaName, lessonCount, regSchoolCount, lessonSchoolCount, sort_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 地区top5
|
|
|
|
|
*/
|
|
|
|
|
public static void areaTop5() {
|
|
|
|
|
SqlPara sqlPara = Db.getSqlPara("DataEase.areaTop5");
|
|
|
|
|
List<Record> list = Db.find(sqlPara);
|
|
|
|
|
int idx = 0;
|
|
|
|
|
for (Record record : list) {
|
|
|
|
|
String gather_regionc = record.getStr("gather_regionc");
|
|
|
|
|
int cnt = record.getInt("cnt");
|
|
|
|
|
int regSchoolCount = record.getInt("regSchoolCount");
|
|
|
|
|
int lessonSchoolCount = record.getInt("lessonSchoolCount");
|
|
|
|
|
//更新
|
|
|
|
|
updateAreaTop5(gather_regionc, cnt, regSchoolCount, lessonSchoolCount, ++idx);
|
|
|
|
|
}
|
|
|
|
|
print("更新地区top5成功!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|