大家好,今天給大家分享一個醫院門診預約系統,2020年4月做的一個項目,基于SSM整合開發。主要分為四個角色:管理者,醫院收費人員,醫生,病人。
主要有一下功能:注冊,登陸、病人資訊管理、醫生資訊管理、收費人員資訊管理、處方管理、收費管理、預約、公告管理等。
**
- 登入頁面
**

**
- 管理者首頁(收費人員、醫生、患者是不同的)
**
**
- 患者管理,主要看患者資訊
**
**
- 醫生管理
**
**
- 預約 可以預約醫生看病
**
**
- 受理,醫生進行受理
**
**
- 添加處方,醫生看病開藥
**
**
- 項目采用SSM架構,下面是項目結構
**
**
- 資料庫分為6張表,管理人員在admin中,患者在user中
**
**
- springMVC的相關配置
**
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<!-- 配置包掃描器,掃描@Controller注解的類 -->
<context:component-scan base-package="com.ssm.mty.controller" />
<!-- 加載注解驅動 -->
<mvc:annotation-driven />
<!--配置靜态資源的通路映射,此配置中的檔案,将不被前端控制器攔截 -->
<mvc:resources location="/js/" mapping="/js/**"/>
<mvc:resources location="/css/" mapping="/css/**"/>
<mvc:resources location="/fonts/" mapping="/fonts/**"/>
<mvc:resources location="/images/" mapping="/images/**"/>
<mvc:resources location="/lib/" mapping="/lib/**"/>
<mvc:resources location="/layui_exts/" mapping="/layui_exts/**"/>
<!-- 配置視圖解析器 -->
<bean class=
"org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
- 項目采用的分頁是pagehelper
@RequestMapping(value = "/findBook")
public String findBook(Integer pageIndex, Integer pageSize, Model model,HttpServletRequest request) {
HttpSession session = request.getSession();
if(session.getAttribute("ad") == null){
session.setAttribute("msg", "對不起,請登入!");
return "login";
}
PageInfo<Book> pageList = bookService.findPageInfo(pageIndex,pageSize);
List<Admin> admin = adminService.getAll();
List<Admin> docList = new ArrayList<Admin>();
for(int i = 0 ;i<admin.size();i++){
if("03".equals(admin.get(i).getType()) ){
docList.add(admin.get(i));
}
}
model.addAttribute("pageList",pageList);
model.addAttribute("docList",docList);
return "BookList";
}