中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

桂林駿程網(wǎng)站建設(shè)seo優(yōu)化流程

桂林駿程網(wǎng)站建設(shè),seo優(yōu)化流程,asp.net h5網(wǎng)站開發(fā),網(wǎng)站建設(shè)08kejiTOC springboot255基于spring boot的疫情信息管理系統(tǒng) 緒論 1.1研究背景與意義 信息化管理模式是將行業(yè)中的工作流程由人工服務(wù),逐漸轉(zhuǎn)換為使用計算機(jī)技術(shù)的信息化管理服務(wù)。這種管理模式發(fā)展迅速,使用起來非常簡單容易,用戶甚至不用掌握…

@TOC

springboot255基于spring boot的疫情信息管理系統(tǒng)

緒論

1.1研究背景與意義

信息化管理模式是將行業(yè)中的工作流程由人工服務(wù),逐漸轉(zhuǎn)換為使用計算機(jī)技術(shù)的信息化管理服務(wù)。這種管理模式發(fā)展迅速,使用起來非常簡單容易,用戶甚至不用掌握相關(guān)的專業(yè)知識,根據(jù)教程指導(dǎo)即可正常使用相關(guān)的系統(tǒng),因而被越來越多的用戶所使用。由于相關(guān)行業(yè)管理信息化,這就使得管理工作不在受到時間和區(qū)域的限制,隨時隨地即可完成相關(guān)的工作任務(wù)和結(jié)果[1]。就目前而言,管理信息化在現(xiàn)代社會中非常流行,使用比較廣泛。早在20世紀(jì)70年代末,就出現(xiàn)了早期的電子商務(wù),相關(guān)的公司企業(yè)使用計算機(jī)建立專用的內(nèi)部網(wǎng)絡(luò),通過內(nèi)部網(wǎng)絡(luò)完成相應(yīng)的采購、銷售等活動,加快相關(guān)的企業(yè)之間的交易速度,提高了工作效率[2]。

當(dāng)下,許多行業(yè)采用互聯(lián)網(wǎng)技術(shù)將工作流程信息化、數(shù)字化,提高了相關(guān)人員的服務(wù)質(zhì)量和效率,節(jié)約了相關(guān)行業(yè)的人力、財力、物力等資源,與此同時,人們獲取外界的相關(guān)信息主要依賴于主流的信息化技術(shù)和工具。人們對生活的需求也在不斷的發(fā)生著變化,為了應(yīng)對用戶的多樣化需求,許多相關(guān)的第三產(chǎn)業(yè)應(yīng)運(yùn)而生,管理信息化也逐漸的流行起來,比如電子商務(wù)行業(yè)。本人通過查詢大量學(xué)習(xí)資料,了解基本的開發(fā)系統(tǒng)的基本背景和關(guān)鍵任務(wù),學(xué)習(xí)與掌握J(rèn)ava語言、web技術(shù)、AJAX技術(shù)、HTML語言等開發(fā)技術(shù),設(shè)計系統(tǒng)功能模塊,以及MySQL數(shù)據(jù)庫的相關(guān)語法和工具,創(chuàng)建和存儲數(shù)據(jù)表格,反映和關(guān)聯(lián)表格之間相互存在的關(guān)系,由此對疫情信息管理系統(tǒng)進(jìn)行研發(fā)和實(shí)現(xiàn)。

1.2國內(nèi)外研究現(xiàn)狀

大概在20世紀(jì)90年代,我國才開始研發(fā)疫情信息管理系統(tǒng),與一些發(fā)達(dá)國家相比,系統(tǒng)研發(fā)起步比較晚。當(dāng)時的計算機(jī)技術(shù)剛開始發(fā)展起來,國家經(jīng)濟(jì)力量比較薄弱,各地區(qū)的經(jīng)濟(jì)發(fā)展水平不平衡,再加上相關(guān)的網(wǎng)絡(luò)應(yīng)用技術(shù)不太先進(jìn),我國也使用了一段較長的時間對網(wǎng)絡(luò)信息化管理進(jìn)行探索[3]。近些年,因?yàn)閲曳浅V匾暫椭С值谌a(chǎn)業(yè)的發(fā)展,以及人們的日常生活需求越來越離不開信息管理技術(shù)的使用,所以我國的信息管理系統(tǒng)行業(yè)發(fā)展速度非???#xff0c;并且相關(guān)的體制法規(guī)也正在不斷地被完善和改進(jìn)。新時代背景下,根據(jù)人們的相關(guān)需求,不斷地促進(jìn)著相關(guān)產(chǎn)業(yè)的產(chǎn)生與發(fā)展,一系列電子產(chǎn)品、應(yīng)用軟件、信息管理系統(tǒng)等新時代的產(chǎn)物逐漸出現(xiàn)在人們的視野中,并且在近幾年發(fā)展迅速,日漸趨于成熟[4]。

與國內(nèi)相比,國外疫情信息管理系統(tǒng)領(lǐng)域發(fā)展較早。國外的計算機(jī)技術(shù)發(fā)展比較成熟,所以系統(tǒng)相關(guān)的設(shè)計也比較完善。19世紀(jì)60年代左右,國外就開始研發(fā)疫情信息管理系統(tǒng),并且不久之后,迅速將其投入市場進(jìn)行使用。美國、英國等一些發(fā)達(dá)國家快速發(fā)展計算機(jī)技術(shù),促進(jìn)了疫情信息管理系統(tǒng)管理行業(yè)信息化建設(shè)[5]。而后隨著相關(guān)的技術(shù)不斷地發(fā)展,覆蓋面非常廣泛,應(yīng)用領(lǐng)域比較多,促進(jìn)著疫情信息管理系統(tǒng)等相關(guān)的信息管理系統(tǒng)不斷地發(fā)展和完善,并且其所設(shè)計的系統(tǒng)功能結(jié)構(gòu)也比較合理、全面。相對而言,國外系統(tǒng)的研發(fā)在相關(guān)領(lǐng)域上還是占據(jù)著較大的優(yōu)勢[6]。因此,我們需要吸收國外系統(tǒng)開發(fā)領(lǐng)域中的較好的技術(shù)精華,發(fā)展我國的信息化管理系統(tǒng),使得其面向大眾,能夠更好的、更全面的服務(wù)于相關(guān)的工作人員。

1.3研究內(nèi)容

現(xiàn)今,互聯(lián)網(wǎng)在我們的日常生活占據(jù)著日益重要的地位,我們也越來越離不開對移動設(shè)備、電腦等上網(wǎng)設(shè)備的使用。傳統(tǒng)的疫情信息管理系統(tǒng)模式主要依靠管理人員純手工記錄的相關(guān)信息,比較繁瑣,不方便查找,也非常容易出現(xiàn)錯誤。如今,如果再通過手工記錄疫情信息,將大大不利于疫情信息管理系統(tǒng)行業(yè)管理相關(guān)的疫情信息管理系統(tǒng)信息,嚴(yán)重影響疫情信息管理系統(tǒng)行業(yè)的發(fā)展。因此,本人結(jié)合傳統(tǒng)的疫情信息管理系統(tǒng)業(yè)務(wù)模式和先進(jìn)的電子信息管理模式,使用Java語言編程設(shè)計功能模塊,AJAX實(shí)現(xiàn)前臺和后臺之間的交互,MySQL數(shù)據(jù)庫創(chuàng)建和存儲數(shù)據(jù)表格,對疫情信息管理系統(tǒng)進(jìn)行設(shè)計和開發(fā)。本系統(tǒng)的設(shè)計有利于相關(guān)行業(yè)實(shí)現(xiàn)最大化的資源管理與共享,促進(jìn)相關(guān)行業(yè)的信息交流、分工合作,提高相關(guān)工作人員的工作效率,最終實(shí)現(xiàn)整個疫情信息管理系統(tǒng)行業(yè)服務(wù)的信息化管理。

