一、项目介绍
健康管理系统是一款应用于健康管理机构的业务系统,实现健康管理机构工作内容可视化、会员管理专业化、健康评估数字化、健康干预流程化、知识库集成化,从而提高健康管理师的工作效率,加强与会员间的互动,增强管理者对健康管理机构运营情况的了解。
1.1技术架构:
HTML5 Bootstrap ElementUI Vue Ajax Zookeeper Dubbo Git ApachePOI Echars MySQL
1.2功能架构:
项目分为管理后台 和移动端前台 通过Dubbo 服务调用。
1.3项目功能:
有 系统设置 、 用户管理、 体检预约 、 会员管理 、 健康评估 、 健康干预 、 体检报告 、在线预约 模块 子模块和功能
1.4用户角色:
管理员 : 可对平台所有信息进行管理,有增删改查的功能
健康管理师 : 可以对患者进行评估,干预,随访等操作
患者 : 可以在微信端操作预约、查询报告、评估、健康日记等功能
二、环境搭建
2.1项目结构
parent:父工程,打包方式为pom,统一锁定依赖的版本,同时聚合其他子模块便于统一执行maven命令
common:通用模块,打包方式为jar,存放项目中使用到的一些工具类、实体类、返回结果和常量类
interface:打包方式为jar,存放服务接口
service_provider:Dubbo服务模块,打包方式为war,存放服务实现类、Dao接口、Mapper映射文件等,作为服务提供方,需要部署到tomcat运行
backend:健康管理后台,打包方式为war,作为Dubbo服务消费方,存放Controller、HTML页面、js、css、spring配置文件等,需要部署到tomcat运行
mobile:移动端前台,打包方式为war,作为Dubbo服务消费方,存放Controller、HTML页面、js、css、spring配置文件等,需要部署到tomcat运行
创建工程,并添加依赖和配置文件。
2.2开发步骤
步骤一:创建项目使用的数据库
步骤二:将PowerDesigner导出的SQL脚本导入数据库进行建表
步骤三:导入开发模块的实体类
package com.it.pojo;import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;/*** 用户*/
public class User implements Serializable{private Integer id; // 主键private Date birthday; // 生日private String gender; // 性别private String username; // 用户名,唯一private String password; // 密码private String remark; // 备注private String station; // 状态private String telephone; // 联系电话private Set<Role> roles = new HashSet<Role>(0);//对应角色集合public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public Date getBirthday() {return birthday;}public void setBirthday(Date birthday) {this.birthday = birthday;}public String getGender() {return gender;}public void setGender(String gender) {this.gender = gender;}public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public String getRemark() {return remark;}public void setRemark(String remark) {this.remark = remark;}public String getStation() {return station;}public void setStation(String station) {this.station = station;}public String getTelephone() {return telephone;}public void setTelephone(String telephone) {this.telephone = telephone;}public Set<Role> getRoles() {return roles;}public void setRoles(Set<Role> roles) {this.roles = roles;}
}
步骤四:导入项目所需公共资源
1)返回消息常量类MessageConstant
package com.it.constant;
/*** 消息常量*/
public class MessageConstant {public static final String DELETE_CHECKITEM_FAIL = "删除检查项失败";public static final String DELETE_CHECKITEM_SUCCESS = "删除检查项成功";public static final String ADD_CHECKITEM_SUCCESS = "新增检查项成功";public static final String ADD_CHECKITEM_FAIL = "新增检查项失败";public static final String EDIT_CHECKITEM_FAIL = "编辑检查项失败";public static final String QUERY_CHECKGROUP_FAIL = "查询检查组失败";public static final String EDIT_CHECKGROUP_FAIL = "编辑检查组失败";public static final String EDIT_CHECKGROUP_SUCCESS = "编辑检查组成功";public static final String PIC_UPLOAD_SUCCESS = "图片上传成功";public static final String PIC_UPLOAD_FAIL = "图片上传失败";public static final String ADD_SETMEAL_FAIL = "新增套餐失败";public static final String ADD_SETMEAL_SUCCESS = "新增套餐成功";public static final String IMPORT_ORDERSETTING_FAIL = "批量导入预约设置数据失败";public static final String IMPORT_ORDERSETTING_SUCCESS = "批量导入预约设置数据成功";public static final String GET_ORDERSETTING_SUCCESS = "获取预约设置数据成功";public static final String GET_ORDERSETTING_FAIL = "获取预约设置数据失败";public static final String ORDERSETTING_SUCCESS = "预约设置成功";public static final String ORDERSETTING_FAIL = "预约设置失败";public static final String ADD_MEMBER_FAIL = "新增会员失败";public static final String ADD_MEMBER_SUCCESS = "新增会员成功";public static final String DELETE_MEMBER_FAIL = "删除会员失败";public static final String DELETE_MEMBER_SUCCESS = "删除会员成功";public static final String EDIT_MEMBER_FAIL = "编辑会员失败";public static final String EDIT_MEMBER_SUCCESS = "编辑会员成功";public static final String TELEPHONE_VALIDATECODE_NOTNULL = "手机号和验证码都不能为空";public static final String LOGIN_SUCCESS = "登录成功";public static final String VALIDATECODE_ERROR = "验证码输入错误";public static final String QUERY_ORDER_SUCCESS = "查询预约信息成功";public static final String QUERY_ORDER_FAIL = "查询预约信息失败";public static final String SEND_VALIDATECODE_FAIL = "验证码发送失败";public static final String SEND_VALIDATECODE_SUCCESS = "验证码发送成功";public static final String SELECTED_DATE_CANNOT_ORDER = "所选日期不能进行体检预约";public static final String ORDER_FULL = "预约已满";public static final String HAS_ORDERED = "已经完成预约,不能重复预约";public static final String ORDER_SUCCESS = "预约成功";public static final String GET_USERNAME_SUCCESS = "获取当前登录用户名称成功";public static final String GET_USERNAME_FAIL = "获取当前登录用户名称失败";public static final String GET_MENU_SUCCESS = "获取当前登录用户菜单成功";public static final String GET_MENU_FAIL = "获取当前登录用户菜单失败";public static final String GET_MEMBER_NUMBER_REPORT_SUCCESS = "获取会员统计数据成功";public static final String GET_MEMBER_NUMBER_REPORT_FAIL = "获取会员统计数据失败";public static final String GET_SETMEAL_COUNT_REPORT_SUCCESS = "获取套餐统计数据成功";public static final String GET_SETMEAL_COUNT_REPORT_FAIL = "获取套餐统计数据失败";public static final String GET_BUSINESS_REPORT_SUCCESS = "获取运营统计数据成功";public static final String GET_BUSINESS_REPORT_FAIL = "获取运营统计数据失败";public static final String GET_SETMEAL_LIST_SUCCESS = "查询套餐列表数据成功";public static final String GET_SETMEAL_LIST_FAIL = "查询套餐列表数据失败";
}
2)返回结果Result和PageResult类,放到common工程中
Result:
package com.it.entity;
import java.io.Serializable;
/*** 封装返回结果*/
public class Result implements Serializable{private boolean flag;//执行结果,true为执行成功 false为执行失败private String message;//返回提示信息,主要用于页面提示信息private Object data;//返回数据public Result(boolean flag, String message) {super();this.flag = flag;this.message = message;}public Result(boolean flag, String message, Object data) {this.flag = flag;this.message = message;this.data = data;}public boolean isFlag() {return flag;}public void setFlag(boolean flag) {this.flag = flag;}public String getMessage() {return message;}public void setMessage(String message) {this.message = message;}public Object getData() {return data;}public void setData(Object data) {this.data = data;}
}
PageResult:
package com.it.entity;
import java.io.Serializable;
import java.util.List;
/**
* 分页结果封装对象
*/
public class PageResult implements Serializable{private Long total;//总记录数private List rows;//当前页结果public PageResult(Long total, List rows) {super();this.total = total;this.rows = rows;}public Long getTotal() {return total;}public void setTotal(Long total) {this.total = total;}public List getRows() {return rows;}}
3)封装查询条件的QueryPageBean类,放到common工程中
package com.it.entity;
import java.io.Serializable;
/**
* 封装查询条件
*/
public class QueryPageBean implements Serializable{private Integer currentPage;//页码private Integer pageSize;//每页记录数private String queryString;//查询条件public Integer getCurrentPage() {return currentPage;}public void setCurrentPage(Integer currentPage) {this.currentPage = currentPage;}public Integer getPageSize() {return pageSize;}public void setPageSize(Integer pageSize) {this.pageSize = pageSize;}public String getQueryString() {return queryString;}public void setQueryString(String queryString) {this.queryString = queryString;}
}
4)html、js、css、图片等静态资源,放到backend工程中
步骤五:进行功能模块开发