瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/jiwei/wlyy2.0 into dev

# Conflicts:
#	common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java
#	svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/RehabilitationDetailDao.java
liuwenbin 6 年之前
父節點
當前提交
ca7c101945
共有 100 個文件被更改,包括 9967 次插入190 次删除
  1. 75 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseCityDO.java
  2. 62 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseProvinceDO.java
  3. 101 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseStreetDO.java
  4. 88 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseTownDO.java
  5. 88 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictHealthProblemDO.java
  6. 75 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictHospitalDeptDO.java
  7. 127 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictIcd10DO.java
  8. 75 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictJobTitleDO.java
  9. 88 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictMedicineDO.java
  10. 390 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java
  11. 127 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorHospitalDO.java
  12. 62 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorRoleDictDO.java
  13. 64 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ImGetuiConfigDO.java
  14. 0 35
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageDo.java
  15. 62 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageDO.java
  16. 16 15
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageSubscriberDO.java
  17. 341 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrg.java
  18. 288 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java
  19. 478 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
  20. 4 4
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleDO.java
  21. 230 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java
  22. 49 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailTimeDO.java
  23. 97 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailsDO.java
  24. 125 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageNormcatDO.java
  25. 153 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropDO.java
  26. 124 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropvalueDO.java
  27. 220 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSignRecordDO.java
  28. 124 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSkuDO.java
  29. 84 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionDO.java
  30. 86 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionQuotaDO.java
  31. 185 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/JobConfigDO.java
  32. 65 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/QuotaDO.java
  33. 101 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamDO.java
  34. 75 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamMemberDO.java
  35. 8 8
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java
  36. 12 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/HospitalServiceItemDO.java
  37. 12 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateDO.java
  38. 12 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateLabelDO.java
  39. 1 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java
  40. 0 11
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java
  41. 11 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationDetailDO.java
  42. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPlanTemplateDO.java
  43. 184 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  44. 3 3
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java
  45. 71 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseCityVO.java
  46. 115 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorHospitalVO.java
  47. 60 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorRoleDictVO.java
  48. 335 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorVO.java
  49. 236 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseOrgVO.java
  50. 412 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BasePatientVO.java
  51. 60 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseProvinceVO.java
  52. 93 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseStreetVO.java
  53. 71 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTeamMemberVO.java
  54. 93 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTeamVO.java
  55. 82 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTownVO.java
  56. 82 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHealthProblemVO.java
  57. 71 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHospitalDeptVO.java
  58. 115 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictIcd10VO.java
  59. 71 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictJobTitleVO.java
  60. 82 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictMedicineVO.java
  61. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/im/ImGetuiConfigVO.java
  62. 54 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageSubscriberVO.java
  63. 59 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageVO.java
  64. 3 3
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleVO.java
  65. 34 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/RehabilitationVO.java
  66. 46 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailTimeVO.java
  67. 96 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailsVO.java
  68. 211 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java
  69. 106 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageNormcatVO.java
  70. 156 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropVO.java
  71. 124 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropvalueDO.java
  72. 196 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSignRecordVO.java
  73. 133 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSkuVO.java
  74. 151 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageVO.java
  75. 84 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionQuotaVO.java
  76. 86 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionVO.java
  77. 184 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/JobConfigVO.java
  78. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/QuotaVO.java
  79. 9 6
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java
  80. 96 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientDisseaseInfoVO.java
  81. 10 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java
  82. 8 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  83. 6 6
      server/svr-authentication/pom.xml
  84. 16 1
      server/svr-authentication/src/main/java/com/yihu/AuthServer.java
  85. 0 14
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyAuthorizationServerConfigurerAdapter.java
  86. 0 49
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyWebSecurityConfigurerAdapter.java
  87. 0 10
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserDetails.java
  88. 0 10
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserSimple.java
  89. 69 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/config/WlyyWebSecurityConfigurerAdapter.java
  90. 228 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/SaltUser.java
  91. 17 12
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/core/WlyyUserDetailsService.java
  92. 52 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/model/Oauth2Envelop.java
  93. 220 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserDetails.java
  94. 165 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserSimple.java
  95. 65 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/common/WlyyOAuth2AccessToken.java
  96. 100 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/config/WlyyAuthorizationServerConfigurerAdapter.java
  97. 49 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/core/jdbc/WlyyJdbcUserSecurityService.java
  98. 44 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/core/redis/WlyyRedisVerifyCodeService.java
  99. 338 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/WlyyTokenGranter.java
  100. 0 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/client/WlyyJdbcClientRedirectUriService.java

+ 75 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseCityDO.java

@ -0,0 +1,75 @@
package com.yihu.jw.entity.base.area;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 城市字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_city")
public class BaseCityDO extends IntegerIdentityEntity {
    /**
	* 省编码
	*/
    private String province;
    /**
	* 城市编码
	*/
    private String code;
    /**
	* 城市名称
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "province")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 62 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseProvinceDO.java

@ -0,0 +1,62 @@
package com.yihu.jw.entity.base.area;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 省字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_province")
public class BaseProvinceDO extends IntegerIdentityEntity {
    /**
	* 省份编码
	*/
    private String code;
    /**
	* 省份名称
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 101 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseStreetDO.java

@ -0,0 +1,101 @@
package com.yihu.jw.entity.base.area;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 街道字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_street")
public class BaseStreetDO extends IntegerIdentityEntity {
    /**
	* 省标识
	*/
    private String province;
    /**
	* 市标识
	*/
    private String city;
    /**
	* 区县标识
	*/
    private String town;
    /**
	* 街道标识
	*/
    private String code;
    /**
	* 街道名称
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "province")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@Column(name = "city")
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
	@Column(name = "town")
    public String getTown() {
        return town;
    }
    public void setTown(String town) {
        this.town = town;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 88 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseTownDO.java

@ -0,0 +1,88 @@
package com.yihu.jw.entity.base.area;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 区县字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_town")
public class BaseTownDO extends IntegerIdentityEntity {
    /**
	* 省编码
	*/
    private String province;
    /**
	* 城市编码
	*/
    private String city;
    /**
	* 区县编码
	*/
    private String code;
    /**
	* 区县名称
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "province")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@Column(name = "city")
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 88 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictHealthProblemDO.java

@ -0,0 +1,88 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 健康问题字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "dict_health_problem")
public class DictHealthProblemDO extends IntegerIdentityEntity {
    /**
	* saas配置id,null标识公共字典
	*/
    private String saasId;
    /**
	* 字典编码
	*/
    private String code;
    /**
	* 字典名称
	*/
    private String name;
    /**
	* 描述
	*/
    private String description;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "description")
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 75 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictHospitalDeptDO.java

@ -0,0 +1,75 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 医院科室字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "dict_hospital_dept")
public class DictHospitalDeptDO extends IntegerIdentityEntity {
    /**
	* saas配置id,null标识公共字典
	*/
    private String saasId;
    /**
	* 科室标识
	*/
    private String code;
    /**
	* 科室名称
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 127 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictIcd10DO.java

@ -0,0 +1,127 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * ICD10字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "dict_icd10")
public class DictIcd10DO extends IntegerIdentityEntity {
    /**
	* saas配置id,null标识公共字典
	*/
    private String saasId;
    /**
	* icd10字典编码
	*/
    private String code;
    /**
	* icd10字典名称
	*/
    private String name;
    /**
	* 字典名称拼音首字母
	*/
    private String phoneticCode;
    /**
	* 是否慢病
	*/
    private String chronicFlag;
    /**
	* 是否传染病
	*/
    private String infectiousFlag;
    /**
	* 描述
	*/
    private String description;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "phonetic_code")
    public String getPhoneticCode() {
        return phoneticCode;
    }
    public void setPhoneticCode(String phoneticCode) {
        this.phoneticCode = phoneticCode;
    }
	@Column(name = "chronic_flag")
    public String getChronicFlag() {
        return chronicFlag;
    }
    public void setChronicFlag(String chronicFlag) {
        this.chronicFlag = chronicFlag;
    }
	@Column(name = "infectious_flag")
    public String getInfectiousFlag() {
        return infectiousFlag;
    }
    public void setInfectiousFlag(String infectiousFlag) {
        this.infectiousFlag = infectiousFlag;
    }
	@Column(name = "description")
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 75 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictJobTitleDO.java

@ -0,0 +1,75 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 职称字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "dict_job_title")
public class DictJobTitleDO extends IntegerIdentityEntity {
    /**
	* saas配置id,null标识公共字典
	*/
    private String saasId;
    /**
	* 职称标识
	*/
    private String code;
    /**
	* 职称名
	*/
    private String name;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 88 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/DictMedicineDO.java

@ -0,0 +1,88 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 药品字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "dict_medicine")
public class DictMedicineDO extends IntegerIdentityEntity {
    /**
	* saas配置id,null标识公共字典
	*/
    private String saasId;
    /**
	* 药品编码
	*/
    private String code;
    /**
	* 药品名称
	*/
    private String name;
    /**
	* 药品类型:1健康记录
	*/
    private String type;
    /**
	* 创建时间
	*/
    private Date createTime;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "type")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 390 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -0,0 +1,390 @@
