91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 65.96MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-03-29
  • 語言: 其他
  • 標簽: Spring??

資源簡介

基于Spring+SpringMVC+MyBatis的在線考試系統。詳情的介紹在我的帖子里都有,歡迎大家指點

資源截圖

代碼片段和文件信息

package?top.sdszhq.controller;

import?com.google.gson.Gson;
import?org.apache.poi.hssf.usermodel.HSSFWorkbook;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestBody;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.ResponseBody;
import?top.sdszhq.pojo.ExamResult;
import?top.sdszhq.service.ExamRankService;
import?top.sdszhq.utils.ExcelUtil;

import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?java.io.OutputStream;
import?java.io.UnsupportedEncodingException;
import?java.util.ArrayList;
import?java.util.List;
import?java.util.Map;
@Controller
public?class?ExamExport?{
????@Autowired
????public?ExamRankService?ers;


????@ResponseBody
????@RequestMapping(value?=?“/html/rankExport.action“produces?=?“application/json;?charset=utf-8“)
????public?String?rankExport(@RequestBody?Map?map?HttpServletRequest?request?HttpServletResponse?response)?{
????????String?examCode?=?map.get(“examCode“);
????????List?list?=?new?ArrayList<>();
????????list?=?ers.selectExamRank(examCode);
????????return?new?Gson().toJson(list);
???????/*?String[]?title?=?{“考試排名““考生賬號““考試姓名““分數“};

????????//excel文件名
????????String?fileName?=?“學生成績表“+System.currentTimeMillis()+“.xls“;

????????//sheet名
????????String?sheetName?=?“學生成績表“;

????????String[][]?content?=?new?String[?list.size()?][?title.length?];

????????for?(int?i?=?0;?i?????????????content[i][0]?=?String.valueOf(i);
????????????content[i][1]?=?list.get(i).getStudentaccount().toString();
????????????content[i][2]?=?list.get(i).getStudentName().toString();
????????????content[i][3]?=?list.get(i).getScore().toString();
????????}

????????//創建HSSFWorkbook
????????HSSFWorkbook?wb?=?ExcelUtil.getHSSFWorkbook(sheetName?title?content?null);

????????//響應到客戶端
????????try?{
????????????this.setResponseHeader(response?fileName);
????????????OutputStream?os?=?response.getOutputStream();
????????????wb.write(os);
????????????os.flush();
????????????os.close();
????????}?catch?(Exception?e)?{
????????????e.printStackTrace();
????????}*/
????}

????//發送響應流方法
????public?void?setResponseHeader(HttpServletResponse?response?String?fileName)?{
????????try?{
????????????try?{
????????????????fileName?=?new?String(fileName.getBytes()“ISO8859-1“);
????????????}?catch?(UnsupportedEncodingException?e)?{
????????????????//?TODO?Auto-generated?catch?block
????????????????e.printStackTrace();
????????????}
????????????response.setContentType(“application/octet-stream;charset=ISO8859-1“);
????????????response.setHeader(“Content-Disposition“?“attachment;filename=“+?fileName);
????????????response.addHeader(“Pargam“?“no-cache“);
????????????response.addHeader(“Cache-Control“?“no-cache“);
??

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????????21??2019-06-16?10:11??online_exam\.git\COMMIT_EDITMSG

?????文件????????330??2019-06-01?20:22??online_exam\.git\config

?????文件?????????73??2019-06-01?20:21??online_exam\.git\description

?????文件????????101??2019-06-16?10:12??online_exam\.git\FETCH_HEAD

?????文件?????????23??2019-06-01?20:22??online_exam\.git\HEAD

?????文件????????478??2019-06-01?20:21??online_exam\.git\hooks\applypatch-msg.sample

?????文件????????896??2019-06-01?20:21??online_exam\.git\hooks\commit-msg.sample

?????文件???????3327??2019-06-01?20:21??online_exam\.git\hooks\fsmonitor-watchman.sample

?????文件????????189??2019-06-01?20:21??online_exam\.git\hooks\post-update.sample

?????文件????????424??2019-06-01?20:21??online_exam\.git\hooks\pre-applypatch.sample

?????文件???????1638??2019-06-01?20:21??online_exam\.git\hooks\pre-commit.sample

?????文件???????1348??2019-06-01?20:21??online_exam\.git\hooks\pre-push.sample

?????文件???????4898??2019-06-01?20:21??online_exam\.git\hooks\pre-rebase.sample

?????文件????????544??2019-06-01?20:21??online_exam\.git\hooks\pre-receive.sample

?????文件???????1492??2019-06-01?20:21??online_exam\.git\hooks\prepare-commit-msg.sample

?????文件???????3610??2019-06-01?20:21??online_exam\.git\hooks\update.sample

?????文件?????297216??2019-06-16?10:11??online_exam\.git\index

?????文件????????240??2019-06-01?20:21??online_exam\.git\info\exclude

?????文件???????2599??2019-06-16?10:11??online_exam\.git\logs\HEAD

?????文件???????2599??2019-06-16?10:11??online_exam\.git\logs\refs\heads\master

?????文件????????209??2019-06-01?20:22??online_exam\.git\logs\refs\remotes\origin\HEAD

?????文件???????2184??2019-06-16?10:11??online_exam\.git\logs\refs\remotes\origin\master

?????文件????????208??2019-06-06?21:59??online_exam\.git\objects\04\83c0c99d9cb01ffa24e67cf6d8954c756cc690

?????文件?????????48??2019-06-02?11:20??online_exam\.git\objects\06\6c982939277a12334dd1014e2206be76b93d15

?????文件????????437??2019-06-02?13:28??online_exam\.git\objects\06\e3b4c8dc876413be295a095111fe3e5b07bcfb

?????文件????????260??2019-06-06?21:59??online_exam\.git\objects\07\03f7888e8bcf00f13af9120c6841583cde873f

?????文件????????183??2019-06-12?13:19??online_exam\.git\objects\0a\97c8eff782982a20e1e8714b882b0d3336b915

?????文件???????2264??2019-06-06?21:59??online_exam\.git\objects\0a\b882e8aaa4ca39215260cb9107c05d967a3536

?????文件????????179??2019-06-06?21:59??online_exam\.git\objects\0c\7fd9ffb8a5c8908ff92ff9f2977cebb5db05be

?????文件????????212??2019-06-06?21:59??online_exam\.git\objects\0d\87ad30d8798d92b4f1aba7ba6bb6e7bbe0b14c

............此處省略2871個文件信息

評論

共有 條評論