freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

教務(wù)管理系統(tǒng)之學(xué)生管理系統(tǒng)_畢業(yè)設(shè)計(jì)論文-資料下載頁(yè)

2024-08-27 12:11本頁(yè)面

【導(dǎo)讀】合性先進(jìn)管理手段。其中學(xué)生信息的管理是一項(xiàng)非常繁瑣與復(fù)雜的一項(xiàng)工作,對(duì)于一個(gè)學(xué)校。而言,更應(yīng)該運(yùn)用一些本地資源,提高學(xué)生管理的力度。的JSP+Servlet+SQLSERVER2020數(shù)據(jù)庫(kù)進(jìn)行開(kāi)發(fā)。系統(tǒng)主要分為四大模塊管理員管理模塊、和網(wǎng)絡(luò)化的需求,提高高校教務(wù)的工作質(zhì)量與效率。

  

【正文】 nsupload Apache monsupload 上傳文件核心代碼: protected void studentUPdate(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException{ StudentVO vo = new StudentVO()。 try { DiskFileItemFactory factory = new DiskFileItemFactory()。 (1024*4)。 // 設(shè)置緩沖區(qū)大小,這里是 4kb (tempPathFile)。 // 設(shè)置緩沖區(qū)目錄 ServletFileUpload upload = new ServletFileUpload(factory)。 (1024*1024*4)。 // 設(shè)置最大文件尺寸,這里是 4MB 24 ListFileItem items = (request)。// 得到所有 文件 IteratorFileItem i = ()。 while (()) { FileItem fi = (FileItem) ()。 if (()){ // 判斷是否是 字段值 { String inputName = ()。 // 對(duì)應(yīng)表單的 name String inputValue = (utf8)。 // 對(duì)應(yīng)表單的 value if ((sId)) {// 學(xué)號(hào) (inputValue)。 } else if((sName)){// 姓名 (inputValue)。 } // }else {// file 上傳域 String fileName = ()。 //獲取上傳文件的完整名稱如:f:\ if (fileName != null amp。amp。 !().isEmpty()) { String virtualPath = (fileName)。 // 存入數(shù)據(jù)庫(kù)的虛擬文件名稱 (virtualPath)。 File fullFile = new File(virtualPath)。// 增加時(shí)間戳的前綴 File savedFile = new File(uploadPath, ())。 (savedFile)。 } } } //========================================上傳完成 return。 } } catch (Exception e1) { ()。 } } 25 解析 Excel 工具 poi Poi 解析 Excel 實(shí)現(xiàn)批量上傳效果如圖: 圖 57 上傳組件 學(xué)生信息批量導(dǎo)入結(jié)果圖 Apache POI 解析 Excle 核心代碼: /** * Excel 讀取工具 * @author 段大志 * 時(shí)間 :2020121下午 6:35:20 */ public class ExcelReaderUtil { Workbook wb = null。 ListString[] dataList = new ArrayListString[](100)。 /** * 取 Excel 所有數(shù)據(jù),包含 header */ public ListString[] getAllData(int sheetIndex) { int columnNum = 0。 Sheet sheet = (sheetIndex)。 if ((0) != null) { columnNum = (0).getLastCellNum() (0).getFirstCellNum()。 //(該表共有列數(shù): + columnNum)。 } if (columnNum 0) { for (Row row : sheet) { // 迭代每一行的數(shù)據(jù) 26 String[] singleRow = new String[columnNum]。 int n = 0。 for (int i = 0。 i columnNum。 i++) { Cell cell = (i, )。 switch (()) { case : singleRow[n] = 。 // 空白單單元格 break。 case : singleRow[n] = (cell .getBooleanCellValue())。 break。 // 數(shù)值 case : if ((cell)) { singleRow[n] = (cell .getDateCellValue())。 } else { ()。 String temp = ()。 // 判斷是否包含小數(shù)點(diǎn),如果不含小數(shù)點(diǎn),則以字符串讀取,如果含小數(shù)點(diǎn),則轉(zhuǎn)換為 Double 類(lèi)型的字符串 if ((.) 1) { singleRow[n] = (new Double(temp)) .trim()。 } else { singleRow[n] = ()。 } } break。 case : singleRow[n] = ().trim()。 break。 case : singleRow[n] = 。 break。 27 case : ()。 singleRow[n] = ()。 if (singleRow[n] != null) { singleRow[n] = singleRow[n].replaceAll(N/A, ) .trim()。 } break。 default: singleRow[n] = 。 break。 } n++。 } if (.equals(singleRow[0])) { continue。 }// 如果第一行為空,跳過(guò) (singleRow)。 } } return dataList。 } 學(xué)生信息增加 手動(dòng)添加學(xué)生信息示意圖,見(jiàn)圖 58 28 圖 58 手動(dòng)添加學(xué)生信息 修改學(xué)生基本信息示意圖,見(jiàn)圖 58 圖 58 添加學(xué)生非法信息驗(yàn)證 客戶端驗(yàn)證技術(shù)關(guān)鍵代碼: script type=text/javascript $(document).ready(function(){ $(input[name=sId]).focus()。 // $(myForm).validate({ debug: false, //true:調(diào)試模式 。取消 submit 的默認(rèn)提交功能 //以上幾項(xiàng)均可選 rules: { sId:{ required: true, 29 rangelength: [10,10], digits:true, remote: page/classes/Student?m=9 //傳說(shuō)當(dāng)中的 ajax 驗(yàn)證 ,自動(dòng)把input 中的值發(fā)送到服務(wù)器 }, sName: { required: true, rangelength: [2,4] }, sCard: { required: true, rangelength: [18,18] }, cId: { required:true, remote: page/classes/Student?m=8 //傳說(shuō)當(dāng)中的 ajax 驗(yàn)證 ,自動(dòng)把input 中的值發(fā)送到服務(wù)器 }, politicsStatus:required, sAddress: required, nation:required, sex:required, birthday: { required:true, dateISO:true //例如: 20200623, 1998/01/22 只驗(yàn)證格式,不驗(yàn)證有效性 }, telphone: { required:true, digits:true, rangelength: [11,11] }, :{ digits: true, rangelength: [4,10] } 30 }, })。 })。 /script 學(xué)生信息修改 無(wú)刷新驗(yàn)證 驗(yàn)證示意圖,見(jiàn) 57: 圖 57 學(xué)生添加成功提示圖 無(wú)刷新服務(wù)器 Ajax 驗(yàn)證服務(wù)關(guān)鍵代碼: protected void validatesId(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ String sId = ((sId))。// ajax 驗(yàn)證用 StudentVO vo = (sId)。 boolean flag = vo == null ? true : false。 // 學(xué)號(hào)不存在就是 true PrintWriter out = ()。 (flag)。 } 操作成功,提示信息示意圖,見(jiàn)圖 58: 圖 58 學(xué)生添加成功提示圖 學(xué)生信息修改示意圖,見(jiàn)下圖 59: 31 圖 59 學(xué)生信息修改圖 學(xué)生信息導(dǎo)出到 Excel 學(xué)生信息下載示意圖,見(jiàn)下圖 59: 圖 59 學(xué)生信息下載圖 學(xué)生 Excel 下載后臺(tái)模板截圖,見(jiàn)下圖 510: 圖 510 動(dòng)態(tài)生成 excel 模板 學(xué)生 excel 信息模板 ,后臺(tái)存放位置示意圖,見(jiàn)下圖 511: 32 圖 511 學(xué)生信息模板圖 Java 動(dòng)態(tài)操作 Excel 技術(shù) poi 插件和 oms upload 下載關(guān)鍵代碼: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 第 1步驟:接收客戶端請(qǐng)求,動(dòng)態(tài)從數(shù)據(jù)庫(kù)查詢符合條件的數(shù)據(jù) String cId = ((cId))。 ListStudentVO list = (cId)。 ListString[] data = new ArrayListString[]()。 for(StudentVO stu: list){ String[] arr = new String[6]。 arr[0] = ()。 //學(xué)號(hào) arr[2] = ().equals(1) ? 男 : 女 。 //性別 arr[5] = (())。//出生年月 (arr)。 } // 第 2步驟:動(dòng)態(tài)生成學(xué)生信息的 Excel,并保存在磁盤(pán) String sheetHead = cId + 班級(jí)信息 。 File excelFile = null。 try { ExcelCreateUtil excel = new ExcelCreateUtil(, sheetHead, data)。 boolean isDele
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1