|
|
|
@ -14,6 +14,7 @@ import com.jfinal.core.Controller;
|
|
|
|
|
import com.jfinal.ext.interceptor.GET;
|
|
|
|
|
import com.jfinal.ext.interceptor.POST;
|
|
|
|
|
import com.jfinal.kit.Kv;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import com.jfinal.upload.UploadFile;
|
|
|
|
|
import io.github.yedaxia.apidocs.ApiDoc;
|
|
|
|
@ -48,15 +49,19 @@ public class DataEaseController extends Controller {
|
|
|
|
|
//发布的地址
|
|
|
|
|
String publish_url = BaseApplication.PropKit.get("dataEase.publish_url");
|
|
|
|
|
//先更新一下数据表
|
|
|
|
|
dm.updateCity(dataVisualizationName, city_name);
|
|
|
|
|
//再拼接一下URL的最终地址
|
|
|
|
|
boolean success = dm.updateCity(dataVisualizationName, city_name);
|
|
|
|
|
if (!success) {
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(false, dataVisualizationName + "名称的大屏不唯一,无法完成更新操作!"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//拼接一下URL的最终地址
|
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
|
jo.put("city_name", city_name);
|
|
|
|
|
String base64Str = Base64.encode(jo.toString());
|
|
|
|
|
//记录最后一次操作的是哪个市或者县区
|
|
|
|
|
dm.writeLastArea(city_name);
|
|
|
|
|
//跳转
|
|
|
|
|
redirect(publish_url + "/#/de-link/X4l1qGNH?attachParams=" + base64Str);
|
|
|
|
|
redirect(publish_url + BaseApplication.PropKit.get("dataEase.ShiZhou_url") + "?attachParams=" + base64Str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -78,13 +83,13 @@ public class DataEaseController extends Controller {
|
|
|
|
|
String base64Str = Base64.encode(jo.toString());
|
|
|
|
|
switch (type_id) {
|
|
|
|
|
case 1://左侧学前教育规模发展预测,义务教育规模发展预测,普通高中教育规模发展预测
|
|
|
|
|
publish_url = publish_url + "/#/de-link/TgShVA0z";
|
|
|
|
|
publish_url = publish_url + BaseApplication.PropKit.get("dataEase.ShiLeft_url");
|
|
|
|
|
break;
|
|
|
|
|
case 2://最底下,人口
|
|
|
|
|
publish_url = publish_url + "/#/de-link/QZVOyXqD";
|
|
|
|
|
publish_url = publish_url + BaseApplication.PropKit.get("dataEase.ShiBottom_url");
|
|
|
|
|
break;
|
|
|
|
|
case 3://教育资源配置发展预测
|
|
|
|
|
publish_url = publish_url + "/#/de-link/oitjXDlA";
|
|
|
|
|
publish_url = publish_url + BaseApplication.PropKit.get("dataEase.ShiRight_url");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
//跳转
|
|
|
|
@ -101,7 +106,11 @@ public class DataEaseController extends Controller {
|
|
|
|
|
// identity_id=1 省
|
|
|
|
|
// identity_id=2 市
|
|
|
|
|
// identity_id=3 县
|
|
|
|
|
int identity_id = Integer.parseInt(CookieUtil.getValue(getRequest(), "identity_id"));
|
|
|
|
|
String identity_idStr = CookieUtil.getValue(getRequest(), "identity_id");
|
|
|
|
|
int identity_id = 1;
|
|
|
|
|
if (!StrKit.isBlank(identity_idStr)) {
|
|
|
|
|
identity_id = Integer.parseInt(identity_idStr);
|
|
|
|
|
}
|
|
|
|
|
List<com.jfinal.plugin.activerecord.Record> list = dm.getDataSetByIdentityId(identity_id);
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list));
|
|
|
|
|
}
|
|
|
|
@ -115,8 +124,12 @@ public class DataEaseController extends Controller {
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"id"})
|
|
|
|
|
public void downloadExcel(int id) throws IOException {
|
|
|
|
|
String identity_idStr = CookieUtil.getValue(getRequest(), "identity_id");
|
|
|
|
|
int identity_id = 1;
|
|
|
|
|
if (!StrKit.isBlank(identity_idStr)) {
|
|
|
|
|
identity_id = Integer.parseInt(identity_idStr);
|
|
|
|
|
}
|
|
|
|
|
//根据当前登录人员的身份,获取对应的数据集名称
|
|
|
|
|
int identity_id = Integer.parseInt(CookieUtil.getValue(getRequest(), "identity_id"));
|
|
|
|
|
String person_id = CookieUtil.getValue(getRequest(), "person_id");
|
|
|
|
|
//获取他是哪个城市或者县区的管理员
|
|
|
|
|
//行政区划码
|
|
|
|
@ -142,8 +155,12 @@ public class DataEaseController extends Controller {
|
|
|
|
|
@Before(GET.class)
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void downSampleExcel(int id) throws IOException {
|
|
|
|
|
String identity_idStr = CookieUtil.getValue(getRequest(), "identity_id");
|
|
|
|
|
int identity_id = 1;
|
|
|
|
|
if (!StrKit.isBlank(identity_idStr)) {
|
|
|
|
|
identity_id = Integer.parseInt(identity_idStr);
|
|
|
|
|
}
|
|
|
|
|
//根据当前登录人员的身份,获取对应的数据集名称
|
|
|
|
|
int identity_id = Integer.parseInt(CookieUtil.getValue(getRequest(), "identity_id"));
|
|
|
|
|
if (identity_id == 1) {
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(false, "省管理员不能下载模板!"));
|
|
|
|
|
return;
|
|
|
|
@ -173,7 +190,11 @@ public class DataEaseController extends Controller {
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void uploadExcel() {
|
|
|
|
|
//根据当前登录人员的身份,获取对应的数据集名称
|
|
|
|
|
int identity_id = Integer.parseInt(CookieUtil.getValue(getRequest(), "identity_id"));
|
|
|
|
|
String identity_idStr = CookieUtil.getValue(getRequest(), "identity_id");
|
|
|
|
|
int identity_id = 1;
|
|
|
|
|
if (!StrKit.isBlank(identity_idStr)) {
|
|
|
|
|
identity_id = Integer.parseInt(identity_idStr);
|
|
|
|
|
}
|
|
|
|
|
String person_id = CookieUtil.getValue(getRequest(), "person_id");
|
|
|
|
|
//获取他是哪个城市或者县区的管理员
|
|
|
|
|
//行政区划码
|
|
|
|
|