|
|
|
@ -19,6 +19,7 @@ import io.github.yedaxia.apidocs.ApiDoc;
|
|
|
|
|
import net.sf.json.JSONArray;
|
|
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class DataEaseController extends Controller {
|
|
|
|
@ -128,7 +129,7 @@ public class DataEaseController extends Controller {
|
|
|
|
|
@Before(GET.class)
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"id"})
|
|
|
|
|
public void downloadExcel(int id) {
|
|
|
|
|
public void downloadExcel(int id) throws IOException {
|
|
|
|
|
//根据当前登录人员的身份,获取对应的数据集名称
|
|
|
|
|
int identity_id = Integer.parseInt(CookieUtil.getValue(getRequest(), "identity_id"));
|
|
|
|
|
String person_id = CookieUtil.getValue(getRequest(), "person_id");
|
|
|
|
@ -138,18 +139,11 @@ public class DataEaseController extends Controller {
|
|
|
|
|
//根据区域码,获取区域名称
|
|
|
|
|
String area_name = rm.getAreaName(area_code);
|
|
|
|
|
Record record = dm.getDataSetById(id);
|
|
|
|
|
String table_name = record.getStr("table_name");
|
|
|
|
|
String tableName = record.getStr("table_name");
|
|
|
|
|
String dataSetName = record.getStr("dataset_name");
|
|
|
|
|
|
|
|
|
|
switch (identity_id) {
|
|
|
|
|
case 1:
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String tempDir = System.getProperty("java.io.tmpdir");
|
|
|
|
|
//导出excel
|
|
|
|
|
dm.exportExcel(identity_id, tableName, dataSetName, tempDir, area_name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|