民政救助系統(tǒng)|基于Spring Boot的民政救助系統(tǒng)
項目編號:BS-XX-193
前言:
隨著計算機技術(shù)和網(wǎng)絡(luò)技術(shù)的快速發(fā)展,信息化建設(shè)已經(jīng)成為影響我國社會各行各業(yè)發(fā)展的重要因素,特別是電子政務(wù)系統(tǒng)的運用,受到了我國很多政府部門的親睞,也給他們政務(wù)工作帶來了顯著的效果。加上我國醫(yī)療制度不斷的改革與發(fā)展,在醫(yī)院業(yè)務(wù)流程上也提出實現(xiàn)信息化,同時,民政部門救助工作也應(yīng)該積極響應(yīng)國家信息化建設(shè)的號召,把手工的業(yè)務(wù)流程轉(zhuǎn)化為信息化流程,使整個業(yè)務(wù)流程更加高效和規(guī)范。而我國民政救助工作不是獨立的一項工作,運作過程中涉及貧困人口管理、工作內(nèi)容管理、資金管理、扶貧幫對管理、追蹤記錄等眾多的模塊,這樣民政部門要實現(xiàn)民政救助業(yè)務(wù)的信息化就變的非常困難,民政救助系統(tǒng)建設(shè)一個信息管理系統(tǒng),目前國家還沒有建設(shè)一款比較成熟和完善的系統(tǒng),還需要更多的學(xué)者進行深入的研究。本文就是在這種背景下對民政救助系統(tǒng)的開發(fā)展開探討,通過結(jié)合民政救助需求實際情況,對民政救助系統(tǒng)設(shè)計進行了研究與系統(tǒng)的開發(fā)工作。在民政救助系統(tǒng)設(shè)計方面,為了更方便于軟件開發(fā)與維護,采用B/S三層結(jié)構(gòu)。在設(shè)計過程中,把民政救助系統(tǒng)分為了貧困人口管理模塊、工作內(nèi)容管理模塊、資金管理模塊、扶貧幫對管理模塊、追蹤記錄功能模塊等五個部分,希望可以實現(xiàn)民政救助內(nèi)部人員的網(wǎng)上辦公。這個系統(tǒng)的實施運行可以提高民政救助部門的內(nèi)部辦公的效率,規(guī)范辦公流程,為民政部門的信息化發(fā)展起到積極的作用。
一,環(huán)境介紹
語言環(huán)境:Java:? jdk1.8
數(shù)據(jù)庫:Mysql: mysql5.7
應(yīng)用服務(wù)器:Tomcat:? tomcat8.5.31
開發(fā)工具:IDEA或eclipse
二,項目簡介
民政救助系統(tǒng)提供了貧困人口管理、工作內(nèi)容管理、資金管理、扶貧幫對管理、追蹤記錄等功能。主要進行貧困人口管理:對貧困人口進行注冊、申請、審批等操作 2.工作內(nèi)容管理:申請管理扶貧補助、管理扶貧項目 3.資金管理:記錄系統(tǒng)金額的使用情況,近路當前資金總量,資金使用過多余額較少時給出提醒。 4.扶貧幫對管理:扶貧對象信息管理,扶貧主體信息管理,結(jié)對管理 5.追蹤記錄:幫扶記錄、幫扶措施、幫扶計劃、幫扶成效。
本系統(tǒng)初步分為七個模塊主要是貧困人口管理,工作內(nèi)容管理,資金管理,扶貧幫對管理,追蹤記錄,救濟金管理,建檔立卡等七個主要的模塊。
(1)貧困人口管理模塊:這個模塊主要包括貧困人口注冊,貧困人口
申請,貧困人口審批等功能。
(2)工作內(nèi)容管理模塊:這個模塊主要包括申請管理扶貧補助,管理扶貧項目。
(3)資金管理模塊:這個模塊主要包括記錄系統(tǒng)金額的使用情況,近路當前資金總量,資金使用過多余額較少時給出提醒。
(4)扶貧幫對管理模塊:這個模塊主要包括扶貧對象信息管理,扶貧主體信息管理,結(jié)對管理。
(5)追蹤記錄模塊:這個模塊主要包括幫扶記錄、幫扶措施、幫扶計劃、幫扶成效。
民政救助系統(tǒng)提供了貧困人口管理、工作內(nèi)容管理、資金管理、扶貧幫對管理、追蹤記錄等功能。主要進行貧困人口管理:對貧困人口進行注冊、申請、審批等操作 2.工作內(nèi)容管理:申請管理扶貧補助、管理扶貧項目 3.資金管理:記錄系統(tǒng)金額的使用情況,近路當前資金總量,資金使用過多余額較少時給出提醒。 4.扶貧幫對管理:扶貧對象信息管理,扶貧主體信息管理,結(jié)對管理 5.追蹤記錄:幫扶記錄、幫扶措施、幫扶計劃、幫扶成效。功能模塊圖如圖2-1所示:

