当前位置: 首页 > news >正文

古色古香 网站模板达州建设企业网站

古色古香 网站模板,达州建设企业网站,wordpress 内容可以是表格吗,自建网站的劣势1#xff0c;项目目的 1、科室管理#xff1a;新增科室#xff0c;删除科室#xff08;如果有医生在#xff0c;则不能删除该科室#xff09;#xff0c;修改科室。 2、医生管理#xff1a;录入医生信息#xff0c;以及科室信息。修改医生信息#xff08;主要是修改…1项目目的 1、科室管理新增科室删除科室如果有医生在则不能删除该科室修改科室。 2、医生管理录入医生信息以及科室信息。修改医生信息主要是修改个人信息和科室 3、坐诊信息设置可以设置医生当天和未来6天的坐诊情况包括上午和下午的坐诊时间段和可预约数量系统将自动保存到该医生的坐诊信息列表中。 4、全部信息展示按照科室展示每个医生七天的坐诊情况需要按照科室归类展示 5、预约功能用户可以选择要预约的科室医生、日期和时间段并输入患者的个人信息系统将自动判断该时间段是否还有预约名额并保存预约信息。 6.搜索功能用户可以输入搜索日期和时间段系统将自动搜索未来七天内在该时间段坐诊的医生信息并按照科室分类展示。 7、可以查询某个医生未来七天病人对它的预约情况。 2建立一个部门类 package HostipalSystem;import java.util.ArrayList;public class department {private String name;ArrayList doctor doctorsnew ArrayList();//医生列表public department() {}public department(String name, ArrayListdoctor doctors) {this.name name;this.doctors doctors;}public String getName() {return name;}public void setName(String name) {this.name name;}public ArrayListdoctor getDoctors() {return doctors;}public void setDoctors(ArrayListdoctor doctors) {this.doctors doctors;} } 3医生类 package HostipalSystem;import java.time.LocalDate; import java.util.ArrayList;public class doctor {private String name;private String sex;private int age;private String degree;private String advantage;private LocalDate jointime;private ArrayListschedule schedule;//一个医生7天的排版表private String department;private String id;public doctor() {}public String getDepartment() {return department;}public void setDepartment(String department) {this.department department;}public doctor(String name, String sex, int age, String degree, String advantage, LocalDate jointime, ArrayListHostipalSystem.schedule schedule, String id, String department) {this.name name;this.sex sex;this.age age;this.degree degree;this.advantage advantage;this.jointime jointime;this.schedule schedule;this.id id;}public String getId() {return id;}public void setId(String id) {this.id id;}public String getName() {return name;}public void setName(String name) {this.name name;}public String getSex() {return sex;}public void setSex(String sex) {this.sex sex;}public int getAge() {return age;}public void setAge(int age) {this.age age;}public String getDegree() {return degree;}public void setDegree(String degree) {this.degree degree;}public String getAdvantage() {return advantage;}public void setAdvantage(String advantage) {this.advantage advantage;}public LocalDate getJointime() {return jointime;}public void setJointime(LocalDate jointime) {this.jointime jointime;}public ArrayListHostipalSystem.schedule getSchedule() {return schedule;}public void setSchedule(ArrayListHostipalSystem.schedule schedule) {this.schedule schedule;} }4排班类 主要是排班的信息 package HostipalSystem;import java.time.LocalDate; import java.time.LocalTime;public class schedule {private LocalDate date;private String morningN;private LocalTime starttime;private LocalTime endtime;private int numjiezhen;private int numyuyue;private String afternoonN;private LocalTime starttime1;private LocalTime endtime1;private int numjiezhen1;private int numyuyue1;private String nightN;private LocalTime starttime2;private LocalTime endtime2;private int numjiezhen2;private int numyuyue2;public schedule() {}public schedule(LocalDate date, String morning, LocalTime starttime, LocalTime endtime, int numjiezhen, int numyuyue, String afternoon, LocalTime starttime1, LocalTime endtime1, int numjiezhen1, int numyuyue1, String night, LocalTime starttime2, LocalTime endtime2, int numjiezhen2, int numyuyue2) {this.date date;this.morning morning;this.starttime starttime;this.endtime endtime;this.numjiezhen numjiezhen;this.numyuyue numyuyue;this.afternoon afternoon;this.starttime1 starttime1;this.endtime1 endtime1;this.numjiezhen1 numjiezhen1;this.numyuyue1 numyuyue1;this.night night;this.starttime2 starttime2;this.endtime2 endtime2;this.numjiezhen2 numjiezhen2;this.numyuyue2 numyuyue2;}public LocalDate getDate() {return date;}public void setDate(LocalDate date) {this.date date;}public String getMorning() {return morning;}public void setMorning(String morning) {this.morning morning;}public LocalTime getStarttime() {return starttime;}public void setStarttime(LocalTime starttime) {this.starttime starttime;}public LocalTime getEndtime() {return endtime;}public void setEndtime(LocalTime endtime) {this.endtime endtime;}public int getNumjiezhen() {return numjiezhen;}public void setNumjiezhen(int numjiezhen) {this.numjiezhen numjiezhen;}public int getNumyuyue() {return numyuyue;}public void setNumyuyue(int numyuyue) {this.numyuyue numyuyue;}public String getAfternoon() {return afternoon;}public void setAfternoon(String afternoon) {this.afternoon afternoon;}public LocalTime getStarttime1() {return starttime1;}public void setStarttime1(LocalTime starttime1) {this.starttime1 starttime1;}public LocalTime getEndtime1() {return endtime1;}public void setEndtime1(LocalTime endtime1) {this.endtime1 endtime1;}public int getNumjiezhen1() {return numjiezhen1;}public void setNumjiezhen1(int numjiezhen1) {this.numjiezhen1 numjiezhen1;}public int getNumyuyue1() {return numyuyue1;}public void setNumyuyue1(int numyuyue1) {this.numyuyue1 numyuyue1;}public String getNight() {return night;}public void setNight(String night) {this.night night;}public LocalTime getStarttime2() {return starttime2;}public void setStarttime2(LocalTime starttime2) {this.starttime2 starttime2;}public LocalTime getEndtime2() {return endtime2;}public void setEndtime2(LocalTime endtime2) {this.endtime2 endtime2;}public int getNumjiezhen2() {return numjiezhen2;}public void setNumjiezhen2(int numjiezhen2) {this.numjiezhen2 numjiezhen2;}public int getNumyuyue2() {return numyuyue2;}public void setNumyuyue2(int numyuyue2) {this.numyuyue2 numyuyue2;} }4预约类 主要是病人的信息 package HostipalSystem;import java.time.LocalDateTime;public class oppintment {private int num0;private String name;private String sex;private int age;private String desc;private String doctor;private String departmentname;private LocalDateTime date;public oppintment() {}public int getNum() {return num;}public void setNum(int num) {this.num num;}public oppintment(String name, String sex, int age, String desc, String doctor, String departmentname, LocalDateTime date, int num) {this.name name;this.sex sex;this.age age;this.desc desc;this.doctor doctor;this.departmentname departmentname;this.date date;this.numnum;}public String getName() {return name;}public void setName(String name) {this.name name;}public String getSex() {return sex;}public void setSex(String sex) {this.sex sex;}public int getAge() {return age;}public void setAge(int age) {this.age age;}public String getDesc() {return desc;}public void setDesc(String desc) {this.desc desc;}public String getDoctor() {return doctor;}public void setDoctor(String doctor) {this.doctor doctor;}public String getDepartmentname() {return departmentname;}public void setDepartmentname(String departmentname) {this.departmentname departmentname;}public LocalDateTime getDate() {return date;}public void setDate(LocalDateTime date) {this.date date;} }6医院操着系统 6.1界面 public void start(){Boolean flagtrue;while(flag){Scanner sc new Scanner(System.in);System.out.println(------------欢迎来到医院操作系统-------------);System.out.println(----------1,添加部门------------);System.out.println(----------2添加医生------------);System.out.println(----------3查询部门里的医生------------);System.out.println(----------4查询医生的基本信息------------);System.out.println(----------5查询可预约医生的时间------------);System.out.println(----------6挂号------------);System.out.println(----------7排班------------);System.out.println(----------8退出操作系统------------);int commandsc.nextInt();switch (command){case 1:adddepasrtment();break;case 2:adddoctor();break;case 3:showdoctorindepartment();break;case 4:showdoctorinfo();break;case 5:showtimeofdoctor();break;case 6:booking();break;case 8:flagfalse;break;case 7:operateschedule();break;default:System.out.println(输入有误请重新输入);}}} 6.2设置部门 需要判断部门是否存在 public void adddepasrtment(){OUT:while(true){department dnew department();Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的部门的名称);String namesc.next();d.setName(name);for(int i0;ialldepartment.size();i){if(alldepartment.get(i).getName().equals(name)){System.out.println(该部门已存在);continue OUT;}}alldepartment.add(d);//将建好的部门添加进去break;}} 6.2.1遇到问题1 Scanner scnew Scanner(System.in);             System.out.println(请输入你要添加的部门的名称);             String namesc.next(); 将以上输入语句放在外面如果不合格将一直循环 错误代码如下 public void adddepasrtment(){OUT:department dnew department();Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的部门的名称);String namesc.next();while(true){Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的部门的名称);String namesc.next();d.setName(name);for(int i0;ialldepartment.size();i){if(alldepartment.get(i).getName().equals(name)){System.out.println(该部门已存在);continue OUT;}}alldepartment.add(d);break;}} 6.2.2遇到问题2 OUT:放在循环外面 continue OUT放在循环里面结束一层循环 6.3建立一个存放部门的集合 ArrayListdepartment alldepartmentnew ArrayList(); 7医生的添加 public void adddoctor(){doctor dnew doctor();Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的医生的姓名);String namesc.next();d.setName(name);System.out.println(请输入你要添加的医生的性别);String sexsc.next();d.setSex(sex);System.out.println(请输入你要添加的医生的年龄);int agesc.nextInt();d.setAge(age);System.out.println(请输入你要添加的医生的学历);String degreesc.next();d.setDegree(degree);System.out.println(请输入你要添加的医生的擅长);String advantagesc.next();d.setAdvantage(advantage);System.out.println(请输入你要添加的医生的入职时间);//LocalDate jointimesc.nextLocalDate();d.setJointime(jointime());//调用方法存入医生的入职时间d.setId(UUID.randomUUID().toString());//生成随机数作为医生的编号System.out.println(您的编号是d.getId());System.out.println(请选择你的部门);for(int i0;ialldepartment.size();i){System.out.println(i1.alldepartment.get(i).getName());}while(true){System.out.println(请输入部门的编号);int commandsc.nextInt();if(commandalldepartment.size()||command1){System.out.println(输入有误请重新输入);continue;}else{d.setDepartment(alldepartment.get(command-1).getName());alldepartment.get(command-1).getDoctors().add(d);alldoctor.add(d);//将医生添加到科室里System.out.println(录入完毕);break;}}}7.1医生的加入时间 public LocalDate jointime(){Scanner scnew Scanner(System.in);System.out.println(请输入医生入职时间格式为yyyy-mm-dd);String jointimesc.next();LocalDate dateLocalDate.parse(jointime);return date;} 7.2写一个集合存放所有医生 ArrayListdoctor alldoctornew ArrayList(); 8,查询部门里的医生 public void showdoctorindepartment(){for(int i0;ialldepartment.size();i){System.out.println(i1.alldepartment.get(i).getName());}while(true){System.out.println(请输入你想了解的部门的编号);Scanner scnew Scanner(System.in);int commandsc.nextInt();if(commandalldepartment.size()||command1){System.out.println(输入有误请重新输入);continue;}else{for (int i 0; i alldepartment.get(command-1).getDoctors().size(); i){System.out.println(alldepartment.get(command-1).getDoctors().get(i).getName());}break;}}} 9查询医生的全部信息 public void showdoctorinfo(){for (int i 0; i alldoctor.size(); i){System.out.println(alldoctor.get(i).getName());System.out.println(alldoctor.get(i).getSex());System.out.println(alldoctor.get(i).getAge());System.out.println(alldoctor.get(i).getDegree());System.out.println(alldoctor.get(i).getAdvantage());System.out.println(alldoctor.get(i).getJointime());System.out.println(alldoctor.get(i).getId());System.out.println(alldoctor.get(i).getDepartment());System.out.println(---------------------------------------);}} 10查找需要的医生 public doctor printfalldoctor (){for(int i0;ialldoctor.size();i){System.out.println((i1)alldoctor.get(i).getName());}doctor d;while(true){System.out.println(请输入你想了解的医生的编号);Scanner scnew Scanner(System.in);int commandsc.nextInt();if(commandalldoctor.size()||command1){System.out.println(输入有误请重新输入);continue;}else{dalldoctor.get(command-1);break;}}return d;//返回医生} 11排班 public void operateschedule(){doctor dprintfalldoctor();for (int i 0; i 7; i){schedule snew schedule();s.setDate(LocalDate.now().plusDays(i));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()上午是否上班);//s.getDate().getDayOfWeek()取的是日对象的获得星期天的方法System.out.println(Y,上班);System.out.println(N,不上班);Scanner scnew Scanner(System.in);String commandsc.next();s.setMorning(command);if(s.getMorning().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午上班时间);System.out.println(格式为HH:mm:ss);String starttimesc.next();s.setStarttime(LocalTime.parse(starttime));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午下班时间);System.out.println(格式为HH:mm:ss);String endtimesc.next();s.setEndtime(LocalTime.parse(endtime));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午接诊人数);int numjiezhensc.nextInt();s.setNumjiezhen(numjiezhen);}System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午是否上班);System.out.println(Y,上班);System.out.println(N,不上班);String command1sc.next();s.setAfternoon(command1);if(s.getAfternoon().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午上班时间);System.out.println(格式为HH:mm:ss);String starttime1sc.next();s.setStarttime1(LocalTime.parse(starttime1));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午下班时间);System.out.println(格式为HH:mm:ss);String endtime1sc.next();s.setEndtime1(LocalTime.parse(endtime1));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午接诊人数);int numjiezhen1sc.nextInt();s.setNumjiezhen1(numjiezhen1);}System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上是否上班);System.out.println(Y,上班);System.out.println(N,不上班);String command2sc.next();s.setNight(command2);if(s.getNight().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上上班时间);System.out.println(格式为HH:mm:ss);String starttime2sc.next();s.setStarttime2(LocalTime.parse(starttime2));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上下班时间);System.out.println(格式为HH:mm:ss);String endtime2sc.next();s.setEndtime2(LocalTime.parse(endtime2));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上接诊人数);int numjiezhen2sc.nextInt();s.setNumjiezhen2(numjiezhen2);}d.getSchedule().add(s);//添加排班}} 12查询信息医生排班 public void showtimeofdoctor(){doctor dprintfalldoctor();//调用方法获取输入的医生for (int i 0; i d.getSchedule().size(); i){System.out.println(d.getSchedule().get(i).getDate());if(d.getSchedule().get(i).getMorning().equals(Y)){System.out.println(上午d.getSchedule().get(i).getStarttime()-d.getSchedule().get(i).getEndtime());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue()接诊人数d.getSchedule().get(i).getNumjiezhen());}else if(d.getSchedule().get(i).getMorning().equals(N)) System.out.println(上午不上班);if(d.getSchedule().get(i).getAfternoon().equals(Y)){System.out.println(下午d.getSchedule().get(i).getStarttime1()-d.getSchedule().get(i).getEndtime1());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue1()接诊人数d.getSchedule().get(i).getNumjiezhen1());}else if(d.getSchedule().get(i).getAfternoon().equals(N)) System.out.println(下午不上班);if(d.getSchedule().get(i).getNight().equals(Y)){System.out.println(晚上d.getSchedule().get(i).getStarttime2()-d.getSchedule().get(i).getEndtime2());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue2()接诊人数d.getSchedule().get(i).getNumjiezhen2());System.out.println(---------------------------------------);}}} 13遇到问题字符串与时间对象的格式转换 如果你遇到 LocalTime.parse() 方法无法解析时间字符串的问题通常有以下几个原因 格式不匹配 输入的时间字符串格式与 LocalTime.parse() 默认的格式HH:mm:ss不匹配。 解决方法使用 DateTimeFormatter 指定正确的格式。 无效的时间值 输入的时间字符串包含无效的时间值例如小时数超过23分钟数或秒数超过59。 解决方法确保输入的时间字符串是有效的。 字符集问题 输入的时间字符串包含非数字字符或特殊字符。 解决方法检查并清理输入字符串确保只有有效的时间字符。 时区问题 如果时间字符串包含时区信息而 LocalTime 不支持时区。 解决方法使用 ZonedDateTime 或 OffsetTime 来处理带时区的时间字符串。 LocalDate.parse() 方法默认使用 ISO_LOCAL_DATE 格式即 yyyy-MM-dd。如果你的输入时间字符串格式与此默认格式不匹配你需要使用 DateTimeFormatter 来指定正确的格式。 14病人预约 14.1预约成功后打印信息 public oppintment bookingsc(oppintment o,doctor d){System.out.println(请输入您的姓名);Scanner scnew Scanner(System.in);String namesc.next();o.setName(name);System.out.println(请输入您的性别);String sexsc.next();o.setSex(sex);System.out.println(请输入您的年龄);int agesc.nextInt();o.setAge(age);System.out.println(请输入您的手机号);String phonesc.next();o.setDesc(phone);System.out.println(预约成功);System.out.println(预约科室d.getDepartment());o.setDepartmentname(d.getDepartment());System.out.println(预约医生d.getName());o.setDoctor(d.getName());System.out.println(预约号o.getNum()1);o.setNum(o.getNum()1);return o;}} 14.2能否预约成功进行判断 public void booking(){doctor dprintfalldoctor();oppintment onew oppintment();System.out.println(请输入预约日期);Scanner scnew Scanner(System.in);String datesc.next();LocalDate date1LocalDate.parse(date);for(int i0;id.getSchedule().size();i){schedule sd.getSchedule().get(i);if(s.equals(date1)){System.out.println(请选择1上午。2下午。3晚上);int commandsc.nextInt();switch (command){case 1:if(s.getMorning().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime())time1.isAfter(s.getStarttime())(s.getNumjiezhen()-s.getNumyuyue())0)//判断是否在范围内,预约人数是否满了{oppintment o1bookingsc(o,d);LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);allpaitent.add(o1);}}break;case 2:if(s.getAfternoon().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime1())time1.isAfter(s.getStarttime1())(s.getNumjiezhen1()-s.getNumyuyue1())0){oppintment o1bookingsc(o,d);LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);allpaitent.add(o1);}}break;case 3:if(s.getNight().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime2())time1.isAfter(s.getStarttime2())(s.getNumjiezhen2()-s.getNumyuyue2())0){oppintment o1bookingsc(o,d);//预约成功,打印基本信息LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);//最后打印时间allpaitent.add(o1);}}break;default:System.out.println(输入有误请重新输入);continue;}}}} 14.3代码解释 这段代码实现了医院预约系统的预约功能。具体步骤如下 选择医生调用 printfalldoctor 方法显示所有医生并让用户选择一个医生。 创建预约对象创建一个新的 oppintment 对象。 输入预约日期用户输入预约日期并将其转换为 LocalDate 对象。 遍历医生的排班表检查医生的排班表找到与用户输入日期匹配的排班记录。 选择时间段用户选择上午、下午或晚上的时间段。 输入预约时间用户输入具体的预约时间并进行验证。 验证预约时间确保预约时间在医生的工作时间内并且预约人数未满。 完成预约调用 bookingsc 方法完成预约并将预约信息添加到 allpaitent 列表中。 15app 实现类 package HostipalSystem;import java.time.LocalDate; import java.util.Scanner;public class app {public static void main(String[] args) {hospitalmanager hnew hospitalmanager();h.start();} }16超卓系统全部代码 package HostipalSystem;import javax.swing.text.DateFormatter; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Scanner; import java.util.UUID;public class hospitalmanager {ArrayListdepartment alldepartmentnew ArrayList();ArrayListdoctor alldoctornew ArrayList();ArrayListoppintment allpaitentnew ArrayList();public void start(){Boolean flagtrue;while(flag){Scanner sc new Scanner(System.in);System.out.println(------------欢迎来到医院操作系统-------------);System.out.println(----------1,添加部门------------);System.out.println(----------2添加医生------------);System.out.println(----------3查询部门里的医生------------);System.out.println(----------4查询医生的基本信息------------);System.out.println(----------5查询可预约医生的时间------------);System.out.println(----------6挂号------------);System.out.println(----------7排班------------);System.out.println(----------8退出操作系统------------);int commandsc.nextInt();switch (command){case 1:adddepasrtment();break;case 2:adddoctor();break;case 3:showdoctorindepartment();break;case 4:showdoctorinfo();break;case 5:showtimeofdoctor();break;case 6:booking();break;case 8:flagfalse;break;case 7:operateschedule();break;default:System.out.println(输入有误请重新输入);}}}public void adddepasrtment(){OUT:while(true){department dnew department();Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的部门的名称);String namesc.next();d.setName(name);for(int i0;ialldepartment.size();i){if(alldepartment.get(i).getName().equals(name)){System.out.println(该部门已存在);continue OUT;}}alldepartment.add(d);//将建好的部门添加进去break;}}public void adddoctor(){doctor dnew doctor();Scanner scnew Scanner(System.in);System.out.println(请输入你要添加的医生的姓名);String namesc.next();d.setName(name);System.out.println(请输入你要添加的医生的性别);String sexsc.next();d.setSex(sex);System.out.println(请输入你要添加的医生的年龄);int agesc.nextInt();d.setAge(age);System.out.println(请输入你要添加的医生的学历);String degreesc.next();d.setDegree(degree);System.out.println(请输入你要添加的医生的擅长);String advantagesc.next();d.setAdvantage(advantage);System.out.println(请输入你要添加的医生的入职时间);//LocalDate jointimesc.nextLocalDate();d.setJointime(jointime());//调用方法存入医生的入职时间d.setId(UUID.randomUUID().toString());//生成随机数作为医生的编号System.out.println(您的编号是d.getId());System.out.println(请选择你的部门);for(int i0;ialldepartment.size();i){System.out.println(i1.alldepartment.get(i).getName());}while(true){System.out.println(请输入部门的编号);int commandsc.nextInt();if(commandalldepartment.size()||command1){System.out.println(输入有误请重新输入);continue;}else{d.setDepartment(alldepartment.get(command-1).getName());alldepartment.get(command-1).getDoctors().add(d);alldoctor.add(d);//将医生添加到科室里System.out.println(录入完毕);break;}}}public LocalDate jointime(){Scanner scnew Scanner(System.in);System.out.println(请输入医生入职时间格式为yyyy-mm-dd);String jointimesc.next();LocalDate dateLocalDate.parse(jointime);return date;}public void showdoctorindepartment(){for(int i0;ialldepartment.size();i){System.out.println(i1.alldepartment.get(i).getName());}while(true){System.out.println(请输入你想了解的部门的编号);Scanner scnew Scanner(System.in);int commandsc.nextInt();if(commandalldepartment.size()||command1){System.out.println(输入有误请重新输入);continue;}else{for (int i 0; i alldepartment.get(command-1).getDoctors().size(); i){System.out.println(alldepartment.get(command-1).getDoctors().get(i).getName());}break;}}}public void showdoctorinfo(){for (int i 0; i alldoctor.size(); i){System.out.println(alldoctor.get(i).getName());System.out.println(alldoctor.get(i).getSex());System.out.println(alldoctor.get(i).getAge());System.out.println(alldoctor.get(i).getDegree());System.out.println(alldoctor.get(i).getAdvantage());System.out.println(alldoctor.get(i).getJointime());System.out.println(alldoctor.get(i).getId());System.out.println(alldoctor.get(i).getDepartment());System.out.println(---------------------------------------);}}public void showtimeofdoctor(){doctor dprintfalldoctor();//调用方法获取输入的医生for (int i 0; i d.getSchedule().size(); i){System.out.println(d.getSchedule().get(i).getDate());if(d.getSchedule().get(i).getMorning().equals(Y)){System.out.println(上午d.getSchedule().get(i).getStarttime()-d.getSchedule().get(i).getEndtime());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue()接诊人数d.getSchedule().get(i).getNumjiezhen());}else if(d.getSchedule().get(i).getMorning().equals(N)) System.out.println(上午不上班);if(d.getSchedule().get(i).getAfternoon().equals(Y)){System.out.println(下午d.getSchedule().get(i).getStarttime1()-d.getSchedule().get(i).getEndtime1());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue1()接诊人数d.getSchedule().get(i).getNumjiezhen1());}else if(d.getSchedule().get(i).getAfternoon().equals(N)) System.out.println(下午不上班);if(d.getSchedule().get(i).getNight().equals(Y)){System.out.println(晚上d.getSchedule().get(i).getStarttime2()-d.getSchedule().get(i).getEndtime2());System.out.println(预约人数d.getSchedule().get(i).getNumyuyue2()接诊人数d.getSchedule().get(i).getNumjiezhen2());System.out.println(---------------------------------------);}}}//public doctor printfalldoctor (){for(int i0;ialldoctor.size();i){System.out.println((i1)alldoctor.get(i).getName());}doctor d;while(true){System.out.println(请输入你想了解的医生的编号);Scanner scnew Scanner(System.in);int commandsc.nextInt();if(commandalldoctor.size()||command1){System.out.println(输入有误请重新输入);continue;}else{dalldoctor.get(command-1);break;}}return d;//返回医生}public void operateschedule(){doctor dprintfalldoctor();for (int i 0; i 7; i){schedule snew schedule();s.setDate(LocalDate.now().plusDays(i));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()上午是否上班);//s.getDate().getDayOfWeek()取的是日对象的获得星期天的方法System.out.println(Y,上班);System.out.println(N,不上班);Scanner scnew Scanner(System.in);String commandsc.next();s.setMorning(command);if(s.getMorning().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午上班时间);System.out.println(格式为HH:mm:ss);String starttimesc.next();s.setStarttime(LocalTime.parse(starttime));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午下班时间);System.out.println(格式为HH:mm:ss);String endtimesc.next();s.setEndtime(LocalTime.parse(endtime));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()的上午接诊人数);int numjiezhensc.nextInt();s.setNumjiezhen(numjiezhen);}System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午是否上班);System.out.println(Y,上班);System.out.println(N,不上班);String command1sc.next();s.setAfternoon(command1);if(s.getAfternoon().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午上班时间);System.out.println(格式为HH:mm:ss);String starttime1sc.next();s.setStarttime1(LocalTime.parse(starttime1));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午下班时间);System.out.println(格式为HH:mm:ss);String endtime1sc.next();s.setEndtime1(LocalTime.parse(endtime1));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()下午接诊人数);int numjiezhen1sc.nextInt();s.setNumjiezhen1(numjiezhen1);}System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上是否上班);System.out.println(Y,上班);System.out.println(N,不上班);String command2sc.next();s.setNight(command2);if(s.getNight().equals(Y)){System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上上班时间);System.out.println(格式为HH:mm:ss);String starttime2sc.next();s.setStarttime2(LocalTime.parse(starttime2));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上下班时间);System.out.println(格式为HH:mm:ss);String endtime2sc.next();s.setEndtime2(LocalTime.parse(endtime2));System.out.println(请输入s.getDate()号星期s.getDate().getDayOfWeek()晚上接诊人数);int numjiezhen2sc.nextInt();s.setNumjiezhen2(numjiezhen2);}d.getSchedule().add(s);//添加排班}}public void booking(){doctor dprintfalldoctor();oppintment onew oppintment();System.out.println(请输入预约日期);Scanner scnew Scanner(System.in);String datesc.next();LocalDate date1LocalDate.parse(date);for(int i0;id.getSchedule().size();i){schedule sd.getSchedule().get(i);if(s.equals(date1)){System.out.println(请选择1上午。2下午。3晚上);int commandsc.nextInt();switch (command){case 1:if(s.getMorning().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime())time1.isAfter(s.getStarttime())(s.getNumjiezhen()-s.getNumyuyue())0)//判断是否在范围内,预约人数是否满了{oppintment o1bookingsc(o,d);LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);allpaitent.add(o1);}}break;case 2:if(s.getAfternoon().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime1())time1.isAfter(s.getStarttime1())(s.getNumjiezhen1()-s.getNumyuyue1())0){oppintment o1bookingsc(o,d);LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);allpaitent.add(o1);}}break;case 3:if(s.getNight().equals(Y)){System.out.println(请输入预约时间);String timesc.next();LocalTime time1LocalTime.parse(time);if(time1.isBefore(s.getEndtime2())time1.isAfter(s.getStarttime2())(s.getNumjiezhen2()-s.getNumyuyue2())0){oppintment o1bookingsc(o,d);//预约成功,打印基本信息LocalDateTime date2LocalDateTime.of(date1,time1);o1.setDate(date2);System.out.println(预约时间date2);//最后打印时间allpaitent.add(o1);}}break;default:System.out.println(输入有误请重新输入);continue;}}}}public oppintment bookingsc(oppintment o,doctor d){System.out.println(请输入您的姓名);Scanner scnew Scanner(System.in);String namesc.next();o.setName(name);System.out.println(请输入您的性别);String sexsc.next();o.setSex(sex);System.out.println(请输入您的年龄);int agesc.nextInt();o.setAge(age);System.out.println(请输入您的手机号);String phonesc.next();o.setDesc(phone);System.out.println(预约成功);System.out.println(预约科室d.getDepartment());o.setDepartmentname(d.getDepartment());System.out.println(预约医生d.getName());o.setDoctor(d.getName());System.out.println(预约号o.getNum()1);o.setNum(o.getNum()1);return o;}}
文章转载自:
http://www.morning.gqtxz.cn.gov.cn.gqtxz.cn
http://www.morning.wdwfm.cn.gov.cn.wdwfm.cn
http://www.morning.bqwnp.cn.gov.cn.bqwnp.cn
http://www.morning.lszjq.cn.gov.cn.lszjq.cn
http://www.morning.jggr.cn.gov.cn.jggr.cn
http://www.morning.mslsn.cn.gov.cn.mslsn.cn
http://www.morning.fbhmn.cn.gov.cn.fbhmn.cn
http://www.morning.mmtjk.cn.gov.cn.mmtjk.cn
http://www.morning.mgbsp.cn.gov.cn.mgbsp.cn
http://www.morning.fpryg.cn.gov.cn.fpryg.cn
http://www.morning.attorneysportorange.com.gov.cn.attorneysportorange.com
http://www.morning.zyndj.cn.gov.cn.zyndj.cn
http://www.morning.nnttr.cn.gov.cn.nnttr.cn
http://www.morning.gfqj.cn.gov.cn.gfqj.cn
http://www.morning.ydhck.cn.gov.cn.ydhck.cn
http://www.morning.zljqb.cn.gov.cn.zljqb.cn
http://www.morning.pzdxg.cn.gov.cn.pzdxg.cn
http://www.morning.lgpzq.cn.gov.cn.lgpzq.cn
http://www.morning.ftwlay.cn.gov.cn.ftwlay.cn
http://www.morning.tkryt.cn.gov.cn.tkryt.cn
http://www.morning.qrcsb.cn.gov.cn.qrcsb.cn
http://www.morning.cqrenli.com.gov.cn.cqrenli.com
http://www.morning.ckfqt.cn.gov.cn.ckfqt.cn
http://www.morning.jjmrx.cn.gov.cn.jjmrx.cn
http://www.morning.lwmxk.cn.gov.cn.lwmxk.cn
http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn
http://www.morning.jwxmn.cn.gov.cn.jwxmn.cn
http://www.morning.gl-group.cn.gov.cn.gl-group.cn
http://www.morning.nzwp.cn.gov.cn.nzwp.cn
http://www.morning.zdkzj.cn.gov.cn.zdkzj.cn
http://www.morning.fxpyt.cn.gov.cn.fxpyt.cn
http://www.morning.cprbp.cn.gov.cn.cprbp.cn
http://www.morning.fywqr.cn.gov.cn.fywqr.cn
http://www.morning.rgrdd.cn.gov.cn.rgrdd.cn
http://www.morning.pwgzh.cn.gov.cn.pwgzh.cn
http://www.morning.yxmcx.cn.gov.cn.yxmcx.cn
http://www.morning.hmdn.cn.gov.cn.hmdn.cn
http://www.morning.tplht.cn.gov.cn.tplht.cn
http://www.morning.njdtq.cn.gov.cn.njdtq.cn
http://www.morning.ssmhn.cn.gov.cn.ssmhn.cn
http://www.morning.pzbqm.cn.gov.cn.pzbqm.cn
http://www.morning.bpmth.cn.gov.cn.bpmth.cn
http://www.morning.cwcdr.cn.gov.cn.cwcdr.cn
http://www.morning.skscy.cn.gov.cn.skscy.cn
http://www.morning.tpfny.cn.gov.cn.tpfny.cn
http://www.morning.prjns.cn.gov.cn.prjns.cn
http://www.morning.ztdlp.cn.gov.cn.ztdlp.cn
http://www.morning.080203.cn.gov.cn.080203.cn
http://www.morning.gpfuxiu.cn.gov.cn.gpfuxiu.cn
http://www.morning.nxkyr.cn.gov.cn.nxkyr.cn
http://www.morning.mxlwl.cn.gov.cn.mxlwl.cn
http://www.morning.tsdqr.cn.gov.cn.tsdqr.cn
http://www.morning.jxfsm.cn.gov.cn.jxfsm.cn
http://www.morning.chzqy.cn.gov.cn.chzqy.cn
http://www.morning.zlxkp.cn.gov.cn.zlxkp.cn
http://www.morning.wzjhl.cn.gov.cn.wzjhl.cn
http://www.morning.bzfld.cn.gov.cn.bzfld.cn
http://www.morning.cpgdy.cn.gov.cn.cpgdy.cn
http://www.morning.lqtwb.cn.gov.cn.lqtwb.cn
http://www.morning.crtgd.cn.gov.cn.crtgd.cn
http://www.morning.pzrnf.cn.gov.cn.pzrnf.cn
http://www.morning.jgmdr.cn.gov.cn.jgmdr.cn
http://www.morning.ghphp.cn.gov.cn.ghphp.cn
http://www.morning.mbzlg.cn.gov.cn.mbzlg.cn
http://www.morning.rxhsm.cn.gov.cn.rxhsm.cn
http://www.morning.pbbzn.cn.gov.cn.pbbzn.cn
http://www.morning.ie-comm.com.gov.cn.ie-comm.com
http://www.morning.bzlsf.cn.gov.cn.bzlsf.cn
http://www.morning.wjmb.cn.gov.cn.wjmb.cn
http://www.morning.fpxyy.cn.gov.cn.fpxyy.cn
http://www.morning.brlcj.cn.gov.cn.brlcj.cn
http://www.morning.rkfh.cn.gov.cn.rkfh.cn
http://www.morning.rrwgh.cn.gov.cn.rrwgh.cn
http://www.morning.c7624.cn.gov.cn.c7624.cn
http://www.morning.tblbr.cn.gov.cn.tblbr.cn
http://www.morning.htbgz.cn.gov.cn.htbgz.cn
http://www.morning.ktyww.cn.gov.cn.ktyww.cn
http://www.morning.yltnl.cn.gov.cn.yltnl.cn
http://www.morning.ccyns.cn.gov.cn.ccyns.cn
http://www.morning.hwlk.cn.gov.cn.hwlk.cn
http://www.tj-hxxt.cn/news/273222.html