1.4論文結(jié)構(gòu)

本文圍繞著疫情信息管理系統(tǒng)的整個開發(fā)過程,展開了詳細(xì)的描述和說明,設(shè)計和實(shí)現(xiàn)本系統(tǒng)的主要工作有:首先分析研究背景、研究狀態(tài),其次介紹設(shè)計系統(tǒng)時使用到的相關(guān)技術(shù),然后通過系統(tǒng)分析確定系統(tǒng)的功能需求,接著通過編碼工作詳細(xì)設(shè)計和實(shí)現(xiàn)系統(tǒng),最后再通過系統(tǒng)測試,找出系統(tǒng)存在的問題和解決問題的方法,不斷地修改和完善系統(tǒng)。論文內(nèi)容的組織結(jié)構(gòu)設(shè)計如下。

第一章緒論,通過介紹本系統(tǒng)的研究背景、研究現(xiàn)狀等內(nèi)容,幫助用戶了解和認(rèn)識本系統(tǒng)的發(fā)展過程。

第二章相關(guān)技術(shù)介紹,主要介紹了Java語言、B/S模式、MySQL數(shù)據(jù)庫等相關(guān)的開發(fā)技術(shù),為后期系統(tǒng)的功能實(shí)現(xiàn)提供技術(shù)上的支持。

第三章系統(tǒng)分析,分析用戶的使用需求,以及系統(tǒng)實(shí)現(xiàn)的可行性,最后通過用例建模分析與系統(tǒng)相關(guān)的參與者及其用例之間的關(guān)系。

第四章系統(tǒng)設(shè)計,主要根據(jù)系統(tǒng)總體功能設(shè)計,確定將要設(shè)計的系統(tǒng)功能模塊,設(shè)計相關(guān)的數(shù)據(jù)表格。

第五章系統(tǒng)實(shí)現(xiàn),通過相關(guān)的功能模塊運(yùn)行圖,展現(xiàn)出系統(tǒng)的主要功能模塊操作流程。

第六章系統(tǒng)測試,主要使用功能測試的方式,測試系統(tǒng)的相關(guān)功能運(yùn)行和使用的具體情況。

第七章總結(jié)與展望,通過本文的各章節(jié)描述總結(jié)得出,基本上完成了系統(tǒng)的設(shè)計,展望未來將學(xué)習(xí)和使用更加先進(jìn)的技術(shù),提高系統(tǒng)的實(shí)用性,使得系統(tǒng)更好的服務(wù)于使用人員。

1.5本章小結(jié)

本章主要介紹了課題的研究背景與意義,研究現(xiàn)狀,研究內(nèi)容等內(nèi)容,最后介紹了本論文的組織結(jié)構(gòu)設(shè)計。信息化管理模式順應(yīng)了信息化時代的變化,本人以現(xiàn)在主流的管理模式為前提,根據(jù)使用者的相關(guān)需求,設(shè)計出一款符合大眾需求的疫情信息管理系統(tǒng)。

2理論基礎(chǔ)

2.1 B/S模式

B/S模式(Browser/Server)是一種比較常用的網(wǎng)絡(luò)結(jié)構(gòu)模式[7]。B/S模式是由模型、視圖、控制器(Model-View-Controller,MVC)結(jié)構(gòu)組成[8]。模型主要是指業(yè)務(wù)模型,視圖主要是指用戶界面,控制器主要是控制保證視圖和模型的同步執(zhí)行。B/S模式的三層結(jié)構(gòu)是相互獨(dú)立的,換句話說,當(dāng)某一個模塊發(fā)生修改和更新,其不會對其他模塊產(chǎn)生影響。根據(jù)B/S的這一特點(diǎn),可以將對業(yè)務(wù)邏輯的處理以及約束條件集中到中間層中,便于前端增加對模型和方法的調(diào)用和復(fù)用。并且可以直接通過中間層對數(shù)據(jù)庫進(jìn)行相關(guān)的操作處理,大大減少了數(shù)據(jù)庫的連接數(shù),節(jié)省了計算機(jī)的對相關(guān)的資源配置空間。

使用B/S模式可以節(jié)省系統(tǒng)資源配置,提高研發(fā)工作效率,減少開發(fā)時間,因而大大提高了我們開發(fā)軟件的可能性。B/S模式有針對性的改變了傳統(tǒng)的客戶端/服務(wù)器模式(Client/Server,C/S模式),也可以說這是對C/S模式進(jìn)行了擴(kuò)展。在這種結(jié)構(gòu)模式中,用戶不用再向使用C/S模式一樣,下載客戶端,其可以直接通過使用瀏覽器的方式,打開網(wǎng)站地址,即可訪問和使用相關(guān)的系統(tǒng)功能服務(wù)。

2.2 IDEA開發(fā)環(huán)境

軟件開發(fā)使用的編程語言有許多種,而每種編程語言需要通過與其相對應(yīng)的開發(fā)平臺進(jìn)行編譯和運(yùn)行。IDEA平臺都是目前比較常用的開發(fā)環(huán)境。IDEA平臺是開源的,具有功能強(qiáng)大、可擴(kuò)展性強(qiáng)等特點(diǎn),可以應(yīng)用于C/S模式軟件的開發(fā),但是它所占據(jù)的內(nèi)存容量比較大,運(yùn)行較慢,并且其并未提供Tomcat服務(wù)器,運(yùn)行過程中需要將代碼發(fā)布到Tomcat服務(wù)器中,測試使用的時間較長,故而不太適用于B/S模式軟件的開發(fā)。

IDEA平臺是建立在IDEA平臺的基礎(chǔ)之上,增加了許多的應(yīng)用插件,比如Tomcat插件、mail組件等。IDEA平臺增加了Tomcat插件,代碼編寫完成或者更新完成時,程序員無需將代碼發(fā)布到Tomcat服務(wù)器中,可以直接通過調(diào)試實(shí)現(xiàn)程序的運(yùn)行。IDEA平臺增加了Mail組件,該組件可以為本程序提供標(biāo)準(zhǔn)的郵件方法,便于開發(fā)人員完成與郵件功能相關(guān)的編譯工作。IDEA平臺占據(jù)的內(nèi)存空間較小,同時其也具有較高的可擴(kuò)展性,編程人員可以根據(jù)需要添加和使用相關(guān)的插件??梢灾С种髁鞯拈_源產(chǎn)品和相關(guān)的開發(fā)框架,被廣泛運(yùn)用到相關(guān)的移動系統(tǒng)、web應(yīng)用系統(tǒng)等開發(fā)中。相比于IDEA平臺,本系統(tǒng)比較適合使用IDEA平臺進(jìn)行編程和開發(fā)。

2.3 MySQL數(shù)據(jù)庫

MySQL是一種小型的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),因?yàn)槠溥\(yùn)行速度快,占用內(nèi)存空間小,并且源代碼也是開源的,運(yùn)行和維護(hù)成本低,系統(tǒng)性能穩(wěn)定,受到了許多開發(fā)人員的喜愛[9]。考慮到MySQL數(shù)據(jù)庫開發(fā)成本低,功能齊全等因素,大多中小型網(wǎng)站選擇使用MySQL數(shù)據(jù)庫管理數(shù)據(jù)信息。