package com.yihu.jw.entity.base.doctor;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 医生基础信息实体
*
* @author litaohong on  2018年08月31日
*
*/
@Entity
@Table(name = "base_doctor")
public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    /**
	* 机构id
	*/
    private String orgId;
    /**
	* 密码
	*/
    private String password;
    /**
	* 
	*/
    private String salt;
    /**
	* 姓名
	*/
    private String name;
    /**
	* 性别(1男,2女) 用国家标准字典
	*/
    private String sex;
    /**
	* 医生专长
	*/
    private String expertise;
    /**
	* 医生介绍
	*/
    private String introduce;
    /**
	*  身份证
	*/
    private String idcard;
    /**
	* 生日
	*/
    private Date birthday;
    /**
	* 头像http地址
	*/
    private String photo;
    /**
	* 手机号
	*/
    private String mobile;
    /**
	* 医生二维码
	*/
    private String qrcode;
    /**
	* 省代码
	*/
    private String provinceCode;
    /**
	* 省名称
	*/
    private String provinceName;
    /**
	* 市代码
	*/
    private String cityCode;
    /**
	* 市名称
	*/
    private String cityName;
    /**
	* 区县代码
	*/
    private String townCode;
    /**
	* 区县名称
	*/
    private String townName;
    /**
	* 街道代码
	*/
    private String streetCode;
    /**
	* 街道名称
	*/
    private String streetName;
    /**
	* 资格是否认证通过,1是,0否
	*/
    private String iscertified;
    /**
	* 是否是名医,1是,0否
	*/
    private String isFamous;
    /**
	* 是否提示设置密码  1 提示过 0未提示
	*/
    private String isPasswordPrompt;
    /**
	* 名称拼音首字母
	*/
    private String spell;
    /**
	* CA证书过期时间
	*/
    private Date certifiedOvertime;
    /**
	* CA证书编号
	*/
    private String certificateNum;
    /**
	* 
	*/
    private String openid;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@Column(name = "password")
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
	@Column(name = "salt")
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "sex")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
	@Column(name = "expertise")
    public String getExpertise() {
        return expertise;
    }
    public void setExpertise(String expertise) {
        this.expertise = expertise;
    }
	@Column(name = "introduce")
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
	@Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@Column(name = "birthday")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
	@Column(name = "photo")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
	@Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
	@Column(name = "qrcode")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@Column(name = "province_code")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
	@Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
	@Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
	@Column(name = "town_code")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
	@Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
	@Column(name = "street_code")
    public String getStreetCode() {
        return streetCode;
    }
    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }
	@Column(name = "street_name")
    public String getStreetName() {
        return streetName;
    }
    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }
	@Column(name = "iscertified")
    public String getIscertified() {
        return iscertified;
    }
    public void setIscertified(String iscertified) {
        this.iscertified = iscertified;
    }
	@Column(name = "is_famous")
    public String getIsFamous() {
        return isFamous;
    }
    public void setIsFamous(String isFamous) {
        this.isFamous = isFamous;
    }
	@Column(name = "is_password_prompt")
    public String getIsPasswordPrompt() {
        return isPasswordPrompt;
    }
    public void setIsPasswordPrompt(String isPasswordPrompt) {
        this.isPasswordPrompt = isPasswordPrompt;
    }
	@Column(name = "spell")
    public String getSpell() {
        return spell;
    }
    public void setSpell(String spell) {
        this.spell = spell;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@Column(name = "certified_overtime")
    public Date getCertifiedOvertime() {
        return certifiedOvertime;
    }
    public void setCertifiedOvertime(Date certifiedOvertime) {
        this.certifiedOvertime = certifiedOvertime;
    }
	@Column(name = "certificate_num")
    public String getCertificateNum() {
        return certificateNum;
    }
    public void setCertificateNum(String certificateNum) {
        this.certificateNum = certificateNum;
    }
	@Column(name = "openid")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 127 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorHospitalDO.java

@ -0,0 +1,127 @@
package com.yihu.jw.entity.base.doctor;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 医生职业信息实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_doctor_hospital")
public class BaseDoctorHospitalDO extends IntegerIdentityEntity {
    /**
	* 医院标识
	*/
    private String hospCode;
    /**
	* 医院名称
	*/
    private String hospName;
    /**
	* 医生角色标识
	*/
    private String roleCode;
    /**
	* 医院角色名称
	*/
    private String roleName;
    /**
	* 职称代码
	*/
    private String jobTitleCode;
    /**
	* 职称名称
	*/
    private String jobTitleName;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
    /**
	* 
	*/
    private Date createTime;
	@Column(name = "hosp_code")
    public String getHospCode() {
        return hospCode;
    }
    public void setHospCode(String hospCode) {
        this.hospCode = hospCode;
    }
	@Column(name = "hosp_name")
    public String getHospName() {
        return hospName;
    }
    public void setHospName(String hospName) {
        this.hospName = hospName;
    }
	@Column(name = "role_code")
    public String getRoleCode() {
        return roleCode;
    }
    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }
	@Column(name = "role_name")
    public String getRoleName() {
        return roleName;
    }
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
	@Column(name = "job_title_code")
    public String getJobTitleCode() {
        return jobTitleCode;
    }
    public void setJobTitleCode(String jobTitleCode) {
        this.jobTitleCode = jobTitleCode;
    }
	@Column(name = "job_title_name")
    public String getJobTitleName() {
        return jobTitleName;
    }
    public void setJobTitleName(String jobTitleName) {
        this.jobTitleName = jobTitleName;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
	@Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 62 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorRoleDictDO.java

@ -0,0 +1,62 @@
package com.yihu.jw.entity.base.doctor;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 医生角色字典实体
 * 
 * @author litaohong on  2018年08月31日
 *
 */
@Entity
@Table(name = "base_doctor_role_dict")
public class BaseDoctorRoleDictDO extends IntegerIdentityEntity {
    /**
	* 角色code
	*/
    private String code;
    /**
	* 角色名称:全科医生、专科医生、健康管理师、管理员等
	*/
    private String name;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 64 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ImGetuiConfigDO.java

@ -0,0 +1,64 @@
package com.yihu.jw.entity.base.im;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * im个推配置表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_im_getui_config")
public class ImGetuiConfigDO extends UuidIdentityEntity {
    private String saasId;//个推url
    private String host;
    private String appId;//个推appid
    private String appkey;//个推appkey
    private String mastersecret;//个推的秘钥
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getHost() {
        return host;
    }
    public void setHost(String host) {
        this.host = host;
    }
    @Column(name = "app_id")
    public String getAppId() {
        return appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getAppkey() {
        return appkey;
    }
    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }
    public String getMastersecret() {
        return mastersecret;
    }
    public void setMastersecret(String mastersecret) {
        this.mastersecret = mastersecret;
    }
}

+ 0 - 35
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageDo.java

@ -1,35 +0,0 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by progr1mmer on 2018/8/14.
 */@Entity
@Table(name = "base_message")
public class MessageDo extends IntegerIdentityEntity {
    private String topic; //消息主题
    private String template; //消息模板
    @Column(name = "topic", nullable = false)
    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    @Column(name = "template", nullable = false)
    public String getTemplate() {
        return template;
    }
    public void setTemplate(String template) {
        this.template = template;
    }
}

+ 62 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageDO.java

@ -0,0 +1,62 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.UuidIdentityEntity;
import org.springframework.stereotype.Component;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - 基于MQ的消息推送
 * Created by progr1mmer on 2018/8/30.
 */
@Entity
@Table(name = "base_mq_message")
public class MqMessageDO extends UuidIdentityEntity {
    //主题
    private String topic;
    //名称
    private String name;
    //备注
    private String remark;
    //模板
    private String template;
    @Column(name = "topic", nullable = false)
    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    @Column(name = "name", nullable = false)
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Column(name = "template")
    public String getTemplate() {
        return template;
    }
    public void setTemplate(String template) {
        this.template = template;
    }
}

+ 16 - 15
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageSubscriberDO.java

@ -1,33 +1,25 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - 基于MQ的消息推送订阅者
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_message_subscriber")
public class MessageSubscriberDO extends IntegerIdentityEntity {
@Table(name = "base_mq_message_subscriber")
public class MqMessageSubscriberDO extends UuidIdentityEntity {
    private Integer messageId; //消息ID
    private String saasId; //saas id
    private String topic; //主题
    private String url; //推送地址
    private String remark; //备注
    @Column(name = "message_id")
    public Integer getMessageId() {
        return messageId;
    }
    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }
    @Column(name = "saas_id", length = 50)
    @Column(name = "saas_id", nullable = false, length = 50)
    public String getSaasId() {
        return saasId;
    }
@ -36,7 +28,16 @@ public class MessageSubscriberDO extends IntegerIdentityEntity {
        this.saasId = saasId;
    }
    @Column(name = "url")
    @Column(name = "topic", nullable = false)
    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    @Column(name = "url", nullable = false)
    public String getUrl() {
        return url;
    }

+ 341 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrg.java

@ -0,0 +1,341 @@
/**
 *  @author  
 *  @create 2018-08-29 12:41:02 
*/
package com.yihu.jw.entity.base.org;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
@Entity
@Table(name = "base_org")
public class BaseOrg extends UuidIdentityEntityWithOperator {
/**
* saas化配置
*/
private String saasid;
/**
* 省份标识
*/
private String provinceCode;
/**
* 城市标识
*/
private String cityCode;
/**
* 区县标识
*/
private String townCode;
/**
* 机构名称
*/
private String name;
/**
* 机构别名
*/
private String alias;
/**
* 机构名称拼音首字母
*/
private String spell;
/**
* 机构类型: 1.  医疗机构2.  企事业单位3.  政府机关4.  社会团体 5.药店 0.  部门 6.单位或者独立子公司7.基层机构 8.专业公共机构
*/
private String type;
/**
* 机构简介
*/
private String brief;
/**
* 机构详细地址
*/
private String address;
/**
* 机构图片
*/
private String photo;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 法人
*/
private String legalperson;
/**
* 机构管理员
*/
private String orgAdmin;
/**
* 机构网址
*/
private String orgUrl;
/**
* 机构简介
*/
private String intro;
/**
* 机构二维码
*/
private String qrcode;
/**
* 作废标识,1正常,0作废
*/
private String del;
@Column(name = "saasid")
public String getSaasid()
{
    return saasid;
}
public void setSaasid(String saasid)
{
    this.saasid = saasid;
}
@Column(name = "province_code")
public String getProvinceCode()
{
    return provinceCode;
}
public void setProvinceCode(String provinceCode)
{
    this.provinceCode = provinceCode;
}
@Column(name = "city_code")
public String getCityCode()
{
    return cityCode;
}
public void setCityCode(String cityCode)
{
    this.cityCode = cityCode;
}
@Column(name = "town_code")
public String getTownCode()
{
    return townCode;
}
public void setTownCode(String townCode)
{
    this.townCode = townCode;
}
@Column(name = "name")
public String getName()
{
    return name;
}
public void setName(String name)
{
    this.name = name;
}
@Column(name = "alias")
public String getAlias()
{
    return alias;
}
public void setAlias(String alias)
{
    this.alias = alias;
}
@Column(name = "spell")
public String getSpell()
{
    return spell;
}
public void setSpell(String spell)
{
    this.spell = spell;
}
@Column(name = "type")
public String getType()
{
    return type;
}
public void setType(String type)
{
    this.type = type;
}
@Column(name = "brief")
public String getBrief()
{
    return brief;
}
public void setBrief(String brief)
{
    this.brief = brief;
}
@Column(name = "address")
public String getAddress()
{
    return address;
}
public void setAddress(String address)
{
    this.address = address;
}
@Column(name = "photo")
public String getPhoto()
{
    return photo;
}
public void setPhoto(String photo)
{
    this.photo = photo;
}
@Column(name = "longitude")
public String getLongitude()
{
    return longitude;
}
public void setLongitude(String longitude)
{
    this.longitude = longitude;
}
@Column(name = "latitude")
public String getLatitude()
{
    return latitude;
}
public void setLatitude(String latitude)
{
    this.latitude = latitude;
}
@Column(name = "legalperson")
public String getLegalperson()
{
    return legalperson;
}
public void setLegalperson(String legalperson)
{
    this.legalperson = legalperson;
}
@Column(name = "org_admin")
public String getOrgAdmin()
{
    return orgAdmin;
}
public void setOrgAdmin(String orgAdmin)
{
    this.orgAdmin = orgAdmin;
}
@Column(name = "org_url")
public String getOrgUrl()
{
    return orgUrl;
}
public void setOrgUrl(String orgUrl)
{
    this.orgUrl = orgUrl;
}
@Column(name = "intro")
public String getIntro()
{
    return intro;
}
public void setIntro(String intro)
{
    this.intro = intro;
}
@Column(name = "qrcode")
public String getQrcode()
{
    return qrcode;
}
public void setQrcode(String qrcode)
{
    this.qrcode = qrcode;
}
@Column(name = "del")
public String getDel()
{
    return del;
}
public void setDel(String del)
{
    this.del = del;
}
}

+ 288 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java

@ -0,0 +1,288 @@
package com.yihu.jw.entity.base.org;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 机构信息实体
 *
 * @author litaohong on  2018年08月31日
 */
@Entity
@Table(name = "base_org")
public class BaseOrgDO extends UuidIdentityEntityWithOperator {
    /**
     * saas化配置
     */
    private String saasid;
    /**
     * 省份标识
     */
    private String provinceCode;
    /**
     * 城市标识
     */
    private String cityCode;
    /**
     * 区县标识
     */
    private String townCode;
    /**
     * 机构名称
     */
    private String name;
    /**
     * 机构别名
     */
    private String alias;
    /**
     * 机构名称拼音首字母
     */
    private String spell;
    /**
     * 机构类型: 1.  医疗机构2.  企事业单位3.  政府机关4.  社会团体 5.药店 0.  部门 6.单位或者独立子公司7.基层机构 8.专业公共机构
     */
    private String type;
    /**
     * 机构简介
     */
    private String brief;
    /**
     * 机构详细地址
     */
    private String address;
    /**
     * 机构图片
     */
    private String photo;
    /**
     * 经度
     */
    private String longitude;
    /**
     * 纬度
     */
    private String latitude;
    /**
     * 法人
     */
    private String legalperson;
    /**
     * 机构管理员
     */
    private String orgAdmin;
    /**
     * 机构网址
     */
    private String orgUrl;
    /**
     * 机构简介
     */
    private String intro;
    /**
     * 机构二维码
     */
    private String qrcode;
    /**
     * 作废标识,1正常,0作废
     */
    private String del;
    @Column(name = "saasid")
    public String getSaasid() {
        return saasid;
    }
    public void setSaasid(String saasid) {
        this.saasid = saasid;
    }
    @Column(name = "province_code")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
    @Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    @Column(name = "town_code")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "alias")
    public String getAlias() {
        return alias;
    }
    public void setAlias(String alias) {
        this.alias = alias;
    }
    @Column(name = "spell")
    public String getSpell() {
        return spell;
    }
    public void setSpell(String spell) {
        this.spell = spell;
    }
    @Column(name = "type")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    @Column(name = "brief")
    public String getBrief() {
        return brief;
    }
    public void setBrief(String brief) {
        this.brief = brief;
    }
    @Column(name = "address")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }
    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }
    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
    @Column(name = "legalperson")
    public String getLegalperson() {
        return legalperson;
    }
    public void setLegalperson(String legalperson) {
        this.legalperson = legalperson;
    }
    @Column(name = "org_admin")
    public String getOrgAdmin() {
        return orgAdmin;
    }
    public void setOrgAdmin(String orgAdmin) {
        this.orgAdmin = orgAdmin;
    }
    @Column(name = "org_url")
    public String getOrgUrl() {
        return orgUrl;
    }
    public void setOrgUrl(String orgUrl) {
        this.orgUrl = orgUrl;
    }
    @Column(name = "intro")
    public String getIntro() {
        return intro;
    }
    public void setIntro(String intro) {
        this.intro = intro;
    }
    @Column(name = "qrcode")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
    @Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 478 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java

@ -0,0 +1,478 @@
package com.yihu.jw.entity.base.patient;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 居民信息实体
*
* @author litaohong on  2018年08月31日
*
*/
@Entity
@Table(name = "base_patient")
public class BasePatientDO extends UuidIdentityEntityWithOperator {
    /**
	* saas配置id
	*/
    private String saasId;
    /**
	* 身份证号
	*/
    private String idcard;
    /**
	* 登录密码
	*/
    private String password;
    /**
	* 
	*/
    private String salt;
    /**
	* 姓名
	*/
    private String name;
    /**
	* 生日
	*/
    private Date birthday;
    /**
	* 性别,1男,2女
	*/
    private String sex;
    /**
	* 手机号
	*/
    private String mobile;
    /**
	* 联系电话
	*/
    private String phone;
    /**
	* 社保卡号
	*/
    private String ssc;
    /**
	* 头像http地址
	*/
    private String photo;
    /**
	* 省编码
	*/
    private String provinceCode;
    /**
	* 市编码
	*/
    private String cityCode;
    /**
	* 区县编码
	*/
    private String townCode;
    /**
	* 街道编码
	*/
    private String streetCode;
    /**
	* 具体详细地址
	*/
    private String address;
    /**
	* 疾病类型,0健康,1高血压,2糖尿病,3高血压+糖尿病
	*/
    private String disease;
    /**
	* 病情:0绿标,1黄标,2红标,3重点关注,
	*/
    private String diseaseCondition;
    /**
	* 总积分
	*/
    private String points;
    /**
	* 病历总数
	*/
    private String recordAmount;
    /**
	* 微信编号
	*/
    private String openid;
    /**
	* 用户状态:1正常,0禁用,-1恶意注册,2审核中
	*/
    private String patientStatus;
    /**
	* 联系方式备注【基卫】
	*/
    private String mobileRemarks;
    /**
	* 第一次添加open的时间
	*/
    private Date openidTime;
    /**
	* 居委会代码
	*/
    private String sickVillage;
    /**
	* 
	*/
    private String sickVillageName;
    /**
	* 绑定电子社保卡主体(共济为操作人code)
	*/
    private String principalCode;
    /**
	* 是否绑定电子社保卡 (0否 1是)
	*/
    private String sicardStatus;
    /**
	* 电子社保卡绑定时间
	*/
    private Date sicardTime;
    /**
	* 是否分配过微信标签
	*/
    private Integer isWxtag;
    /**
	* 微信tagId
	*/
    private String wxtagid;
    /**
	* 居民预警状态:0为标准,1为预警状态
	*/
    private Integer standardStatus;
    /**
	* 医疗保险号
	*/
    private String medicareNumber;
    /**
	* unionId 开发平台唯一标识
	*/
    private String unionid;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
	@Column(name = "password")
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
	@Column(name = "salt")
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "birthday")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
	@Column(name = "sex")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
	@Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
	@Column(name = "phone")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
	@Column(name = "ssc")
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
	@Column(name = "photo")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
	@Column(name = "province_code")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
	@Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@Column(name = "town_code")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
	@Column(name = "street_code")
    public String getStreetCode() {
        return streetCode;
    }
    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }
	@Column(name = "address")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
	@Column(name = "disease")
    public String getDisease() {
        return disease;
    }
    public void setDisease(String disease) {
        this.disease = disease;
    }
	@Column(name = "disease_condition")
    public String getDiseaseCondition() {
        return diseaseCondition;
    }
    public void setDiseaseCondition(String diseaseCondition) {
        this.diseaseCondition = diseaseCondition;
    }
	@Column(name = "points")
    public String getPoints() {
        return points;
    }
    public void setPoints(String points) {
        this.points = points;
    }
	@Column(name = "record_amount")
    public String getRecordAmount() {
        return recordAmount;
    }
    public void setRecordAmount(String recordAmount) {
        this.recordAmount = recordAmount;
    }
	@Column(name = "openid")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
	@Column(name = "patient_status")
    public String getPatientStatus() {
        return patientStatus;
    }
    public void setPatientStatus(String patientStatus) {
        this.patientStatus = patientStatus;
    }
	@Column(name = "mobile_remarks")
    public String getMobileRemarks() {
        return mobileRemarks;
    }
    public void setMobileRemarks(String mobileRemarks) {
        this.mobileRemarks = mobileRemarks;
    }
	@Column(name = "openid_time")
    public Date getOpenidTime() {
        return openidTime;
    }
    public void setOpenidTime(Date openidTime) {
        this.openidTime = openidTime;
    }
	@Column(name = "sick_village")
    public String getSickVillage() {
        return sickVillage;
    }
    public void setSickVillage(String sickVillage) {
        this.sickVillage = sickVillage;
    }
	@Column(name = "sick_village_name")
    public String getSickVillageName() {
        return sickVillageName;
    }
    public void setSickVillageName(String sickVillageName) {
        this.sickVillageName = sickVillageName;
    }
	@Column(name = "principal_code")
    public String getPrincipalCode() {
        return principalCode;
    }
    public void setPrincipalCode(String principalCode) {
        this.principalCode = principalCode;
    }
	@Column(name = "sicard_status")
    public String getSicardStatus() {
        return sicardStatus;
    }
    public void setSicardStatus(String sicardStatus) {
        this.sicardStatus = sicardStatus;
    }
	@Column(name = "sicard_time")
    public Date getSicardTime() {
        return sicardTime;
    }
    public void setSicardTime(Date sicardTime) {
        this.sicardTime = sicardTime;
    }
	@Column(name = "is_wxtag")
    public Integer getIsWxtag() {
        return isWxtag;
    }
    public void setIsWxtag(Integer isWxtag) {
        this.isWxtag = isWxtag;
    }
	@Column(name = "wxtagid")
    public String getWxtagid() {
        return wxtagid;
    }
    public void setWxtagid(String wxtagid) {
        this.wxtagid = wxtagid;
    }
	@Column(name = "standard_status")
    public Integer getStandardStatus() {
        return standardStatus;
    }
    public void setStandardStatus(Integer standardStatus) {
        this.standardStatus = standardStatus;
    }
	@Column(name = "medicare_number")
    public String getMedicareNumber() {
        return medicareNumber;
    }
    public void setMedicareNumber(String medicareNumber) {
        this.medicareNumber = medicareNumber;
    }
	@Column(name = "unionid")
    public String getUnionid() {
        return unionid;
    }
    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 4 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleDO.java

@ -19,7 +19,7 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
	//备注
	private String remark;
	//是否系统管理员
	private Boolean isSystem;
	private Boolean system;
	@Column(name = "name", length = 50)
	public String getName() {
@ -39,12 +39,12 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
		this.remark = remark;
	}
	@Column(name = "is_system")
	@Column(name = "system")
	public Boolean getSystem() {
		return isSystem;
		return system;
	}
	public void setSystem(Boolean system) {
		isSystem = system;
		this.system = system;
	}
}

+ 230 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java

@ -0,0 +1,230 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * 服务包表
 * @author yeshijie on 2018/8/17.
 */
@Entity
@Table(name = "base_service_package")
public class ServicePackageDO extends UuidIdentityEntity implements Serializable {
    public enum Level {
        system("系统", "0"),
        doctor("医生", "1"),
        team("团队", "2"),
        hospital("社区", "3"),
        town("区", "4");
        private String name;
        private String value;
        Level(String name, String value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
    }
    public enum Status {
        waiting("待审核", "0"),
        pass("审核通过", "1"),
        unpass("审核不通过", "2");
        private String name;
        private String value;
        Status(String name, String value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
    }
    public enum Type {
        rehabilitation("康复计划", "1");
        private String name;
        private String value;
        Type(String name, String value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
    }
    private String saasId;
    private String name;//服务包名称
    private String type;//服务包类型
    private Integer num;//服务项数量
    private Long price;//预售价//单位分
    private String level;//服务包级别(0系统,1.医生,2团队,3社区,4区)
    private String levelCode;//关联code
    private String creater;//创建者
    private Date createTime;//创建时间
    private String introduce;//服务介绍
    private String status;//审核状态(预留字段0待审核,1审核通过,2审核不通过)
    private Integer del;//是否有效(1有效,0失效)
    private List<ServicePackageDetailsDO> detailsDOList;//服务项
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    public String getLevel() {
        return level;
    }
    public void setLevel(String level) {
        this.level = level;
    }
    @Column(name = "level_code")
    public String getLevelCode() {
        return levelCode;
    }
    public void setLevelCode(String levelCode) {
        this.levelCode = levelCode;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    @Transient
    public List<ServicePackageDetailsDO> getDetailsDOList() {
        return detailsDOList;
    }
    public void setDetailsDOList(List<ServicePackageDetailsDO> detailsDOList) {
        this.detailsDOList = detailsDOList;
    }
}

+ 49 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailTimeDO.java

@ -0,0 +1,49 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包明细执行时间表
 * @author yeshijie on 2018/8/17.
 */
@Entity
@Table(name = "base_service_package_detail_time")
public class ServicePackageDetailTimeDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private String detailId;//服务包明细id
    private Date excutionTime;//执行时间
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "detail_id")
    public String getDetailId() {
        return detailId;
    }
    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }
    @Column(name = "excution_time")
    public Date getExcutionTime() {
        return excutionTime;
    }
    public void setExcutionTime(Date excutionTime) {
        this.excutionTime = excutionTime;
    }
}

+ 97 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailsDO.java

@ -0,0 +1,97 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包明细表
 * @author yeshijie on 2018/8/17.
 */
@Entity
@Table(name = "base_service_package_details")
public class ServicePackageDetailsDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private String servicePackageId;//服务包id',
    private String code;//服务项目编码',
    private String name;//服务项目名称',
    private Date createTime;//创建时间',
    private Date executionTime;//执行时间',
    private String executionType;//执行类型(1固定时间,2固定次数(不固定时间),3长期)',
    private Integer executionNum;//最少执行次数',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "service_package_id")
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    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;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "execution_type")
    public String getExecutionType() {
        return executionType;
    }
    public void setExecutionType(String executionType) {
        this.executionType = executionType;
    }
    @Column(name = "execution_num")
    public Integer getExecutionNum() {
        return executionNum;
    }
    public void setExecutionNum(Integer executionNum) {
        this.executionNum = executionNum;
    }
    @Column(name = "execution_time")
    public Date getExecutionTime() {
        return executionTime;
    }
    public void setExecutionTime(Date executionTime) {
        this.executionTime = executionTime;
    }
}

+ 125 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageNormcatDO.java

