|
|
|
@ -17,9 +17,7 @@ import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import com.jfinal.upload.UploadFile;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
public class YpController extends Controller {
|
|
|
|
|
YpModel model = new YpModel();
|
|
|
|
@ -245,11 +243,11 @@ public class YpController extends Controller {
|
|
|
|
|
//导出
|
|
|
|
|
Page<Record> rs = model.getTaskInfo(task_id, bx_id, 1, 99999);
|
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xlsx";
|
|
|
|
|
ExcelExportUtil.export(rs, jo, excelFile, task_name + "申报结果(" + bx_name + ")",bx_name);
|
|
|
|
|
ExcelExportUtil.export(rs, jo, excelFile, task_name + "申报结果(" + bx_name + ")", bx_name);
|
|
|
|
|
mergeList.add(excelFile);
|
|
|
|
|
}
|
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xlsx";
|
|
|
|
|
ExcelCommonUtil.mergeExcel(mergeList, excelFile,1);
|
|
|
|
|
ExcelCommonUtil.mergeExcel(mergeList, excelFile, 1);
|
|
|
|
|
|
|
|
|
|
//提供下载
|
|
|
|
|
String filename = task_name + "申报结果.xlsx";
|
|
|
|
@ -268,6 +266,15 @@ public class YpController extends Controller {
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(false, "上传文件类型错误!系统只允许上传jpg格式!"));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//判断文件大小大于20mb则返回错误信息,并终止上传,删除上传文件
|
|
|
|
|
long size = picFile.getFile().length();
|
|
|
|
|
if (size > 1024 * 1024 * 20) {
|
|
|
|
|
Map map = new HashMap();
|
|
|
|
|
map.put("success", false);
|
|
|
|
|
map.put("message", "图片文件大小大于20MB,请检查后重传!");
|
|
|
|
|
renderJson(map);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
String uuid = UUID.randomUUID().toString();
|
|
|
|
|
//判断目录是不是存在
|
|
|
|
|
File file = new File(PathKit.getWebRootPath() + "/upload");
|
|
|
|
|