You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
1 month ago
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|