功能: 用户分为患者,医生,管理员,患者可进行注册选择医生 挂号,选择日期,选择号源,医生可进行接诊,管理员可 对用户,医生信息的维护等等功能。
二、项目运行环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: Jdbc+ Servlert + Jsp + css + Javascript + JQuery + Ajax + Fileupload等等。
登录拦截器代码:
@Component
public class LoginInterceptor implements HandlerInterceptor{
private Logger log = LoggerFactory.getLogger(LoginInterceptor.class);
@Autowired
private SiteConfig siteConfig;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler){
String requestURI = request.getRequestURI();
HttpSession session = request.getSession();
session.setAttribute(SessionConstant.SESSION_USER_AUTH_KEY, AppConfig.ORDER_AUTH);
Object attribute = session.getAttribute(SessionConstant.SESSION_USER_LOGIN_KEY);
if(attribute == null){
log.info("用户还未登录或者session失效,重定向到登录页面,当前URL=" + requestURI);
//首先判断是否是ajax请求
if(StringUtil.isAjax(request)){
//表示是ajax请求
try {
response.setCharacterEncoding("UTF-8");
response.getWriter().write(JSON.toJSonString(CodeMsg.USER_SESSION_EXPIRED));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}
//说明是普通的请求,可直接重定向到登录页面
//用户还未登录或者session失效,重定向到登录页面
try {
response.sendRedirect("/system/login");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}
log.info("该请求符合登录要求,放行" + requestURI);
if(!StringUtil.isAjax(request)){
//若不是ajax请求,则将菜单信息放入页面模板变量
User user = (User)attribute;
List
医院预约挂号系统后台管理页面代码:
${siteName!""}后台管理系统主页
<#include "../common/header.ftl"/>
<#include "../common/left-menu.ftl"/>
<#include "../common/header-menu.ftl"/>
备份文件
${databaseBackupTotal!"0"}
用户总数
${userTotal!"0"}
当前在线用户
${onlineUserTotal!"0"}
操作日志
${operatorLogTotal!"0"}条
<#include "../common/third-menu.ftl"/>
医生编号
医生名称
病人名称
所属科室
支付状态
出诊状态
<#if orderReceivings?size gt 0>
<#list orderReceivings as orderReceiving>
${orderReceiving.doctor.doctorDno}
${orderReceiving.doctor.user.name}
${orderReceiving.orderRegistration.patient.user.name}
${orderReceiving.doctor.department.name}
<#if orderReceiving.payStatus == 1>
未支付
<#else>
已支付
#if>
<#if orderReceiving.status == 1>
未完成
<#else>
已完成
#if>
#list>
#if>
<#include "../common/footer.ftl"/>