SQL Server也是近幾年使用較多的關(guān)系型數(shù)據(jù)庫,其與MySQL數(shù)據(jù)庫存在的不同之處主要有,在環(huán)境方面,SQL Server數(shù)據(jù)庫比較適合于.NET環(huán)境,而MySQL數(shù)據(jù)庫適用于幾乎所有的語言;在成本方面,SQL Server數(shù)據(jù)庫是商業(yè)化的,其運(yùn)行多個數(shù)據(jù)庫可許證,雖然有一個免費(fèi)版,但是只能讓你對關(guān)系型數(shù)據(jù)庫管理系統(tǒng)有一定的認(rèn)識與了解,熟悉相關(guān)的使用流程。如果要想使用SQL Server數(shù)據(jù)庫的話,就需要支付相關(guān)費(fèi)用,而MySQL數(shù)據(jù)庫是開源的,其對于用戶來說,使用是完全免費(fèi);在實(shí)際應(yīng)用方面,SQL Server數(shù)據(jù)庫和MySQL數(shù)據(jù)庫均支持Java語言、PHP語言、C++語言等多種編程語言,但是MySQL數(shù)據(jù)庫除了支持上述SQL Server數(shù)據(jù)庫能支持的編程語言外,還支持Scheme、Eiffel等其他編程語言,故而MySQL數(shù)據(jù)庫受歡迎程度比SQL Server數(shù)據(jù)庫更高。

2.4 Java語言

Java語言是一種面向?qū)ο蟮木幊陶Z言,其主要具有繼承、封裝、多態(tài)等特征,從而提高編程工作效率,實(shí)現(xiàn)軟件的設(shè)計和開發(fā)[10]。繼承機(jī)制可以繼承相關(guān)的類和方法,新的類可以在繼承已經(jīng)定義的類的相關(guān)特性基礎(chǔ)上,擴(kuò)展自己新的數(shù)據(jù)和功能,進(jìn)而提高自身的能力。封裝機(jī)制可以提高程序的安全性,其隱藏對象的相關(guān)屬性和行為,對外只提供一個接口,用戶直接通過訪問相應(yīng)的接口來實(shí)現(xiàn)自己需要的功能操作。多態(tài)機(jī)制可以描述對象的多樣性,簡單的來說就是引用相同的對象做不同的事務(wù)。Java語言具有安全高效的優(yōu)點(diǎn),并且其通過依靠Java虛擬機(jī),可以實(shí)現(xiàn)跨平臺操作[11]。Java語言比較容易學(xué)習(xí)和掌握,就目前軟件開發(fā)所使用的開發(fā)類語言而言,Java語言比較受程序員喜愛,應(yīng)用比較廣泛。

2.5本章小結(jié)

本章主要介紹了實(shí)現(xiàn)疫情信息管理系統(tǒng)的相關(guān)理論基礎(chǔ)以及開發(fā)工具。本系統(tǒng)采用B/S模式,使用Java語言、AJAX技術(shù)、MySQL數(shù)據(jù)庫等工具,設(shè)計系統(tǒng)功能、頁面布局、后臺數(shù)據(jù)等。開發(fā)本系統(tǒng)所使用的相關(guān)技術(shù)操作簡單、容易掌握,Java語言具有跨平臺性,可以支持在不同的瀏覽器使用本系統(tǒng),MySQL數(shù)據(jù)庫是開源的,減少了本系統(tǒng)的開發(fā)成本。

3需求分析

3.1功能需求分析

需求分析過程是系統(tǒng)能否成功投入市場,也能否被用戶所接受和使用的非常關(guān)鍵的一個步驟。功能需求分析是通過設(shè)計系統(tǒng)功能來實(shí)現(xiàn)相關(guān)的業(yè)務(wù)事項(xiàng),詳細(xì)分析用戶的實(shí)際需要,確定需要設(shè)計的相關(guān)業(yè)務(wù)事項(xiàng),其是系統(tǒng)實(shí)現(xiàn)的關(guān)鍵,本系統(tǒng)存在的主要功能需求包括用戶注冊管理、用戶信息管理、密碼信息管理等。

3.2技術(shù)需求分析

本系統(tǒng)需要使用Java語言編碼設(shè)計相關(guān)的功能模塊,MySQL數(shù)據(jù)庫創(chuàng)建和存儲數(shù)據(jù)表格,AJAX實(shí)現(xiàn)前臺和后臺之間的交互,并且需要在IDEA開發(fā)環(huán)境中,編寫相關(guān)的Java代碼等系統(tǒng)程序文件,使用MySQL數(shù)據(jù)庫存儲數(shù)據(jù)信息,然后通過使用連接代碼完成與MySQL數(shù)據(jù)庫的搭建工作,再通過使用開發(fā)環(huán)境中的Tomcat插件,完成與Tomcat服務(wù)器的發(fā)布工作,最后通過與Tomcat服務(wù)器的交互行為可以實(shí)現(xiàn)代碼調(diào)試工作。滿足以上相關(guān)的技術(shù)需求,本系統(tǒng)才可以在瀏覽器上進(jìn)行訪問和使用。

3.3數(shù)據(jù)需求分析

在設(shè)計系統(tǒng)功能模塊時,需要收集與系統(tǒng)有關(guān)的數(shù)據(jù)信息,并且對采集的數(shù)據(jù)信息進(jìn)行組織和存儲,分析系統(tǒng)功能設(shè)計,篩選有價值的數(shù)據(jù),而后形成數(shù)據(jù)字典。其中,從龐大的數(shù)據(jù)信息中篩選出有價值的數(shù)據(jù)是比較耗時,也是非常重要的一步,主要依據(jù)信息的來源、信息的有效性、信息的擴(kuò)充性、信息的真實(shí)性等內(nèi)容篩選數(shù)據(jù)。數(shù)據(jù)需求分析階段,為系統(tǒng)的開發(fā)工作做好進(jìn)一步準(zhǔn)備,便于更好的設(shè)計和完成系統(tǒng)。

3.4安全需求分析

安全需求分析是在系統(tǒng)使用過程中對性能的具體要求,對功能需求的一個補(bǔ)充內(nèi)容,也是對功能需求的一個補(bǔ)充內(nèi)容,主要包括響應(yīng)需求、安全性需求、穩(wěn)定性需求、可擴(kuò)展性需求等內(nèi)容。安全需求是在系統(tǒng)功能需求以外的其他必要的需求內(nèi)容,其不論在系統(tǒng)設(shè)計過程,還是在系統(tǒng)投入市場過程,都起到了極其重要的作用。

3.5可行性分析

3.5.1經(jīng)濟(jì)可行性

經(jīng)濟(jì)可行性是決定是否研發(fā)系統(tǒng)的關(guān)鍵性因素。我們主要通過比較實(shí)際的收益和成本的方法,來確定一個系統(tǒng)是否具有經(jīng)濟(jì)可行性。在使用系統(tǒng)的過程中,當(dāng)獲得的收益大于開發(fā)的成本時,說明此系統(tǒng)的研發(fā)在經(jīng)濟(jì)上是可行的。由于本系統(tǒng)的開發(fā)使用的技術(shù)基本上是開源的,獲得技術(shù)上的支持是沒有多少問題的,在軟件實(shí)現(xiàn)方面所花費(fèi)的成本是很低的,甚至不需要花費(fèi)成本。研發(fā)系統(tǒng)的成本主要是來自調(diào)研、硬件和技術(shù)人員等方面。如果系統(tǒng)中需要存儲的數(shù)據(jù)量不是很大,僅需要配置一臺普通的服務(wù)器,即可滿足相關(guān)需求。如果需要存儲的數(shù)據(jù)量很大,則需要配置一臺具有獨(dú)立功能的服務(wù)器,比如管理數(shù)據(jù)庫需要單獨(dú)的數(shù)據(jù)庫服務(wù)器,負(fù)責(zé)接入網(wǎng)站需要web服務(wù)器等等,但是一臺服務(wù)器的價格是比較貴的??紤]到數(shù)據(jù)量和成本,我們使用小型集群服務(wù)器,這樣既可以充分利用相關(guān)的資源,又可以讓系統(tǒng)正常訪問服務(wù)器。

