parent
88e3c6ebe2
commit
42a75c317f
@ -0,0 +1,37 @@
|
|||||||
|
package com.dsideal.base.Tools;
|
||||||
|
|
||||||
|
import com.dsideal.base.BaseApplication;
|
||||||
|
import com.dsideal.base.DataEase.Model.DataEaseModel;
|
||||||
|
import com.dsideal.base.Plugin.YamlProp;
|
||||||
|
import com.dsideal.base.Tools.Util.LocalMysqlConnectUtil;
|
||||||
|
import com.jfinal.plugin.activerecord.Db;
|
||||||
|
import com.jfinal.plugin.activerecord.Record;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AiGenerate {
|
||||||
|
public static DataEaseModel dm = new DataEaseModel();
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
//加载配置文件
|
||||||
|
String configFile = "application.yaml";
|
||||||
|
BaseApplication.PropKit = new YamlProp(configFile);
|
||||||
|
LocalMysqlConnectUtil.Init();
|
||||||
|
|
||||||
|
String sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dataease' AND TABLE_NAME LIKE 'excel_报告-教育资源配置发展预测%';";
|
||||||
|
List<Record> tableList = Db.find(sql);
|
||||||
|
String[] biJiao = new String[]{"文山州", "楚雄州"};
|
||||||
|
for (Record record : tableList) {
|
||||||
|
String tableName = record.getStr("TABLE_NAME");
|
||||||
|
|
||||||
|
for (int j = 0; j < biJiao.length; j++) {
|
||||||
|
sql = "select * from `" + tableName + "` where `行政区划`=?";
|
||||||
|
List<Record> listConetent = Db.use(DataEaseModel.DB_NAME).find(sql, biJiao[j]);
|
||||||
|
if (!listConetent.isEmpty()) {
|
||||||
|
System.out.println(listConetent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue