<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Java醫(yī)院就診掛號(hào)系統(tǒng)

          共 10192字,需瀏覽 21分鐘

           ·

          2022-05-31 20:48

          程序員的成長(zhǎng)之路
          互聯(lián)網(wǎng)/程序員/技術(shù)/資料共享?
          關(guān)注


          閱讀本文大概需要 13?分鐘。

          來自:https://blog.csdn.net/weixin_44893902/article/details/119986708

          一、語言和環(huán)境

          1. 實(shí)現(xiàn)語言:?JAVA語言。
          2. 環(huán)境要求:?MyEclipse/Eclipse + Tomcat + MySQL。
          3. 使用技術(shù):?Spring MVC + Spring + MyBatis 或 JSP + Servlet + JavaBean + JDBC。

          二、實(shí)現(xiàn)效果

          實(shí)現(xiàn)能夠?qū)颊咝彰?,醫(yī)師類別、科室的模糊查詢,用戶點(diǎn)擊核銷以后狀態(tài)變?yōu)橐丫驮\。
          點(diǎn)擊掛號(hào)實(shí)現(xiàn)基本信息的添加

          三、實(shí)現(xiàn)代碼

          數(shù)據(jù)庫(kù):

          SET FOREIGN_KEY_CHECKS=0;
          -- ------------------------------ Table structure for tb_patient-- ----------------------------DROP TABLE IF EXISTS `tb_patient`;CREATE TABLE `tb_patient` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, `sex` varchar(10) DEFAULT NULL, `age` int(11) DEFAULT NULL, `phone` varchar(20) DEFAULT NULL, `department` varchar(50) DEFAULT NULL, `type` varchar(50) DEFAULT NULL, `price` decimal(9,2) DEFAULT NULL, `state` int(11) DEFAULT NULL, `register_time` datetime DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
          -- ------------------------------ Records of tb_patient-- ----------------------------INSERT INTO `tb_patient` VALUES ('1', '張蕾', '女', '12', '13895463212', '兒科', '專家醫(yī)師', '25.00', '1', '2021-07-18 12:23:00');INSERT INTO `tb_patient` VALUES ('2', '劉德明', '男', '28', '13345623215', '骨科', '普通醫(yī)師', '8.00', '0', '2021-07-18 12:23:00');INSERT INTO `tb_patient` VALUES ('3', '李將軍', '男', '38', '13578064788', '內(nèi)科', '專家醫(yī)師', '25.00', '1', '2021-07-17 12:23:00');INSERT INTO `tb_patient` VALUES ('4', '張佩佩', '女', '44', '18214217246', '外科', '副主任醫(yī)師', '17.00', '0', '2021-07-16 12:23:00');INSERT?INTO?`tb_patient`?VALUES?('5',?'程聰明',?'男',?'29',?'13652645964',?'骨科',?'副主任醫(yī)師',?'17.00',?'0',?'2021-08-08?16:21:52');


          項(xiàng)目Java代碼:

          目錄結(jié)構(gòu)

          JAR包:

          代碼:

          =src
          > com.mhys.crm.controller
          HospitalContrller.java
          package com.mhys.crm.controller;
          import java.util.List;
          import javax.annotation.Resource;
          import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;
          import com.mhys.crm.dao.TbPatientMapper;import com.mhys.crm.entity.TbPatient;
          @Controllerpublic class HospitalContrller { @Resource private TbPatientMapper tbPatientMapper;
          @RequestMapping("/select") public String getList(Model model) { List selctAll = tbPatientMapper.selectAlls(); System.out.println(selctAll); model.addAttribute("selctAll", selctAll); return "info"; }
          @RequestMapping("/list") public String getAll(Model model, String name, String type, String dep) { List selctAll = tbPatientMapper.selectAll(name, type, dep); System.out.println(name+"==="+type+"==="+dep); model.addAttribute("selctAll", selctAll); return "info"; }
          @RequestMapping("/upd") public String upDev(Model model,int id) { int update = tbPatientMapper.update(id); return "redirect:/select.do"; }
          @RequestMapping("/adds") public String adds(Model model) { return "addInfo"; }
          @RequestMapping("/insert") public String toaddDev(Model model,TbPatient tb) { tbPatientMapper.insert(tb); return "redirect:/select.do"; }
          }
          > com.mhys.crm.dao
          TbPatientMapper.java
          package com.mhys.crm.dao;
          import com.mhys.crm.entity.TbPatient;import java.util.List;
          import org.apache.ibatis.annotations.Param;
          public interface TbPatientMapper { int deleteByPrimaryKey(Integer id);
          int insert(TbPatient record);
          TbPatient selectByPrimaryKey(Integer id);
          List selectAlls();
          int updateByPrimaryKey(TbPatient record);
          int update(Integer id);
          List selectAll(@Param("name")String name,@Param("type")String type,@Param("dep")String dap);}
          TbPatientMapper.xml
          delete from tb_patient where id = #{id,jdbcType=INTEGER} insert into tb_patient (id, name, sex, age, phone, department, type, price, state, register_time) values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{phone,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{state,jdbcType=INTEGER}, #{registerTime,jdbcType=TIMESTAMP}) update tb_patient set name = #{name,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, age = #{age,jdbcType=INTEGER}, phone = #{phone,jdbcType=VARCHAR}, department = #{department,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR}, price = #{price,jdbcType=DECIMAL}, state = #{state,jdbcType=INTEGER}, register_time = #{registerTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=INTEGER}


          update tb_patient set state=1 where id = #{id,jdbcType=INTEGER}
          > com.mhys.crm.entity
          TbPatient.java
          package com.mhys.crm.entity;
          import java.math.BigDecimal;import java.util.Date;
          public class TbPatient { private Integer id;
          private String name;
          private String sex;
          private Integer age;
          private String phone;
          private String department;
          private String type;
          private BigDecimal price;
          private Integer state;
          private Date registerTime;
          public Integer getId() { return id; }
          public void setId(Integer id) { this.id = id; }
          public String getName() { return name; }
          public void setName(String name) { this.name = name == null ? null : name.trim(); }
          public String getSex() { return sex; }
          public void setSex(String sex) { this.sex = sex == null ? null : sex.trim(); }
          public Integer getAge() { return age; }
          public void setAge(Integer age) { this.age = age; }
          public String getPhone() { return phone; }
          public void setPhone(String phone) { this.phone = phone == null ? null : phone.trim(); }
          public String getDepartment() { return department; }
          public void setDepartment(String department) { this.department = department == null ? null : department.trim(); }
          public String getType() { return type; }
          public void setType(String type) { this.type = type == null ? null : type.trim(); }
          public BigDecimal getPrice() { return price; }
          public void setPrice(BigDecimal price) { this.price = price; }
          public Integer getState() { return state; }
          public void setState(Integer state) { this.state = state; }
          public Date getRegisterTime() { return registerTime; }
          public void setRegisterTime(Date registerTime) { this.registerTime = registerTime; }
          @Override public String toString() { return "TbPatient [id=" + id + ", name=" + name + ", sex=" + sex + ", age=" + age + ", phone=" + phone + ", department=" + department + ", type=" + type + ", price=" + price + ", state=" + state + ", registerTime=" + registerTime + "]"; }

          }
          > com.mhys.crm.service.impl
          HospitalService.java
          package com.mhys.crm.service.impl;
          import java.util.List;
          import javax.annotation.Resource;
          import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;
          import com.mhys.crm.dao.TbPatientMapper;import com.mhys.crm.entity.TbPatient;
          public class HospitalService { @Resource private TbPatientMapper tbPatientMapper;
          @RequestMapping("/select") public String getList(Model model) { List selctAll = tbPatientMapper.selectAlls(); System.out.println(selctAll); model.addAttribute("selctAll", selctAll); return "info"; }
          @RequestMapping("/list") public String getAll(Model model, String name, String type, String dep) { List selctAll = tbPatientMapper.selectAll(name, type, dep); System.out.println(name+"==="+type+"==="+dep); model.addAttribute("selctAll", selctAll); return "info"; }
          @RequestMapping("/upd") public String upDev(Model model,int id) { int update = tbPatientMapper.update(id); return "redirect:/select.do"; }
          @RequestMapping("/adds") public String adds(Model model) { return "addInfo"; }
          @RequestMapping("/insert") public String toaddDev(Model model,TbPatient tb) { tbPatientMapper.insert(tb); return "redirect:/select.do"; }}
          =resource
          > mybatis
          SqlMapConfig.xml
          "http://mybatis.org/dtd/mybatis-3-config.dtd">

          > spring
          applicationContext-dao.xml
          xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">

          applicationContext-service.xml
          xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
          spring-mvc.xml
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
          > database.properties
          jdbc.url=jdbc:mysql://localhost:3306/hospital_db?useUnicode=true&characterEncoding=UTF-8&useSSL=falsejdbc.username=rootjdbc.password=123456jdbc.driver=com.mysql.jdbc.Driver
          =JSP頁面
          > /WEB-INF/jsp/
          addInfo.jsp
          <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 掛號(hào)


          姓名
          性別
          年齡
          電話
          醫(yī)師類別
          價(jià)格
          掛號(hào)時(shí)間
          info.jsp
          <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>"UTF-8">醫(yī)院就診掛號(hào)系統(tǒng)

          "center">醫(yī)院就診掛號(hào)系統(tǒng)

          "warp">
          "list.do"> 患者姓名:type="text" name="name">      醫(yī)師類別:       科室:type="text" name="dep">      type="submit" value="查詢">    type="button" value="掛號(hào)" onclick="add()">
          "margin-bottom: 30px;" width="100%" border="1px" cellpadding="11" cellspacing="0"> "list" items="${selctAll }">
          編號(hào)姓名性別年齡電話科室醫(yī)師類別價(jià)格掛號(hào)時(shí)間狀態(tài)操作
          ${list.id }${list.name }${list.sex }${list.age }${list.phone }${list.department }${list.type }${list.price }"${list.registerTime }" pattern="yyyy-MM-dd"/> if test="${list.state==0}"> 未就診 if> if test="${list.state==1}"> 已就診 if> if test="${list.state==0}"> "javascript:if(confirm('確實(shí)要核銷該掛號(hào)信息嗎?'))location='upd.do?id=${list.id }'">核銷 if> <%-- if test="${list.state==1}"> 已就診 if> --%>
          index.jsp
          <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;%>XXX系統(tǒng)

          源碼下載

          鏈接:https://pan.baidu.com/s/1Spl38NORVbpYs7MhY19goA
          提取碼:jisk

          推薦閱讀:

          SpringBoot太重,Vert.x真香!

          Spring AOP 常見注解和執(zhí)行順序

          互聯(lián)網(wǎng)初中高級(jí)大廠面試題(9個(gè)G)

          內(nèi)容包含Java基礎(chǔ)、JavaWeb、MySQL性能優(yōu)化、JVM、鎖、百萬并發(fā)、消息隊(duì)列、高性能緩存、反射、Spring全家桶原理、微服務(wù)、Zookeeper......等技術(shù)棧!

          ?戳閱讀原文領(lǐng)取!? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??朕已閱?

          瀏覽 67
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                    <th id="afajh"><progress id="afajh"></progress></th>
                    一级黄色天堂网片 | 中文字幕一区在线观看 | 久久狼友 | 国产成人高潮毛片 | 久久久久福利视频 |