基于javaweb的宠物医院预约挂号系统(java+JSP+Spring+SpringBoot+MyBatis+html+layui+maven+Mysql)
一、项目简述
功能包括:
用户分为宠物,医生,管理员,宠物主人可进行注册选择医生挂号,选择日期,选择号源,医生可进行宠物接诊,管理员可对宠物,医生信息的维护等等功能。
二、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP +Spring + SpringBoot + MyBatis + html+ css + Javascript + JQuery + Ajax + layui+ maven等等
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
messages.setType(1); messages.setTime(new Date()); PageInfopageInfo2 = messagesService.selectMessagesListDemo(messages,1,99); return pageInfo2.getList(); } @RequestMapping(value = "/messagesQundingUptate") @ResponseBody public String messagesQundingUptate(Integer id) { if(id != null) { Messages messages = new Messages(); messages.setId(id); messages.setType(3); //3表示预约成功 messagesService.updateByPrimaryKeySelective(messages); Messages selectByPrimaryKey = messagesService.selectByPrimaryKey(id); Messages mes = new Messages(); mes.setType(1); mes.setTime(new Date());
return "behind/admin/feiyisList";
}
*/
}
医生管理控制层:
@Controller
@RequestMapping("/doctor")
public class DoctorController {
@Autowired
private AdminService adminService;
@Autowired
private DoctorService doctorService;
@Autowired
private SectionService sectionService;
@Autowired
private PatientService patientService;
//工作区数据 messages.setTime(new Date()); Listlist = messagesService.selectMessagesPai(messages); model.addAttribute("mlist",list); model.addAttribute("messagesList",pageInfo.getList()); model.addAttribute("pageInfo",pageInfo); model.addAttribute("messages",messages); model.addAttribute("type",type); return "doctor/messageList"; } @RequestMapping("/admin_Register") public String admin_Register(Admin admin,Model model) { int insertSelective = adminService.insertSelective(admin); model.addAttribute("type",2); return "login"; }
merchant.setState(1);
merchantService.updateByPrimaryKeySelective(merchant);
}
return "redirect:/admin/merchantList";
}
*/
@RequestMapping("/messageList")
public String doctorList(Model model, Messages messages, @RequestParam(value="page",defaultValue="1")Integer page,Integer type,HttpServletRequest request) {
if(messages == null) {
messages = new Messages();
}
HttpSession session = request.getSession();
Doctor dt = (Doctor) session.getAttribute("DOCTOR");
if(dt != null){
messages.setDid(dt.getId());
}else{
return "redirect:/login/index";
}
messages.setType(type);
//底层数据
PageInfo pageInfo = messagesService.selectMessagesList(messages,page,size);
//工作区数据
@RequestMapping("/sectionDelect")
public String sectionDelect(Integer id) {
Section section = new Section();
section.setPid(id);
section.setType(2);
List list = sectionService.selectByExample(section);
sectionService.deleteByPrimaryKey(id);
for (Section section2 : list) {
sectionService.deleteByPrimaryKey(section2.getId());
}
return "redirect:/admin/sectionList";
}
@RequestMapping("/sectionBelowUptate")
public String sectionBelowUptate(Section section) {
sectionService.updateByPrimaryKeySelective(section);
return "redirect:/admin/sectionBelowList?id="+section.getPid();
}
@RequestMapping("/sectionBelowDelect")
public String sectionBelowUptate(Integer id) {
Section section = sectionService.selectByPrimaryKey(id);
Integer pid = section.getPid();
sectionService.deleteByPrimaryKey(section.getId());
return "redirect:/admin/sectionBelowList?id="+pid;
//删除图片
// String fp= filePath.substring(filePath.indexOf("/")+1);//文件的真实路径
if (feiyis.getImg() != null) {
String name = feiyis.getImg().substring(feiyis.getImg().indexOf("s") + 2);//获取文件
File file = new File(filePath + name);
if (file.exists()) {
file.delete();
}
}
feiyisService.deleteByPrimaryKey(id);
}
return "redirect:/admin/feiyisList?type=" + type;
*/
@RequestMapping("/sectionUptatePage")
public String sectionUptatePage(Model model,Integer id) {
if(id != null) {
Section se = sectionService.selectByPrimaryKey(id);
model.addAttribute("se",se);
}
return "admin/sectionUptate";
}
@RequestMapping("/sectionAdd")
@ResponseBody
public Map sectionAdd(String name) {
char sz = sou.charAt(0);
//判断是否是大写
if(Character.isUpperCase(sz)){
sz = StringRandom.toLower(sz); //大写转小写
}
for(int i =0; i
sb.append(list.get(i).getName()+",");
shu.append(list.get(i).getYipeoples()+",");
}
}
model.addAttribute("name",sb.toString());
model.addAttribute("nu",shu.toString());
}
return "doctor/index";
}
@RequestMapping("/doctorUptatePage")
public String doctorUptatePage(Model model,HttpServletRequest request) {
HttpSession session = request.getSession();
Doctor dt = (Doctor) session.getAttribute("DOCTOR");
if(dt != null) {
Doctor doctor = doctorService.selectByPrimaryKey(dt.getId());
List sectionlist2 = null;
return "redirect:/admin/index";
}
*/
}
医生管理控制层:
@Controller
@RequestMapping("/doctor")
public class DoctorController {
@Autowired
private AdminService adminService;
@Autowired
private DoctorService doctorService;
@Autowired
private SectionService sectionService;
@Autowired
private PatientService patientService;
return "login";
}
@RequestMapping("/index")
public String index(Integer type,Model model) {
if(type == null){
type = 1;
}
model.addAttribute("type",type);
return "login";
}
@RequestMapping("/font/index")
int doctor = doctorService.countByExample(null); //医生总数
int section = sectionService.count(); //科室总数
//患者总数
int patient = 0;
List selectByExample = patientService.selectByExample(null);
Messages mess = new Messages();
for (Patient pa : selectByExample) {
if(pa.getName() != null) {
mess.setDid(dt.getId());
mess.setUsername(pa.getName());
List selectMessages = messagesService.selectMessages(mess);
if(selectMessages.size() > 0 )
{
patient++;
}
}
}
}
model.addAttribute("sectionlist", sectionlist);
model.addAttribute("sectionlist2", sectionlist2);
return "doctorRegister";
}
/**
* 管理员注册