@ -0,0 +1,125 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包类目表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_service_package_normcat")
public class ServicePackageNormcatDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private Long cid;//商品所属类目ID
    private Long parentCid;//父类目ID=0时,代表的是一级的类目
    private String name;//类目名称
    private Integer isParent;//该类目是否为父类目(即:该类目是否还有子类目),1为true,0为false
    private Long sortOrder;//排列序号,表示同级类目的展现次序,如数值相等则按名称次序排列。取值范围:大于零的整数
    private String alias;//alias
    private String picUrl;//类型图片
    private String simpleName;//分类简称
    private Date createTime;//创建时间
    private Integer del;//状态。可选值:1(正常),0(删除)
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    @Column(name = "parent_cid")
    public Long getParentCid() {
        return parentCid;
    }
    public void setParentCid(Long parentCid) {
        this.parentCid = parentCid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "is_parent")
    public Integer getIsParent() {
        return isParent;
    }
    public void setIsParent(Integer isParent) {
        this.isParent = isParent;
    }
    @Column(name = "sort_order")
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    public String getAlias() {
        return alias;
    }
    public void setAlias(String alias) {
        this.alias = alias;
    }
    @Column(name = "pic_url")
    public String getPicUrl() {
        return picUrl;
    }
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }
    @Column(name = "simple_name")
    public String getSimpleName() {
        return simpleName;
    }
    public void setSimpleName(String simpleName) {
        this.simpleName = simpleName;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 153 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropDO.java

@ -0,0 +1,153 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包属性表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_service_package_prop")
public class ServicePackagePropDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private Long pid;//属性 ID
    private Long parentPid;//上级属性ID
    private Long parentVid;//上级属性值ID
    private String name;//属性名
    private Integer isKeyProp;//是否关键属性。可选值:true(是),false(否)
    private Integer isSaleProp;//是否销售属性。可选值:true(是),false(否)
    private Integer isItemProp;//是否商品属性。可选值:true(是),false(否)
    private Integer must;//是否为必选属性。可选值:true(是),false(否)
    private Integer multi;//是否可以多选。可选值:true(是),false(否)
    private Long sortOrder;
    private Long cid;//类目ID
    private Date createTime;
    private Integer del;//状态。可选值:1(正常),0(删除)
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    @Column(name = "parent_pid")
    public Long getParentPid() {
        return parentPid;
    }
    public void setParentPid(Long parentPid) {
        this.parentPid = parentPid;
    }
    @Column(name = "parent_vid")
    public Long getParentVid() {
        return parentVid;
    }
    public void setParentVid(Long parentVid) {
        this.parentVid = parentVid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "is_key_prop")
    public Integer getIsKeyProp() {
        return isKeyProp;
    }
    public void setIsKeyProp(Integer isKeyProp) {
        this.isKeyProp = isKeyProp;
    }
    @Column(name = "is_sale_prop")
    public Integer getIsSaleProp() {
        return isSaleProp;
    }
    public void setIsSaleProp(Integer isSaleProp) {
        this.isSaleProp = isSaleProp;
    }
    @Column(name = "is_item_prop")
    public Integer getIsItemProp() {
        return isItemProp;
    }
    public void setIsItemProp(Integer isItemProp) {
        this.isItemProp = isItemProp;
    }
    public Integer getMust() {
        return must;
    }
    public void setMust(Integer must) {
        this.must = must;
    }
    public Integer getMulti() {
        return multi;
    }
    public void setMulti(Integer multi) {
        this.multi = multi;
    }
    @Column(name = "sort_order")
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 124 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropvalueDO.java

@ -0,0 +1,124 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包属性值表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_service_package_propvalue")
public class ServicePackagePropvalueDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private Long cid;//类目ID',
    private Long pid;//属性 ID',
    private String propName;//属性名',
    private Long vid;//属性值ID',
    private String name;//属性值',
    private String nameAlias;//属性值别名',
    private Integer isParent;//是否为父类目属性',
    private Long sortOrder;//排列序号。取值范围:大于零的整数',
    private Date createTime;
    private Integer del;//状态。可选值:1(正常),0(删除)',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    @Column(name = "prop_name")
    public String getPropName() {
        return propName;
    }
    public void setPropName(String propName) {
        this.propName = propName;
    }
    public Long getVid() {
        return vid;
    }
    public void setVid(Long vid) {
        this.vid = vid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "name_alias")
    public String getNameAlias() {
        return nameAlias;
    }
    public void setNameAlias(String nameAlias) {
        this.nameAlias = nameAlias;
    }
    @Column(name = "is_parent")
    public Integer getIsParent() {
        return isParent;
    }
    public void setIsParent(Integer isParent) {
        this.isParent = isParent;
    }
    @Column(name = "sort_order")
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 220 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSignRecordDO.java

@ -0,0 +1,220 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包签约记录表
 * @author yeshijie on 2018/8/17.
 */
@Entity
@Table(name = "base_service_package_sign_record")
public class ServicePackageSignRecordDO extends UuidIdentityEntity implements Serializable {
    public enum Status {
        create("新建", "1"),
        complete("已完成", "2");
        private String name;
        private String value;
        Status(String name, String value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
    }
    private String saasId;
    private String servicePackageId;//服务包id
    private String servicePackageName;//服务包名称
    private String patient;//居民code
    private String name;//居民姓名
    private String idcard;//居民身份证
    private String ssc;//社保卡号
    private String signDoctor;//签约医生code
    private String signDoctorName;//签约医生名称
    private String hospital;//医院code
    private String hospitalName;//医院名称
    private Long adminTeamCode;//行政团队id
    private Long price;//服务总价
    private Date startTime;//服务开始时间
    private Date endTime;//服务结束时间
    private String status;//状态(1新建,2已完成)
    private String doctorTeamCode;//医生服务团队code
    private Date createTime;//创建时间
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "service_package_id")
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    @Column(name = "service_package_name")
    public String getServicePackageName() {
        return servicePackageName;
    }
    public void setServicePackageName(String servicePackageName) {
        this.servicePackageName = servicePackageName;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    @Column(name = "sign_doctor")
    public String getSignDoctor() {
        return signDoctor;
    }
    public void setSignDoctor(String signDoctor) {
        this.signDoctor = signDoctor;
    }
    @Column(name = "sign_doctor_name")
    public String getSignDoctorName() {
        return signDoctorName;
    }
    public void setSignDoctorName(String signDoctorName) {
        this.signDoctorName = signDoctorName;
    }
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    @Column(name = "admin_team_code")
    public Long getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    @Column(name = "start_time")
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    @Column(name = "end_time")
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name = "doctor_team_code")
    public String getDoctorTeamCode() {
        return doctorTeamCode;
    }
    public void setDoctorTeamCode(String doctorTeamCode) {
        this.doctorTeamCode = doctorTeamCode;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 124 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSkuDO.java

@ -0,0 +1,124 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包sku表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_service_package_sku")
public class ServicePackageSkuDO extends UuidIdentityEntity implements Serializable {
    private String saasId;//
    private String servicePackageId;//服务包id',
    private String properties;//sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2',
    private Long quantity;//属于这个sku的商品的数量,',
    private Long price;//属于这个sku的商品的价格 取值范围:0-100000000;单位:分。如:200,表示:2元。',
    private String propertiesName;//sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……',
    private String barcode;//商品级别的条形码',
    private Long minPrice;//促销价',
    private Date createTime;//sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss',
    private Date updateTime;//sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss',
    private Integer del;//sku状态。 1:正常 ;0:删除',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "service_package_id")
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    public String getProperties() {
        return properties;
    }
    public void setProperties(String properties) {
        this.properties = properties;
    }
    public Long getQuantity() {
        return quantity;
    }
    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    @Column(name = "properties_name")
    public String getPropertiesName() {
        return propertiesName;
    }
    public void setPropertiesName(String propertiesName) {
        this.propertiesName = propertiesName;
    }
    public String getBarcode() {
        return barcode;
    }
    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }
    @Column(name = "min_price")
    public Long getMinPrice() {
        return minPrice;
    }
    public void setMinPrice(Long minPrice) {
        this.minPrice = minPrice;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 84 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionDO.java

@ -0,0 +1,84 @@
package com.yihu.jw.entity.base.statistics;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 统计维度表
 * @author yeshijie on 2018/8/31.
 */
@Entity
@Table(name = "base_dimension")
public class DimensionDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private String code;//业务代码
    private String type;//类型
    private String name;//指标名称
    private Integer status;//状态(1: 正常 0:不可以用 -1 已删除)
    private Date createTime;
    private String remark;//备注
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 86 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionQuotaDO.java

@ -0,0 +1,86 @@
package com.yihu.jw.entity.base.statistics;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * 统计维度指标表
 * @author yeshijie on 2018/8/31.
 */
@Entity
@Table(name = "base_dimension_quota")
public class DimensionQuotaDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private String quotaCode;//关联base_quota的code
    private String dimensionCode;//关联base_dimension的code
    private String dictSql;//查询字典的sql语句
    private String convertClazz;//数据转换的类
    private Integer sort;//维度顺序
    private String key;//查询出来的key
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "quota_code")
    public String getQuotaCode() {
        return quotaCode;
    }
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
    }
    @Column(name = "dimension_code")
    public String getDimensionCode() {
        return dimensionCode;
    }
    public void setDimensionCode(String dimensionCode) {
        this.dimensionCode = dimensionCode;
    }
    @Column(name = "dict_sql")
    public String getDictSql() {
        return dictSql;
    }
    public void setDictSql(String dictSql) {
        this.dictSql = dictSql;
    }
    @Column(name = "convert_clazz")
    public String getConvertClazz() {
        return convertClazz;
    }
    public void setConvertClazz(String convertClazz) {
        this.convertClazz = convertClazz;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
}

+ 185 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/JobConfigDO.java

@ -0,0 +1,185 @@
package com.yihu.jw.entity.base.statistics;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * 统计job配置表
 * @author yeshijie on 2018/8/31.
 */
@Entity
@Table(name = "base_job_config")
public class JobConfigDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private String jobName;//任务名称
    private String jobInfo;//任务描述
    private String jobType;//任务类型(0--单次执行  1--周期执行 2--监听任务)
    private String jobClass;//任务执行的class
    private String sql;//统计sql语句
    private String sqlCount;//统计总数语句
    private String sqlDay;//天数条件
    private String sqlYear;//年份条件
    private String cacheKey;//缓存的key
    private String quartzCron;//quartz表达式
    private String status;//1 启动 0停止
    private String quotaCode;//指标code
    private Integer del;//1: 正常 0: 删除
    private String extractType;//抽取类型   1或者为空:数据库 2ES
    private String timeLevel;//1增量 2到达量 3生成到达量也生成增量
    private Integer incrementInterval;//增量时间间隔1天,2周,3月
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "job_name")
    public String getJobName() {
        return jobName;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    @Column(name = "job_info")
    public String getJobInfo() {
        return jobInfo;
    }
    public void setJobInfo(String jobInfo) {
        this.jobInfo = jobInfo;
    }
    @Column(name = "job_type")
    public String getJobType() {
        return jobType;
    }
    public void setJobType(String jobType) {
        this.jobType = jobType;
    }
    @Column(name = "job_class")
    public String getJobClass() {
        return jobClass;
    }
    public void setJobClass(String jobClass) {
        this.jobClass = jobClass;
    }
    public String getSql() {
        return sql;
    }
    public void setSql(String sql) {
        this.sql = sql;
    }
    @Column(name = "sql_count")
    public String getSqlCount() {
        return sqlCount;
    }
    public void setSqlCount(String sqlCount) {
        this.sqlCount = sqlCount;
    }
    @Column(name = "sql_day")
    public String getSqlDay() {
        return sqlDay;
    }
    public void setSqlDay(String sqlDay) {
        this.sqlDay = sqlDay;
    }
    @Column(name = "sql_year")
    public String getSqlYear() {
        return sqlYear;
    }
    public void setSqlYear(String sqlYear) {
        this.sqlYear = sqlYear;
    }
    @Column(name = "cache_key")
    public String getCacheKey() {
        return cacheKey;
    }
    public void setCacheKey(String cacheKey) {
        this.cacheKey = cacheKey;
    }
    @Column(name = "quartz_cron")
    public String getQuartzCron() {
        return quartzCron;
    }
    public void setQuartzCron(String quartzCron) {
        this.quartzCron = quartzCron;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name = "quota_code")
    public String getQuotaCode() {
        return quotaCode;
    }
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    @Column(name = "extract_type")
    public String getExtractType() {
        return extractType;
    }
    public void setExtractType(String extractType) {
        this.extractType = extractType;
    }
    @Column(name = "time_level")
    public String getTimeLevel() {
        return timeLevel;
    }
    public void setTimeLevel(String timeLevel) {
        this.timeLevel = timeLevel;
    }
    @Column(name = "increment_interval")
    public Integer getIncrementInterval() {
        return incrementInterval;
    }
    public void setIncrementInterval(Integer incrementInterval) {
        this.incrementInterval = incrementInterval;
    }
}

+ 65 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/QuotaDO.java

@ -0,0 +1,65 @@
package com.yihu.jw.entity.base.statistics;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * 统计指标表
 * @author yeshijie on 2018/8/31.
 */
@Entity
@Table(name = "base_quota")
public class QuotaDO extends UuidIdentityEntity implements Serializable {
    private String code;//指标code',
    private String name;//指标名称',
    private String createTime;
    private String updateTime;
    private Integer 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;
    }
    @Column(name = "create_time")
    public String getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 101 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamDO.java

@ -0,0 +1,101 @@
package com.yihu.jw.entity.base.team;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 团队信息实体
*
* @author litaohong on  2018年08月31日
*
*/
@Entity
@Table(name = "base_team")
public class BaseTeamDO extends UuidIdentityEntityWithOperator {
    /**
	* 机构id
	*/
    private String orgId;
    /**
	* 团队名称
	*/
    private String name;
    /**
	* 领导医生标识
	*/
    private String leaderId;
    /**
	* 团队人数
	*/
    private String teamNum;
    /**
	* 团队二维码
	*/
    private String qrcode;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "leader_id")
    public String getLeaderId() {
        return leaderId;
    }
    public void setLeaderId(String leaderId) {
        this.leaderId = leaderId;
    }
	@Column(name = "team_num")
    public String getTeamNum() {
        return teamNum;
    }
    public void setTeamNum(String teamNum) {
        this.teamNum = teamNum;
    }
	@Column(name = "qrcode")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 75 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamMemberDO.java

@ -0,0 +1,75 @@
package com.yihu.jw.entity.base.team;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 团队成员实体
*
* @author litaohong on  2018年08月31日
*
*/
@Entity
@Table(name = "base_team_member")
public class BaseTeamMemberDO extends UuidIdentityEntityWithOperator {
    /**
	* 团队ID
	*/
    private String teamId;
    /**
	* 机构标识
	*/
    private String orgId;
    /**
	* 医生标识,多个医生以逗号分开
	*/
    private String doctorId;
    /**
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "team_id")
    public String getTeamId() {
        return teamId;
    }
    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }
	@Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@Column(name = "doctor_id")
    public String getDoctorId() {
        return doctorId;
    }
    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 8 - 8
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java

@ -42,9 +42,9 @@ public class UserDO extends UuidIdentityEntityWithOperator {
    //邮箱
    private String email;
    //是否可用
    private Boolean isEnabled;
    private Boolean enabled;
    //是否锁定
    private Boolean isLocked;
    private Boolean locked;
    //锁定时间
    private Date lockedDate;
    //最后登陆时间
@ -124,22 +124,22 @@ public class UserDO extends UuidIdentityEntityWithOperator {
        this.email = email;
    }
    @Column(name = "is_enabled", nullable = false)
    @Column(name = "enabled", nullable = false)
    public Boolean getEnabled() {
        return isEnabled;
        return enabled;
    }
    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
        this.enabled = enabled;
    }
    @Column(name = "is_locked", nullable = false)
    @Column(name = "locked", nullable = false)
    public Boolean getLocked() {
        return isLocked;
        return locked;
    }
    public void setLocked(Boolean locked) {
        isLocked = locked;
        this.locked = locked;
    }
    @Column(name = "locked_date")

+ 12 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/HospitalServiceItemDO.java

@ -35,6 +35,9 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    @Column(name = "status")
    private Integer status;//状态
    @Column(name = "expense")
    private Integer expense;//价格
    @Transient
    private SpecialistServiceItemDO specialistServiceItemDO;
@ -91,4 +94,13 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    public void setSpecialistServiceItemDO(SpecialistServiceItemDO specialistServiceItemDO) {
        this.specialistServiceItemDO = specialistServiceItemDO;
    }
    @Column(name = "expense")
    public Integer getExpense() {
        return expense;
    }
    public void setExpense(Integer expense) {
        this.expense = expense;
    }
}

+ 12 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateDO.java

@ -48,6 +48,9 @@ public class SpecialistEvaluateDO extends UuidIdentityEntityWithOperator impleme
    @Transient
    private String labelId;//标签Id
    @Transient
    private Integer flag;//标识标签
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
@ -137,4 +140,13 @@ public class SpecialistEvaluateDO extends UuidIdentityEntityWithOperator impleme
    public void setLabelId(String labelId) {
        this.labelId = labelId;
    }
    @Transient
    public Integer getFlag() {
        return flag;
    }
    public void setFlag(Integer flag) {
        this.flag = flag;
    }
}

+ 12 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateLabelDO.java

@ -36,6 +36,9 @@ public class SpecialistEvaluateLabelDO extends UuidIdentityEntityWithOperator im
    @Column(name = "patient")
    private String patient;//患者code
    @Column(name = "flag")
    private Integer flag;//标识标签
    @Column(name = "saas_id")
    public String getSaasId() {
@ -90,4 +93,13 @@ public class SpecialistEvaluateLabelDO extends UuidIdentityEntityWithOperator im
    public void setPatient(String patient) {
        this.patient = patient;
    }
    @Column(name = "flag")
    public Integer getFlag() {
        return flag;
    }
    public void setFlag(Integer flag) {
        this.flag = flag;
    }
}

+ 1 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java

@ -73,6 +73,7 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    @Column(name = "status")
    private Integer status; //删除状态
    @Transient
    public Integer flag;

+ 0 - 11
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java

@ -34,8 +34,6 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
    private Integer planType;//安排类型(1康复计划,2转社区医院,3转家庭病床)
    @Column(name = "service_package_id")
    private String servicePackageId;//服务包id
    @Column(name = "service_qr_code")
    private String serviceQrCode;//服务码
    @Column(name = "status")
    private Integer status;//状态(0已中止,1进行中,2已完成)
@ -137,13 +135,4 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
    public void setDiseaseName(String diseaseName) {
        this.diseaseName = diseaseName;
    }
    @Column(name = "service_qr_code")
    public String getServiceQrCode() {
        return serviceQrCode;
    }
    public void setServiceQrCode(String serviceQrCode) {
        this.serviceQrCode = serviceQrCode;
    }
}

+ 11 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationDetailDO.java

@ -38,6 +38,8 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
    private Integer status;//状态(0未完成,1已完成,2已预约)
    @Column(name = "expense")
    private Integer expense;
    @Column(name = "service_qr_code")
    private String serviceQrCode;//服务码
    @Column(name = "saas_id")
    public String getSaasId() {
@ -137,4 +139,13 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
    public void setExpense(Integer expense) {
        this.expense = expense;
    }
    @Column(name = "service_qr_code")
    public String getServiceQrCode() {
        return serviceQrCode;
    }
    public void setServiceQrCode(String serviceQrCode) {
        this.serviceQrCode = serviceQrCode;
    }
}

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPlanTemplateDO.java

@ -23,7 +23,7 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
    @Column(name = "hospital_name")
    private String hospitalName;//医院名称
    @Column(name = "admin_team_code")
    private Integer adminTeamCode;//行政团队id
    private Long adminTeamCode;//行政团队id
    @Column(name = "del")
    private Integer del;//是否删除(0是,1否)
@ -64,11 +64,11 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
    }
    @Column(name = "admin_team_code")
    public Integer getAdminTeamCode() {
    public Long getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(Integer adminTeamCode) {
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }

+ 184 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -137,4 +137,188 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/sms_template";
    }
    /**
     * 服务包
     */
    public static class ServicePackage extends Basic{
        public static final String PREFIX  = "/service_package";
    }
    /**
     * 康复计划
     */
    public static class BaseRehabilitation extends Basic{
        public static final String PREFIX  = "/base_rehabilitation";
        public static final String CREATELOG  = "/createlog";
        public static final String FINDBYID  = "/findFinishById";
    }
    /**
     * 统计指标
     */
    public static class Quota extends Basic{
        public static final String PREFIX  = "/quota";
    }
    /**
     * 统计维度
     */
    public static class Dimension extends Basic{
        public static final String PREFIX  = "/dimension";
    }
    /**
     * job
     */
    public static class JobConfig extends Basic{
        public static final String PREFIX  = "/job_config";
    }
    /**
     * im
     */
    public static class ImGetuiConfig extends Basic{
        public static final String PREFIX  = "/im_getui";
    }
    /**
     * 城市字典
     */
    public static class BaseCity extends Basic {
        public static final String PREFIX  = "/baseCity";
    }
    /**
     * 医生基础信息
     */
    public static class BaseDoctor extends Basic {
        public static final String PREFIX  = "/baseDoctor";
    }
    /**
     * 医生职业信息
     */
    public static class BaseDoctorHospital extends Basic {
        public static final String PREFIX  = "/baseDoctorHospital";
    }
    /**
     * 医生角色字典
     */
    public static class BaseDoctorRoleDict extends Basic {
        public static final String PREFIX  = "/baseDoctorRoleDict";
    }
    /**
     * 居民信息
     */
    public static class BaseOrg extends Basic {
        public static final String PREFIX  = "/baseOrg";
    }
    /**
     * 省字典
     */
    public static class BasePatient extends Basic {
        public static final String PREFIX  = "/basePatient";
    }
    /**
     * 街道字典
     */
    public static class BaseProvince extends Basic {
        public static final String PREFIX  = "/baseProvince";
    }
    /**
     * 团队信息
     */
    public static class BaseTeam extends Basic {
        public static final String PREFIX  = "/baseTeam";
    }
    /**
     * 街道字典
     */
    public static class BaseStreet extends Basic {
        public static final String PREFIX  = "/baseStreet";
    }
    /**
     * 团队成员
     */
    public static class BaseTeamMember extends Basic {
        public static final String PREFIX  = "/baseTeamMember";
    }
    /**
     * 区县字典
     */
    public static class BaseTown extends Basic {
        public static final String PREFIX  = "/baseTown";
    }
    /**
     * 健康问题字典
     */
    public static class DictHealthProblem extends Basic {
        public static final String PREFIX  = "/dictHealthProblem";
    }
    /**
     * 医院科室字典
     */
    public static class DictHospitalDept extends Basic {
        public static final String PREFIX  = "/dictHospitalDept";
    }
    /**
     * ICD10字典
     */
    public static class DictIcd10 extends Basic {
        public static final String PREFIX  = "/dictIcd10";
    }
    /**
     * 职称字典
     */
    public static class DictJobTitle extends Basic {
        public static final String PREFIX  = "/dictJobTitle";
    }
    /**
     * 药品字典
     */
    public static class DictMedicine extends Basic {
        public static final String PREFIX  = "/dictMedicine";
    }
    /**
     * 基于MQ的消息推送
     */
    public static class MqMessage extends Basic {
        public static final String PREFIX  = "/mq_message";
    }
    /**
     * 基于MQ的消息推送订阅者
     */
    public static class MqMessageSubscriber extends Basic {
        public static final String PREFIX  = "/mq_message_subscriber";
    }
}

+ 3 - 3
common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java

@ -36,8 +36,7 @@ public class SpecialistMapping {
        public static final String findDoctorAndDoctorHealthBySpecialDoctor ="/findDoctorAndDoctorHealthBySpecialDoctor";
        public static final String findSpecialistSignFamilyPatientCout ="/findSpecialistSignFamilyPatientCout";
        public static final String getSpecialistSignFamilyPatientByName ="/getSpecialistSignFamilyPatientByName";
        public static final String getPatientAndDiseaseByDoctor ="/getPatientAndDiseaseByDoctor";
@ -56,6 +55,7 @@ public class SpecialistMapping {
    public static class rehabilitation{
        public static final String findRehabilitationPlan = "/findRehabilitationPlan";
        public static final String createRehabilitationPlanTemplate = "/createRehabilitationPlanTemplate";
        public static final String deleteRehabilitationPlanTemplate = "/deleteRehabilitationPlanTemplate";
        public static final String createRehabilitationTemplateDetail = "/createRehabilitationTemplateDetail";
        public static final String findRehabilitationPlanTemplate = "/findRehabilitationPlanTemplate";
        public static final String findTemplateDetailByTemplateId = "/findTemplateDetailByTemplateId";
@ -67,13 +67,13 @@ public class SpecialistMapping {
        public static final String findRehabilitationPlanDetailList = "/findRehabilitationPlanDetailList";
        public static final String calendarPlanDetail = "/calendarPlanDetail";
        public static final String calendarPlanDetailList = "/calendarPlanDetailList";
        public static final String appCalendarPlanDetailList = "/appCalendarPlanDetailList";
        public static final String saveGuidanceMessage = "/saveGuidanceMessage";
        public static final String serviceItemList = "/serviceItemList";
        public static final String serviceItem = "/serviceItem";
        public static final String updateStatusRehabilitationOperate = "/updateStatusRehabilitationOperate";
        public static final String patientRehabilitationDetail = "/patientRehabilitationDetail";
        public static final String recentPlanDetailRecord = "/recentPlanDetailRecord";
        public static final String findServiceItemsByHospital = "/findServiceItemsByHospital";
        public static final String serviceDoctorList = "/serviceDoctorList";
        public static final String dailyJob = "/dailyJob";
    }

+ 71 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseCityVO.java

@ -0,0 +1,71 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 城市字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseCityVO", description = "城市字典")
public class BaseCityVO extends IntegerIdentityVO{
    /**
	省编码	*/
    private String province;
    /**
	城市编码	*/
    private String code;
    /**
	城市名称	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "省编码", example = "模块1")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@ApiModelProperty(value = "城市编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "城市名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 115 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorHospitalVO.java

@ -0,0 +1,115 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 医生职业信息vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseDoctorHospitalVO", description = "医生职业信息")
public class BaseDoctorHospitalVO extends IntegerIdentityVO{
    /**
	医院标识	*/
    private String hospCode;
    /**
	医院名称	*/
    private String hospName;
    /**
	医生角色标识	*/
    private String roleCode;
    /**
	医院角色名称	*/
    private String roleName;
    /**
	职称代码	*/
    private String jobTitleCode;
    /**
	职称名称	*/
    private String jobTitleName;
    /**
	作废标识,1正常,0作废	*/
    private String del;
    /**
		*/
    private Date createTime;
	@ApiModelProperty(value = "医院标识", example = "模块1")
    public String getHospCode() {
        return hospCode;
    }
    public void setHospCode(String hospCode) {
        this.hospCode = hospCode;
    }
	@ApiModelProperty(value = "医院名称", example = "模块1")
    public String getHospName() {
        return hospName;
    }
    public void setHospName(String hospName) {
        this.hospName = hospName;
    }
	@ApiModelProperty(value = "医生角色标识", example = "模块1")
    public String getRoleCode() {
        return roleCode;
    }
    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }
	@ApiModelProperty(value = "医院角色名称", example = "模块1")
    public String getRoleName() {
        return roleName;
    }
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
	@ApiModelProperty(value = "职称代码", example = "模块1")
    public String getJobTitleCode() {
        return jobTitleCode;
    }
    public void setJobTitleCode(String jobTitleCode) {
        this.jobTitleCode = jobTitleCode;
    }
	@ApiModelProperty(value = "职称名称", example = "模块1")
    public String getJobTitleName() {
        return jobTitleName;
    }
    public void setJobTitleName(String jobTitleName) {
        this.jobTitleName = jobTitleName;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
	@ApiModelProperty(value = "", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 60 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorRoleDictVO.java

@ -0,0 +1,60 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 医生角色字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseDoctorRoleDictVO", description = "医生角色字典")
public class BaseDoctorRoleDictVO extends IntegerIdentityVO{
    /**
	角色code	*/
    private String code;
    /**
	角色名称:全科医生、专科医生、健康管理师、管理员等	*/
    private String name;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "角色code", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "角色名称:全科医生、专科医生、健康管理师、管理员等", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 335 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseDoctorVO.java

@ -0,0 +1,335 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 医生基础信息vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseDoctorVO", description = "医生基础信息")
public class BaseDoctorVO extends UuidIdentityVOWithOperator {
    /**
	机构id	*/
    private String orgId;
    /**
	密码	*/
    private String password;
    /**
		*/
    private String salt;
    /**
	姓名	*/
    private String name;
    /**
	性别(1男,2女) 用国家标准字典	*/
    private String sex;
    /**
	医生专长	*/
    private String expertise;
    /**
	医生介绍	*/
    private String introduce;
    /**
	 身份证	*/
    private String idcard;
    /**
	生日	*/
    private Date birthday;
    /**
	头像http地址	*/
    private String photo;
    /**
	手机号	*/
    private String mobile;
    /**
	医生二维码	*/
    private String qrcode;
    /**
	省代码	*/
    private String provinceCode;
    /**
	省名称	*/
    private String provinceName;
    /**
	市代码	*/
    private String cityCode;
    /**
	市名称	*/
    private String cityName;
    /**
	区县代码	*/
    private String townCode;
    /**
	区县名称	*/
    private String townName;
    /**
	街道代码	*/
    private String streetCode;
    /**
	街道名称	*/
    private String streetName;
    /**
	资格是否认证通过,1是,0否	*/
    private String iscertified;
    /**
	是否是名医,1是,0否	*/
    private String isFamous;
    /**
	是否提示设置密码  1 提示过 0未提示	*/
    private String isPasswordPrompt;
    /**
	名称拼音首字母	*/
    private String spell;
    /**
	CA证书过期时间	*/
    private Date certifiedOvertime;
    /**
	CA证书编号	*/
    private String certificateNum;
    /**
		*/
    private String openid;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "机构id", example = "模块1")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@ApiModelProperty(value = "密码", example = "模块1")
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
	@ApiModelProperty(value = "", example = "模块1")
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
	@ApiModelProperty(value = "姓名", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "性别(1男,2女) 用国家标准字典", example = "模块1")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
	@ApiModelProperty(value = "医生专长", example = "模块1")
    public String getExpertise() {
        return expertise;
    }
    public void setExpertise(String expertise) {
        this.expertise = expertise;
    }
	@ApiModelProperty(value = "医生介绍", example = "模块1")
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
	@ApiModelProperty(value = " 身份证", example = "模块1")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
	@ApiModelProperty(value = "生日", example = "模块1")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
	@ApiModelProperty(value = "头像http地址", example = "模块1")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
	@ApiModelProperty(value = "手机号", example = "模块1")
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
	@ApiModelProperty(value = "医生二维码", example = "模块1")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@ApiModelProperty(value = "省代码", example = "模块1")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
	@ApiModelProperty(value = "省名称", example = "模块1")
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
	@ApiModelProperty(value = "市代码", example = "模块1")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@ApiModelProperty(value = "市名称", example = "模块1")
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
	@ApiModelProperty(value = "区县代码", example = "模块1")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
	@ApiModelProperty(value = "区县名称", example = "模块1")
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
	@ApiModelProperty(value = "街道代码", example = "模块1")
    public String getStreetCode() {
        return streetCode;
    }
    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }
	@ApiModelProperty(value = "街道名称", example = "模块1")
    public String getStreetName() {
        return streetName;
    }
    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }
	@ApiModelProperty(value = "资格是否认证通过,1是,0否", example = "模块1")
    public String getIscertified() {
        return iscertified;
    }
    public void setIscertified(String iscertified) {
        this.iscertified = iscertified;
    }
	@ApiModelProperty(value = "是否是名医,1是,0否", example = "模块1")
    public String getIsFamous() {
        return isFamous;
    }
    public void setIsFamous(String isFamous) {
        this.isFamous = isFamous;
    }
	@ApiModelProperty(value = "是否提示设置密码  1 提示过 0未提示", example = "模块1")
    public String getIsPasswordPrompt() {
        return isPasswordPrompt;
    }
    public void setIsPasswordPrompt(String isPasswordPrompt) {
        this.isPasswordPrompt = isPasswordPrompt;
    }
	@ApiModelProperty(value = "名称拼音首字母", example = "模块1")
    public String getSpell() {
        return spell;
    }
    public void setSpell(String spell) {
        this.spell = spell;
    }
	@ApiModelProperty(value = "CA证书过期时间", example = "模块1")
    public Date getCertifiedOvertime() {
        return certifiedOvertime;
    }
    public void setCertifiedOvertime(Date certifiedOvertime) {
        this.certifiedOvertime = certifiedOvertime;
    }
	@ApiModelProperty(value = "CA证书编号", example = "模块1")
    public String getCertificateNum() {
        return certificateNum;
    }
    public void setCertificateNum(String certificateNum) {
        this.certificateNum = certificateNum;
    }
	@ApiModelProperty(value = "", example = "模块1")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 236 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseOrgVO.java

@ -0,0 +1,236 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 机构信息vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseOrgVO", description = "机构信息")
public class BaseOrgVO extends UuidIdentityVOWithOperator {
    /**
	saas化配置	*/
    private String saasid;
    /**
	省份标识	*/
    private String provinceCode;
    /**
	城市标识	*/
    private String cityCode;
    /**
	区县标识	*/
    private String townCode;
    /**
	机构名称	*/
    private String name;
    /**
	机构别名	*/
    private String alias;
    /**
	机构名称拼音首字母	*/
    private String spell;
    /**
	机构类型: 1.  医疗机构2.  企事业单位3.  政府机关4.  社会团体 5.药店 0.  部门 6.单位或者独立子公司7.基层机构 8.专业公共机构	*/
    private String type;
    /**
	机构简介	*/
    private String brief;
    /**
	机构详细地址	*/
    private String address;
    /**
	机构图片	*/
    private String photo;
    /**
	经度	*/
    private String longitude;
    /**
	纬度	*/
    private String latitude;
    /**
	法人	*/
    private String legalperson;
    /**
	机构管理员	*/
    private String orgAdmin;
    /**
	机构网址	*/
    private String orgUrl;
    /**
	机构简介	*/
    private String intro;
    /**
	机构二维码	*/
    private String qrcode;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "saas化配置", example = "模块1")
    public String getSaasid() {
        return saasid;
    }
    public void setSaasid(String saasid) {
        this.saasid = saasid;
    }
	@ApiModelProperty(value = "省份标识", example = "模块1")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
	@ApiModelProperty(value = "城市标识", example = "模块1")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@ApiModelProperty(value = "区县标识", example = "模块1")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
	@ApiModelProperty(value = "机构名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "机构别名", example = "模块1")
    public String getAlias() {
        return alias;
    }
    public void setAlias(String alias) {
        this.alias = alias;
    }
	@ApiModelProperty(value = "机构名称拼音首字母", example = "模块1")
    public String getSpell() {
        return spell;
    }
    public void setSpell(String spell) {
        this.spell = spell;
    }
	@ApiModelProperty(value = "机构类型: 1.  医疗机构2.  企事业单位3.  政府机关4.  社会团体 5.药店 0.  部门 6.单位或者独立子公司7.基层机构 8.专业公共机构", example = "模块1")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
	@ApiModelProperty(value = "机构简介", example = "模块1")
    public String getBrief() {
        return brief;
    }
    public void setBrief(String brief) {
        this.brief = brief;
    }
	@ApiModelProperty(value = "机构详细地址", example = "模块1")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
	@ApiModelProperty(value = "机构图片", example = "模块1")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
	@ApiModelProperty(value = "经度", example = "模块1")
    public String getLongitude() {
        return longitude;
    }
    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
	@ApiModelProperty(value = "纬度", example = "模块1")
    public String getLatitude() {
        return latitude;
    }
    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
	@ApiModelProperty(value = "法人", example = "模块1")
    public String getLegalperson() {
        return legalperson;
    }
    public void setLegalperson(String legalperson) {
        this.legalperson = legalperson;
    }
	@ApiModelProperty(value = "机构管理员", example = "模块1")
    public String getOrgAdmin() {
        return orgAdmin;
    }
    public void setOrgAdmin(String orgAdmin) {
        this.orgAdmin = orgAdmin;
    }
	@ApiModelProperty(value = "机构网址", example = "模块1")
    public String getOrgUrl() {
        return orgUrl;
    }
    public void setOrgUrl(String orgUrl) {
        this.orgUrl = orgUrl;
    }
	@ApiModelProperty(value = "机构简介", example = "模块1")
    public String getIntro() {
        return intro;
    }
    public void setIntro(String intro) {
        this.intro = intro;
    }
	@ApiModelProperty(value = "机构二维码", example = "模块1")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 412 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BasePatientVO.java

@ -0,0 +1,412 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 居民信息vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BasePatientVO", description = "居民信息")
public class BasePatientVO extends UuidIdentityVOWithOperator {
    /**
	saas配置id	*/
    private String saasId;
    /**
	身份证号	*/
    private String idcard;
    /**
	登录密码	*/
    private String password;
    /**
		*/
    private String salt;
    /**
	姓名	*/
    private String name;
    /**
	生日	*/
    private Date birthday;
    /**
	性别,1男,2女	*/
    private String sex;
    /**
	手机号	*/
    private String mobile;
    /**
	联系电话	*/
    private String phone;
    /**
	社保卡号	*/
    private String ssc;
    /**
	头像http地址	*/
    private String photo;
    /**
	省编码	*/
    private String provinceCode;
    /**
	市编码	*/
    private String cityCode;
    /**
	区县编码	*/
    private String townCode;
    /**
	街道编码	*/
    private String streetCode;
    /**
	具体详细地址	*/
    private String address;
    /**
	疾病类型,0健康,1高血压,2糖尿病,3高血压+糖尿病	*/
    private String disease;
    /**
	病情:0绿标,1黄标,2红标,3重点关注,	*/
    private String diseaseCondition;
    /**
	总积分	*/
    private String points;
    /**
	病历总数	*/
    private String recordAmount;
    /**
	微信编号	*/
    private String openid;
    /**
	用户状态:1正常,0禁用,-1恶意注册,2审核中	*/
    private String patientStatus;
    /**
	联系方式备注【基卫】	*/
    private String mobileRemarks;
    /**
	第一次添加open的时间	*/
    private Date openidTime;
    /**
	居委会代码	*/
    private String sickVillage;
    /**
		*/
    private String sickVillageName;
    /**
	绑定电子社保卡主体(共济为操作人code)	*/
    private String principalCode;
    /**
	是否绑定电子社保卡 (0否 1是)	*/
    private String sicardStatus;
    /**
	电子社保卡绑定时间	*/
    private Date sicardTime;
    /**
	是否分配过微信标签	*/
    private Integer isWxtag;
    /**
	微信tagId	*/
    private String wxtagid;
    /**
	居民预警状态:0为标准,1为预警状态	*/
    private Integer standardStatus;
    /**
	医疗保险号	*/
    private String medicareNumber;
    /**
	unionId 开发平台唯一标识	*/
    private String unionid;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "saas配置id", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "身份证号", example = "模块1")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
	@ApiModelProperty(value = "登录密码", example = "模块1")
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
	@ApiModelProperty(value = "", example = "模块1")
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
	@ApiModelProperty(value = "姓名", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "生日", example = "模块1")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
	@ApiModelProperty(value = "性别,1男,2女", example = "模块1")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
	@ApiModelProperty(value = "手机号", example = "模块1")
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
	@ApiModelProperty(value = "联系电话", example = "模块1")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
	@ApiModelProperty(value = "社保卡号", example = "模块1")
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
	@ApiModelProperty(value = "头像http地址", example = "模块1")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
	@ApiModelProperty(value = "省编码", example = "模块1")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
	@ApiModelProperty(value = "市编码", example = "模块1")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@ApiModelProperty(value = "区县编码", example = "模块1")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
	@ApiModelProperty(value = "街道编码", example = "模块1")
    public String getStreetCode() {
        return streetCode;
    }
    public void setStreetCode(String streetCode) {
        this.streetCode = streetCode;
    }
	@ApiModelProperty(value = "具体详细地址", example = "模块1")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
	@ApiModelProperty(value = "疾病类型,0健康,1高血压,2糖尿病,3高血压+糖尿病", example = "模块1")
    public String getDisease() {
        return disease;
    }
    public void setDisease(String disease) {
        this.disease = disease;
    }
	@ApiModelProperty(value = "病情:0绿标,1黄标,2红标,3重点关注,", example = "模块1")
    public String getDiseaseCondition() {
        return diseaseCondition;
    }
    public void setDiseaseCondition(String diseaseCondition) {
        this.diseaseCondition = diseaseCondition;
    }
	@ApiModelProperty(value = "总积分", example = "模块1")
    public String getPoints() {
        return points;
    }
    public void setPoints(String points) {
        this.points = points;
    }
	@ApiModelProperty(value = "病历总数", example = "模块1")
    public String getRecordAmount() {
        return recordAmount;
    }
    public void setRecordAmount(String recordAmount) {
        this.recordAmount = recordAmount;
    }
	@ApiModelProperty(value = "微信编号", example = "模块1")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
	@ApiModelProperty(value = "用户状态:1正常,0禁用,-1恶意注册,2审核中", example = "模块1")
    public String getPatientStatus() {
        return patientStatus;
    }
    public void setPatientStatus(String patientStatus) {
        this.patientStatus = patientStatus;
    }
	@ApiModelProperty(value = "联系方式备注【基卫】", example = "模块1")
    public String getMobileRemarks() {
        return mobileRemarks;
    }
    public void setMobileRemarks(String mobileRemarks) {
        this.mobileRemarks = mobileRemarks;
    }
	@ApiModelProperty(value = "第一次添加open的时间", example = "模块1")
    public Date getOpenidTime() {
        return openidTime;
    }
    public void setOpenidTime(Date openidTime) {
        this.openidTime = openidTime;
    }
	@ApiModelProperty(value = "居委会代码", example = "模块1")
    public String getSickVillage() {
        return sickVillage;
    }
    public void setSickVillage(String sickVillage) {
        this.sickVillage = sickVillage;
    }
	@ApiModelProperty(value = "", example = "模块1")
    public String getSickVillageName() {
        return sickVillageName;
    }
    public void setSickVillageName(String sickVillageName) {
        this.sickVillageName = sickVillageName;
    }
	@ApiModelProperty(value = "绑定电子社保卡主体(共济为操作人code)", example = "模块1")
    public String getPrincipalCode() {
        return principalCode;
    }
    public void setPrincipalCode(String principalCode) {
        this.principalCode = principalCode;
    }
	@ApiModelProperty(value = "是否绑定电子社保卡 (0否 1是)", example = "模块1")
    public String getSicardStatus() {
        return sicardStatus;
    }
    public void setSicardStatus(String sicardStatus) {
        this.sicardStatus = sicardStatus;
    }
	@ApiModelProperty(value = "电子社保卡绑定时间", example = "模块1")
    public Date getSicardTime() {
        return sicardTime;
    }
    public void setSicardTime(Date sicardTime) {
        this.sicardTime = sicardTime;
    }
	@ApiModelProperty(value = "是否分配过微信标签", example = "模块1")
    public Integer getIsWxtag() {
        return isWxtag;
    }
    public void setIsWxtag(Integer isWxtag) {
        this.isWxtag = isWxtag;
    }
	@ApiModelProperty(value = "微信tagId", example = "模块1")
    public String getWxtagid() {
        return wxtagid;
    }
    public void setWxtagid(String wxtagid) {
        this.wxtagid = wxtagid;
    }
	@ApiModelProperty(value = "居民预警状态:0为标准,1为预警状态", example = "模块1")
    public Integer getStandardStatus() {
        return standardStatus;
    }
    public void setStandardStatus(Integer standardStatus) {
        this.standardStatus = standardStatus;
    }
	@ApiModelProperty(value = "医疗保险号", example = "模块1")
    public String getMedicareNumber() {
        return medicareNumber;
    }
    public void setMedicareNumber(String medicareNumber) {
        this.medicareNumber = medicareNumber;
    }
	@ApiModelProperty(value = "unionId 开发平台唯一标识", example = "模块1")
    public String getUnionid() {
        return unionid;
    }
    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 60 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseProvinceVO.java

@ -0,0 +1,60 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 省字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseProvinceVO", description = "省字典")
public class BaseProvinceVO extends IntegerIdentityVO{
    /**
	省份编码	*/
    private String code;
    /**
	省份名称	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "省份编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "省份名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 93 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseStreetVO.java

@ -0,0 +1,93 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 街道字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseStreetVO", description = "街道字典")
public class BaseStreetVO extends IntegerIdentityVO{
    /**
	省标识	*/
    private String province;
    /**
	市标识	*/
    private String city;
    /**
	区县标识	*/
    private String town;
    /**
	街道标识	*/
    private String code;
    /**
	街道名称	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "省标识", example = "模块1")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@ApiModelProperty(value = "市标识", example = "模块1")
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
	@ApiModelProperty(value = "区县标识", example = "模块1")
    public String getTown() {
        return town;
    }
    public void setTown(String town) {
        this.town = town;
    }
	@ApiModelProperty(value = "街道标识", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "街道名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 71 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTeamMemberVO.java

@ -0,0 +1,71 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 团队成员vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseTeamMemberVO", description = "团队成员")
public class BaseTeamMemberVO extends UuidIdentityVOWithOperator {
    /**
	团队ID	*/
    private String teamId;
    /**
	机构标识	*/
    private String orgId;
    /**
	医生标识,多个医生以逗号分开	*/
    private String doctorId;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "团队ID", example = "模块1")
    public String getTeamId() {
        return teamId;
    }
    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }
	@ApiModelProperty(value = "机构标识", example = "模块1")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@ApiModelProperty(value = "医生标识,多个医生以逗号分开", example = "模块1")
    public String getDoctorId() {
        return doctorId;
    }
    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 93 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTeamVO.java

@ -0,0 +1,93 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 团队信息vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseTeamVO", description = "团队信息")
public class BaseTeamVO extends UuidIdentityVOWithOperator {
    /**
	机构id	*/
    private String orgId;
    /**
	团队名称	*/
    private String name;
    /**
	领导医生标识	*/
    private String leaderId;
    /**
	团队人数	*/
    private String teamNum;
    /**
	团队二维码	*/
    private String qrcode;
    /**
	作废标识,1正常,0作废	*/
    private String del;
	@ApiModelProperty(value = "机构id", example = "模块1")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@ApiModelProperty(value = "团队名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "领导医生标识", example = "模块1")
    public String getLeaderId() {
        return leaderId;
    }
    public void setLeaderId(String leaderId) {
        this.leaderId = leaderId;
    }
	@ApiModelProperty(value = "团队人数", example = "模块1")
    public String getTeamNum() {
        return teamNum;
    }
    public void setTeamNum(String teamNum) {
        this.teamNum = teamNum;
    }
	@ApiModelProperty(value = "团队二维码", example = "模块1")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "模块1")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 82 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/BaseTownVO.java

@ -0,0 +1,82 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 区县字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "BaseTownVO", description = "区县字典")
public class BaseTownVO extends IntegerIdentityVO{
    /**
	省编码	*/
    private String province;
    /**
	城市编码	*/
    private String city;
    /**
	区县编码	*/
    private String code;
    /**
	区县名称	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "省编码", example = "模块1")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
	@ApiModelProperty(value = "城市编码", example = "模块1")
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
	@ApiModelProperty(value = "区县编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "区县名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 82 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHealthProblemVO.java

@ -0,0 +1,82 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 健康问题字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "DictHealthProblemVO", description = "健康问题字典")
public class DictHealthProblemVO extends IntegerIdentityVO{
    /**
	saas配置id,null标识公共字典	*/
    private String saasId;
    /**
	字典编码	*/
    private String code;
    /**
	字典名称	*/
    private String name;
    /**
	描述	*/
    private String description;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "saas配置id,null标识公共字典", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "字典编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "字典名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "描述", example = "模块1")
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 71 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHospitalDeptVO.java

@ -0,0 +1,71 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 医院科室字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "DictHospitalDeptVO", description = "医院科室字典")
public class DictHospitalDeptVO extends IntegerIdentityVO{
    /**
	saas配置id,null标识公共字典	*/
    private String saasId;
    /**
	科室标识	*/
    private String code;
    /**
	科室名称	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "saas配置id,null标识公共字典", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "科室标识", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "科室名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 115 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictIcd10VO.java

@ -0,0 +1,115 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * ICD10字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "DictIcd10VO", description = "ICD10字典")
public class DictIcd10VO extends IntegerIdentityVO{
    /**
	saas配置id,null标识公共字典	*/
    private String saasId;
    /**
	icd10字典编码	*/
    private String code;
    /**
	icd10字典名称	*/
    private String name;
    /**
	字典名称拼音首字母	*/
    private String phoneticCode;
    /**
	是否慢病	*/
    private String chronicFlag;
    /**
	是否传染病	*/
    private String infectiousFlag;
    /**
	描述	*/
    private String description;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "saas配置id,null标识公共字典", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "icd10字典编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "icd10字典名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "字典名称拼音首字母", example = "模块1")
    public String getPhoneticCode() {
        return phoneticCode;
    }
    public void setPhoneticCode(String phoneticCode) {
        this.phoneticCode = phoneticCode;
    }
	@ApiModelProperty(value = "是否慢病", example = "模块1")
    public String getChronicFlag() {
        return chronicFlag;
    }
    public void setChronicFlag(String chronicFlag) {
        this.chronicFlag = chronicFlag;
    }
	@ApiModelProperty(value = "是否传染病", example = "模块1")
    public String getInfectiousFlag() {
        return infectiousFlag;
    }
    public void setInfectiousFlag(String infectiousFlag) {
        this.infectiousFlag = infectiousFlag;
    }
	@ApiModelProperty(value = "描述", example = "模块1")
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 71 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictJobTitleVO.java

@ -0,0 +1,71 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 职称字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "DictJobTitleVO", description = "职称字典")
public class DictJobTitleVO extends IntegerIdentityVO{
    /**
	saas配置id,null标识公共字典	*/
    private String saasId;
    /**
	职称标识	*/
    private String code;
    /**
	职称名	*/
    private String name;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "saas配置id,null标识公共字典", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "职称标识", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "职称名", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 82 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictMedicineVO.java

@ -0,0 +1,82 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 
 * 药品字典vo
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong 	1.0  2018年08月31日 Created
 *
 * </pre>
 * @since 1.
 */
@ApiModel(value = "DictMedicineVO", description = "药品字典")
public class DictMedicineVO extends IntegerIdentityVO{
    /**
	saas配置id,null标识公共字典	*/
    private String saasId;
    /**
	药品编码	*/
    private String code;
    /**
	药品名称	*/
    private String name;
    /**
	药品类型:1健康记录	*/
    private String type;
    /**
	创建时间	*/
    private Date createTime;
	@ApiModelProperty(value = "saas配置id,null标识公共字典", example = "模块1")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
	@ApiModelProperty(value = "药品编码", example = "模块1")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
	@ApiModelProperty(value = "药品名称", example = "模块1")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@ApiModelProperty(value = "药品类型:1健康记录", example = "模块1")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
	@ApiModelProperty(value = "创建时间", example = "模块1")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 64 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/im/ImGetuiConfigVO.java

@ -0,0 +1,64 @@
package com.yihu.jw.restmodel.base.im;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@ApiModel(value = "ImGetuiConfigVO", description = "im个推配置表")
public class ImGetuiConfigVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "EwC0iRSrcS")
    private String saasId;
    @ApiModelProperty(value = "个推url", example = "EwC0iRSrcS")
    private String host;
    @ApiModelProperty(value = "个推appid", example = "EwC0iRSrcS")
    private String appId;//个推appid
    @ApiModelProperty(value = "个推appkey", example = "EwC0iRSrcS")
    private String appkey;//个推appkey
    @ApiModelProperty(value = "个推的秘钥", example = "EwC0iRSrcS")
    private String mastersecret;//
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getHost() {
        return host;
    }
    public void setHost(String host) {
        this.host = host;
    }
    public String getAppId() {
        return appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getAppkey() {
        return appkey;
    }
    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }
    public String getMastersecret() {
        return mastersecret;
    }
    public void setMastersecret(String mastersecret) {
        this.mastersecret = mastersecret;
    }
}

+ 54 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageSubscriberVO.java

@ -0,0 +1,54 @@
package com.yihu.jw.restmodel.base.message;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 基于MQ的消息推送订阅者
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "MqMessageSubscriberVO", description = "基于MQ的消息推送订阅者")
public class MqMessageSubscriberVO extends UuidIdentityVO {
    @ApiModelProperty(value = "SAAS ID", example = "402803ee656498890165649ad2xaaba2")
    private String saasId;
    @ApiModelProperty(value = "主题", example = "dailyReport")
    private String topic;
    @ApiModelProperty(value = "推送地址", example = "http://www.example.com/api")
    private String url;
    @ApiModelProperty(value = "备注", example = "我是备注")
    private String remark;
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 59 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageVO.java

@ -0,0 +1,59 @@
package com.yihu.jw.restmodel.base.message;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 基于MQ的消息推送
 * Created by progr1mmer on 2018/9/3.
 */
@ApiModel(value = "MqMessageVO", description = "基于MQ的消息推送")
public class MqMessageVO extends UuidIdentityVO {
    //主题
    @ApiModelProperty(value = "主题", example = "dailyReport")
    private String topic;
    //名称
    @ApiModelProperty(value = "名称", example = "日常统计数据")
    private String name;
    //备注
    @ApiModelProperty(value = "备注", example = "我是备注")
    private String remark;
    //模板
    @ApiModelProperty(value = "模板")
    private String template;
    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getTemplate() {
        return template;
    }
    public void setTemplate(String template) {
        this.template = template;
    }
}

+ 3 - 3
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleVO.java

@ -16,7 +16,7 @@ public class RoleVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "备注", example = "我是备注")
	private String remark;
	@ApiModelProperty(value = "是否系统管理员", example = "1")
	private Boolean isSystem;
	private Boolean system;
	public String getName() {
		return this.name;
@ -35,10 +35,10 @@ public class RoleVO extends UuidIdentityVOWithOperator {
	}
	public Boolean getSystem() {
		return isSystem;
		return system;
	}
	public void setSystem(Boolean system) {
		isSystem = system;
		this.system = system;
	}
}

+ 34 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/RehabilitationVO.java

@ -0,0 +1,34 @@
package com.yihu.jw.restmodel.base.servicePackage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * @author yeshijie on 2018/8/30.
 */
@ApiModel(value = "RehabilitationVO", description = "康复计划服务包")
public class RehabilitationVO implements Serializable {
    @ApiModelProperty(value = "服务包")
    private ServicePackageVO servicePackageVO;
    @ApiModelProperty(value = "服务包签约信息")
    private ServicePackageSignRecordVO signRecordVO;
    public ServicePackageVO getServicePackageVO() {
        return servicePackageVO;
    }
    public void setServicePackageVO(ServicePackageVO servicePackageVO) {
        this.servicePackageVO = servicePackageVO;
    }
    public ServicePackageSignRecordVO getSignRecordVO() {
        return signRecordVO;
    }
    public void setSignRecordVO(ServicePackageSignRecordVO signRecordVO) {
        this.signRecordVO = signRecordVO;
    }
}

+ 46 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailTimeVO.java

@ -0,0 +1,46 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 服务包明细执行时间表
 * @author yeshijie on 2018/8/17.
 */
@ApiModel(value = "ServicePackageDetailTimeVO", description = "服务包明细执行时间表")
public class ServicePackageDetailTimeVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "EwC0iRSrcS")
    private String saasId;
    @ApiModelProperty(value = "服务包明细id", example = "EwC0iRSrcS")
    private String detailId;//服务包明细id
    @ApiModelProperty(value = "执行时间")
    private Date excutionTime;//执行时间
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getDetailId() {
        return detailId;
    }
    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }
    public Date getExcutionTime() {
        return excutionTime;
    }
    public void setExcutionTime(Date excutionTime) {
        this.excutionTime = excutionTime;
    }
}

