Compare commits

...

2 Commits

Author SHA1 Message Date
黄海 d041b681f8 'commit'
2 years ago
黄海 222218131a 'commit'
2 years ago

@ -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);
}
}

@ -49,7 +49,6 @@ public class YpModel {
* @param byxx * @param byxx
* @param bybj * @param bybj
* @param sg * @param sg
* @param zzfs
* @param hjszd * @param hjszd
* @param jtzz * @param jtzz
* @param xx * @param xx
@ -72,7 +71,7 @@ public class YpModel {
* @param uuid ID * @param uuid ID
*/ */
public void save(String zkz, String xm, String xb, String mz, String byxx, public void save(String zkz, String xm, String xb, 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) {
@ -85,7 +84,6 @@ public class YpModel {
record.set("byxx", byxx); record.set("byxx", byxx);
record.set("bybj", bybj); record.set("bybj", bybj);
record.set("sg", sg); record.set("sg", sg);
record.set("zzfs", zzfs);
record.set("hjszd", hjszd); record.set("hjszd", hjszd);
record.set("jtzz", jtzz); record.set("jtzz", jtzz);
record.set("xx", xx); record.set("xx", xx);
@ -115,4 +113,14 @@ public class YpModel {
SqlPara sp = Db.getSqlPara("yp.listView"); SqlPara sp = Db.getSqlPara("yp.listView");
return Db.paginate(page, limit, sp); return Db.paginate(page, limit, sp);
} }
public List<Record> exportWDL() {
SqlPara sp = Db.getSqlPara("yp.exportWDL");
return Db.find(sp);
}
public List<Record> exportYDLWTB() {
SqlPara sp = Db.getSqlPara("yp.exportYDLWTB");
return Db.find(sp);
}
} }

@ -0,0 +1,24 @@
{
"title": "未登录人员列表",
"sheetName": "报表",
"titleHeight": 30,
"rowHeight": 30,
"showNumber": true,
"colInfo": [
{
"show_column_name": "准考证号",
"list_column_name": "zkz",
"width": 16
},
{
"show_column_name": "学生姓名",
"list_column_name": "xm",
"width": 16
},
{
"show_column_name": "中招分数",
"list_column_name": "score",
"width": 16
}
]
}

@ -0,0 +1,24 @@
{
"title": "已登录未填报人员",
"sheetName": "报表",
"titleHeight": 30,
"rowHeight": 30,
"showNumber": true,
"colInfo": [
{
"show_column_name": "准考证号",
"list_column_name": "zkz",
"width": 16
},
{
"show_column_name": "学生姓名",
"list_column_name": "xm",
"width": 16
},
{
"show_column_name": "中招分数",
"list_column_name": "score",
"width": 16
}
]
}

@ -1,5 +1,5 @@
{ {
"title": "学生信息填情况", "title": "学生信息填情况",
"sheetName": "报表", "sheetName": "报表",
"titleHeight": 30, "titleHeight": 30,
"rowHeight": 30, "rowHeight": 30,

@ -3,4 +3,10 @@
#sql("listView") #sql("listView")
select * from t_yp_record where length(xb)>0 select * from t_yp_record where length(xb)>0
#end #end
#sql("exportWDL")
SELECT zkz,xm,score FROM (select zkz,xm,score from t_yp_student as t1 where T1.zkz!='888888888888' AND t1.zkz not in (select zkz from t_yp_record) order by score desc ) AS T2;
#end
#sql("exportYDLWTB")
select zkz,xm,zzfs as score from t_yp_record where xb is null order by zzfs desc;
#end
#end #end

@ -0,0 +1,24 @@
{
"title": "未登录人员列表",
"sheetName": "报表",
"titleHeight": 30,
"rowHeight": 30,
"showNumber": true,
"colInfo": [
{
"show_column_name": "准考证号",
"list_column_name": "zkz",
"width": 16
},
{
"show_column_name": "学生姓名",
"list_column_name": "xm",
"width": 16
},
{
"show_column_name": "中招分数",
"list_column_name": "score",
"width": 16
}
]
}

@ -0,0 +1,24 @@
{
"title": "已登录未填报人员",
"sheetName": "报表",
"titleHeight": 30,
"rowHeight": 30,
"showNumber": true,
"colInfo": [
{
"show_column_name": "准考证号",
"list_column_name": "zkz",
"width": 16
},
{
"show_column_name": "学生姓名",
"list_column_name": "xm",
"width": 16
},
{
"show_column_name": "中招分数",
"list_column_name": "score",
"width": 16
}
]
}

@ -1,5 +1,5 @@
{ {
"title": "学生信息填情况", "title": "学生信息填情况",
"sheetName": "报表", "sheetName": "报表",
"titleHeight": 30, "titleHeight": 30,
"rowHeight": 30, "rowHeight": 30,

@ -3,4 +3,10 @@
#sql("listView") #sql("listView")
select * from t_yp_record where length(xb)>0 select * from t_yp_record where length(xb)>0
#end #end
#sql("exportWDL")
SELECT zkz,xm,score FROM (select zkz,xm,score from t_yp_student as t1 where T1.zkz!='888888888888' AND t1.zkz not in (select zkz from t_yp_record) order by score desc ) AS T2;
#end
#sql("exportYDLWTB")
select zkz,xm,zzfs as score from t_yp_record where xb is null order by zzfs desc;
#end
#end #end
Loading…
Cancel
Save