圖2-1系統(tǒng)功能模塊圖
普通游客可以進行注冊,登錄,貧困人口申請,貧困人口注冊用戶功能用例如圖2-2用戶功能用例圖

圖2-2用戶功能用例圖
管理員通過系統(tǒng)內(nèi)置的賬戶登錄,管理員賬戶除了能使用普通用戶的所有功能之外,還能進入后臺管理頁面對用戶進行貧困人口注冊,貧困人口申請,貧困人口審批,貧困人口注冊,管理扶貧項目,記錄資金,扶貧幫對管理等如圖2-3
管理員用例圖

圖2-3管理員用例圖
三,系統(tǒng)展示
3.1注冊和登錄
前端登錄與注冊頁面由login.vue和register.vue實現(xiàn)用戶信息由userInfo.vue實現(xiàn)。用戶首先需要輸入用戶名和郵箱,之后點擊發(fā)送驗證碼,前端會將用戶名和郵箱通過/api/sendCode提交到后端。后端接受到數(shù)據(jù)之后,首先會驗證郵箱是否符合格式,郵箱是否已經(jīng)被注冊,如果條件成立,則返回相關(guān)提示信息。否則將生成驗證碼,通過郵件發(fā)送至用戶郵箱,同時將郵箱和驗證碼存儲于session中。之后用戶需要將其他信息填寫完畢,并且輸入驗證碼,點擊注冊,前端會通過/api/register接口將數(shù)據(jù)提交到后端。后端收到數(shù)據(jù)后,首先會通過提交信息的郵箱從session中讀取之前存儲的驗證碼并進行對比,如果不一致,則返回驗證碼無效提示信息,否則繼續(xù)業(yè)務(wù)。之后會驗證郵箱是否符合規(guī)范,以及是否被注冊,如果驗證通過,則后端調(diào)用服務(wù)層類userService的register方法添加用戶,register方法首先會將用戶的密碼進行MD5加密,填充注冊時間,用戶狀態(tài)等信息,然后通過持久層類userMapper的方法將用戶信息提交至數(shù)據(jù)庫。提交成功之將創(chuàng)建用戶的文件倉庫,通過調(diào)用fileStoreService的 createFileStore方法創(chuàng)建對應(yīng)用戶的文件倉庫并提交到數(shù)據(jù)庫。界面實現(xiàn)效果如圖5-1所示。
完成注冊之后用戶就可以登錄了。輸入用戶名和密碼之后點擊登錄,前端會將攜帶用戶名與密碼通過/api/login接口提交至后端,后端調(diào)用服務(wù)層類userService的login方法來處理數(shù)據(jù)。首先會將用戶的明文密碼使用MD5加密,之后通過持久層類userMapper的方法去數(shù)據(jù)庫中查詢是否存在對應(yīng)用戶名的用戶,然后對比密碼是否正確,并返回相應(yīng)結(jié)果至控制層。如果賬戶密碼正確,則將查詢到的用戶數(shù)據(jù)存儲于session中,并且生成token提交至數(shù)據(jù)庫中。之后將提示信息與token返回至前端,前端會將token存儲于cookie中,以保持登錄狀態(tài)。界面實現(xiàn)效果如圖5-2所示。
用戶完成登錄之后,將跳轉(zhuǎn)至網(wǎng)盤界面,同時通過/api/getTokenVerity接口驗證token是否有效,然后通過/api/getLoggedUser接口向后端的session中獲取當前登錄用戶信息,并存儲于cookie中。

?