+ 96 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailsVO.java

@ -0,0 +1,96 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@ApiModel(value = "ServicePackageDetailsVO", description = "服务包明细表")
public class ServicePackageDetailsVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "EwC0iRSrcS")
    private String saasId;
    @ApiModelProperty(value = "服务包id", example = "EwC0iRSrcS")
    private String servicePackageId;//服务包id',
    @ApiModelProperty(value = "服务项目编码", example = "EwC0iRSrcS")
    private String code;//服务项目编码',
    @ApiModelProperty(value = "服务项目名称", example = "康复计划")
    private String name;//服务项目名称',
    @ApiModelProperty(value = "创建时间")
    private Date createTime;//创建时间',
    @ApiModelProperty(value = "执行时间")
    private Date executionTime;//执行时间',
    @ApiModelProperty(value = "执行类型", example = "1")
    private String executionType;//执行类型(1固定时间,2固定次数(不固定时间),3长期)',
    @ApiModelProperty(value = "最少执行次数", example = "1")
    private Integer exceutionNum;//最少执行次数',
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    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 Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getExecutionType() {
        return executionType;
    }
    public void setExecutionType(String executionType) {
        this.executionType = executionType;
    }
    public Integer getExceutionNum() {
        return exceutionNum;
    }
    public void setExceutionNum(Integer exceutionNum) {
        this.exceutionNum = exceutionNum;
    }
    public Date getExecutionTime() {
        return executionTime;
    }
    public void setExecutionTime(Date executionTime) {
        this.executionTime = executionTime;
    }
}