3.5.2技術(shù)可行性

Java語言具有跨平臺性,本系統(tǒng)主要通過Java語言進(jìn)行編碼實(shí)現(xiàn)的,所以本系統(tǒng)可以支持在多個操作系統(tǒng)或者多個瀏覽器上運(yùn)行和使用[14]。MySQL數(shù)據(jù)庫是可以被免費(fèi)使用的,并且MySQL數(shù)據(jù)庫的日常運(yùn)行和維護(hù)工作比較簡單,這樣有利于降低本系統(tǒng)的開發(fā)成本[15]。在學(xué)校期間,本人已經(jīng)學(xué)習(xí)和掌握了Java語言、MySQL數(shù)據(jù)庫、AJAX技術(shù)等相關(guān)的技術(shù)相關(guān)知識以及用法,因此在技術(shù)可行性方面,本系統(tǒng)是可以實(shí)現(xiàn)被設(shè)計與實(shí)現(xiàn)的。

3.5.3操作可行性

本系統(tǒng)所采用網(wǎng)絡(luò)結(jié)構(gòu)是B/S模式,對于開發(fā)人員來說,可以直接復(fù)用相關(guān)的代碼,或者稍微對原代碼進(jìn)行修改,使得其滿足于本系統(tǒng)的相關(guān)需求,如此便可大大節(jié)約了開發(fā)時間,在最優(yōu)最短的時間內(nèi)完成對系統(tǒng)的設(shè)計。對于用戶來說,在傳統(tǒng)的模式下,需要下載客戶端才可使用系統(tǒng)。現(xiàn)在,在新型的模式下,使用本系統(tǒng),就不需要下載,直接選擇瀏覽器打開網(wǎng)址,即可訪問和使用本系統(tǒng)。并且,用戶可以根據(jù)自身的工作需要,選擇相關(guān)的菜單按鈕操作本系統(tǒng)。在系統(tǒng)的一些功能模塊中,本人還添加了相關(guān)的使用提示信息,方便用戶更好更快的了解和使用本系統(tǒng)。因此,本系統(tǒng)的設(shè)計和實(shí)現(xiàn)是具備操作可行性的。

3.6本章小結(jié)

需求分析在軟件開發(fā)周期中是耗時最長的一個環(huán)節(jié),系統(tǒng)的整個設(shè)計和實(shí)現(xiàn)過程主要依賴于需求分析報告。調(diào)查收集出不同用戶對本系統(tǒng)的相關(guān)使用需求,由此設(shè)計相關(guān)的功能模塊,從而期望實(shí)現(xiàn)用戶滿意度較高的實(shí)用型系統(tǒng)。本章主要從功能需求、技術(shù)需求、數(shù)據(jù)需求、安全需求、可行性分析等方面,對系統(tǒng)進(jìn)行需求分析,確保設(shè)計出一款實(shí)用價值比較高的管理系統(tǒng)。

4系統(tǒng)設(shè)計

4.1系統(tǒng)功能設(shè)計

本系統(tǒng)主要通過使用Java語言編碼設(shè)計系統(tǒng)功能,MySQL數(shù)據(jù)庫管理數(shù)據(jù),AJAX技術(shù)設(shè)計簡潔的、友好的網(wǎng)址頁面,然后在IDEA開發(fā)平臺中,編寫相關(guān)的Java代碼文件,接著通過連接語言完成與數(shù)據(jù)庫的搭建工作,再通過平臺提供的Tomcat插件完成信息的交互,最后在瀏覽器中打開系統(tǒng)網(wǎng)址便可使用本系統(tǒng)。本系統(tǒng)的使用角色可以被分為用戶和管理員,用戶具有注冊、查看信息、留言信息等功能,管理員具有修改用戶信息,發(fā)布新聞等功能,系統(tǒng)總體功能設(shè)計圖如圖4-1所示。

疫情信息管理系統(tǒng)

系統(tǒng)設(shè)置管理

公告管理

社區(qū)管控管理

疫苗預(yù)約管理

疫情信息管理

個人信息設(shè)置

密碼信息設(shè)置管理

疫情信息添加

疫情信息刪除

疫情信息修改

社區(qū)管控添加

社區(qū)管控刪除

疫苗預(yù)約添加

疫苗預(yù)約修改

疫苗預(yù)約刪除

公告添加

公告修改

公告刪除

圖4-1系統(tǒng)總體功能設(shè)計圖

4.2數(shù)據(jù)庫設(shè)計

4.2.1概念設(shè)計

在數(shù)據(jù)庫設(shè)計過程中,概念設(shè)計階段是邏輯設(shè)計階段得以實(shí)現(xiàn)的基礎(chǔ),也是根據(jù)用戶參與情況確定對數(shù)據(jù)的處理要求,從而使得數(shù)據(jù)庫設(shè)計成功的關(guān)鍵。概念設(shè)計的主要任務(wù)是將現(xiàn)實(shí)世界的所收集到的使用需求轉(zhuǎn)化為抽象的信息世界結(jié)構(gòu)的過程,能夠真實(shí)的反映現(xiàn)實(shí)生活中實(shí)體與實(shí)體之間的聯(lián)系,數(shù)據(jù)庫的相關(guān)語法和代碼比較容易理解和修改,方便相關(guān)人員將相關(guān)的數(shù)據(jù)信息存儲到數(shù)據(jù)庫中,并對其進(jìn)行修改和使用[18]。

通過將現(xiàn)實(shí)世界中的實(shí)體、屬性、聯(lián)系等內(nèi)容進(jìn)行概念設(shè)計,建立比較抽象的概念數(shù)據(jù)模型,即E-R圖。通過E-R圖可將現(xiàn)實(shí)世界抽象到的概念設(shè)計轉(zhuǎn)變成數(shù)據(jù)庫的實(shí)體設(shè)計,并且能夠明顯的看見各個實(shí)體之間,數(shù)據(jù)的流動情況,具體較強(qiáng)的表達(dá)能力,更加方便于開發(fā)人員尋找與發(fā)現(xiàn)用戶具體的需求[19]。因此,E-R的建立,在整個數(shù)據(jù)庫的設(shè)計過程中,起著至關(guān)重要的作用。本系統(tǒng)主要的實(shí)體有管理員、用戶、留言等。在E-R圖中,矩形表示實(shí)體集,橢圓形表示屬性,菱形表示聯(lián)系。其中,聯(lián)系的類型包括1:1(一對一)、1:n(一對多)、n:m(多對多)關(guān)系。

4.2.2邏輯設(shè)計

本系統(tǒng)使用MySQL數(shù)據(jù)庫管理與系統(tǒng)相關(guān)的數(shù)據(jù)信息。邏輯設(shè)計階段是將上一個階段中的概念數(shù)據(jù)模型,轉(zhuǎn)換為方便數(shù)據(jù)庫進(jìn)行存儲的關(guān)系模型,即基本表的形式,方便開發(fā)人員后期對數(shù)據(jù)模型進(jìn)行優(yōu)化和管理[20]。邏輯設(shè)計階段是整個數(shù)據(jù)庫設(shè)計設(shè)計的關(guān)鍵,與系統(tǒng)有關(guān)的信息將會在這一階段中被存儲在數(shù)據(jù)庫中,當(dāng)用戶使用本系統(tǒng)進(jìn)行相關(guān)的功能操作時,與之有關(guān)的數(shù)據(jù)信息所在的基本表會發(fā)生相應(yīng)的更新變化。數(shù)據(jù)庫的邏輯設(shè)計階段主要任務(wù)是將與系統(tǒng)相關(guān)的數(shù)據(jù)信息,設(shè)計成為方便數(shù)據(jù)庫存儲和管理的基本表格的形式,具體內(nèi)容如下。

