作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
本项目为后管系统。
管理员角色包含以下功能:
管理员登录,用户管理,患者管理,挂号管理,科室管理,分诊叫号管理等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7/8.0版本均可;
6.是否Maven项目:否;
技术栈
1. 后端:Spring+SpringMVC+Mybatis
2. 前端:JSP+CSS+JavaScript+jQuery+easyUI
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,修改相关配置,然后运行;
3. 将项目中application.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/triage 登录
管理员账号/密码:admin/123456
运行截图
相关代码
部门控制器
package com.bjpowernode.triage.buss.controller;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bjpowernode.triage.buss.entity.Dept;
import com.bjpowernode.triage.buss.service.DeptService;
import com.bjpowernode.triage.common.controller.BaseController;
import com.bjpowernode.triage.common.persistence.Page;
import com.bjpowernode.triage.common.persistence.PropertyFilter;
import com.bjpowernode.triage.system.entity.Permission;
/**
* 用户controller
* @author bjpowernode
* @date 2016年1月13日
*/
@Controller
@RequestMapping("buss/dept")
public class DeptController extends BaseController {
@Autowired
private DeptService deptService;
/**
* 默认页面
*/
@RequestMapping(method = RequestMethod.GET)
public String list() {
return "buss/deptList";
}
/**
* 部门集合(JSON)
*/
@RequestMapping(value="allDept/json",method = RequestMethod.GET)
@ResponseBody
public List<Dept> allDept(){
List<Dept> deptList=deptService.getAll();
return deptList;
}
/**
* 获取科室json
*/
@RequiresPermissions("buss:dept:view")
@RequestMapping(value="json",method = RequestMethod.GET)
@ResponseBody
public Map<String, Object> getData(HttpServletRequest request) {
Page<Dept> page = getPage(request);
List<PropertyFilter> filters = PropertyFilter.buildFromHttpRequest(request);
page = deptService.search(page, filters);
return getEasyUIData(page);
}
/**
* 添加科室跳转
*
* @param model
*/
@RequiresPermissions("buss:dept:add")
@RequestMapping(value = "create", method = RequestMethod.GET)
public String createForm(Model model) {
model.addAttribute("dept", new Dept());
model.addAttribute("action", "create");
return "buss/deptForm";
}
/**
* 添加科室
*
* @param dept
* @param model
*/
@RequiresPermissions("buss:dept:add")
@RequestMapping(value = "create", method = RequestMethod.POST)
@ResponseBody
public String create(@Valid Dept dept, Model model) {
deptService.save(dept);
return "success";
}
/**
* 修改科室跳转
*
* @param id
* @param model
* @return
*/
@RequiresPermissions("buss:dept:update")
@RequestMapping(value = "update/{id}", method = RequestMethod.GET)
public String updateForm(@PathVariable("id") Integer id, Model model) {
model.addAttribute("dept", deptService.get(id));
model.addAttribute("action", "update");
return "buss/deptForm";
}
/**
* 修改科室
*
* @param dept
* @param model
* @return
*/
@RequiresPermissions("buss:dept:update")
@RequestMapping(value = "update", method = RequestMethod.POST)
@ResponseBody
public String update(@Valid @ModelAttribute @RequestBody Dept dept,Model model) {
deptService.update(dept);
return "success";
}
/**
* 删除用户
*
* @param id
* @return
*/
@RequiresPermissions("buss:dept:delete")
@RequestMapping(value = "delete/{id}")
@ResponseBody
public String delete(@PathVariable("id") Integer id) {
deptService.delete(id);
return "success";
}
}
如果也想学习本系统,下面领取。关注并回复:175ssm