+ 211 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java

@ -0,0 +1,211 @@
package com.yihu.jw.restmodel.base.servicePackage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * @author yeshijie on 2018/8/30.
 */
@ApiModel(value = "ServicePackageLogVO", description = "服务包日志")
public class ServicePackageLogVO implements Serializable {
    public enum Flag {
        success("成功", 0),
        failure("失败", 1);
        private String name;
        private int value;
        Flag(String name, int value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public int getValue() {
            return value;
        }
        public void setValue(int value) {
            this.value = value;
        }
    }
    public enum UserType {
        patient("居民", "1"),
        doctor("医生", "2");
        private String name;
        private String value;
        UserType(String name, String value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
    }
    @ApiModelProperty(value = "uuid")
    private String id;//uuid
    @ApiModelProperty(value = "时间")
    private Date createTime;//时间
    @ApiModelProperty(value = "saasid")
    private String saasId;//saasid
    @ApiModelProperty(value = "服务包id")
    private String sevicePackageId;//服务包id
    @ApiModelProperty(value = "服务包明细id")
    private String sevicePackageDetailId;//服务包明细id
    @ApiModelProperty(value = "医生或者患者code")
    private String userCode;//医生或者患者code
    @ApiModelProperty(value = "医生或者患者name")
    private String userName;//医生或者患者name
    @ApiModelProperty(value = "1 患者 2医生")
    private String userType;// 1 患者 2医生
    @ApiModelProperty(value = "关联类型(1健康指导,2健康文章,3代预约)")
    private String relationType;//关联类型(1健康指导,2健康文章,3代预约)
    @ApiModelProperty(value = "关联id")
    private String relationId;//关联id
    @ApiModelProperty(value = "操作说明")
    private String message;//操作说明
    @ApiModelProperty(value = "操作是否成功 1成功 0失败")
    private Integer flag;//操作是否成功 1成功 0失败
    @ApiModelProperty(value = "完成项目数")
    private Integer finish;//完成项目数
    @ApiModelProperty(value = "扩展字段存json")
    private String ext;//扩展字段存json
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getSevicePackageId() {
        return sevicePackageId;
    }
    public void setSevicePackageId(String sevicePackageId) {
        this.sevicePackageId = sevicePackageId;
    }
    public String getSevicePackageDetailId() {
        return sevicePackageDetailId;
    }
    public void setSevicePackageDetailId(String sevicePackageDetailId) {
        this.sevicePackageDetailId = sevicePackageDetailId;
    }
    public String getUserCode() {
        return userCode;
    }
    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getUserType() {
        return userType;
    }
    public void setUserType(String userType) {
        this.userType = userType;
    }
    public String getRelationType() {
        return relationType;
    }
    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }
    public String getRelationId() {
        return relationId;
    }
    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    public Integer getFlag() {
        return flag;
    }
    public void setFlag(Integer flag) {
        this.flag = flag;
    }
    public Integer getFinish() {
        return finish;
    }
    public void setFinish(Integer finish) {
        this.finish = finish;
    }
    public String getExt() {
        return ext;
    }
    public void setExt(String ext) {
        this.ext = ext;
    }
}

+ 106 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageNormcatVO.java

@ -0,0 +1,106 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 服务包类目表
 * @author yeshijie on 2018/8/29.
 */
@ApiModel(value = "ServicePackageNormcatVO", description = "服务包类目表")
public class ServicePackageNormcatVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "EwC0iRSrcS")
    private String saasId;
    @ApiModelProperty(value = "商品所属类目ID", example = "465")
    private Long cid;//商品所属类目ID
    @ApiModelProperty(value = "父类目ID", example = "0")
    private Long parentCid;//父类目ID=0时,代表的是一级的类目
    @ApiModelProperty(value = "类目名称", example = "服务")
    private String name;//类目名称
    @ApiModelProperty(value = "别名", example = "福")
    private String alias;//alias
    @ApiModelProperty(value = "类型图片")
    private String picUrl;//类型图片
    @ApiModelProperty(value = "分类简称")
    private String simpleName;//分类简称
    @ApiModelProperty(value = "创建时间")
    private Date createTime;//创建时间
    @ApiModelProperty(value = "状态。可选值:1(正常),0(删除)", example = "1")
    private Integer del;//状态。可选值:1(正常),0(删除)
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    public Long getParentCid() {
        return parentCid;
    }
    public void setParentCid(Long parentCid) {
        this.parentCid = parentCid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAlias() {
        return alias;
    }
    public void setAlias(String alias) {
        this.alias = alias;
    }
    public String getPicUrl() {
        return picUrl;
    }
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }
    public String getSimpleName() {
        return simpleName;
    }
    public void setSimpleName(String simpleName) {
        this.simpleName = simpleName;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 156 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropVO.java

@ -0,0 +1,156 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@ApiModel(value = "ServicePackagePropVO", description = "服务包属性表")
public class ServicePackagePropVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId", example = "xsaasdaqq")
    private String saasId;
    @ApiModelProperty(value = "属性 id", example = "123412")
    private Long pid;//属性 ID
    @ApiModelProperty(value = "上级属性ID", example = "134")
    private Long parentPid;//上级属性ID
    @ApiModelProperty(value = "上级属性值ID", example = "1324")
    private Long parentVid;//上级属性值ID
    @ApiModelProperty(value = "属性名", example = "爱迪生")
    private String name;//属性名
    @ApiModelProperty(value = "是否关键属性", example = "1")
    private Integer isKeyProp;//是否关键属性。可选值:true(是),false(否)
    @ApiModelProperty(value = "是否销售属性", example = "1")
    private Integer isSaleProp;//是否销售属性。可选值:true(是),false(否)
    @ApiModelProperty(value = "是否商品属性", example = "1")
    private Integer isItemProp;//是否商品属性。可选值:true(是),false(否)
    @ApiModelProperty(value = "是否为必选属性", example = "1")
    private Integer must;//是否为必选属性。可选值:true(是),false(否)
    @ApiModelProperty(value = "是否可以多选", example = "1")
    private Integer multi;//是否可以多选。可选值:true(是),false(否)
    @ApiModelProperty(value = "排序", example = "1")
    private Long sortOrder;
    @ApiModelProperty(value = "类目ID", example = "123")
    private Long cid;//类目ID
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "状态。可选值:1(正常),0(删除)", example = "1")
    private Integer del;//状态。可选值:1(正常),0(删除)
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    public Long getParentPid() {
        return parentPid;
    }
    public void setParentPid(Long parentPid) {
        this.parentPid = parentPid;
    }
    public Long getParentVid() {
        return parentVid;
    }
    public void setParentVid(Long parentVid) {
        this.parentVid = parentVid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getIsKeyProp() {
        return isKeyProp;
    }
    public void setIsKeyProp(Integer isKeyProp) {
        this.isKeyProp = isKeyProp;
    }
    public Integer getIsSaleProp() {
        return isSaleProp;
    }
    public void setIsSaleProp(Integer isSaleProp) {
        this.isSaleProp = isSaleProp;
    }
    public Integer getIsItemProp() {
        return isItemProp;
    }
    public void setIsItemProp(Integer isItemProp) {
        this.isItemProp = isItemProp;
    }
    public Integer getMust() {
        return must;
    }
    public void setMust(Integer must) {
        this.must = must;
    }
    public Integer getMulti() {
        return multi;
    }
    public void setMulti(Integer multi) {
        this.multi = multi;
    }
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 124 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropvalueDO.java

@ -0,0 +1,124 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * 服务包属性值表
 * @author yeshijie on 2018/8/29.
 */
@Entity
@Table(name = "base_service_package_propvalue")
public class ServicePackagePropvalueDO extends UuidIdentityEntity implements Serializable {
    private String saasId;
    private Long cid;//类目ID',
    private Long pid;//属性 ID',
    private String propName;//属性名',
    private Long vid;//属性值ID',
    private String name;//属性值',
    private String nameAlias;//属性值别名',
    private Integer isParent;//是否为父类目属性',
    private Long sortOrder;//排列序号。取值范围:大于零的整数',
    private Date createTime;
    private Integer del;//状态。可选值:1(正常),0(删除)',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public Long getCid() {
        return cid;
    }
    public void setCid(Long cid) {
        this.cid = cid;
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    @Column(name = "prop_name")
    public String getPropName() {
        return propName;
    }
    public void setPropName(String propName) {
        this.propName = propName;
    }
    public Long getVid() {
        return vid;
    }
    public void setVid(Long vid) {
        this.vid = vid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "name_alias")
    public String getNameAlias() {
        return nameAlias;
    }
    public void setNameAlias(String nameAlias) {
        this.nameAlias = nameAlias;
    }
    @Column(name = "is_parent")
    public Integer getIsParent() {
        return isParent;
    }
    public void setIsParent(Integer isParent) {
        this.isParent = isParent;
    }
    @Column(name = "sort_order")
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 196 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSignRecordVO.java

@ -0,0 +1,196 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@ApiModel(value = "ServicePackageSignRecordVO", description = "服务包签约记录表")
public class ServicePackageSignRecordVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId", example = "EwC0iRSrcS")
    private String saasId;
    @ApiModelProperty(value = "服务包id", example = "EwC0iRSrcS")
    private String servicePackageId;//服务包id
    @ApiModelProperty(value = "服务包名称", example = "康复计划")
    private String servicePackageName;//服务包名称
    @ApiModelProperty(value = "居民code", example = "EwC0iRSrcS")
    private String patient;//居民code
    @ApiModelProperty(value = "居民姓名", example = "李四")
    private String name;//居民姓名
    @ApiModelProperty(value = "居民身份证", example = "350124199584724")
    private String idcard;//居民身份证
    @ApiModelProperty(value = "社保卡号", example = "568241")
    private String ssc;//社保卡号
    @ApiModelProperty(value = "签约医生code", example = "EwC0iRSrcS")
    private String signDoctor;//签约医生code
    @ApiModelProperty(value = "签约医生名称", example = "张飒")
    private String signDoctorName;//签约医生名称
    @ApiModelProperty(value = "医院code", example = "EwC0iRSrcS")
    private String hospital;//医院code
    @ApiModelProperty(value = "医院名称", example = "第一医院")
    private String hospitalName;//医院名称
    @ApiModelProperty(value = "行政团队id", example = "EwC0iRSrcS")
    private Long adminTeamCode;//行政团队id
    @ApiModelProperty(value = "服务总价", example = "445554")
    private Long price;//服务总价
    @ApiModelProperty(value = "服务开始时间")
    private Date startTime;//服务开始时间
    @ApiModelProperty(value = "服务结束时间")
    private Date endTime;//服务结束时间
    @ApiModelProperty(value = "状态(1新建,2已完成)")
    private String status;//状态(1新建,2已完成)
    @ApiModelProperty(value = "医生服务团队code", example = "EwC0iRSrcS")
    private String doctorTeamCode;//医生服务团队code
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    public String getServicePackageName() {
        return servicePackageName;
    }
    public void setServicePackageName(String servicePackageName) {
        this.servicePackageName = servicePackageName;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    public String getSignDoctor() {
        return signDoctor;
    }
    public void setSignDoctor(String signDoctor) {
        this.signDoctor = signDoctor;
    }
    public String getSignDoctorName() {
        return signDoctorName;
    }
    public void setSignDoctorName(String signDoctorName) {
        this.signDoctorName = signDoctorName;
    }
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    public Long getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public String getDoctorTeamCode() {
        return doctorTeamCode;
    }
    public void setDoctorTeamCode(String doctorTeamCode) {
        this.doctorTeamCode = doctorTeamCode;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 133 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSkuVO.java

@ -0,0 +1,133 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import java.util.Date;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@ApiModel(value = "ServicePackageSkuVO", description = "服务包sku表")
public class ServicePackageSkuVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId", example = "xsaasdaqq")
    private String saasId;//
    @ApiModelProperty(value = "服务包id", example = "xsaasdaqq")
    private String servicePackageId;//服务包id',
    @ApiModelProperty(value = "sku的销售属性组合字符串", example = "p1:v1;p2:v2")
    private String properties;//sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2',
    @ApiModelProperty(value = "属于这个sku的商品的数量", example = "1234")
    private Long quantity;//属于这个sku的商品的数量,',
    @ApiModelProperty(value = "属于这个sku的商品的价格", example = "5600")
    private Long price;//属于这个sku的商品的价格 取值范围:0-100000000;单位:分。如:200,表示:2元。',
    @ApiModelProperty(value = "sku所对应的销售属性的中文名字串", example = "pid1:vid1:pid_name1:vid_name1;")
    private String propertiesName;//sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……',
    @ApiModelProperty(value = "商品级别的条形码", example = "xsaasdaqq")
    private String barcode;//商品级别的条形码',
    @ApiModelProperty(value = "促销价", example = "123")
    private Long minPrice;//促销价',
    @ApiModelProperty(value = "sku创建日期")
    private Date createTime;//sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss',
    @ApiModelProperty(value = "sku最后修改日期")
    private Date updateTime;//sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss',
    @ApiModelProperty(value = "sku状态。 1:正常 ;0:删除", example = "1")
    private Integer del;//sku状态。 1:正常 ;0:删除',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "service_package_id")
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    public String getProperties() {
        return properties;
    }
    public void setProperties(String properties) {
        this.properties = properties;
    }
    public Long getQuantity() {
        return quantity;
    }
    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    @Column(name = "properties_name")
    public String getPropertiesName() {
        return propertiesName;
    }
    public void setPropertiesName(String propertiesName) {
        this.propertiesName = propertiesName;
    }
    public String getBarcode() {
        return barcode;
    }
    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }
    @Column(name = "min_price")
    public Long getMinPrice() {
        return minPrice;
    }
    public void setMinPrice(Long minPrice) {
        this.minPrice = minPrice;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 151 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageVO.java

@ -0,0 +1,151 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import java.util.Date;
import java.util.List;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@ApiModel(value = "ServicePackageVO", description = "服务包表")
public class ServicePackageVO extends UuidIdentityVO  {
    @ApiModelProperty(value = "saasId", example = "xsaasdaqq")
    private String saasId;
    @ApiModelProperty(value = "服务包名称", example = "服务")
    private String name;//服务包名称
    @ApiModelProperty(value = "服务包类型", example = "1")
    private String type;//服务包类型
    @ApiModelProperty(value = "服务项数量", example = "20")
    private Integer num;//服务项数量
    @ApiModelProperty(value = "预售价", example = "50000")
    private Long price;//预售价//单位分
    @ApiModelProperty(value = "服务包级别(0系统,1.医生,2团队,3社区,4区)", example = "1")
    private String level;//服务包级别(0系统,1.医生,2团队,3社区,4区)
    @ApiModelProperty(value = "关联code", example = "xsaasdaqq")
    private String levelCode;//关联code
    @ApiModelProperty(value = "创建者", example = "张武1")
    private String creater;//创建者
    @ApiModelProperty(value = "创建时间")
    private Date createTime;//创建时间
    @ApiModelProperty(value = "服务介绍", example = "xsaasdaqq")
    private String introduce;//服务介绍
    @ApiModelProperty(value = "审核状态", example = "1")
    private String status;//审核状态(预留字段0待审核,1审核通过,2审核不通过)
    @ApiModelProperty(value = "是否有效(1有效,0失效)", example = "1")
    private Integer del;//是否有效(1有效,0失效)
    @ApiModelProperty(value = "服务项")
    private List<ServicePackageDetailsVO> detailsVOList;
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    public String getLevel() {
        return level;
    }
    public void setLevel(String level) {
        this.level = level;
    }
    @Column(name = "level_code")
    public String getLevelCode() {
        return levelCode;
    }
    public void setLevelCode(String levelCode) {
        this.levelCode = levelCode;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    public List<ServicePackageDetailsVO> getDetailsVOList() {
        return detailsVOList;
    }
    public void setDetailsVOList(List<ServicePackageDetailsVO> detailsVOList) {
        this.detailsVOList = detailsVOList;
    }
}

+ 84 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionQuotaVO.java

@ -0,0 +1,84 @@
package com.yihu.jw.restmodel.base.statistics;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@ApiModel(value = "DimensionQuotaVO", description = "统计维度指标")
public class DimensionQuotaVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId")
    private String saasId;
    @ApiModelProperty(value = "关联base_quota的code")
    private String quotaCode;//
    @ApiModelProperty(value = "关联base_dimension的code")
    private String dimensionCode;//
    @ApiModelProperty(value = "查询字典的sql语句")
    private String dictSql;//
    @ApiModelProperty(value = "数据转换的类")
    private String convertClazz;//
    @ApiModelProperty(value = "维度顺序")
    private Integer sort;//
    @ApiModelProperty(value = "查询出来的key")
    private String key;//
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getQuotaCode() {
        return quotaCode;
    }
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
    }
    public String getDimensionCode() {
        return dimensionCode;
    }
    public void setDimensionCode(String dimensionCode) {
        this.dimensionCode = dimensionCode;
    }
    public String getDictSql() {
        return dictSql;
    }
    public void setDictSql(String dictSql) {
        this.dictSql = dictSql;
    }
    public String getConvertClazz() {
        return convertClazz;
    }
    public void setConvertClazz(String convertClazz) {
        this.convertClazz = convertClazz;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
}

+ 86 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionVO.java

@ -0,0 +1,86 @@
package com.yihu.jw.restmodel.base.statistics;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 统计维度表
 * @author yeshijie on 2018/8/31.
 */
@ApiModel(value = "DimensionVO", description = "统计维度")
public class DimensionVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId")
    private String saasId;
    @ApiModelProperty(value = "业务代码")
    private String code;//
    @ApiModelProperty(value = "类型")
    private String type;//
    @ApiModelProperty(value = "指标名称")
    private String name;//
    @ApiModelProperty(value = "状态(1: 正常 0:不可以用 -1 已删除)")
    private Integer status;//
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "备注")
    private String remark;//
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 184 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/JobConfigVO.java

@ -0,0 +1,184 @@
package com.yihu.jw.restmodel.base.statistics;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@ApiModel(value = "JobConfigVO", description = "统计job配置")
public class JobConfigVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId")
    private String saasId;
    @ApiModelProperty(value = "任务名称")
    private String jobName;//
    @ApiModelProperty(value = "任务描述")
    private String jobInfo;//
    @ApiModelProperty(value = "任务类型(0--单次执行  1--周期执行 2--监听任务)")
    private String jobType;//
    @ApiModelProperty(value = "任务执行的class")
    private String jobClass;//
    @ApiModelProperty(value = "统计sql语句")
    private String sql;//
    @ApiModelProperty(value = "统计总数语句")
    private String sqlCount;//
    @ApiModelProperty(value = "天数条件")
    private String sqlDay;//
    @ApiModelProperty(value = "年份条件")
    private String sqlYear;//
    @ApiModelProperty(value = "缓存的key")
    private String cacheKey;//
    @ApiModelProperty(value = "quartz表达式")
    private String quartzCron;//
    @ApiModelProperty(value = "1 启动 0停止")
    private String status;//
    @ApiModelProperty(value = "指标code")
    private String quotaCode;//
    @ApiModelProperty(value = "1: 正常 0: 删除")
    private Integer del;//
    @ApiModelProperty(value = "抽取类型   1或者为空:数据库 2ES")
    private String extractType;//
    @ApiModelProperty(value = "1增量 2到达量 3生成到达量也生成增量")
    private String timeLevel;//
    @ApiModelProperty(value = "增量时间间隔1天,2周,3月")
    private Integer incrementInterval;//
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getJobName() {
        return jobName;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    public String getJobInfo() {
        return jobInfo;
    }
    public void setJobInfo(String jobInfo) {
        this.jobInfo = jobInfo;
    }
    public String getJobType() {
        return jobType;
    }
    public void setJobType(String jobType) {
        this.jobType = jobType;
    }
    public String getJobClass() {
        return jobClass;
    }
    public void setJobClass(String jobClass) {
        this.jobClass = jobClass;
    }
    public String getSql() {
        return sql;
    }
    public void setSql(String sql) {
        this.sql = sql;
    }
    public String getSqlCount() {
        return sqlCount;
    }
    public void setSqlCount(String sqlCount) {
        this.sqlCount = sqlCount;
    }
    public String getSqlDay() {
        return sqlDay;
    }
    public void setSqlDay(String sqlDay) {
        this.sqlDay = sqlDay;
    }
    public String getSqlYear() {
        return sqlYear;
    }
    public void setSqlYear(String sqlYear) {
        this.sqlYear = sqlYear;
    }
    public String getCacheKey() {
        return cacheKey;
    }
    public void setCacheKey(String cacheKey) {
        this.cacheKey = cacheKey;
    }
    public String getQuartzCron() {
        return quartzCron;
    }
    public void setQuartzCron(String quartzCron) {
        this.quartzCron = quartzCron;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public String getQuotaCode() {
        return quotaCode;
    }
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    public String getExtractType() {
        return extractType;
    }
    public void setExtractType(String extractType) {
        this.extractType = extractType;
    }
    public String getTimeLevel() {
        return timeLevel;
    }
    public void setTimeLevel(String timeLevel) {
        this.timeLevel = timeLevel;
    }
    public Integer getIncrementInterval() {
        return incrementInterval;
    }
    public void setIncrementInterval(Integer incrementInterval) {
        this.incrementInterval = incrementInterval;
    }
}

+ 64 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/QuotaVO.java

@ -0,0 +1,64 @@
package com.yihu.jw.restmodel.base.statistics;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@ApiModel(value = "QuotaVO", description = "统计指标")
public class QuotaVO extends UuidIdentityVO {
    @ApiModelProperty(value = "指标code")
    private String code;//指标code
    @ApiModelProperty(value = "指标名称")
    private String name;//指标名称
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "更新时间")
    private String updateTime;
    @ApiModelProperty(value = "删除标志:1: 正常 0: 删除")
    private Integer 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 getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    public String getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 9 - 6
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java

@ -1,5 +1,6 @@
package com.yihu.jw.restmodel.base.user;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
@ -40,10 +41,10 @@ public class UserVO extends UuidIdentityVOWithOperator {
    private String email;
    //是否可用
    @ApiModelProperty(value = "是否可用", example = "1")
    private Boolean isEnabled;
    private Boolean enabled;
    //是否锁定
    @ApiModelProperty(value = "是否锁定", example = "1")
    private Boolean isLocked;
    private Boolean locked;
    //锁定时间
    @ApiModelProperty(value = "锁定时间", example = "2018-08-27 13:23:32")
    private Date lockedDate;
@ -119,21 +120,22 @@ public class UserVO extends UuidIdentityVOWithOperator {
    }
    public Boolean getEnabled() {
        return isEnabled;
        return enabled;
    }
    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
        this.enabled = enabled;
    }
    public Boolean getLocked() {
        return isLocked;
        return locked;
    }
    public void setLocked(Boolean locked) {
        isLocked = locked;
        this.locked = locked;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getLockedDate() {
        return lockedDate;
    }
@ -142,6 +144,7 @@ public class UserVO extends UuidIdentityVOWithOperator {
        this.lockedDate = lockedDate;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getLoginDate() {
        return loginDate;
    }

+ 96 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientDisseaseInfoVO.java

@ -0,0 +1,96 @@
package com.yihu.jw.restmodel.specialist;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * Created by humingfen on 2018/8/30.
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "居民签约疾病信息", description = "居民签约疾病信息")
public class PatientDisseaseInfoVO {
    @ApiModelProperty("疾病")
    private String disease;
    @ApiModelProperty("疾病名称")
    private String diseaseName;
    @ApiModelProperty("居民code")
    private String patient;
    @ApiModelProperty("居民姓名")
    private String patientName;
    @ApiModelProperty("年龄")
    private String age;
    @ApiModelProperty("性别")
    private String sex;
    @ApiModelProperty("身份证")
    private String idcard;
    @ApiModelProperty("生日")
    private String  birthday;
    public String getDisease() {
        return disease;
    }
    public void setDisease(String disease) {
        this.disease = disease;
    }
    public String getDiseaseName() {
        return diseaseName;
    }
    public void setDiseaseName(String diseaseName) {
        this.diseaseName = diseaseName;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getBirthday() {
        return birthday;
    }
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
}

+ 10 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java

@ -20,6 +20,8 @@ public class Envelop implements Serializable {
    protected String message;
    @ApiModelProperty(value = "状态(200 - 成功)", example = "200")
    protected Integer status = EnvelopStatus.success.code;
    @ApiModelProperty(value = "错误码", example = "200")
    protected String errorCode;
    public Integer getStatus() {
        return status;
@ -37,6 +39,14 @@ public class Envelop implements Serializable {
        this.message = message;
    }
    public String getErrorCode() {
        return errorCode;
    }
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
    public static Envelop getSuccess(String message) {
        Envelop envelop = new Envelop();
        envelop.setMessage(message);

+ 8 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -44,6 +44,14 @@ public abstract class EnvelopRestEndpoint {
        return envelop;
    }
    protected Envelop error(String message,String errorCode){
        Envelop envelop = new Envelop();
        envelop.setMessage(message);
        envelop.setErrorCode(errorCode);
        envelop.setStatus(-1);
        return envelop;
    }
    protected <J> ObjEnvelop<J> success(J obj){
        return success("success", obj);
    }

+ 6 - 6
server/svr-authentication/pom.xml

@ -55,22 +55,18 @@
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-feign</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-ribbon</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
@ -81,12 +77,10 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <scope>${dependency.scope}</scope>
        </dependency>
        <!-- Redis  -->
@ -106,6 +100,12 @@
        </dependency>
        <!-- JdbcTemplate-->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>utils</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
</project>

+ 16 - 1
server/svr-authentication/src/main/java/com/yihu/AuthServer.java

@ -1,7 +1,22 @@
package com.yihu;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
/**
 * Created by progr1mmer on 2018/8/29.
 */
public class AuthServer {
@SpringBootApplication
public class AuthServer extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(AuthServer.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AuthServer.class);
    }
}

+ 0 - 14
server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyAuthorizationServerConfigurerAdapter.java

@ -1,14 +0,0 @@
package com.yihu.jw.oauth2.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
/**
 *
 * Created by progr1mmer on 2018/8/29.
 */
@Configuration
@EnableAuthorizationServer
public class WlyyAuthorizationServerConfigurerAdapter extends AuthorizationServerConfigurerAdapter {
}

+ 0 - 49
server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyWebSecurityConfigurerAdapter.java

@ -1,49 +0,0 @@
package com.yihu.jw.oauth2.config;
import com.yihu.jw.oauth2.core.WlyyUserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
/**
 * Config - Spring Security
 * Created by progr1mmer on 2018/8/29.
 */
@Configuration
public class WlyyWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
    @Autowired
    private AuthenticationProvider authenticationProvider;
    @Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring().antMatchers("/oauth/**");
    }
    @Override
    protected void configure(AuthenticationManagerBuilder authBuilder) throws Exception {
        authBuilder.authenticationProvider(authenticationProvider);
    }
    @Bean
    WlyyUserDetailsService wlyyUserDetailsService(){
        return new WlyyUserDetailsService();
    }
    @Bean
    public AuthenticationProvider authenticationProvider(UserDetailsService userDetailsService) {
        DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
        authenticationProvider.setUserDetailsService(userDetailsService);
        authenticationProvider.setPasswordEncoder(new Md5PasswordEncoder());
        return authenticationProvider;
    }
}

+ 0 - 10
server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserDetails.java

@ -1,10 +0,0 @@
package com.yihu.jw.oauth2.model;
import java.io.Serializable;
/**
 * Model - 认证用户详细信息
 * Created by progr1mmer on 2018/8/29.
 */
public class WlyyUserDetails implements Serializable {
}

+ 0 - 10
server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserSimple.java

@ -1,10 +0,0 @@
package com.yihu.jw.oauth2.model;
import java.io.Serializable;
/**
 * Model - 认证用户简略信息
 * Created by progr1mmer on 2018/8/29.
 */
public class WlyyUserSimple implements Serializable {
}

+ 69 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/config/WlyyWebSecurityConfigurerAdapter.java

@ -0,0 +1,69 @@
package com.yihu.jw.security.config;
import com.yihu.jw.security.web.authentication.WlyyAuthenticationFailureHandler;
import com.yihu.jw.security.core.userdetails.jdbc.WlyyUserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.authentication.dao.ReflectionSaltSource;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import javax.sql.DataSource;
/**
 * Config - Spring Security
 * Created by progr1mmer on 2018/8/29.
 */
@Configuration
@EnableWebSecurity
public class WlyyWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
    @Autowired
    private DataSource dataSource;
    @Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring().antMatchers("/oauth/**");
    }
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/login/**").permitAll()
                .antMatchers("/**").hasRole("USER")
                .and().formLogin().loginPage("/login").failureHandler(new WlyyAuthenticationFailureHandler())
                .and().logout().logoutUrl("/logout").logoutSuccessUrl("/login")
                .and().headers().frameOptions().disable()
                .and().csrf().disable();
    }
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(authenticationProvider());
    }
    @Bean
    WlyyUserDetailsService wlyyUserDetailsService(){
        return new WlyyUserDetailsService(dataSource);
    }
    @Bean
    AuthenticationProvider authenticationProvider() {
        DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
        authenticationProvider.setUserDetailsService(wlyyUserDetailsService());
        authenticationProvider.setPasswordEncoder(new Md5PasswordEncoder());
        ReflectionSaltSource reflectionSaltSource = new ReflectionSaltSource();
        reflectionSaltSource.setUserPropertyToUse("salt");
        authenticationProvider.setSaltSource(reflectionSaltSource);
        authenticationProvider.setSaltSource(reflectionSaltSource);
        return authenticationProvider;
    }
}

+ 228 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/SaltUser.java

@ -0,0 +1,228 @@
package com.yihu.jw.security.core.userdetails;
import org.springframework.security.core.CredentialsContainer;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.Assert;
import java.io.Serializable;
import java.util.*;
/**
 * Created by progr1mmer on 2018/8/29.
 */
public class SaltUser implements UserDetails, CredentialsContainer {
    private static final long serialVersionUID = 420L;
    private String password;
    private final String username;
    private final Set<GrantedAuthority> authorities;
    private final boolean accountNonExpired;
    private final boolean accountNonLocked;
    private final boolean credentialsNonExpired;
    private final boolean enabled;
    private final String salt;
    public SaltUser(String username, String password, String salt, Collection<? extends GrantedAuthority> authorities) {
        this(username, password, salt, true, true, true, true, authorities);
    }
    public SaltUser(String username, String password, String salt, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        if(username != null && !"".equals(username) && password != null) {
            this.username = username;
            this.password = password;
            this.salt = salt;
            this.enabled = enabled;
            this.accountNonExpired = accountNonExpired;
            this.credentialsNonExpired = credentialsNonExpired;
            this.accountNonLocked = accountNonLocked;
            this.authorities = Collections.unmodifiableSet(sortAuthorities(authorities));
        } else {
            throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
        }
    }
    public Collection<GrantedAuthority> getAuthorities() {
        return this.authorities;
    }
    public String getPassword() {
        return this.password;
    }
    public String getUsername() {
        return this.username;
    }
    public String getSalt() {
        return salt;
    }
    public boolean isEnabled() {
        return this.enabled;
    }
    public boolean isAccountNonExpired() {
        return this.accountNonExpired;
    }
    public boolean isAccountNonLocked() {
        return this.accountNonLocked;
    }
    public boolean isCredentialsNonExpired() {
        return this.credentialsNonExpired;
    }
    public void eraseCredentials() {
        this.password = null;
    }
    private static SortedSet<GrantedAuthority> sortAuthorities(Collection<? extends GrantedAuthority> authorities) {
        Assert.notNull(authorities, "Cannot pass a null GrantedAuthority collection");
        SortedSet<GrantedAuthority> sortedAuthorities = new TreeSet(new SaltUser.AuthorityComparator());
        Iterator var2 = authorities.iterator();
        while(var2.hasNext()) {
            GrantedAuthority grantedAuthority = (GrantedAuthority)var2.next();
            Assert.notNull(grantedAuthority, "GrantedAuthority list cannot contain any null elements");
            sortedAuthorities.add(grantedAuthority);
        }
        return sortedAuthorities;
    }
    public boolean equals(Object rhs) {
        return rhs instanceof SaltUser?this.username.equals(((SaltUser)rhs).username):false;
    }
    public int hashCode() {
        return this.username.hashCode();
    }
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(super.toString()).append(": ");
        sb.append("Username: ").append(this.username).append("; ");
        sb.append("Password: [PROTECTED]; ");
        sb.append("Enabled: ").append(this.enabled).append("; ");
        sb.append("AccountNonExpired: ").append(this.accountNonExpired).append("; ");
        sb.append("credentialsNonExpired: ").append(this.credentialsNonExpired).append("; ");
        sb.append("AccountNonLocked: ").append(this.accountNonLocked).append("; ");
        if(!this.authorities.isEmpty()) {
            sb.append("Granted Authorities: ");
            boolean first = true;
            Iterator var3 = this.authorities.iterator();
            while(var3.hasNext()) {
                GrantedAuthority auth = (GrantedAuthority)var3.next();
                if(!first) {
                    sb.append(",");
                }
                first = false;
                sb.append(auth);
            }
        } else {
            sb.append("Not granted any authorities");
        }
        return sb.toString();
    }
    public static SaltUser.UserBuilder withUsername(String username) {
        return (new SaltUser.UserBuilder()).username(username);
    }
    public static class UserBuilder {
        private String username;
        private String password;
        private List<GrantedAuthority> authorities;
        private boolean accountExpired;
        private boolean accountLocked;
        private boolean credentialsExpired;
        private boolean disabled;
        private UserBuilder() {
        }
        private SaltUser.UserBuilder username(String username) {
            Assert.notNull(username, "username cannot be null");
            this.username = username;
            return this;
        }
        public SaltUser.UserBuilder password(String password) {
            Assert.notNull(password, "password cannot be null");
            this.password = password;
            return this;
        }
        public SaltUser.UserBuilder roles(String... roles) {
            List<GrantedAuthority> authorities = new ArrayList(roles.length);
            String[] var3 = roles;
            int var4 = roles.length;
            for(int var5 = 0; var5 < var4; ++var5) {
                String role = var3[var5];
                Assert.isTrue(!role.startsWith("ROLE_"), role + " cannot start with ROLE_ (it is automatically added)");
                authorities.add(new SimpleGrantedAuthority("ROLE_" + role));
            }
            return this.authorities((List)authorities);
        }
        public SaltUser.UserBuilder authorities(GrantedAuthority... authorities) {
            return this.authorities(Arrays.asList(authorities));
        }
        public SaltUser.UserBuilder authorities(List<? extends GrantedAuthority> authorities) {
            this.authorities = new ArrayList(authorities);
            return this;
        }
        public SaltUser.UserBuilder authorities(String... authorities) {
            return this.authorities(AuthorityUtils.createAuthorityList(authorities));
        }
        public SaltUser.UserBuilder accountExpired(boolean accountExpired) {
            this.accountExpired = accountExpired;
            return this;
        }
        public SaltUser.UserBuilder accountLocked(boolean accountLocked) {
            this.accountLocked = accountLocked;
            return this;
        }
        public SaltUser.UserBuilder credentialsExpired(boolean credentialsExpired) {
            this.credentialsExpired = credentialsExpired;
            return this;
        }
        public SaltUser.UserBuilder disabled(boolean disabled) {
            this.disabled = disabled;
            return this;
        }
        public UserDetails build() {
            return new User(this.username, this.password, !this.disabled, !this.accountExpired, !this.credentialsExpired, !this.accountLocked, this.authorities);
        }
    }
    private static class AuthorityComparator implements Comparator<GrantedAuthority>, Serializable {
        private static final long serialVersionUID = 420L;
        private AuthorityComparator() {
        }
        public int compare(GrantedAuthority g1, GrantedAuthority g2) {
            return g2.getAuthority() == null?-1:(g1.getAuthority() == null?1:g1.getAuthority().compareTo(g2.getAuthority()));
        }
    }
}

+ 17 - 12
server/svr-authentication/src/main/java/com/yihu/jw/oauth2/core/WlyyUserDetailsService.java

@ -1,17 +1,20 @@
package com.yihu.jw.oauth2.core;
package com.yihu.jw.security.core.userdetails.jdbc;
import com.yihu.jw.oauth2.model.WlyyUserSimple;
import com.yihu.jw.security.core.userdetails.SaltUser;
import com.yihu.jw.security.model.WlyyUserDetails;
import com.yihu.jw.security.model.WlyyUserSimple;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
/**
@ -20,7 +23,11 @@ import java.util.List;
 */
public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetailsService {
    private static final String DEFAULT_USER_DETAILS_STATEMENT = "SELECT * FROM user u WHERE u.username = ? OR u.mobile = ? OR u.idcard = ?";
    private static final String DEFAULT_USER_DETAILS_STATEMENT = "SELECT * FROM base_user u WHERE u.username = ? OR u.mobile = ? OR u.idcard = ?";
    public WlyyUserDetailsService(DataSource dataSource) {
        this.setDataSource(dataSource);
    }
    /**
     * 用户登录判读接口
@ -31,16 +38,11 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
     */
    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        List<UserDetails> users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(UserDetails.class), username, username, username);
        List<WlyyUserDetails> users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserDetails.class), username, username, username);
        if (users == null || users.size() == 0) {
            throw new UsernameNotFoundException(username);
        }
        return new User(username, users.get(0).getPassword(), getGrantedAuthorities(username));
        /*if (username.equals("admin")){
            return new User("admin", "e10adc3949ba59abbe56e057f20f883e", getGrantedAuthorities(username));
        }
        return null;*/
        return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), getGrantedAuthorities(username));
    }
    private Collection<? extends GrantedAuthority> getGrantedAuthorities(String username) {
@ -49,7 +51,10 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        return authorities;
    }
    public WlyyUserSimple loadUserSimpleByUsername(String username) throws UsernameNotFoundException {
    public WlyyUserSimple authSuccess (String username) throws UsernameNotFoundException {
        //更新登陆时间
        this.getJdbcTemplate().update("update base_user u set u.login_date = ? where u.username = ? or u.mobile = ? or u.idcard = ?", new Date(), username, username, username);
        //加载用户简略信息
        List<WlyyUserSimple> users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserSimple.class), username, username, username);
        if (users == null || users.size() == 0) {
            throw new UsernameNotFoundException(username);

+ 52 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/model/Oauth2Envelop.java

@ -0,0 +1,52 @@
package com.yihu.jw.security.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.HashMap;
/**
 * Model - 认证失败信息
 * Created by progr1mmer on 2018/8/29.
 */
public class Oauth2Envelop<T> {
    protected String message;
    protected Integer status;
    private T obj = (T)new HashMap<>();
    public Oauth2Envelop(String message, Integer status) {
        this.message = message;
        this.status = status;
    }
    public Oauth2Envelop(String message, Integer status, T obj) {
        this.message = message;
        this.status = status;
        this.obj = obj;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    public T getObj() {
        return obj;
    }
    public void setObj(T obj) {
        this.obj = obj;
    }
}

+ 220 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserDetails.java

@ -0,0 +1,220 @@
package com.yihu.jw.security.model;
import java.io.Serializable;
import java.util.Date;
/**
 * Model - 认证用户详细信息
 * Created by progr1mmer on 2018/8/29.
 */
public class WlyyUserDetails implements Serializable {
    /**
     * 性别
     */
    public enum Gender {
        //男
        male,
        //女
        female
    }
    private String id;
    //创建时间
    private Date createTime;
    //创建者
    private String createUser;
    //创建者
    private String createUserName;
    //更新时间
    private Date updateTime;
    //更新者
    private String updateUser;
    //更新者
    private String updateUserName;
    //用户名
    private String username;
    //密码
    private String password;
    //密码散列值
    private String salt;
    //姓名
    private String name;
    //性别
    private Gender gender;
    //身份证号码
    private String idcard;
    //手机号码
    private String mobile;
    //邮箱
    private String email;
    //是否可用
    private Boolean enabled;
    //是否锁定
    private Boolean locked;
    //锁定时间
    private Date lockedDate;
    //最后登陆时间
    private Date loginDate;
    //登陆失败次数
    private Integer loginFailureCount;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getCreateUser() {
        return createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    public String getCreateUserName() {
        return createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getUpdateUser() {
        return updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    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 getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Gender getGender() {
        return gender;
    }
    public void setGender(Gender gender) {
        this.gender = gender;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public Boolean isEnabled() {
        return enabled;
    }
    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }
    public Boolean isLocked() {
        return locked;
    }
    public void setLocked(Boolean locked) {
        this.locked = locked;
    }
    public Date getLockedDate() {
        return lockedDate;
    }
    public void setLockedDate(Date lockedDate) {
        this.lockedDate = lockedDate;
    }
    public Date getLoginDate() {
        return loginDate;
    }
    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
    public Integer getLoginFailureCount() {
        return loginFailureCount;
    }
    public void setLoginFailureCount(Integer loginFailureCount) {
        this.loginFailureCount = loginFailureCount;
    }
}

+ 165 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserSimple.java

@ -0,0 +1,165 @@
package com.yihu.jw.security.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * Model - 认证用户简略信息
 * Created by progr1mmer on 2018/8/29.
 */
public class WlyyUserSimple implements Serializable {
    /**
     * 性别
     */
    public enum Gender {
        //男
        male,
        //女
        female
    }
    private String id;
    //用户名
    private String username;
    //姓名
    private String name;
    //性别
    private Gender gender;
    //身份证号码
    private String idcard;
    //手机号码
    private String mobile;
    //邮箱
    private String email;
    //最后登陆时间
    private Date loginDate;
    //扩展字段
    private String user; //当前登陆凭证
    private String accessToken;
    private String refreshToken;
    private String tokenType;
    private int expiresIn;
    private String state;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Gender getGender() {
        return gender;
    }
    public void setGender(Gender gender) {
        this.gender = gender;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getLoginDate() {
        return loginDate;
    }
    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
    public String getUser() {
        return user;
    }
    public void setUser(String user) {
        this.user = user;
    }
    //@JsonProperty(value = "access_token")
    public String getAccessToken() {
        return accessToken;
    }
    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }
    //@JsonProperty(value = "refresh_token")
    public String getRefreshToken() {
        return refreshToken;
    }
    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }
    //@JsonProperty(value = "token_type")
    public String getTokenType() {
        return tokenType;
    }
    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }
    //@JsonProperty(value = "expires_in")
    public int getExpiresIn() {
        return expiresIn;
    }
    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
}

+ 65 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/common/WlyyOAuth2AccessToken.java

@ -0,0 +1,65 @@
package com.yihu.jw.security.oauth2.common;
import java.io.Serializable;
/**
 * Created by progr1mmer on 2018/8/29.
 */
public class WlyyOAuth2AccessToken implements Serializable {
    private String accessToken;
    private String refreshToken;
    private String tokenType;
    private int expiresIn;
    private String scope;
    private String state;
    public String getAccessToken() {
        return accessToken;
    }
    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }
    public String getRefreshToken() {
        return refreshToken;
    }
    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }
    public String getTokenType() {
        return tokenType;
    }
    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }
    public int getExpiresIn() {
        return expiresIn;
    }
    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }
    public String getScope() {
        return scope;
    }
    public void setScope(String scope) {
        this.scope = scope;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
}