表4.1打卡表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yonghu_idInteger用戶
3daka_timeDate打卡時間
4insert_timeDate打卡日期
5didian_addressString打卡地點(diǎn)
6daka_contentString打卡備注
7create_timeDate創(chuàng)建時間

表4.2字典表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2dic_codeString字段
3dic_nameString字段名
4code_indexInteger編碼
5index_nameString編碼名字
6super_idInteger父字段id
7beizhuString備注
8create_timeDate創(chuàng)建時間

表4.3地區(qū)表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2diqu_uuid_numberString地區(qū)編號
3diqu_nameString地區(qū)名稱
4diqu_addressString地區(qū)位置
5fengxian_typesInteger地區(qū)風(fēng)險等級
6diqu_contentString地區(qū)詳情
7create_timeDate創(chuàng)建時間

表4.4公告表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2gonggao_nameString公告名稱
3gonggao_typesInteger公告類型
4gonggao_contentString公告內(nèi)容
5insert_timeDate公告發(fā)布時間
6create_timeDate創(chuàng)建時間

表4.5核酸預(yù)約表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yonghu_idInteger用戶
3hesuanyuyue_uuid_numberString預(yù)約編號
4yuyue_timeDate預(yù)約檢測時間
5jiancedian_typesInteger檢測點(diǎn)
6yuyue_contentString預(yù)約備注
7hesuanyuyue_typesInteger核酸預(yù)約狀態(tài)
8shiji_timeDate實(shí)際檢測時間
9jiancejieguo_typesInteger檢測結(jié)果
10hesuanyuyue_fileString檢測文件
11beizhu_contentString備注
12insert_timeDate申請時間
13create_timeDate創(chuàng)建時間

表4.6社區(qū)管控表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2shequ_typesInteger社區(qū)
3kaishi_timeDate管控開始時間
4jieshu_timeDate管控結(jié)束時間
5yuanyou_contentString管控原因
6fengxian_typesInteger管控等級
7beizhu_contentString管控備注
8insert_timeDate添加時間
9create_timeDate創(chuàng)建時間

表4.7疫苗預(yù)約表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yonghu_idInteger用戶
3yimiaoyuyue_uuid_numberString預(yù)約編號
4zhen_typesInteger第幾針
5yuyue_contentString預(yù)約備注
6yimiaoyuyue_typesInteger疫苗預(yù)約狀態(tài)
7yuyue_timeDate預(yù)約打針時間
8shiji_timeDate實(shí)際打針時間
9yimiao_bianhaoString疫苗編號
10yimiaoshengchan_timeDate疫苗生產(chǎn)日期
11yimiaogongsi_typesInteger疫苗公司
12beizhu_contentString備注
13insert_timeDate申請時間
14create_timeDate創(chuàng)建時間

表4.8疫情信息表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yiqingxinxi_nameString疫情信息名稱
3yiqingxinxi_typesInteger疫情信息類型
4yiqingxinxi_contentString疫情信息內(nèi)容
5insert_timeDate疫情信息發(fā)布時間
6create_timeDate創(chuàng)建時間

表4.9用戶表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yonghu_uuid_numberString用戶編號
3yonghu_nameString用戶姓名
4yonghu_phoneString用戶手機(jī)號
5yonghu_id_numberString用戶身份證號
6yonghu_photoString用戶頭像
7yonghu_emailString電子郵箱
8create_timeDate創(chuàng)建時間

表4.10用戶行程表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2yonghu_idInteger用戶
3diqu_idInteger地區(qū)
4qu_timeDate去的時間
5hui_timeDate回的時間
6yuanyou_contentString去的緣由
7insert_timeDate添加時間
8create_timeDate創(chuàng)建時間

表4.11社區(qū)管理員表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2shequguanliyuan_uuid_numberString社區(qū)管理員編號
3shequguanliyuan_nameString社區(qū)管理員姓名
4shequguanliyuan_phoneString社區(qū)管理員手機(jī)號
5shequguanliyuan_id_numberString社區(qū)管理員身份證號
6shequguanliyuan_photoString社區(qū)管理員頭像
7zhiwei_typesInteger職位
8shequ_typesInteger所屬社區(qū)
9shequguanliyuan_emailString電子郵箱
10create_timeDate創(chuàng)建時間

表4.12管理員表

序號列名數(shù)據(jù)類型說明允許空
1IdIntid
2usernameString用戶名
3passwordString密碼
4roleString角色
5addtimeDate新增時間

4.3本章小結(jié)

本章主要介紹了系統(tǒng)功能設(shè)計、數(shù)據(jù)庫設(shè)計等內(nèi)容。通過設(shè)計系統(tǒng)的總體功能框架,確定系統(tǒng)的功能設(shè)計主要包括疫情信息等模塊。數(shù)據(jù)庫設(shè)計主要分為概念設(shè)計階段和邏輯設(shè)計階段,其中,概念設(shè)計是將現(xiàn)實(shí)世界中的數(shù)據(jù)轉(zhuǎn)變?yōu)樾畔⑹澜缰械母拍钅P?#xff0c;邏輯設(shè)計是將概念設(shè)計中的概念模型轉(zhuǎn)變成可以被數(shù)據(jù)庫存儲的數(shù)據(jù)表格。系統(tǒng)功能設(shè)計好壞是系統(tǒng)得以被編碼實(shí)現(xiàn)的重要依據(jù)。數(shù)據(jù)庫設(shè)計是否符合規(guī)范,是系統(tǒng)能夠成功運(yùn)行的基本保障,也是用戶和系統(tǒng)實(shí)現(xiàn)交互處理的重要前提。

5系統(tǒng)實(shí)現(xiàn)

5.1管理員功能模塊實(shí)現(xiàn)

5.1.1管理員登錄

管理員可以選擇任一瀏覽器打開網(wǎng)址,輸入信息無誤后,以管理員的身份行使相關(guān)的管理權(quán)限,管理員登錄界面設(shè)計如圖5-1所示。

圖5-1管理員登錄界面

5.1.2疫情信息管理

管理員可以通過選擇疫情信息管理,管理相關(guān)的疫情信息信息記錄,比如進(jìn)行查看疫情信息信息標(biāo)題,修改疫情信息信息來源等操作,疫情信息管理界面設(shè)計如圖5-2所示。

圖5-2疫情信息管理界面

5.1.3公告管理

管理員可以通過選擇公告管理,管理相關(guān)的公告信息記錄,比如進(jìn)行查看公告詳情,刪除錯誤的公告信息,發(fā)布公告等操作,公告管理界面如圖5-3所示。

圖5-3 公告管理界面

5.1.4公告類型管理

管理員可以通過選擇公告類型管理,管理相關(guān)的公告類型信息,比如查看所有公告類型,刪除無用公告類型,修改公告類型,添加公告類型等操作,公告類型管理界面設(shè)計如圖5-4所示。

圖5-4公告類型管理界面

ShequguankongController.java

