|
|
@ -23,6 +23,7 @@ import com.jfinal.upload.UploadFile;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.UUID;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
@ -107,10 +108,10 @@ public class YpController extends Controller {
|
|
|
|
* @param uuid 照片ID
|
|
|
|
* @param uuid 照片ID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Before(POST.class)
|
|
|
|
@Before(POST.class)
|
|
|
|
@EmptyInterface({"xb", "xm", "mz", "byxx", "bybj", "sg", "zzfs", "hjszd", "jtzz",
|
|
|
|
@EmptyInterface({"xb", "xm", "mz", "byxx", "bybj", "sg", "hjszd", "jtzz",
|
|
|
|
"xx", "fzhm", "bw", "db", "zg", "st", "zyz", "xly", "jlhd", "tc", "jwh", "uuid"})
|
|
|
|
"xx", "fzhm", "bw", "db", "zg", "st", "zyz", "xly", "jlhd", "tc", "jwh", "uuid"})
|
|
|
|
public void save(String xb, String xm, String mz, String byxx,
|
|
|
|
public void save(String xb, String xm, String mz, String byxx,
|
|
|
|
String bybj, String sg, String zzfs, String hjszd, String jtzz, String xx,
|
|
|
|
String bybj, String sg, String hjszd, String jtzz, String xx,
|
|
|
|
String bb_name, String bb_bureau, String bb_tel, String mm_name, String mm_bureau,
|
|
|
|
String bb_name, String bb_bureau, String bb_tel, String mm_name, String mm_bureau,
|
|
|
|
String mm_tel, String fzhm, String bw, String db, String zg, String st,
|
|
|
|
String mm_tel, String fzhm, String bw, String db, String zg, String st,
|
|
|
|
String zyz, String xly, String jlhd, String tc, String jwh, String uuid) {
|
|
|
|
String zyz, String xly, String jlhd, String tc, String jwh, String uuid) {
|
|
|
@ -122,7 +123,7 @@ public class YpController extends Controller {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String zkz = getSessionAttr("zkz");
|
|
|
|
String zkz = getSessionAttr("zkz");
|
|
|
|
model.save(zkz, xm, xb, mz, byxx, bybj, sg, zzfs, hjszd, jtzz, xx, bb_name, bb_bureau, bb_tel, mm_name, mm_bureau,
|
|
|
|
model.save(zkz, xm, xb, mz, byxx, bybj, sg, hjszd, jtzz, xx, bb_name, bb_bureau, bb_tel, mm_name, mm_bureau,
|
|
|
|
mm_tel, fzhm, bw, db, zg, st, zyz, xly, jlhd, tc, jwh, uuid);
|
|
|
|
mm_tel, fzhm, bw, db, zg, st, zyz, xly, jlhd, tc, jwh, uuid);
|
|
|
|
kv.set("success", true);
|
|
|
|
kv.set("success", true);
|
|
|
|
kv.set("message", "保存成功!");
|
|
|
|
kv.set("message", "保存成功!");
|
|
|
@ -187,7 +188,7 @@ public class YpController extends Controller {
|
|
|
|
public void exportExcel() throws URISyntaxException {
|
|
|
|
public void exportExcel() throws URISyntaxException {
|
|
|
|
//模板文件
|
|
|
|
//模板文件
|
|
|
|
String excelPath = CommonUtil.getClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
|
|
|
String excelPath = CommonUtil.getClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
|
|
|
String filePath = excelPath + "103.json";
|
|
|
|
String filePath = excelPath + "103_YTB.json";
|
|
|
|
//转成 json对象
|
|
|
|
//转成 json对象
|
|
|
|
JSONObject jo = FileUtil.readJsonFile(filePath);
|
|
|
|
JSONObject jo = FileUtil.readJsonFile(filePath);
|
|
|
|
//导出
|
|
|
|
//导出
|
|
|
@ -195,7 +196,39 @@ public class YpController extends Controller {
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xls";
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xls";
|
|
|
|
ExcelCommonUtil.export(rs, jo, excelFile);
|
|
|
|
ExcelCommonUtil.export(rs, jo, excelFile);
|
|
|
|
//提供下载
|
|
|
|
//提供下载
|
|
|
|
String filename = "学生信息表.xls";
|
|
|
|
String filename = "已填报.xlsx";
|
|
|
|
renderFile(new File(excelFile), filename);
|
|
|
|
renderFile(new File(excelFile), filename);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Before(GET.class)
|
|
|
|
|
|
|
|
public void exportWDL() throws URISyntaxException {
|
|
|
|
|
|
|
|
//模板文件
|
|
|
|
|
|
|
|
String excelPath = CommonUtil.getClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
|
|
|
|
|
|
|
String filePath = excelPath + "103_WDL.json";
|
|
|
|
|
|
|
|
//转成 json对象
|
|
|
|
|
|
|
|
JSONObject jo = FileUtil.readJsonFile(filePath);
|
|
|
|
|
|
|
|
//导出
|
|
|
|
|
|
|
|
List<Record> rs = model.exportWDL();
|
|
|
|
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xls";
|
|
|
|
|
|
|
|
ExcelCommonUtil.export(rs, jo, excelFile);
|
|
|
|
|
|
|
|
//提供下载
|
|
|
|
|
|
|
|
String filename = "未登录.xlsx";
|
|
|
|
|
|
|
|
renderFile(new File(excelFile), filename);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Before(GET.class)
|
|
|
|
|
|
|
|
public void exportYDLWTB() throws URISyntaxException {
|
|
|
|
|
|
|
|
//模板文件
|
|
|
|
|
|
|
|
String excelPath = CommonUtil.getClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
|
|
|
|
|
|
|
String filePath = excelPath + "103_YDLWTB.json";
|
|
|
|
|
|
|
|
//转成 json对象
|
|
|
|
|
|
|
|
JSONObject jo = FileUtil.readJsonFile(filePath);
|
|
|
|
|
|
|
|
//导出
|
|
|
|
|
|
|
|
List<Record> rs = model.exportYDLWTB();
|
|
|
|
|
|
|
|
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xls";
|
|
|
|
|
|
|
|
ExcelCommonUtil.export(rs, jo, excelFile);
|
|
|
|
|
|
|
|
//提供下载
|
|
|
|
|
|
|
|
String filename = "已登录未填报.xlsx";
|
|
|
|
|
|
|
|
renderFile(new File(excelFile), filename);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|