+ 100 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/config/WlyyAuthorizationServerConfigurerAdapter.java

@ -0,0 +1,100 @@
package com.yihu.jw.security.oauth2.config;
import com.yihu.jw.security.oauth2.provider.client.WlyyJdbcClientRedirectUriService;
import com.yihu.jw.security.oauth2.provider.WlyyTokenGranter;
import com.yihu.jw.security.oauth2.core.redis.WlyyRedisVerifyCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.provider.ClientDetailsService;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices;
import org.springframework.security.oauth2.provider.code.InMemoryAuthorizationCodeServices;
import org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestFactory;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
import javax.sql.DataSource;
/**
 * Config - Spring Oauth2
 * Created by progr1mmer on 2018/8/29.
 */
@Configuration
@EnableAuthorizationServer
public class WlyyAuthorizationServerConfigurerAdapter extends AuthorizationServerConfigurerAdapter {
    @Autowired
    private DataSource dataSource;
    @Autowired
    private JedisConnectionFactory jedisConnectionFactory;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private RedisTemplate redisTemplate;
    @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
        endpoints.tokenStore(redisTokenStore());
        endpoints.authorizationCodeServices(authorizationCodeServices());
    }
    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.withClientDetails(clientDetailsService());
    }
    /*@Override
    public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
        security.passwordEncoder(new StandardPasswordEncoder());
    }*/
    @Bean
    @Primary
    WlyyTokenGranter wlyyTokenGranter (
            AuthenticationManager authenticationManager,
            AuthorizationServerTokenServices authorizationServerTokenServices) {
        WlyyTokenGranter tokenGranter = new WlyyTokenGranter(
                authenticationManager,
                authorizationServerTokenServices,
                authorizationCodeServices(),
                clientDetailsService(),
                new DefaultOAuth2RequestFactory(clientDetailsService()),
                wlyyRedisVerifyCodeService());
        return tokenGranter;
    }
    @Bean
    ClientDetailsService clientDetailsService() {
        return new JdbcClientDetailsService(dataSource);
    }
    @Bean
    RedisTokenStore redisTokenStore() {
        return new RedisTokenStore(jedisConnectionFactory);
    }
    @Bean
    WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService() {
        return new WlyyRedisVerifyCodeService(redisTemplate);
    }
    @Bean
    AuthorizationCodeServices authorizationCodeServices() {
        return new InMemoryAuthorizationCodeServices();
    }
    @Bean
    WlyyJdbcClientRedirectUriService wlyyJdbcClientRedirectUriService() {
        return new WlyyJdbcClientRedirectUriService(jdbcTemplate);
    }
}

