main
黄海 2 years ago
parent be6ac5d201
commit 65bfa22aba

@ -210,10 +210,10 @@ public class ExamController extends Controller {
//转成 json对象
JSONObject jo = FileUtil.readJsonFile(filePath);
//导出
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xls";
String excelFile = excelPath + "excelTemp/" + UUID.randomUUID().toString().toUpperCase() + ".xlsx";
ExcelCommonUtil.export(list, jo, excelFile, null, "名次");
//提供下载
String filename = "排名结果.xls";
String filename = "排名结果.xlsx";
renderFile(new File(excelFile), filename);
}
}

@ -12,4 +12,8 @@ public class IndexController extends Controller {
public void index() {
redirect("/html/dangjian/view/login.html");
}
@Before({GET.class})
public void admin() {
redirect("/html/login.html");
}
}

@ -10,6 +10,16 @@
"list_column_name": "person_name",
"width": 40
},
{
"show_column_name": "处室",
"list_column_name": "ks",
"width": 40
},
{
"show_column_name": "电话",
"list_column_name": "tel",
"width": 40
},
{
"show_column_name": "得分",
"list_column_name": "score",

@ -1,6 +1,6 @@
#namespace("Exam")
#sql("getPageSummary")
select t1.person_id,t2.person_name,sum(t1.score) as score,t2.start_time,t2.end_time from t_exam_record as t1
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(t1.score) as score,t2.start_time,t2.end_time from t_exam_record as t1
inner join t_exam_person as t2 on t1.person_id=t2.person_id
where t1.reply=t1.answer and t2.end_time is not null and t1.b_use=1 and t2.b_use=1
group by t1.person_id,t2.person_name order by sum(t1.score) desc,timediff(t2.end_time,t2.start_time) asc

@ -10,6 +10,16 @@
"list_column_name": "person_name",
"width": 40
},
{
"show_column_name": "处室",
"list_column_name": "ks",
"width": 40
},
{
"show_column_name": "电话",
"list_column_name": "tel",
"width": 40
},
{
"show_column_name": "得分",
"list_column_name": "score",

@ -1,8 +1,8 @@
#namespace("Exam")
#sql("getPageSummary")
select t1.person_id,t2.person_name,sum(t1.score) as score,t2.start_time,t2.end_time from t_exam_record as t1
select t1.person_id,t2.person_name,t2.ks,t2.tel,sum(t1.score) as score,t2.start_time,t2.end_time from t_exam_record as t1
inner join t_exam_person as t2 on t1.person_id=t2.person_id
where t1.reply=t1.answer and t2.end_time is not null
where t1.reply=t1.answer and t2.end_time is not null and t1.b_use=1 and t2.b_use=1
group by t1.person_id,t2.person_name order by sum(t1.score) desc,timediff(t2.end_time,t2.start_time) asc
#end

Loading…
Cancel
Save