3.2貧困人口管理

3.3申請管理扶貧補助

3.4管理扶貧項目


?

3.5資金管理



3.6扶貧幫對管理模塊

5.7追蹤記錄模塊


?

四,核心代碼展示
package cn.poverty.api.controller;import cn.afterturn.easypoi.handler.inter.IExcelDictHandler;import cn.poverty.interaction.req.item.apply.ReliefItemApplyAddReq;import cn.poverty.interaction.req.item.apply.ReliefItemApplyPageReq;import cn.poverty.interaction.req.item.apply.ReliefItemApplyReq;import cn.poverty.interaction.req.item.apply.ReliefItemApplyUpdateReq;import cn.poverty.interaction.resp.base.ApiResponse;import cn.poverty.interaction.resp.item.apply.ReliefItemApplyResp;import cn.poverty.interaction.resp.page.Pagination;import cn.poverty.service.ReliefItemApplyService;import lombok.extern.slf4j.Slf4j;import org.apache.shiro.authz.annotation.RequiresPermissions;import org.springframework.transaction.annotation.Propagation;import org.springframework.transaction.annotation.Transactional;import org.springframework.web.bind.annotation.DeleteMapping;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annotation.PutMapping;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;import javax.servlet.http.HttpServletResponse;import javax.validation.Valid;import java.util.Arrays;/**
* @author
* @packageName cn.poverty.api.controller
* @Description: 前端控制器
* @date
*/public class ReliefItemApplyController extends BaseApiController { ? ?
? ?private ReliefItemApplyService reliefItemApplyService; ? ?
? ?private HttpServletResponse response; ? ?
? ?private IExcelDictHandler excelDictHandler; ? ?/**
? ? * 申請扶貧項目
? ? * @author
? ? * @date
? ? * @param addReq 申請扶貧項目請求參數(shù)
? ? */
? ?
? ?
? ?public ApiResponse applyItem({
? ? ? ?reliefItemApplyService.applyItem(addReq); ? ? ? ? ReliefItemApplyReq addReq)return apiResponse();
? ?} ? ?/**
? ? * 新增
? ? * @author
? ? * @date
? ? * @param addReq 新增Req
? ? */
? ?
? ?
? ?public ApiResponse addItem({
? ? ? ?reliefItemApplyService.addItem(addReq); ? ? ? ? ReliefItemApplyAddReq addReq)return apiResponse();
? ?} ? ?/**
? ? * 主鍵ID集合批量
? ? *
? ? * @date
? ? * @param mainIdList 主鍵ID集合
? ? */
? ?
? ?
? ?public ApiResponse batchDeleteItem({
? ? ? ?reliefItemApplyService.batchDeleteItem(Arrays.asList(mainIdList.split( String mainIdList)","))); ? ? ? ?return apiResponse();
? ?} ? ?/**
? ? * 分頁查詢
? ? *
? ? * @date
? ? * @param ?pageReq 分頁查詢Req
? ? * @return Pagination
? ? */
? ?
? ?
? ?public ApiResponse<Pagination<ReliefItemApplyResp>> queryByPage( ? ? ? ? ? ?{ ? ? ? ? ReliefItemApplyPageReq pageReq)return apiResponse(reliefItemApplyService.queryByPage(pageReq));
? ?} ? ?/**
? ? * 更新
? ? *
? ? * @date
? ? * @param updateReq 更新請求參數(shù)
? ? */
? ?
? ?
? ?public ApiResponse updateItem({
? ? ? ?reliefItemApplyService.updateItem(updateReq); ? ? ? ? ReliefItemApplyUpdateReq updateReq)return apiResponse();
? ?}
}
package cn.poverty.api.controller;import cn.poverty.common.utils.alibaba.AliOssService;import cn.poverty.interaction.req.common.MultipleFileAccessUrlReq;import cn.poverty.interaction.resp.base.ApiResponse;import cn.poverty.interaction.resp.upload.AppFileUrlResp;import cn.poverty.interaction.resp.upload.MultipartFileUrlResp;import org.apache.shiro.authz.annotation.RequiresPermissions;import org.springframework.web.bind.annotation.DeleteMapping;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.bind.annotation.RestController;import org.springframework.web.multipart.MultipartFile;import javax.annotation.Resource;import javax.validation.Valid;import java.util.Arrays;import java.util.List;/**
* @author
* @projectName poverty-help-api
* @Description: 系統(tǒng)文件相關(guān)前端控制器
* @date
*/public class SystemFileController extends BaseApiController { ? ?
? ?private AliOssService aliOssService; ? ?/**
? ? * 拿到文件直接訪問路徑
? ? *
? ? * @date
? ? * @param fileNames
? ? * @return ApiResponse
? ? */
? ?
? ?
? ?public ApiResponse<List<AppFileUrlResp>> appFileAccessUrl({ ? ? ? ? String fileNames)return apiResponse(aliOssService.getObjectAccessUrlList(Arrays.asList(fileNames.split(","))));
? ?} ? ?/**
? ? * 拿到單個文件名稱的地址
? ? * @author
? ? * @date
? ? * @param fileName 文件名稱
? ? * @return String
? ? */
? ?
? ?public ApiResponse<String> singleFileAccessUrl({ ? ? ? ? String fileName)return apiResponse(aliOssService.getObjectAccessUrl(fileName));
? ?} ? ?/**
? ? * 拿到多個文件名稱的地址
? ? * @author
? ? * @date
? ? * @param multipleFileAccessUrlReq 文件名稱集合
? ? * @return String
? ? */
? ?
? ?public ApiResponse<List<String>> multipleFileAccessUrl({ ? ? ? ? MultipleFileAccessUrlReq multipleFileAccessUrlReq)return apiResponse(aliOssService.getObjectAccessUrlList(multipleFileAccessUrlReq.getFileNameList()));
? ?} ? ?/**
? ? * 拿到多個文件名稱的地址
? ? * @author
? ? * @date
? ? * @param multipleFileAccessUrlReq 文件名稱集合
? ? * @return List
? ? */
? ?
? ?public ApiResponse<List<MultipartFileUrlResp>> queryMultipleFileAccessUrl({ ? ? ? ? MultipleFileAccessUrlReq multipleFileAccessUrlReq)return apiResponse(aliOssService.getObjectAccessUrlList(multipleFileAccessUrlReq.getFileNameList()));
? ?} ? ?/**
? ? * 刪除OSS的文件
? ? * @author
? ? * @date
? ? * @param name 刪除OSS的文件
? ? */
? ?
? ?public ApiResponse deleteFileByFileName({
? ? ? ?aliOssService.deleteObject(name); ? ? ? ? String name)return apiResponse();
? ?} ? ?/**
? ? * 上傳文件
? ? *
? ? * @date
? ? * @param file
? ? * @return String
? ? */
? ?
? ?public ApiResponse<String> uploadFile({ ? ? ? ? MultipartFile file)return apiResponse(aliOssService.multipartFileToOss(file,false));
? ?} ? ?/**
? ? * 上傳文件
? ? *
? ? * @date
? ? * @param file
? ? * @return String
? ? */
? ?
? ?public ApiResponse<String> uploadFileMixed({ ? ? ? ? MultipartFile file)return apiResponse(aliOssService.mixFileToOss(file,true));
? ?}
}
package cn.poverty.api.controller;import cn.afterturn.easypoi.handler.inter.IExcelDictHandler;import cn.poverty.interaction.req.item.ReliefItemAddReq;import cn.poverty.interaction.req.item.ReliefItemPageReq;import cn.poverty.interaction.req.item.ReliefItemUpdateReq;import cn.poverty.interaction.resp.base.ApiResponse;import cn.poverty.interaction.resp.item.ReliefItemResp;import cn.poverty.interaction.resp.page.Pagination;import cn.poverty.service.ReliefItemService;import lombok.extern.slf4j.Slf4j;import org.apache.shiro.authz.annotation.RequiresPermissions;import org.springframework.web.bind.annotation.DeleteMapping;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annotation.PutMapping;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;import javax.servlet.http.HttpServletResponse;import javax.validation.Valid;import java.util.Arrays;import java.util.List;/**
* @author
* @packageName cn.poverty.api.controller
* @Description: 前端控制器
* @date
*/public class ReliefItemController extends BaseApiController { ? ?
? ?private ReliefItemService reliefItemService; ? ?
? ?private HttpServletResponse response; ? ?
? ?private IExcelDictHandler excelDictHandler; ? ?/**
? ? * 新增
? ? *
? ? * @date
? ? * @param addReq 新增Req
? ? */
? ?
? ?
? ?public ApiResponse addItem({
? ? ? ?reliefItemService.addItem(addReq); ? ? ? ? ReliefItemAddReq addReq)return apiResponse();
? ?} ? ?/**
? ? * 主鍵ID集合批量
? ? *
? ? * @date
? ? * @param mainIdList 主鍵ID集合
? ? */
? ?
? ?
? ?public ApiResponse batchDeleteItem({
? ? ? ?reliefItemService.batchDeleteItem(Arrays.asList(mainIdList.split( String mainIdList)","))); ? ? ? ?return apiResponse();
? ?} ? ?/**
? ? * 分頁查詢
? ? *
? ? * @date
? ? * @param ?pageReq 分頁查詢Req
? ? * @return Pagination
? ? */
? ?
? ?
? ?public ApiResponse<Pagination<ReliefItemResp>> queryByPage( ? ? ? ? ? ?{ ? ? ? ? ReliefItemPageReq pageReq)return apiResponse(reliefItemService.queryByPage(pageReq));
? ?} ? ?/**
? ? * 查詢所有項目
? ? *
? ? * @date
? ? * @return java.util.List
? ? */
? ?
? ?public ApiResponse<List<ReliefItemResp>> queryAllItem(){ ? ? ? ?return apiResponse(reliefItemService.queryAllItem());
? ?} ? ?/**
? ? * 更新
? ? *
? ? * @date
? ? * @param updateReq 更新請求參數(shù)
? ? */
? ?
? ?
? ?public ApiResponse updateItem({
? ? ? ?reliefItemService.updateItem(updateReq); ? ? ? ? ReliefItemUpdateReq updateReq)return apiResponse();
? ?}
}
五,項目總結(jié)
隨著計算機技術(shù)和網(wǎng)絡(luò)技術(shù)的快速發(fā)展,信息化建設(shè)已經(jīng)成為影響我國社會各行各業(yè)發(fā)展的重要因素,特別是電子政務(wù)系統(tǒng)的運用,受到了我國很多政府部門的親睞,也給他們政務(wù)工作帶來了顯著的效果。加上我國扶貧制度不斷的改革與發(fā)展,在扶貧業(yè)務(wù)流程上也提出實現(xiàn)信息化,同時,民政部門救助工作也應(yīng)該積極響應(yīng)國家信息化建設(shè)的號召,把手工的業(yè)務(wù)流程轉(zhuǎn)化為信息化流程,使整個業(yè)務(wù)流程更加高效和規(guī)范。而我國民政救助工作不是獨立的一項工作,運作過程中涉及扶貧、資金管理、貧困人口管理等眾多的部門,這樣民政部門要實現(xiàn)民政救助業(yè)務(wù)的信息化就變的非常困難,民政救助系統(tǒng)建設(shè)一個信息管理系統(tǒng),目前國家還沒有建設(shè)一款比較成熟和完善的系統(tǒng),還需要更多的學(xué)者進行深入的研究。 本文就是在這種背景下對民政救助系統(tǒng)的開發(fā)展開探討,通過結(jié)合民政救助需求實際情況,對民政救助系統(tǒng)設(shè)計進行了研究與系統(tǒng)的開發(fā)工作。在民政救助系統(tǒng)設(shè)計方面,為了更方便于軟件開發(fā)與維護,采用B/S三層結(jié)構(gòu)。在設(shè)計過程中,把民政救助系統(tǒng)分為了辦公中心功能模塊、民政城市優(yōu)撫醫(yī)療救助功能模塊、民政農(nóng)村優(yōu)撫醫(yī)療救助功能模塊、系統(tǒng)維護功能模塊、醫(yī)療機構(gòu)救助功能模塊等五個部分,希望可以實現(xiàn)民政救助內(nèi)部人員的網(wǎng)上辦公。這個系統(tǒng)的實施運行可以提高民政救助部門的內(nèi)部辦公的效率,規(guī)范辦公流程,為民政部門的信息化發(fā)展起到積極的作用。