+ 49 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/core/jdbc/WlyyJdbcUserSecurityService.java

@ -0,0 +1,49 @@
package com.yihu.jw.security.oauth2.core.jdbc;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.authentication.InsufficientAuthenticationException;
import org.springframework.util.Assert;
import javax.sql.DataSource;
import java.util.List;
/**
 * Created by progr1mmer on 2018/1/8.
 */
public class WlyyJdbcUserSecurityService {
    private static final String DEFAULT_KEY_ID_SELECT_STATEMENT = "SELECT id FROM user_security WHERE public_key = ?";
    private static final String DEFAULT_USER_ID_BY_KEY_ID_SELECT_STATEMENT = "SELECT user_id FROM user_key WHERE key_id = ?";
    private static final String DEFAULT_USER_NAME_BY_USER_ID = "SELECT login_code FROM users WHERE id = ?";
    private JdbcTemplate jdbcTemplate;
    public WlyyJdbcUserSecurityService(DataSource dataSource) {
        Assert.notNull(dataSource, "DataSource required");
        this.jdbcTemplate = new JdbcTemplate(dataSource);
    }
    public String getDefaultKeyIdSelectStatement(String publicKey) {
        List<String> keyId = jdbcTemplate.queryForList(DEFAULT_KEY_ID_SELECT_STATEMENT, new String []{publicKey}, String.class);
        if(keyId.size() <= 0) {
            throw new InsufficientAuthenticationException("Illegal authorized pk.");
        }
        return keyId.get(0);
    }
    public String getDefaultUserIdByKeyIdSelectStatement(String keyId) {
        List<String> userId =  jdbcTemplate.queryForList(DEFAULT_USER_ID_BY_KEY_ID_SELECT_STATEMENT, new String []{keyId}, String.class);
        if(userId.size() <= 0) {
            throw new InsufficientAuthenticationException("Unauthorized security key. please check you pk.");
        }
        return userId.get(0);
    }
    public String getDefaultUserNameByUserId(String userId) {
        List<String> username = jdbcTemplate.queryForList(DEFAULT_USER_NAME_BY_USER_ID, new String []{userId}, String.class);
        if(username.size() <= 0) {
            throw new InsufficientAuthenticationException("Illegal user id. please check you pk.");
        }
        return username.get(0);
    }
}