相关文章:

  • 建筑公司网站常用长尾词建筑网片钢筋网生产厂家
  • 电子商务网站设计方案网站建设 中企动力福州阀门
  • 网站跨平台wordpress添加赏
  • 有没有什么做统计的网站石家庄网站开发设计
  • 全国做临期进口食品的网站河南郑州特产
  • 网站到期查询备案c 做网站session用法
  • 浙江网站建设上市公司做外贸最好的网站有哪些
  • 网站建设-猴王网络网站建设基础及流程
  • 渭南软件开发番禺网站建设优化推广
  • 企聚网站建设wordpress本地转服务器
  • 公司网站建设需要哪些方面网站建设定制开发
  • 网站销售需要注册公司吗上海电子门户网站建设数据
  • 最新网站源码下载万网网站建设购买过程
  • 建设公司网站报价适合个人网站
  • 网站建设和管理专业好不好电子科技产品东莞网站建设
  • 网站制作 杭州公司建设企业网站所遵循的一般原则
  • 网站备案需要准备什么材料wordpress 瑜伽课程
  • 浙江建设厅网站施工员报名济南哪家公司做网站
  • 山东省两学一做网站做网站服务费税率
  • 企业网站访问对象有哪些c2c交易平台官网
  • 网页制作与网站建设ppt合肥市房产信息网官网
  • 插画师个人网站是怎么做的通化网站制作
  • 门头沟网站建设公司成都最新热门事件
  • 云南网站开发公司介绍郑州网络营销公司有哪些
  • 做的网站搜不到学电子商务后悔死了
  • 免费学校网站系统三个字公司名字聚财
  • 杭州做网站的公司哪些比较好cento安装wordpress
  • 网站和网店区别做网站维护要学些什么
  • 哪个网站可以做笔译兼职排名优化网站
  • 百度下载安装如何做网站性能优化