基于SSM医院门诊在线预约挂号网站-分诊流程网站(idea-javaweb-php-net-j2ee-springboot)待就诊-诊疗记录-药品-检查收费缴费-排队-排号-医生病人患者管理-病症发布

1 概述

 

系统主要为用户提供了医生、患者、管理员三种权限的用户,实现了前台患者查看信息、在线挂号、登录、注册等;后台医生管理坐诊信息、管理就诊信息、修改密码;后台管理员管理公告、管理科室、管理就诊、管理用户、修改密码等。在设计方面,本系统采用MVC模式,同时使用JSP技术进行动态页面的设计,使用Ajax进行页面异步交互。后台数据库选用mysql数据库。

2 数据库表

 

表5  挂号就诊信息

字段名称

字段大小

字段类型

说明

orderId

4

int

订单编号

goodsId

4

int

商品编号

status

4

int

状态0已挂号,1检查缴费,100治疗完毕买药,101复诊

 

表6  科室信息

字段名称

字段大小

字段类型

说明

typeId

4

int

编号

typeName

20

varchar

名称

 

表7 在线挂号信息

字段名称

字段大小

字段类型

说明

orderId

4

长整型(3)

在线挂号编号

goodsId

4

长整型(3)

经验编号

status

4

长整型(3)

状态0未确认,1已确认,100在线挂号,101退约

 

3 关键代码

 

package com.control.admin;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dao.CustomerInfoDAO;
import com.util.PublicToolCheckParam;
import com.util.PublicToolShowCustomerInfoList;
import com.util.Validate;

public class ManageCustomerInfo extends HttpServlet {

    /**
     *
     */
    private static final long serialVersionUID = 3099608914702213565L;
    static CustomerInfoDAO cdao = new CustomerInfoDAO();

    public static void coolCustomerInfo(HttpServletRequest request,
                                        HttpServletResponse response) throws ServletException, IOException {
        String customerId = Validate.replaceHtml(request
                .getParameter("customerId"));
        String isCooled = Validate
                .replaceHtml(request.getParameter("isCooled"));
        if (PublicToolCheckParam.checkNullAndEmpty(customerId)
                && PublicToolCheckParam.checkNullAndEmpty(isCooled)) {
            cdao.coolCustomer(Integer.parseInt(customerId),
                    Integer.parseInt(isCooled));
            String isSearching = Validate.replaceHtml(request
                    .getParameter("isSearching"));
            String currentPage = Validate.replaceHtml(request.getParameter("currentPage"));
            if (PublicToolCheckParam.checkNullAndEmpty(isSearching)) {
                String key = Validate.replaceHtml(request.getParameter("key"));
                PublicToolShowCustomerInfoList.searchCustomerInfo(request,
                        response, currentPage, key);
                request.setAttribute("key", key);
                request.setAttribute("isSearching", "yes");
            } else {
                PublicToolShowCustomerInfoList.showCustomerInfoList(request,
                        response, currentPage);
            }
        }
        request.getRequestDispatcher("../admin/manageCustomerInfo.jsp")
                .forward(request, response);

    }

    public static void coolMoreCustomerInfo(HttpServletRequest request,
                                            HttpServletResponse response) throws ServletException, IOException {

        String currentPage = Validate.replaceHtml(request.getParameter("currentPage"));
        String[] ckb = request.getParameterValues("ckb");
        if (ckb != null) {
            for (int i = 0; i < ckb.length; i++) {
                // cdao.coolCustomer(Integer.parseInt(ckb[i]));
            }
        }
        PublicToolShowCustomerInfoList.showCustomerInfoList(request, response,
                currentPage);
        request.getRequestDispatcher("../admin/manageCustomerInfo.jsp")
                .forward(request, response);

    }

    public static void searchCustomerInfo(HttpServletRequest request,
                                          HttpServletResponse response) throws ServletException, IOException {

        String currentPage = Validate.replaceHtml(request.getParameter("currentPage"));
        String key = Validate.replaceHtml(request.getParameter("key"));
        PublicToolShowCustomerInfoList.searchCustomerInfo(request, response,
                currentPage, key);
        request.setAttribute("isSearching", "yes");
        request.setAttribute("key", key);

        CustomerInfoDAO cdao = new CustomerInfoDAO();

        int dongjie = cdao.getsdongjie(key);
        int zhengchang = cdao.getszhengchang(key);
        request.setAttribute("dongjie", dongjie);
        request.setAttribute("zhengchang", zhengchang);

        request.getRequestDispatcher("../admin/manageCustomerInfo.jsp")
                .forward(request, response);

    }

    public static void showManageCustomerInfoPage(HttpServletRequest request,
                                                  HttpServletResponse response) throws ServletException, IOException {

        CustomerInfoDAO cdao = new CustomerInfoDAO();

        int dongjie = cdao.getdongjie();
        int zhengchang = cdao.getzhengchang();
        request.setAttribute("dongjie", dongjie);
        request.setAttribute("zhengchang", zhengchang);

        String currentPage = Validate.replaceHtml(request.getParameter("currentPage"));
        PublicToolShowCustomerInfoList.showCustomerInfoList(request, response,
                currentPage);
        request.getRequestDispatcher("../admin/manageCustomerInfo.jsp")
                .forward(request, response);

    }

    /**
     * Constructor of the object.
     */
    public ManageCustomerInfo() {
        super();
    }

    /**
     * Destruction of the servlet. <br>
     */
    public void destroy() {
        super.destroy(); // Just puts "destroy" string in log
        // Put your code here
    }

    /**
     * The doGet method of the servlet. <br>
     * <p>
     * This method is called when a form has its tag value method equals to get.
     *
     * @param request  the request send by the client to the server
     * @param response the response send by the server to the client
     * @throws ServletException if an error occurred
     * @throws IOException      if an error occurred
     */
    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        doPost(request, response);
    }

    /**
     * The doPost method of the servlet. <br>
     * <p>
     * This method is called when a form has its tag value method equals to
     * post.
     *
     * @param request  the request send by the client to the server
     * @param response the response send by the server to the client
     * @throws ServletException if an error occurred
     * @throws IOException      if an error occurred
     */
    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        String method = Validate.replaceHtml(request.getParameter("method"));
        if (PublicToolCheckParam.checkNullAndEmpty(method)) {
            if (method.equals("showManageCustomerInfoPage")) {
                showManageCustomerInfoPage(request, response);
            } else if (method.equals("cool")) {
                coolCustomerInfo(request, response);
            } else if (method.equals("coolMore")) {
                coolMoreCustomerInfo(request, response);
            } else if (method.equals("search")) {
                searchCustomerInfo(request, response);
            }
        }
    }

    /**
     * Initialization of the servlet. <br>
     *
     * @throws ServletException if an error occurs
     */
    public void init() throws ServletException {
        // Put your code here
    }

}

4 效果演示

 

idea或eclipse开发,mysql数据库

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机程序设计开发

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值