+ 44 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/core/redis/WlyyRedisVerifyCodeService.java

@ -0,0 +1,44 @@
package com.yihu.jw.security.oauth2.core.redis;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils;
import java.util.concurrent.TimeUnit;
/**
 * Created by progr1mmer on 2018/4/18.
 */
public class WlyyRedisVerifyCodeService {
    private final String KEY_SUFFIX = ":code";
    private final RedisTemplate redisTemplate;
    public WlyyRedisVerifyCodeService(RedisTemplate redisTemplate) {
        this.redisTemplate = redisTemplate;
    }
    public void store (String client_id, String username, String code, long expire) {
        String key = client_id + ":" + username + KEY_SUFFIX;
        redisTemplate.opsForValue().set(key, code);
        redisTemplate.expire(key, expire, TimeUnit.MILLISECONDS);
    }
    public Integer getExpireTime (String client_id, String username) {
        return new Long(redisTemplate.getExpire(client_id + ":" + username + KEY_SUFFIX)).intValue();
    }
    public boolean verification (String client_id, String username, String code) {
        if (StringUtils.isEmpty(code)) {
            return false;
        }
        String _code = (String) redisTemplate.opsForValue().get(client_id + ":" + username + KEY_SUFFIX);
        if (null == _code) {
            return false;
        }
        if (code.equalsIgnoreCase(_code)) {
            return true;
        }
        return false;
    }
}

+ 338 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/WlyyTokenGranter.java

@ -0,0 +1,338 @@
package com.yihu.jw.security.oauth2.provider;
import com.yihu.jw.security.oauth2.core.redis.WlyyRedisVerifyCodeService;
import org.springframework.security.authentication.*;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
import org.springframework.security.oauth2.common.exceptions.InvalidRequestException;
import org.springframework.security.oauth2.common.exceptions.RedirectMismatchException;
import org.springframework.security.oauth2.common.util.OAuth2Utils;
import org.springframework.security.oauth2.provider.*;
import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices;
import org.springframework.security.oauth2.provider.implicit.ImplicitGrantService;
import org.springframework.security.oauth2.provider.implicit.ImplicitTokenRequest;
import org.springframework.security.oauth2.provider.token.AbstractTokenGranter;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import org.springframework.util.Assert;
import java.util.*;
/**
 * Token授权器。
 * @author Progr1mmer
 * @created 2018.01.09
 */
public class WlyyTokenGranter implements TokenGranter {
    private final Map<String, TokenGranter> tokenGranters = new HashMap<>();
    public WlyyTokenGranter(AuthenticationManager authenticationManager,
                            AuthorizationServerTokenServices tokenServices,
                            AuthorizationCodeServices authorizationCodeServices,
                            ClientDetailsService clientDetailsService,
                            OAuth2RequestFactory requestFactory,
                            WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService) {
        tokenGranters.put(EhrAuthorizationCodeGranter.GRANT_TYPE,
                new EhrAuthorizationCodeGranter(
                        tokenServices,
                        authorizationCodeServices,
                        clientDetailsService,
                        requestFactory
                ));
        tokenGranters.put(EhrResourceOwnerPasswordTokenGranter.GRANT_TYPE,
                new EhrResourceOwnerPasswordTokenGranter(
                        authenticationManager,
                        tokenServices,
                        clientDetailsService,
                        requestFactory
                ));
        tokenGranters.put(EhrRefreshTokenGranter.GRANT_TYPE,
                new EhrRefreshTokenGranter(
                        tokenServices,
                        clientDetailsService,
                        requestFactory
                ));
        tokenGranters.put(EhrImplicitTokenGranter.GRANT_TYPE,
                new EhrImplicitTokenGranter(
                        tokenServices,
                        clientDetailsService,
                        requestFactory
                ));
        tokenGranters.put(EhrVerifyCodeTokenGranter.GRANT_TYPE,
                new EhrVerifyCodeTokenGranter(
                        authenticationManager,
                        tokenServices,
                        clientDetailsService,
                        requestFactory,
                        wlyyRedisVerifyCodeService
                ));
    }
    public OAuth2AccessToken grant(String grantType, TokenRequest tokenRequest) {
        if (tokenGranters.get(grantType) != null) {
            OAuth2AccessToken grant = tokenGranters.get(grantType).grant(grantType, tokenRequest);
            return grant;
        }
        return null;
    }
    /**
     * authorization_code模式Token授权器。
     */
    public static class EhrAuthorizationCodeGranter extends AbstractTokenGranter {
        public static final String GRANT_TYPE = "authorization_code";
        private final AuthorizationCodeServices authorizationCodeServices;
        public EhrAuthorizationCodeGranter(AuthorizationServerTokenServices tokenServices,
                                           AuthorizationCodeServices authorizationCodeServices,
                                           ClientDetailsService clientDetailsService,
                                           OAuth2RequestFactory requestFactory) {
            this(tokenServices, authorizationCodeServices, clientDetailsService, requestFactory, GRANT_TYPE);
        }
        protected EhrAuthorizationCodeGranter(AuthorizationServerTokenServices tokenServices,
                                              AuthorizationCodeServices authorizationCodeServices,
                                              ClientDetailsService clientDetailsService,
                                              OAuth2RequestFactory requestFactory,
                                              String grantType) {
            super(tokenServices, clientDetailsService, requestFactory, grantType);
            this.authorizationCodeServices = authorizationCodeServices;
        }
        @Override
        protected OAuth2Authentication getOAuth2Authentication(ClientDetails client, TokenRequest tokenRequest) {
            Map<String, String> parameters = tokenRequest.getRequestParameters();
            String authorizationCode = parameters.get("code");
            String redirectUri = parameters.get(OAuth2Utils.REDIRECT_URI);
            if (authorizationCode == null) {
                throw new InvalidRequestException("An authorization code must be supplied.");
            }
            OAuth2Authentication storedAuth = authorizationCodeServices.consumeAuthorizationCode(authorizationCode);
            if (storedAuth == null) {
                throw new InvalidGrantException("Invalid authorization code: " + authorizationCode);
            }
            OAuth2Request pendingOAuth2Request = storedAuth.getOAuth2Request();
            String oauthUri;
            if (pendingOAuth2Request.getRedirectUri().indexOf("?") != -1) {
                oauthUri = pendingOAuth2Request.getRedirectUri().substring(0, pendingOAuth2Request.getRedirectUri().indexOf("?"));
            } else {
                oauthUri = pendingOAuth2Request.getRedirectUri();
            }
            // https://jira.springsource.org/browse/SECOAUTH-333
            // This might be null, if the authorization was done without the redirect_uri parameter
            String redirectUriApprovalParameter = pendingOAuth2Request.getRequestParameters().get(
                    OAuth2Utils.REDIRECT_URI);
            if ((redirectUri != null || redirectUriApprovalParameter != null)
                    && !oauthUri.equals(redirectUri)) {
                throw new RedirectMismatchException("Redirect URI mismatch.");
            }
            String pendingClientId = pendingOAuth2Request.getClientId();
            String clientId = tokenRequest.getClientId();
            if (clientId != null && !clientId.equals(pendingClientId)) {
                // just a sanity check.
                throw new InvalidClientException("Client ID mismatch");
            }
            // Secret is not required in the authorization request, so it won't be available
            // in the pendingAuthorizationRequest. We do want to check that a secret is provided
            // in the token request, but that happens elsewhere.
            Map<String, String> combinedParameters = new HashMap<String, String>(pendingOAuth2Request
                    .getRequestParameters());
            // Combine the parameters adding the new ones last so they override if there are any clashes
            combinedParameters.putAll(parameters);
            // Make a new stored request with the combined parameters
            OAuth2Request finalStoredOAuth2Request = pendingOAuth2Request.createOAuth2Request(combinedParameters);
            Authentication userAuth = storedAuth.getUserAuthentication();
            //再次通过pk获取当前请求的用户信息
            /*String pk = combinedParameters.get("pk");
            String keyId = ehrJDBCUserSecurityService.getDefaultKeyIdSelectStatement(pk);
            String userId = ehrJDBCUserSecurityService.getDefaultUserIdByKeyIdSelectStatement(keyId);
            String userName = ehrJDBCUserSecurityService.getDefaultUserNameByUserId(userId);
            UserDetails userDetails = ehrUserDetailsService.loadUserByUsername(userName);
            if (StringUtils.isEmpty(keyId) || StringUtils.isEmpty(userId) || StringUtils.isEmpty(userName)) {
                throw new InsufficientAuthenticationException("Illegal pk");
            }
            UsernamePasswordAuthenticationToken userToken = new UsernamePasswordAuthenticationToken(userDetails.getUsername(), userDetails.getPassword(), userDetails.getAuthorities());*/
            return new OAuth2Authentication(finalStoredOAuth2Request, userAuth);
        }
    }
    /**
     * password模式Token授权器。
     */
    public static class EhrResourceOwnerPasswordTokenGranter extends AbstractTokenGranter {
        private static final String GRANT_TYPE = "password";
        private final AuthenticationManager authenticationManager;
        public EhrResourceOwnerPasswordTokenGranter(AuthenticationManager authenticationManager,
                                                 AuthorizationServerTokenServices tokenServices, ClientDetailsService clientDetailsService, OAuth2RequestFactory requestFactory) {
            this(authenticationManager, tokenServices, clientDetailsService, requestFactory, GRANT_TYPE);
        }
        protected EhrResourceOwnerPasswordTokenGranter(AuthenticationManager authenticationManager, AuthorizationServerTokenServices tokenServices,
                                                    ClientDetailsService clientDetailsService, OAuth2RequestFactory requestFactory, String grantType) {
            super(tokenServices, clientDetailsService, requestFactory, grantType);
            this.authenticationManager = authenticationManager;
        }
        @Override
        protected OAuth2Authentication getOAuth2Authentication(ClientDetails client, TokenRequest tokenRequest) {
            Map<String, String> parameters = new LinkedHashMap<String, String>(tokenRequest.getRequestParameters());
            String username = parameters.get("username");
            String password = parameters.get("password");
            // Protect from downstream leaks of password
            parameters.remove("password");
            Authentication userAuth = new UsernamePasswordAuthenticationToken(username, password);
            ((AbstractAuthenticationToken) userAuth).setDetails(parameters);
            try {
                userAuth = authenticationManager.authenticate(userAuth);
            }
            catch (AccountStatusException ase) {
                //covers expired, locked, disabled cases (mentioned in section 5.2, draft 31)
                throw new InvalidGrantException(ase.getMessage());
            }
            catch (BadCredentialsException e) {
                // If the username/password are wrong the spec says we should send 400/invalid grant
                throw new InvalidGrantException(e.getMessage());
            }
            if (userAuth == null || !userAuth.isAuthenticated()) {
                throw new InvalidGrantException("Could not authenticate user: " + username);
            }
            OAuth2Request storedOAuth2Request = getRequestFactory().createOAuth2Request(client, tokenRequest);
            return new OAuth2Authentication(storedOAuth2Request, userAuth);
        }
    }
    /**
     * refresh模式Token授权器。
     */
    public static class EhrRefreshTokenGranter extends AbstractTokenGranter {
        static final String GRANT_TYPE = "refresh_token";
        public EhrRefreshTokenGranter(AuthorizationServerTokenServices tokenServices,
                                      ClientDetailsService clientDetailsService,
                                      OAuth2RequestFactory requestFactory) {
            super(tokenServices, clientDetailsService, requestFactory, GRANT_TYPE);
        }
        @Override
        protected OAuth2AccessToken getAccessToken(ClientDetails client, TokenRequest tokenRequest) {
            String refreshToken = tokenRequest.getRequestParameters().get(GRANT_TYPE);
            return getTokenServices().refreshAccessToken(refreshToken, tokenRequest);
        }
    }
    /**
     * Implicit模式Token授权器。
     */
    public static class EhrImplicitTokenGranter extends AbstractTokenGranter {
        private static final String GRANT_TYPE = "implicit";
        public EhrImplicitTokenGranter(AuthorizationServerTokenServices tokenServices, ClientDetailsService clientDetailsService, OAuth2RequestFactory requestFactory) {
            this(tokenServices, clientDetailsService, requestFactory, GRANT_TYPE);
        }
        protected EhrImplicitTokenGranter(AuthorizationServerTokenServices tokenServices, ClientDetailsService clientDetailsService,
                                       OAuth2RequestFactory requestFactory, String grantType) {
            super(tokenServices, clientDetailsService, requestFactory, grantType);
        }
        @Override
        protected OAuth2Authentication getOAuth2Authentication(ClientDetails client, TokenRequest clientToken) {
            Authentication userAuth = SecurityContextHolder.getContext().getAuthentication();
            if (userAuth == null || !userAuth.isAuthenticated()) {
                throw new InsufficientAuthenticationException("There is no currently logged in user");
            }
            Assert.state(clientToken instanceof ImplicitTokenRequest, "An ImplicitTokenRequest is required here. Caller needs to wrap the TokenRequest.");
            OAuth2Request requestForStorage = ((ImplicitTokenRequest)clientToken).getOAuth2Request();
            return new OAuth2Authentication(requestForStorage, userAuth);
        }
        @SuppressWarnings("deprecation")
        public void setImplicitGrantService(ImplicitGrantService service) {
        }
    }
    /**
     * verify_code模式Token授权器。
     */
    public static class EhrVerifyCodeTokenGranter extends AbstractTokenGranter {
        private static final String GRANT_TYPE = "verify_code";
        private final AuthenticationManager authenticationManager;
        // Ehr Properties
        private final WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService;
        public EhrVerifyCodeTokenGranter(AuthenticationManager authenticationManager,
                                         AuthorizationServerTokenServices tokenServices,
                                         ClientDetailsService clientDetailsService,
                                         OAuth2RequestFactory requestFactory,
                                         WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService) {
            this(authenticationManager, tokenServices, clientDetailsService, requestFactory, GRANT_TYPE, wlyyRedisVerifyCodeService);
        }
        protected EhrVerifyCodeTokenGranter(AuthenticationManager authenticationManager,
                                            AuthorizationServerTokenServices tokenServices,
                                            ClientDetailsService clientDetailsService,
                                            OAuth2RequestFactory requestFactory,
                                            String grantType,
                                            WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService) {
            super(tokenServices, clientDetailsService, requestFactory, grantType);
            this.authenticationManager = authenticationManager;
            this.wlyyRedisVerifyCodeService = wlyyRedisVerifyCodeService;
        }
        @Override
        protected OAuth2Authentication getOAuth2Authentication(ClientDetails client, TokenRequest tokenRequest) {
            Map<String, String> parameters = new LinkedHashMap<String, String>(tokenRequest.getRequestParameters());
            String client_id = parameters.get("client_id");
            String username = parameters.get("username");
            String verify_code = parameters.get("verify_code");
            if (!wlyyRedisVerifyCodeService.verification(client_id, username, verify_code)){
                throw new InvalidGrantException("Invalid verify_code");
            }
            Authentication userAuth = new UsernamePasswordAuthenticationToken(username, verify_code, getGrantedAuthorities(username));
            ((AbstractAuthenticationToken) userAuth).setDetails(parameters);
            OAuth2Request storedOAuth2Request = getRequestFactory().createOAuth2Request(client, tokenRequest);
            return new OAuth2Authentication(storedOAuth2Request, userAuth);
        }
        private Collection<? extends GrantedAuthority> getGrantedAuthorities(String username) {
            Collection<GrantedAuthority> authorities = new ArrayList<>(1);
            authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
            return authorities;
        }
    }
}

+ 0 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/client/WlyyJdbcClientRedirectUriService.java


部分文件因文件數量過多而無法顯示