查看我的预约:可以查看自己预约信息,以及修改和取消预约,取消预约同样需要接受验证码。
查看我的诚心度:查看自己的诚信都是多少分。
本系统各模块如下图2.1所示:
3.系统设计
======
3.1登录
填写用户名或者密码,如果用户名或者密码错误,登录失败,反之登录成功。判断用户角色,如果是管理员跳转到admin/index.jsp,如果是医生跳转到doctor/login.jsp,如果是患者,跳转到index.jsp。
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String account = req.getParameter(“account”);
String password = req.getParameter(“password”);
String accounttype = req.getParameter(“accounttype”);
req.getSession().removeAttribute(“message”);
// System.out.println(url);
switch (accounttype){
case “管理员”:
AdminDao adminDao=new IAdminimpl();
List admins = adminDao.getAdmin(account);
if(admins.size()>0){
Admin admin = admins.get(0);
if(admin.getPassword().equals(password)){
req.getSession().setAttribute(“admin”,admin);
resp.sendRedirect(“admin/index.jsp”);
}
}
break;
case “医生”:
DoctorDao doctorDao=new DoctorDao();
String where=“where account =?”;
List doctors = doctorDao.query(where, new Object[]{account});
if(doctors.size()>0){
Doctor doctor = doctors.get(0);
if(doctor.getPassword().equals(password)){
req.getSession().setAttribute(“doctor”,doctor);
resp.sendRedirect(“doctor”);
return;
}
}
req.getSession().setAttribute(“message”,“用户名或密码错误!!”);
req.getRequestDispatcher(“doctor/login.jsp”).forward(req,resp);
break;
case “患者”:
PatientDao patientDao=new PatientDao();
List patients = patientDao.query(“account”,account);
if(patients.size()>0){
Patient patient = patients.get(0);
if(patient.getPassword().equals(password)){
req.getSession().setAttribute(“patient”,patient);
String url= (String) req.getSession().getAttribute(“url”);
if(url==null)
url=“index.jsp”;
resp.sendRedirect(url);
return;
}
}
req.getSession().setAttribute(“message”,“用户名或密码错误!!”);
resp.sendRedirect(“login.jsp”);
break;
}
}
3.2患者挂号
患者挂号包括按照科室挂号,按照医生挂号,选择挂号时间,点击确定后,点击发送验证码,在163邮箱中收到挂号验证码,填写正确后,挂号成功,反之失败,显示验证码错误。
public static boolean sendMail(String to, String content){
Properties prop = new Properties();
prop.setProperty(“mail.host”, host);
prop.setProperty(“mail.smtp.auth”, “true”);
prop.setProperty(“mail.transport.protocol”, “smtp”);
/* prop.put(“mail.smtp.ssl.enable”, true);*/
// 开启SSL加密,否则会失败
try {
MailSSLSocketFactory sf = new MailSSLSocketFactory();
sf.setTrustAllHosts(true);
prop.put(“mail.smtp.ssl.enable”, “true”);
prop.put(“mail.smtp.ssl.socketFactory”, sf);
Session session = Session.getInstance(prop);
/* prop.put(“mail.smtp.ssl.enable”, true);*/
Transport ts = session.getTransport();
// 连接邮件服务器:邮箱类型,帐号,授权码代替密码(更安全)
ts.connect(host,from, password);//后面的字符是授权码 // 创建邮件对象
MimeMessage message = new MimeMessage(session);
// 指明邮件的发件人
message.setFrom(new InternetAddress(from));
message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
// 邮件的标题
message.setSubject(“在线预约挂号系统”);
// 邮件的文本内容
/int code=100000+(int)(899999Math.random());
System.out.println(code);*/
message.setContent(content, “text/html;charset=UTF-8”);
// 发送邮件
ts.sendMessage(message, message.getAllRecipients());
ts.close();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
3.3患者我的预约
点击我的预约,可以查看我的预约信息,可以修改预约以及取消预约。
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Patient patient= (Patient) req.getSession().getAttribute(“patient”);
RecodeDao recodeDao = new RecodeDao();
/*String where=“where pid=? order by ordertime desc”;
List list = recodeDao.query(where, new Object[]{patient.getId()});*/
List<HashMap<String, String>> list = recodeDao.orderList(patient.getId());
req.setAttribute(“list”,list);
req.getRequestDispatcher(“orderList.jsp”).forward(req,resp);
}
3.4患者诚信度
点击诚信度,可以查看当前患者诚信度。
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String where =“where pid=? order by time desc”;
Patient patient = (Patient) req.getSession().getAttribute(“patient”);
IntegrityDao integrityDao=new IntegrityDao();
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip1024b (备注Java)
总结
虽然面试套路众多,但对于技术面试来说,主要还是考察一个人的技术能力和沟通能力。不同类型的面试官根据自身的理解问的问题也不尽相同,没有规律可循。
上面提到的关于这些JAVA基础、三大框架、项目经验、并发编程、JVM及调优、网络、设计模式、spring+mybatis源码解读、Mysql调优、分布式监控、消息队列、分布式存储等等面试题笔记及资料
有些面试官喜欢问自己擅长的问题,比如在实际编程中遇到的或者他自己一直在琢磨的这方面的问题,还有些面试官,尤其是大厂的比如 BAT 的面试官喜欢问面试者认为自己擅长的,然后通过提问的方式深挖细节,刨根到底。
一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算
挖细节,刨根到底。
一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算