package com.controller;import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;/*** 社區(qū)管控* 后端接口* @author* @email
*/
@RestController
@Controller
@RequestMapping("/shequguankong")
public class ShequguankongController {private static final Logger logger = LoggerFactory.getLogger(ShequguankongController.class);@Autowiredprivate ShequguankongService shequguankongService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//級聯(lián)表service@Autowiredprivate YonghuService yonghuService;@Autowiredprivate ShequguanliyuanService shequguanliyuanService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不會進(jìn)入");else if("用戶".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));else if("社區(qū)管理員".equals(role))params.put("shequguanliyuanId",request.getSession().getAttribute("userId"));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = shequguankongService.queryPage(params);//字典表數(shù)據(jù)轉(zhuǎn)換List<ShequguankongView> list =(List<ShequguankongView>)page.getList();for(ShequguankongView c:list){//修改對應(yīng)字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put("data", page);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);ShequguankongEntity shequguankong = shequguankongService.selectById(id);if(shequguankong !=null){//entity轉(zhuǎn)viewShequguankongView view = new ShequguankongView();BeanUtils.copyProperties( shequguankong , view );//把實(shí)體數(shù)據(jù)重構(gòu)到view中//修改對應(yīng)字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到數(shù)據(jù)");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ShequguankongEntity shequguankong, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,shequguankong:{}",this.getClass().getName(),shequguankong.toString());shequguankong.setInsertTime(new Date());shequguankong.setCreateTime(new Date());shequguankongService.insert(shequguankong);return R.ok();}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody ShequguankongEntity shequguankong, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,shequguankong:{}",this.getClass().getName(),shequguankong.toString());shequguankongService.updateById(shequguankong);//根據(jù)id更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());shequguankongService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上傳*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<ShequguankongEntity> shequguankongList = new ArrayList<>();//上傳的東西Map<String, List<String>> seachFields= new HashMap<>();//要查詢的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"該文件沒有后綴");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后綴為xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//獲取文件路徑File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上傳文件,請聯(lián)系管理員");}else{List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//讀取xls文件dataList.remove(0);//刪除第一行,因?yàn)榈谝恍惺翘崾緁or(List<String> data:dataList){//循環(huán)ShequguankongEntity shequguankongEntity = new ShequguankongEntity();
//                            shequguankongEntity.setShequTypes(Integer.valueOf(data.get(0)));   //社區(qū) 要改的
//                            shequguankongEntity.setKaishiTime(sdf.parse(data.get(0)));          //管控開始時間 要改的
//                            shequguankongEntity.setJieshuTime(sdf.parse(data.get(0)));          //管控結(jié)束時間 要改的
//                            shequguankongEntity.setYuanyouContent("");//詳情和圖片
//                            shequguankongEntity.setFengxianTypes(Integer.valueOf(data.get(0)));   //管控等級 要改的
//                            shequguankongEntity.setBeizhuContent("");//詳情和圖片
//                            shequguankongEntity.setInsertTime(date);//時間
//                            shequguankongEntity.setCreateTime(date);//時間shequguankongList.add(shequguankongEntity);//把要查詢是否重復(fù)的字段放入map中}//查詢是否重復(fù)shequguankongService.insertBatch(shequguankongList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入數(shù)據(jù)異常,請聯(lián)系管理員");}}}
PoiUtil.java
package com.utils;import org.apache.commons.io.FileUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;/*** 文件導(dǎo)入到處*/
public class PoiUtil {/*** 導(dǎo)入** @param url* @return* @throws Exception*/public static List<List<String>> poiImport(String url) throws Exception {List<List<String>> list = new ArrayList<>();// 創(chuàng)建Excel 讀取文件內(nèi)容HSSFWorkbook workbook = new HSSFWorkbook(FileUtils.openInputStream(new File(url)));/*** 第一種方式讀取Sheet頁*/
//      HSSFSheet sheet = workbook.getSheet("Sheet0");/*** 第二種方式讀取Sheet頁*/HSSFSheet sheet = workbook.getSheetAt(0);//獲取工作表for (int i = 0; i < sheet.getLastRowNum()+1; i++) {HSSFRow row = sheet.getRow(i);//獲取行List<String> rowlist = new ArrayList<>();//行數(shù)據(jù)for (int j = 0; j < row.getLastCellNum(); j++) {HSSFCell cell = row.getCell(j);cell.setCellType(Cell.CELL_TYPE_STRING);String value = cell.getStringCellValue();rowlist.add(value);//行中數(shù)據(jù)添加到行中}list.add(rowlist);//將行數(shù)據(jù)添加到list中}return list;}// 導(dǎo)出public static void poiExport(List<List<String>> list, String url) throws Exception {//創(chuàng)建Excel工作薄HSSFWorkbook workbook = new HSSFWorkbook();//創(chuàng)建一個工作表shheetHSSFSheet sheet = workbook.createSheet();for (int i = 0; i < list.size(); i++) {HSSFRow row = sheet.createRow(i);List<String> dataList = list.get(i);for (int j = 0; j < dataList.size(); j++) {HSSFCell cell = row.createCell(j);cell.setCellValue(dataList.get(j));}}FileOutputStream stream = FileUtils.openOutputStream(new File(url));workbook.write(stream);stream.close();}public static void main(String[] args) {try {//導(dǎo)入List<List<String>> lists = PoiUtil.poiImport("C:/Users/Administrator/Desktop/工作1.xls");System.out.println();//導(dǎo)出PoiUtil.poiExport(lists, "C:/Users/Administrator/Desktop/工作1.xls");//
//            List<List<String>> list = new ArrayList<>();
//            ArrayList<String> dataList = new ArrayList<>();
//            dataList.add("標(biāo)題1");
//            dataList.add("標(biāo)題2");
//            dataList.add("標(biāo)題3");
//            list.add(dataList);
//            // 追加數(shù)據(jù)
//            for (int i = 1; i < 10; i++) {// 這里的int 起始是1 也就是第二行開始
//                ArrayList<String> dataList111 = new ArrayList<>();
//                dataList111.add("內(nèi)容" + i);
//                dataList111.add("內(nèi)容1111111121222222222333333333377777777411111111477777777" + i);
//                dataList111.add("內(nèi)容" + i);
//                list.add(dataList111);
//            }
//            PoiUtil.poiExport(list, "C:/Users/Administrator/Desktop/工作1.xls");} catch (Exception e) {e.printStackTrace();}}
}
DakaController.java

package com.controller;import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;/*** 打卡* 后端接口* @author* @email
*/
@RestController
@Controller
@RequestMapping("/daka")
public class DakaController {private static final Logger logger = LoggerFactory.getLogger(DakaController.class);@Autowiredprivate DakaService dakaService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//級聯(lián)表service@Autowiredprivate YonghuService yonghuService;@Autowiredprivate ShequguanliyuanService shequguanliyuanService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不會進(jìn)入");else if("用戶".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));else if("社區(qū)管理員".equals(role))params.put("shequguanliyuanId",request.getSession().getAttribute("userId"));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = dakaService.queryPage(params);//字典表數(shù)據(jù)轉(zhuǎn)換List<DakaView> list =(List<DakaView>)page.getList();for(DakaView c:list){//修改對應(yīng)字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put("data", page);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);DakaEntity daka = dakaService.selectById(id);if(daka !=null){//entity轉(zhuǎn)viewDakaView view = new DakaView();BeanUtils.copyProperties( daka , view );//把實(shí)體數(shù)據(jù)重構(gòu)到view中//級聯(lián)表YonghuEntity yonghu = yonghuService.selectById(daka.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把級聯(lián)的數(shù)據(jù)添加到view中,并排除id和創(chuàng)建時間字段view.setYonghuId(yonghu.getId());}//修改對應(yīng)字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到數(shù)據(jù)");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DakaEntity daka, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,daka:{}",this.getClass().getName(),daka.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永遠(yuǎn)不會進(jìn)入");else if("用戶".equals(role))daka.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));Wrapper<DakaEntity> queryWrapper = new EntityWrapper<DakaEntity>().eq("yonghu_id", daka.getYonghuId()).eq("insert_time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));logger.info("sql語句:"+queryWrapper.getSqlSegment());DakaEntity dakaEntity = dakaService.selectOne(queryWrapper);if(dakaEntity==null){daka.setDakaTime(new Date());daka.setInsertTime(new Date());daka.setCreateTime(new Date());dakaService.insert(daka);return R.ok();}else {return R.error(511,"今日已經(jīng)打過卡");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody DakaEntity daka, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,daka:{}",this.getClass().getName(),daka.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永遠(yuǎn)不會進(jìn)入");
//        else if("用戶".equals(role))
//            daka.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));//根據(jù)字段查詢是否有相同數(shù)據(jù)Wrapper<DakaEntity> queryWrapper = new EntityWrapper<DakaEntity>().notIn("id",daka.getId()).andNew().eq("yonghu_id", daka.getYonghuId()).eq("insert_time", new SimpleDateFormat("yyyy-MM-dd").format(daka.getInsertTime()));logger.info("sql語句:"+queryWrapper.getSqlSegment());DakaEntity dakaEntity = dakaService.selectOne(queryWrapper);if(dakaEntity==null){dakaService.updateById(daka);//根據(jù)id更新return R.ok();}else {return R.error(511,"當(dāng)天已有打卡記錄");}}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());dakaService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上傳*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<DakaEntity> dakaList = new ArrayList<>();//上傳的東西Map<String, List<String>> seachFields= new HashMap<>();//要查詢的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"該文件沒有后綴");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后綴為xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//獲取文件路徑File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上傳文件,請聯(lián)系管理員");}else{List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//讀取xls文件dataList.remove(0);//刪除第一行,因?yàn)榈谝恍惺翘崾緁or(List<String> data:dataList){//循環(huán)DakaEntity dakaEntity = new DakaEntity();
//                            dakaEntity.setYonghuId(Integer.valueOf(data.get(0)));   //用戶 要改的
//                            dakaEntity.setDakaTime(sdf.parse(data.get(0)));          //打卡時間 要改的
//                            dakaEntity.setInsertTime(date);//時間
//                            dakaEntity.setDidianAddress(data.get(0));                    //打卡地點(diǎn) 要改的
//                            dakaEntity.setDakaContent("");//詳情和圖片
//                            dakaEntity.setCreateTime(date);//時間dakaList.add(dakaEntity);//把要查詢是否重復(fù)的字段放入map中}//查詢是否重復(fù)dakaService.insertBatch(dakaList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入數(shù)據(jù)異常,請聯(lián)系管理員");}}}
list.vue
<template><div class="main-content"><!-- 列表頁 --><div v-if="showFlag"><el-form :inline="true" :model="searchForm" class="form-content"><el-row :gutter="20" class="slt" :style="{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}"><el-form-item label="檢測點(diǎn)"><el-input prefix-icon="el-icon-search" v-model="searchForm.indexNameSearch" placeholder="檢測點(diǎn)" clearable></el-input></el-form-item><el-form-item><el-button icon="el-icon-search" type="success" @click="search()">查詢</el-button></el-form-item></el-row><el-row class="ad" :style="{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}"><el-form-item><el-buttonv-if="isAuth('dictionaryJiancedian','新增')"type="success"icon="el-icon-plus"@click="addOrUpdateHandler()">新增</el-button><el-buttonv-if="isAuth('dictionaryJiancedian','刪除')":disabled="dataListSelections.length <= 0"type="danger"icon="el-icon-delete"@click="deleteHandler()">刪除</el-button></el-form-item></el-row></el-form><div class="table-content"><el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader":header-row-style="headerRowStyle" :header-cell-style="headerCellStyle":border="contents.tableBorder":fit="contents.tableFit":stripe="contents.tableStripe":row-style="rowStyle":cell-style="cellStyle":style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"v-if="isAuth('dictionaryJiancedian','查看')":data="dataList"v-loading="dataListLoading"@selection-change="selectionChangeHandler"><el-table-column  v-if="contents.tableSelection"type="selection"header-align="center"align="center"width="50"></el-table-column><el-table-column label="索引" v-if="contents.tableIndex" type="index" width="50" /><el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="codeIndex"header-align="center"label="檢測點(diǎn)編碼"><template slot-scope="scope">{{scope.row.codeIndex}}</template></el-table-column><el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="indexName"header-align="center"label="檢測點(diǎn)名稱"><template slot-scope="scope">{{scope.row.indexName}}</template></el-table-column><!--<el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="beizhu"header-align="center"label="備注"><template slot-scope="scope">{{scope.row.beizhu}}</template></el-table-column>--><el-table-column width="300" :align="contents.tableAlign"header-align="center"label="操作"><template slot-scope="scope"><el-button v-if="isAuth('dictionaryJiancedian','查看')" type="success" icon="el-icon-tickets" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">詳情</el-button><el-button v-if="isAuth('dictionaryJiancedian','修改')" type="primary" icon="el-icon-edit" size="mini" @click="addOrUpdateHandler(scope.row.id)">修改</el-button><el-button v-if="isAuth('dictionaryJiancedian','刪除')" type="danger" icon="el-icon-delete" size="mini" @click="deleteHandler(scope.row.id)">刪除</el-button></template></el-table-column></el-table><el-paginationclsss="pages":layout="layouts"@size-change="sizeChangeHandle"@current-change="currentChangeHandle":current-page="pageIndex":page-sizes="[10, 20, 50, 100]":page-size="Number(contents.pageEachNum)":total="totalPage":small="contents.pageStyle"class="pagination-content":background="contents.pageBtnBG":style="{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}"></el-pagination></div></div><!-- 添加/修改頁面  將父組件的search方法傳遞給子組件--><add-or-update v-if="addOrUpdateFlag" :parent="this" ref="addOrUpdate"></add-or-update></div>
</template>
<script>import AddOrUpdate from "./add-or-update";import styleJs from "../../../utils/style.js";export default {data() {return {searchForm: {key: ""},form:{},dataList: [],pageIndex: 1,pageSize: 10,totalPage: 0,dataListLoading: false,dataListSelections: [],showFlag: true,sfshVisiable: false,shForm: {},chartVisiable: false,addOrUpdateFlag:false,contents:null,layouts: '',};},created() {this.contents = styleJs.listStyle();this.init();this.getDataList();this.contentStyleChange()},mounted() {},filters: {htmlfilter: function (val) {return val.replace(/<[^>]*>/g).replace(/undefined/g,'');}},components: {AddOrUpdate,},methods: {contentStyleChange() {this.contentSearchStyleChange()this.contentBtnAdAllStyleChange()this.contentSearchBtnStyleChange()this.contentTableBtnStyleChange()this.contentPageStyleChange()},contentSearchStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el=>{let textAlign = 'left'if(this.contents.inputFontPosition == 2) textAlign = 'center'if(this.contents.inputFontPosition == 3) textAlign = 'right'el.style.textAlign = textAlignel.style.height = this.contents.inputHeightel.style.lineHeight = this.contents.inputHeightel.style.color = this.contents.inputFontColorel.style.fontSize = this.contents.inputFontSizeel.style.borderWidth = this.contents.inputBorderWidthel.style.borderStyle = this.contents.inputBorderStyleel.style.borderColor = this.contents.inputBorderColorel.style.borderRadius = this.contents.inputBorderRadiusel.style.backgroundColor = this.contents.inputBgColor})if(this.contents.inputTitle) {document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el=>{el.style.color = this.contents.inputTitleColorel.style.fontSize = this.contents.inputTitleSizeel.style.lineHeight = this.contents.inputHeight})}setTimeout(()=>{document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el=>{el.style.color = this.contents.inputIconColorel.style.lineHeight = this.contents.inputHeight})document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el=>{el.style.color = this.contents.inputIconColorel.style.lineHeight = this.contents.inputHeight})document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el=>{el.style.lineHeight = this.contents.inputHeight})},10)})},// 搜索按鈕contentSearchBtnStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .slt .el-button--success').forEach(el=>{el.style.height = this.contents.searchBtnHeightel.style.color = this.contents.searchBtnFontColorel.style.fontSize = this.contents.searchBtnFontSizeel.style.borderWidth = this.contents.searchBtnBorderWidthel.style.borderStyle = this.contents.searchBtnBorderStyleel.style.borderColor = this.contents.searchBtnBorderColorel.style.borderRadius = this.contents.searchBtnBorderRadiusel.style.backgroundColor = this.contents.searchBtnBgColor})})},// 新增、批量刪除contentBtnAdAllStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .ad .el-button--success').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllAddFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllAddBgColor})document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllDelFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllDelBgColor})document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllWarnFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllWarnBgColor})})},// 表格rowStyle({ row, rowIndex}) {if (rowIndex % 2 == 1) {if(this.contents.tableStripe) {return {color:this.contents.tableStripeFontColor}}} else {return ''}},cellStyle({ row, rowIndex}){if (rowIndex % 2 == 1) {if(this.contents.tableStripe) {return {backgroundColor:this.contents.tableStripeBgColor}}} else {return ''}},headerRowStyle({ row, rowIndex}){return {color: this.contents.tableHeaderFontColor}},headerCellStyle({ row, rowIndex}){return {backgroundColor: this.contents.tableHeaderBgColor}},// 表格按鈕contentTableBtnStyleChange(){},// 分頁contentPageStyleChange(){let arr = []if(this.contents.pageTotal) arr.push('total')if(this.contents.pageSizes) arr.push('sizes')if(this.contents.pagePrevNext){arr.push('prev')if(this.contents.pagePager) arr.push('pager')arr.push('next')}if(this.contents.pageJumper) arr.push('jumper')this.layouts = arr.join()this.contents.pageEachNum = 10},init () {},search() {this.pageIndex = 1;this.getDataList();},// 獲取數(shù)據(jù)列表getDataList() {this.dataListLoading = true;let params = {page: this.pageIndex,limit: this.pageSize,sort: 'id',}if(this.searchForm.indexNameSearch!='' && this.searchForm.indexNameSearch!=undefined){params['indexName'] = this.searchForm.indexNameSearch}//本表的params['dicCode'] = "jiancedian_types"//編碼名字params['dicName'] = "檢測點(diǎn)",//漢字名字this.$http({url: "dictionary/page",method: "get",params: params}).then(({ data }) => {if (data && data.code === 0) {this.dataList = data.data.list;this.totalPage = data.data.total;} else {this.dataList = [];this.totalPage = 0;}this.dataListLoading = false;});},// 每頁數(shù)sizeChangeHandle(val) {this.pageSize = val;this.pageIndex = 1;this.getDataList();},// 當(dāng)前頁currentChangeHandle(val) {this.pageIndex = val;this.getDataList();},// 多選selectionChangeHandler(val) {this.dataListSelections = val;},// 添加/修改addOrUpdateHandler(id,type) {this.showFlag = false;this.addOrUpdateFlag = true;this.crossAddOrUpdateFlag = false;if(type!='info'){type = 'else';}this.$nextTick(() => {this.$refs.addOrUpdate.init(id,type);});},// 刪除deleteHandler(id) {var ids = id? [Number(id)]: this.dataListSelections.map(item => {return Number(item.id);});this.$confirm(`確定進(jìn)行[${id ? "刪除" : "批量刪除"}]操作?`, "提示", {confirmButtonText: "確定",cancelButtonText: "取消",type: "warning"}).then(() => {this.$http({url: "dictionary/delete",method: "post",data: ids}).then(({ data }) => {if (data && data.code === 0) {this.$message({message: "操作成功",type: "success",duration: 1500,onClose: () => {this.search();}});} else {this.$message.error(data.msg);}});});},}};
</script>
<style lang="scss" scoped>
.slt {margin: 0 !important;display: flex;}.ad {margin: 0 !important;display: flex;}.pages {& /deep/ el-pagination__sizes{& /deep/ el-input__inner {height: 22px;line-height: 22px;}}}.el-button+.el-button {margin:0;} .tables {& /deep/ .el-button--success {height: 40px;color: #333;font-size: 14px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 4px;background-color: rgba(117, 113, 249, 1);}& /deep/ .el-button--primary {height: 40px;color: #333;font-size: 14px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 4px;background-color: rgba(102, 204, 255, 1);}& /deep/ .el-button--danger {height: 40px;color: #333;font-size: 14px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 4px;background-color: rgba(204, 255, 102, 1);}& /deep/ .el-button {margin: 4px;}}
</style>
http://www.risenshineclean.com/news/2121.html

相關(guān)文章:

  • 哪個網(wǎng)站財經(jīng)做的最好寧波seo資源
  • 移動網(wǎng)站開發(fā)百度百科常州seo收費(fèi)
  • 2017做網(wǎng)站賺錢短視頻平臺推廣方案
  • 重慶seo網(wǎng)站建設(shè)百度站長鏈接提交
  • 手機(jī)有軟件做ppt下載網(wǎng)站王通seo教程
  • 國內(nèi)做日化官方網(wǎng)站怎么推廣軟件
  • 網(wǎng)站開發(fā)自學(xué)還是培訓(xùn)市場營銷計劃
  • 網(wǎng)站開發(fā)會什么做網(wǎng)絡(luò)營銷推廣
  • sfda的網(wǎng)站的建設(shè)特點(diǎn)免費(fèi)推廣的網(wǎng)站平臺
  • 個人網(wǎng)站整站源碼下載阜新網(wǎng)絡(luò)推廣
  • 網(wǎng)站制作與維護(hù)公司seo營銷名詞解釋
  • 哪個網(wǎng)站做演唱會門票網(wǎng)絡(luò)推廣是做什么工作
  • 如何將項(xiàng)目發(fā)布到網(wǎng)上優(yōu)化關(guān)鍵詞首頁排行榜
  • 動態(tài)網(wǎng)站沒有數(shù)據(jù)庫怎么做百度推廣代運(yùn)營公司
  • 做日本暖暖小視頻網(wǎng)站seo服務(wù)內(nèi)容
  • 《網(wǎng)頁設(shè)計與網(wǎng)站建設(shè)》大作業(yè)要求關(guān)鍵詞愛站網(wǎng)關(guān)鍵詞挖掘工具
  • 想建立什么網(wǎng)站嗎關(guān)鍵詞調(diào)詞平臺哪個好
  • 網(wǎng)站做二級站全網(wǎng)網(wǎng)絡(luò)營銷
  • 織夢 網(wǎng)站根目錄谷歌瀏覽器下載
  • 如何做網(wǎng)站走查一站式海外推廣平臺
  • 外貿(mào)網(wǎng)站建設(shè)推廣公司百度 營銷推廣怎么做
  • 做網(wǎng)站運(yùn)營這工作怎么樣注冊域名
  • 一搜同志網(wǎng)站建設(shè)電話百度登錄個人中心
  • wordpress vip 插件網(wǎng)站seo推廣seo教程
  • 深圳疫情最新消息今天seo指搜索引擎
  • 西安做網(wǎng)站公司網(wǎng)絡(luò)優(yōu)化師是什么工作
  • 安徽六安瓜片是什么茶百家號seo怎么做
  • 企業(yè)商城建站最新小組排名
  • 網(wǎng)站建設(shè)及發(fā)展成品視頻直播軟件推薦哪個好一點(diǎn)
  • 微信上如何做網(wǎng)站網(wǎng)絡(luò)服務(wù)提供者不履行法律行政法規(guī)規(guī)定