|
|
@ -81,7 +81,7 @@ public class Step3_CopyBigScreen {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static Record getVisualizationByName(String dataVisualizationNameCity) {
|
|
|
|
public static Record getVisualizationByName(String dataVisualizationNameCity) {
|
|
|
|
String sql = "select * from data_visualization_info where name =?";
|
|
|
|
String sql = "select * from data_visualization_info where name =?";
|
|
|
|
return Db.use(DataEaseModel.DB_NAME).findFirst(sql, dataVisualizationNameCity);
|
|
|
|
return Db.use(DB_NAME).findFirst(sql, dataVisualizationNameCity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -124,7 +124,7 @@ public class Step3_CopyBigScreen {
|
|
|
|
shareRecord.set("resource_id", childId);
|
|
|
|
shareRecord.set("resource_id", childId);
|
|
|
|
shareRecord.set("id", CommonUtil.getSnowId());
|
|
|
|
shareRecord.set("id", CommonUtil.getSnowId());
|
|
|
|
shareRecord.set("uuid", CommonUtil.randomString(8));//大小写字母和数字组合,长度为8
|
|
|
|
shareRecord.set("uuid", CommonUtil.randomString(8));//大小写字母和数字组合,长度为8
|
|
|
|
Db.use(DataEaseModel.DB_NAME).save("xpack_share", "id", shareRecord);
|
|
|
|
Db.use(DB_NAME).save("xpack_share", "id", shareRecord);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -141,7 +141,7 @@ public class Step3_CopyBigScreen {
|
|
|
|
|
|
|
|
|
|
|
|
//母屏共享链接
|
|
|
|
//母屏共享链接
|
|
|
|
String sql = "select * from xpack_share where resource_id=?";
|
|
|
|
String sql = "select * from xpack_share where resource_id=?";
|
|
|
|
Record motherShareRecord = Db.use(DataEaseModel.DB_NAME).findFirst(sql, motherId);
|
|
|
|
Record motherShareRecord = Db.use(DB_NAME).findFirst(sql, motherId);
|
|
|
|
|
|
|
|
|
|
|
|
//按16个市州进行生成
|
|
|
|
//按16个市州进行生成
|
|
|
|
List<String> list = dm.getCityNameList();
|
|
|
|
List<String> list = dm.getCityNameList();
|
|
|
@ -189,7 +189,7 @@ public class Step3_CopyBigScreen {
|
|
|
|
|
|
|
|
|
|
|
|
//母屏共享链接
|
|
|
|
//母屏共享链接
|
|
|
|
String sql = "select * from xpack_share where resource_id=?";
|
|
|
|
String sql = "select * from xpack_share where resource_id=?";
|
|
|
|
Record motherShareRecord = Db.use(DataEaseModel.DB_NAME).findFirst(sql, motherId);
|
|
|
|
Record motherShareRecord = Db.use(DB_NAME).findFirst(sql, motherId);
|
|
|
|
|
|
|
|
|
|
|
|
String screenName = dataVisualizationProvince + "【拷贝】";//要拷贝出来的屏幕名称
|
|
|
|
String screenName = dataVisualizationProvince + "【拷贝】";//要拷贝出来的屏幕名称
|
|
|
|
//拷贝API
|
|
|
|
//拷贝API
|
|
|
@ -210,10 +210,10 @@ public class Step3_CopyBigScreen {
|
|
|
|
public static String getCityShare(String dataVisualizationName, String cityName) {
|
|
|
|
public static String getCityShare(String dataVisualizationName, String cityName) {
|
|
|
|
String screenName = dataVisualizationName + cityName;
|
|
|
|
String screenName = dataVisualizationName + cityName;
|
|
|
|
String sql = "select * from data_visualization_info where name =?";
|
|
|
|
String sql = "select * from data_visualization_info where name =?";
|
|
|
|
Record record = Db.use(DataEaseModel.DB_NAME).findFirst(sql, screenName);
|
|
|
|
Record record = Db.use(DB_NAME).findFirst(sql, screenName);
|
|
|
|
long id = record.getLong("id");
|
|
|
|
long id = record.getLong("id");
|
|
|
|
sql = "select * from xpack_share where resource_id=?";
|
|
|
|
sql = "select * from xpack_share where resource_id=?";
|
|
|
|
Record shareRecord = Db.use(DataEaseModel.DB_NAME).findFirst(sql, id);
|
|
|
|
Record shareRecord = Db.use(DB_NAME).findFirst(sql, id);
|
|
|
|
System.out.println(cityName + "的共享链接:" + shareRecord.getStr("uuid"));
|
|
|
|
System.out.println(cityName + "的共享链接:" + shareRecord.getStr("uuid"));
|
|
|
|
return shareRecord.getStr("uuid");
|
|
|
|
return shareRecord.getStr("uuid");
|
|
|
|
}
|
|
|
|
}
|
|
|
|