Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
20dd26f504

+ 91 - 1
common/common-entity/src/db/2023.sql

@ -362,4 +362,94 @@ CREATE TABLE `dm_device_category` (
  `czrq` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
  `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='设备分类表';
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='设备分类表';
-- ysj 2023-12-14
CREATE TABLE `dm_sports` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
    `code` varchar(50) DEFAULT NULL COMMENT '运动编码',
    `name` varchar(100) DEFAULT NULL COMMENT '运动名称',
    `type` varchar(20) DEFAULT NULL COMMENT '运动强度类型标识',
    `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `idx_dm_sports_1` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='运动类型字典表';
CREATE TABLE `dm_sports_type` (
     `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
     `code` varchar(50) DEFAULT NULL COMMENT '强度编码',
     `name` varchar(100) DEFAULT NULL COMMENT '强度名称',
     `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
     PRIMARY KEY (`id`) USING BTREE,
     KEY `idx_dm_sports_type_1` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='运动强度字典表';
CREATE TABLE `wlyy_food_comp` (
   `id` int(10) NOT NULL AUTO_INCREMENT,
   `pid` int(10) DEFAULT NULL,
   `name` varchar(50) DEFAULT NULL,
   `hot` int(10) DEFAULT '0' COMMENT '食物能量',
   `component` varchar(2000) DEFAULT NULL COMMENT '食物营养成分',
   `weight` varchar(50) DEFAULT '0' COMMENT '重量',
   `photo` varchar(50) DEFAULT NULL,
   PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `dm_medicines` (
   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
   `code` varchar(50) NOT NULL COMMENT '药品编码',
   `name` varchar(50) NOT NULL COMMENT '药品名称',
   `type` int(11) DEFAULT NULL COMMENT '药品类型:1健康记录',
   `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
   PRIMARY KEY (`id`) USING BTREE,
   KEY `idx_dm_medicines_1` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='药品字典';
CREATE TABLE `wlyy_patient_health_record_diet` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
    `code` varchar(50) NOT NULL COMMENT '记录标识',
    `patient` varchar(50) NOT NULL COMMENT '患者标识',
    `record_date` date DEFAULT NULL COMMENT '记录时间',
    `content` varchar(500) DEFAULT NULL COMMENT '饮食内容',
    `images` varchar(3000) DEFAULT NULL COMMENT '图片HTTP地址,多图以逗号分隔',
    `sort_date` datetime DEFAULT NULL COMMENT '用于查询排序的时间',
    `czrq` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
    `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
    `source` varchar(50) DEFAULT NULL COMMENT '记录来源(0 手动 )',
    PRIMARY KEY (`id`),
    KEY `idx_wlyy_patient_health_record_diet_1` (`patient`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='患者健康记录(饮食)表';
CREATE TABLE `wlyy_patient_health_record_medication` (
     `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
     `code` varchar(50) NOT NULL COMMENT '记录标识',
     `patient` varchar(50) NOT NULL COMMENT '患者标识',
     `record_date` date DEFAULT NULL COMMENT '记录时间',
     `medicines` varchar(50) DEFAULT NULL COMMENT '药品标识',
     `medicines_name` varchar(100) DEFAULT NULL COMMENT '药品名称',
     `sort_date` datetime DEFAULT NULL COMMENT '用于查询排序的时间',
     `czrq` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
     `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
     `source` varchar(50) DEFAULT NULL COMMENT '记录来源(0 手动 )',
     PRIMARY KEY (`id`),
     KEY `idx_wlyy_patient_health_record_medication_1` (`patient`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='患者健康记录(用药)表';
CREATE TABLE `wlyy_patient_health_record_sports` (
     `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
     `code` varchar(50) NOT NULL COMMENT '记录标识',
     `patient` varchar(50) NOT NULL COMMENT '患者标识',
     `record_date` date DEFAULT NULL COMMENT '记录时间',
     `sports_time` decimal(11,2) DEFAULT NULL,
     `sports_type` varchar(50) DEFAULT NULL COMMENT '运动强度',
     `sports_type_name` varchar(100) DEFAULT NULL COMMENT '运动强度名称',
     `sports` varchar(50) DEFAULT NULL COMMENT '运动类型',
     `sports_name` varchar(100) DEFAULT NULL COMMENT '运动类型名称',
     `sort_date` datetime DEFAULT NULL COMMENT '用于查询排序的时间',
     `czrq` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
     `del` varchar(1) DEFAULT '1' COMMENT '作废标识,1正常,0作废',
     `source` varchar(50) DEFAULT NULL COMMENT '记录来源(0 手动 )',
     PRIMARY KEY (`id`),
     KEY `idx_wlyy_patient_health_record_sports_1` (`patient`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='患者健康(运动)记录表';

+ 83 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/FoodComp.java

@ -0,0 +1,83 @@
package com.yihu.jw.entity.base.health;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 健康教育
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_food_comp")
public class FoodComp extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 412341231112321L ;
	// 父id
	private Long pid;
	// 名称
	private String name;
	// 热量
	private Long hot;
	// 成分
	private String component;
	//重量
	private String weight;
	private String photo;
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public Long getPid() {
		return pid;
	}
	public void setPid(Long pid) {
		this.pid = pid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getHot() {
		return hot;
	}
	public void setHot(Long hot) {
		this.hot = hot;
	}
	public String getComponent() {
		return component;
	}
	public void setComponent(String component) {
		this.component = component;
	}
	public String getWeight() {
		return weight;
	}
	public void setWeight(String weight) {
		this.weight = weight;
	}
}

+ 56 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/Medicines.java

@ -0,0 +1,56 @@
package com.yihu.jw.entity.base.health;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 药品字典项目
 * @author George
 */
@Entity
@Table(name = "dm_medicines")
public class Medicines extends IdEntity {
	private static final long serialVersionUID = -6408087441099619157L;
	private String code;// 药品标识
	private String name;// 药品名称
	private Integer type;// 药品类型:1健康记录
	private String del;// 作废标识,1正常,0作废
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
}

+ 120 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/PatientHealthRecordDiet.java

@ -0,0 +1,120 @@
package com.yihu.jw.entity.base.health;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 健康记录(饮食)
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_patient_health_record_diet")
public class PatientHealthRecordDiet extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3346068714600220602L;
	// 记录标识
	private String code;
	// 患者标志
	private String patient;
	// 记录时间
	private Date recordDate;
	// 饮食内容
	private String content;
	// 图片
	private String images;
	// 排序日期
	private Date sortDate;
	// 添加时间
	private Date czrq;
	// 是否作废,1正常,0作废
	private String del;
	//记录来源 0手动 1设备同步
	private String source;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getPatient() {
		return patient;
	}
	public void setPatient(String patient) {
		this.patient = patient;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	@Column(name = "record_date")
	public Date getRecordDate() {
		return recordDate;
	}
	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getImages() {
		return images;
	}
	public void setImages(String images) {
		this.images = images;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@Column(name = "sort_date")
	public Date getSortDate() {
		return sortDate;
	}
	public void setSortDate(Date sortDate) {
		this.sortDate = sortDate;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCzrq() {
		return czrq;
	}
	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
}

+ 121 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/PatientHealthRecordMedication.java

@ -0,0 +1,121 @@
package com.yihu.jw.entity.base.health;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 健康记录(用药)
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_patient_health_record_medication")
public class PatientHealthRecordMedication extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7560620704878032077L;
	// 记录标识
	private String code;
	// 患者标志
	private String patient;
	// 记录时间
	private Date recordDate;
	// 药品标识
	private String medicines;
	// 药品名称
	private String medicinesName;
	// 排序日期
	private Date sortDate;
	// 添加时间
	private Date czrq;
	// 是否作废,1正常,0作废
	private String del;
	//记录来源 0 手动 1记录同步
	private String source;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getPatient() {
		return patient;
	}
	public void setPatient(String patient) {
		this.patient = patient;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	@Column(name = "record_date")
	public Date getRecordDate() {
		return recordDate;
	}
	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	public String getMedicines() {
		return medicines;
	}
	public void setMedicines(String medicines) {
		this.medicines = medicines;
	}
	@Column(name = "medicines_name")
	public String getMedicinesName() {
		return medicinesName;
	}
	public void setMedicinesName(String medicinesName) {
		this.medicinesName = medicinesName;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@Column(name = "sort_date")
	public Date getSortDate() {
		return sortDate;
	}
	public void setSortDate(Date sortDate) {
		this.sortDate = sortDate;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCzrq() {
		return czrq;
	}
	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
}

+ 154 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/PatientHealthRecordSports.java

@ -0,0 +1,154 @@
package com.yihu.jw.entity.base.health;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 健康记录(运动)
 * @author George
 *
 */
@Entity
@Table(name = "wlyy_patient_health_record_sports")
public class PatientHealthRecordSports extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5446594341010696654L;
	// 记录标识
	private String code;
	// 患者标志
	private String patient;
	// 记录时间
	private Date recordDate;
	// 运动时长(分)
	private double sportsTime;
	// 运动强度
	private String sportsType;
	// 运动强度名称
	private String sportsTypeName;
	// 运动类型
	private String sports;
	// 运动类型名称
	private String sportsName;
	// 排序日期
	private Date sortDate;
	// 添加时间
	private Date czrq;
	// 是否作废,1正常,0作废
	private String del;
	//记录来源 0 手动  1 设备同步
	private String source;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getPatient() {
		return patient;
	}
	public void setPatient(String patient) {
		this.patient = patient;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	@Column(name = "record_date")
	public Date getRecordDate() {
		return recordDate;
	}
	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	@Column(name = "sports_time")
	public double getSportsTime() {
		return sportsTime;
	}
	public void setSportsTime(double sportsTime) {
		this.sportsTime = sportsTime;
	}
	@Column(name = "sports_type")
	public String getSportsType() {
		return sportsType;
	}
	public void setSportsType(String sportsType) {
		this.sportsType = sportsType;
	}
	@Column(name = "sports_type_name")
	public String getSportsTypeName() {
		return sportsTypeName;
	}
	public void setSportsTypeName(String sportsTypeName) {
		this.sportsTypeName = sportsTypeName;
	}
	public String getSports() {
		return sports;
	}
	public void setSports(String sports) {
		this.sports = sports;
	}
	@Column(name = "sports_name")
	public String getSportsName() {
		return sportsName;
	}
	public void setSportsName(String sportsName) {
		this.sportsName = sportsName;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@Column(name = "sort_date")
	public Date getSortDate() {
		return sortDate;
	}
	public void setSortDate(Date sortDate) {
		this.sortDate = sortDate;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCzrq() {
		return czrq;
	}
	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
}

+ 55 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/Sports.java

@ -0,0 +1,55 @@
package com.yihu.jw.entity.base.health;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 运动类型
 * @author George
 *
 */
@Entity
@Table(name = "dm_sports")
public class Sports extends IdEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -8431939466804151130L;
	
	// 运动标识
	private String code;
	// 运动名称
	private String name;
	// 作废标识,1正常,0作废
	private String del;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
}

+ 54 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/health/SportsType.java

@ -0,0 +1,54 @@
package com.yihu.jw.entity.base.health;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 运动强度
 * @author George
 *
 */
@Entity
@Table(name = "dm_sports_type")
public class SportsType extends IdEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5957179454535924290L;
	
	// 强度标识
	private String code;
	// 强度名称
	private String name;
	// 作废标识,1正常,0作废
	private String del;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
}