Procházet zdrojové kódy

Merge branch 'dev' of chenweida/jw2.0 into dev

chenweida před 8 roky
rodič
revize
658dfdfee3
26 změnil soubory, kde provedl 334 přidání a 1908 odebrání
  1. 5 7
      svr-configuration/pom.xml
  2. 18 0
      svr-configuration/src/main/java/com.yihu.jw/SvrConfiguration.java
  3. 23 18
      svr-configuration/src/main/resources/application.yml
  4. 8 14
      svr-configuration/src/main/resources/bootstrap.yml
  5. 4 1
      svr-discovery/pom.xml
  6. 8 10
      svr-discovery/src/main/resources/application.yml
  7. 72 1
      svr-lib-parent-pom/pom.xml
  8. 9 4
      svr/svr-base/pom.xml
  9. 4 7
      svr/svr-base/src/main/java/com/yihu/jw/Application.java
  10. 0 8
      svr/svr-base/src/main/java/com/yihu/jw/hospital/dao/OrgDao.java
  11. 0 329
      svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrg.java
  12. 0 209
      svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrgDept.java
  13. 0 145
      svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrgHospital.java
  14. 0 439
      svr/svr-base/src/main/java/com/yihu/jw/user/model/BaseEmployee.java
  15. 0 350
      svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatient.java
  16. 0 187
      svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatientExtend.java
  17. 0 124
      svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatientWechat.java
  18. 3 50
      svr/svr-base/src/main/resources/application.yml
  19. 57 0
      svr/svr-base/src/main/resources/bootstrap.yml
  20. 13 2
      web-gateway/pom.xml
  21. 8 1
      web-gateway/src/main/java/com/yihu/jw/Application.java
  22. 16 0
      web-gateway/src/main/java/com/yihu/jw/controller/PatientController.java
  23. 7 2
      web-gateway/src/main/java/com/yihu/jw/fegin/PatientFegin.java
  24. 16 0
      web-gateway/src/main/java/com/yihu/jw/fegin/fallback/PatientFeginFallback.java
  25. 27 0
      web-gateway/src/main/resources/application.yml
  26. 36 0
      web-gateway/src/main/resources/bootstrap.yml

+ 5 - 7
svr-configuration/pom.xml

@ -22,17 +22,15 @@
        </dependency>
        </dependency>
        <dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka-server</artifactId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        </dependency>
        <dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter</artifactId>
            <artifactId>spring-cloud-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        </dependency>
    </dependencies>
    </dependencies>

+ 18 - 0
svr-configuration/src/main/java/com.yihu.jw/SvrConfiguration.java

@ -0,0 +1,18 @@
package com.yihu.jw;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;
/**
 * Created by chenweida on 2017/5/14.
 */
@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
public class SvrConfiguration {
    public static void main(String[] args) {
        SpringApplication.run(SvrConfiguration.class, args);
    }
}

+ 23 - 18
svr-configuration/src/main/resources/application.yml

@ -1,43 +1,48 @@
server:
server:
  port: 1221
  port: 1221
management:
  port: ${server.port}
eureka:
  client:
    healthcheck:
      enabled: true #启动监控检查
  instance:
    #eurika使用IP不使用host
    prefer-ip-address: true
    #定制化在eurika中显示的名称
    instance-id: ${spring.application.name}:${spring.application.instance_id:${server.port}}
security:
security:
  user:
  user:
    password: configuration
    name: jw
    password:  jkzl
info:
  app:
    name: ConfigurationService
    description: EHR平台全局配置服务
    version: 1.0.0
---
---
spring:
spring:
  profiles: dev
  profiles: dev
eureka:
eureka:
  instance:
    ip-address: 127.0.0.1:8761
    #ip-address: 192.168.1.221:8761
    prefer-ip-address: false
  client:
    serviceUrl:
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka
---
---
spring:
spring:
  profiles: test
  profiles: test
eureka:
eureka:
  instance:
    ip-address: 172.19.103.73:8761
    prefer-ip-address: true
  client:
    serviceUrl:
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka
---
---
spring:
spring:
  profiles: prod
  profiles: prod
eureka:
eureka:
  instance:
    ip-address: 11.1.2.21:8761
    prefer-ip-address: true
  client:
    serviceUrl:
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka

+ 8 - 14
svr-configuration/src/main/resources/bootstrap.yml

@ -2,33 +2,26 @@ spring:
  application:
  application:
    name: svr-configurations
    name: svr-configurations
---
---
spring:
spring:
  profiles: dev
  profiles: dev
##git配置
  cloud:
  cloud:
    config:
    config:
      server:
      server:
        git:
        git:
          #uri: http://192.168.1.220:10080/hill9868/ehr.config.git
          #uri: http://192.168.1.220:10080/hill9868/ehr.config.git
          uri: http://192.168.1.220:10080/EHR/ehr.config.git
        default-label: dev
          uri: http://192.168.1.220:10080/chenweida/jw.config.git
        default-label: master
---
spring:
  profiles: alpha
  cloud:
    config:
      server:
        git:
          uri: http://192.168.1.220:10080/EHR/ehr.config.git
        default-label: dev
---
---
spring:
spring:
  profiles: test
  profiles: test
##git配置
  cloud:
  cloud:
    config:
    config:
      server:
      server:
@ -39,9 +32,10 @@ spring:
---
---
spring:
spring:
  profiles: prod
  profiles: prod
##git配置
  cloud:
  cloud:
    config:
    config:
      server:
      server:
        git:
        git:
          uri: http://11.1.2.8:3000/ehr_admin/ehr.config.git
          uri: http://11.1.2.8:3000/ehr_admin/ehr.config.git
        default-label: master
        default-label: master

+ 4 - 1
svr-discovery/pom.xml

@ -23,6 +23,10 @@
            <groupId>org.springframework.boot</groupId>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <artifactId>spring-boot</artifactId>
        </dependency>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
        <!--给 eurika界面添加账号密码验证-->
        <!--给 eurika界面添加账号密码验证-->
        <dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <groupId>org.springframework.boot</groupId>
@ -31,7 +35,6 @@
        <dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.3.3.RELEASE</version>
        </dependency>
        </dependency>
    </dependencies>
    </dependencies>
</project>
</project>

+ 8 - 10
svr-discovery/src/main/resources/application.yml

@ -2,17 +2,16 @@ server:
  port: 8761
  port: 8761
spring:
spring:
  cloud:
    config:
      enabled: false    ##是否加入配置服务
  application:
    name: svr-discovery
eureka:
eureka:
  client:
  client:
    register-with-eureka: false #是否注册到eurika
    register-with-eureka: false
    registry-fetch-interval-seconds: 30 #定期的更新客户端的服务清单 30秒更新一次
    registry-fetch-interval-seconds: 30 #定期的更新客户端的服务清单 30秒更新一次
#    fetch-registry: false
    serviceUrl:
      defaultZone: http://user:123456@127.0.0.1:8761/eureka/
    fetch-registry: false
    service-url:
      defaultZone: http://jw:jkzl@localhost:8761/eureka
#eurika界面的账号密码
#eurika界面的账号密码
@ -20,9 +19,8 @@ security:
  basic:
  basic:
    enabled: true
    enabled: true
  user:
  user:
    name: user
    password: 123456
    name: jw
    password: jkzl
---
---
spring:
spring:

+ 72 - 1
svr-lib-parent-pom/pom.xml

@ -38,10 +38,21 @@
        <version.springCloud.start>1.2.0.RELEASE</version.springCloud.start>
        <version.springCloud.start>1.2.0.RELEASE</version.springCloud.start>
        <version.springBoot>1.5.3.RELEASE</version.springBoot>
        <version.springBoot>1.5.3.RELEASE</version.springBoot>
        <version.mysql>5.1.38</version.mysql>
        <version.mysql>5.1.38</version.mysql>
        <version.jackson>2.6.6</version.jackson>
        <version.myCommon>1.0.0</version.myCommon>
        <version.spring>4.3.3.RELEASE</version.spring>
    </properties>
    </properties>
    <!--dependencyManagement作用子配置不写版本默认继承父配置-->
    <!--dependencyManagement作用子配置不写版本默认继承父配置-->
    <dependencyManagement>
    <dependencyManagement>
        <dependencies>
        <dependencies>
            <!--自己的封装 common -->
            <dependency>
                <groupId>com.yihu</groupId>
                <artifactId>common-swagger</artifactId>
                <version>${version.myCommon}</version>
            </dependency>
            <!--springCloud start-->
            <!--springCloud start-->
            <dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <groupId>org.springframework.cloud</groupId>
@ -68,13 +79,42 @@
                <artifactId>spring-cloud-starter-bus-amqp</artifactId>
                <artifactId>spring-cloud-starter-bus-amqp</artifactId>
                <version>${version.springCloud}</version>
                <version>${version.springCloud}</version>
            </dependency>
            </dependency>
            <!--路由网关-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-zuul</artifactId>
                <version>${version.springCloud}</version>
            </dependency>
            <!--断路由-->
            <!--断路由-->
            <dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-hystrix</artifactId>
                <artifactId>spring-cloud-starter-hystrix</artifactId>
                <version>${version.springCloud}</version>
                <version>${version.springCloud}</version>
            </dependency>
            </dependency>
            <!--hystrix仪表盘-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
                <version>${version.springCloud}</version>
            </dependency>
            <!--配置服务客户端-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-config</artifactId>
                <version>${version.springCloud}</version>
            </dependency>
            <!--发现服务服务客户端-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-eureka</artifactId>
                <version>${version.springCloud}</version>
            </dependency>
            <!--收集集群中的数据-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-turbine</artifactId>
                <version>${version.springCloud}</version>
            </dependency>
            <dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-feign</artifactId>
                <artifactId>spring-cloud-starter-feign</artifactId>
@ -146,6 +186,11 @@
                <artifactId>spring-boot-starter-mail</artifactId>
                <artifactId>spring-boot-starter-mail</artifactId>
                <version>${version.springBoot}</version>
                <version>${version.springBoot}</version>
            </dependency>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-logging</artifactId>
                <version>${version.springBoot}</version>
            </dependency>
            <dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
@ -163,6 +208,14 @@
            </dependency>
            </dependency>
            <!--springBoot end-->
            <!--springBoot end-->
            <!--spring start-->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${version.spring}</version>
            </dependency>
            <!--spring end-->
            <!--数据库驱动 start-->
            <!--数据库驱动 start-->
            <dependency>
            <dependency>
                <groupId>mysql</groupId>
                <groupId>mysql</groupId>
@ -170,6 +223,24 @@
                <version>${version.mysql}</version>
                <version>${version.mysql}</version>
            </dependency>
            </dependency>
            <!--数据库驱动 end-->
            <!--数据库驱动 end-->
            <!--fastJson start-->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <!--fastJson end-->
        </dependencies>
        </dependencies>
    </dependencyManagement>
    </dependencyManagement>

+ 9 - 4
svr/svr-base/pom.xml

@ -17,7 +17,6 @@
        <dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <groupId>com.yihu</groupId>
            <artifactId>common-swagger</artifactId>
            <artifactId>common-swagger</artifactId>
            <version>1.0.0</version>
        </dependency>
        </dependency>
        <dependency>
        <dependency>
@ -41,12 +40,18 @@
            <artifactId>spring-boot-starter-aop</artifactId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka-server</artifactId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        </dependency>
        <dependency>
        <dependency>
            <groupId>mysql</groupId>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <artifactId>mysql-connector-java</artifactId>

+ 4 - 7
svr/svr-base/src/main/java/com/yihu/jw/Application.java

@ -6,22 +6,19 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.RestTemplate;
/**
/**
 * Created by chenweida on 2017/5/10.
 * Created by chenweida on 2017/5/10.
 * localhost:10020/refresh  刷新当个微服务的配置 可以在需要刷新的bean上面@RefreshScope
 */
 */
@SpringBootApplication
@SpringBootApplication
@EnableDiscoveryClient//服务注册到发现服务
@EnableDiscoveryClient//服务注册到发现服务
public class Application {
public class SvrBaseApplication {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
    public static void main(String[] args) {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        SpringApplication.run(SvrBaseApplication.class, args);
    }
    }
}
}

+ 0 - 8
svr/svr-base/src/main/java/com/yihu/jw/hospital/dao/OrgDao.java

@ -1,8 +0,0 @@
package com.yihu.jw.hospital.dao;
/**
 * Created by chenweida on 2017/5/11.
 */
public interface OrgDao {
}

+ 0 - 329
svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrg.java

@ -1,329 +0,0 @@
package com.yihu.jw.hospital.model;// default package
import java.util.Date;
import javax.persistence.*;
/**
 * 机构表
 */
@Entity
@Table(name = "base_org")
public class BaseOrg implements java.io.Serializable {
	// Fields,
	private Integer id;//'业务无关主键'
	private String code;//'业务主键
	private String province;// '省份标识',
	private String provinceName;//'省份名称'
	private String city;//'城市标识'
	private String cityName;//城市名称
	private String town;//区标示
	private String townName;//区名称
	private String name;//机构名称
	private String alias;//'机构别名'
	private String spell;//'机构名称拼音首字母
	private String type;//'机构类型: 1.  医疗机构2.  企事业单位3.  政府机关4.  社会团体 5.药店 0.  部门 6.单位或者独立子公司7.基层机构 8.专业公共机构'
	private String address;//'机构详细地址'
	private String traffic;//'交通'
	private String photo;//'机构图片'
	private String saasId;//'saas配置id'
	private String longitude;//'经度'
	private String latitude;//'纬度'
	private String legalperson;//'法人'
	private String parentCode;//'上级机构code'
	private String combinationCode;//'医联体code'
	private String orgUrl;//'机构网址'
	private String del;//'作废标识,1正常,0作废'
	private String intro;//'机构简介'
	private Date createTime;//创建时间
	private Date updateTime;//修改时间
	// Constructors
	/** default constructor */
	public BaseOrg() {
	}
	/** minimal constructor */
	public BaseOrg(Integer id, String code, Date createTime, Date updateTime) {
		this.id = id;
		this.code = code;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	/** full constructor */
	public BaseOrg(Integer id, String code, String province,
			String provinceName, String city, String cityName, String town,
			String townName, String name, String alias, String spell,
			String type, String address, String traffic, String photo,
			String saasId, String longitude, String latitude,
			String legalperson, String parentCode, String combinationCode,
			String orgUrl, String del, String intro, Date createTime,
			Date updateTime) {
		this.id = id;
		this.code = code;
		this.province = province;
		this.provinceName = provinceName;
		this.city = city;
		this.cityName = cityName;
		this.town = town;
		this.townName = townName;
		this.name = name;
		this.alias = alias;
		this.spell = spell;
		this.type = type;
		this.address = address;
		this.traffic = traffic;
		this.photo = photo;
		this.saasId = saasId;
		this.longitude = longitude;
		this.latitude = latitude;
		this.legalperson = legalperson;
		this.parentCode = parentCode;
		this.combinationCode = combinationCode;
		this.orgUrl = orgUrl;
		this.del = del;
		this.intro = intro;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "province", length = 50)
	public String getProvince() {
		return this.province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@Column(name = "province_name", length = 50)
	public String getProvinceName() {
		return this.provinceName;
	}
	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}
	@Column(name = "city", length = 50)
	public String getCity() {
		return this.city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	@Column(name = "city_name", length = 50)
	public String getCityName() {
		return this.cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town", length = 50)
	public String getTown() {
		return this.town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	@Column(name = "town_name", length = 50)
	public String getTownName() {
		return this.townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	@Column(name = "name", length = 100)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "alias", length = 10)
	public String getAlias() {
		return this.alias;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	@Column(name = "spell", length = 20)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
	@Column(name = "type", length = 2)
	public String getType() {
		return this.type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "address", length = 300)
	public String getAddress() {
		return this.address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name = "traffic", length = 500)
	public String getTraffic() {
		return this.traffic;
	}
	public void setTraffic(String traffic) {
		this.traffic = traffic;
	}
	@Column(name = "photo", length = 200)
	public String getPhoto() {
		return this.photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column(name = "saas_id", length = 100)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "longitude", length = 10)
	public String getLongitude() {
		return this.longitude;
	}
	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	@Column(name = "latitude", length = 10)
	public String getLatitude() {
		return this.latitude;
	}
	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}
	@Column(name = "legalperson", length = 50)
	public String getLegalperson() {
		return this.legalperson;
	}
	public void setLegalperson(String legalperson) {
		this.legalperson = legalperson;
	}
	@Column(name = "parent_code", length = 100)
	public String getParentCode() {
		return this.parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	@Column(name = "combination_code", length = 100)
	public String getCombinationCode() {
		return this.combinationCode;
	}
	public void setCombinationCode(String combinationCode) {
		this.combinationCode = combinationCode;
	}
	@Column(name = "org_url", length = 200)
	public String getOrgUrl() {
		return this.orgUrl;
	}
	public void setOrgUrl(String orgUrl) {
		this.orgUrl = orgUrl;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return this.del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	@Column(name = "intro", length = 65535)
	public String getIntro() {
		return this.intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

+ 0 - 209
svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrgDept.java

@ -1,209 +0,0 @@
package com.yihu.jw.hospital.model;// default package
import java.util.Date;
import javax.persistence.*;
/**
 * 机构科室表
 */
@Entity
@Table(name = "base_org_dept")
public class BaseOrgDept implements java.io.Serializable {
	// Fields
	private Integer id;//'非业务主键'
	private String code;//'科室标识'
	private String name;//'科室名称'
	private String spell;//'科室名称拼音首字母
	private String del;//'删除标识,1正常,0删除'
	private String orgCode;//'关联 base_org code'
	private String bigdepartmentSn;//'国家一级标准科室SN'
	private String deptTel;//'科室电话'
	private String gloryName;//'科室荣誉字典(多选)国家重点科室,省级重点科室,医院特色专科'
	private String intro;//'科室介绍'
	private String floor;//'楼层号'
	private Integer sort;//'排序权重 默认0'
	private String parentCode;//'父科室code'
	private Date createTime;//创建时间
	private Date updateTime;//修改时间
	// Constructors
	/** default constructor */
	public BaseOrgDept() {
	}
	/** minimal constructor */
	public BaseOrgDept(Integer id, String code, String name, Date createTime,
			Date updateTime) {
		this.id = id;
		this.code = code;
		this.name = name;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	/** full constructor */
	public BaseOrgDept(Integer id, String code, String name, String spell,
			String del, String orgCode, String bigdepartmentSn, String deptTel,
			String gloryName, String intro, String floor, Integer sort,
			String parentCode, Date createTime, Date updateTime) {
		this.id = id;
		this.code = code;
		this.name = name;
		this.spell = spell;
		this.del = del;
		this.orgCode = orgCode;
		this.bigdepartmentSn = bigdepartmentSn;
		this.deptTel = deptTel;
		this.gloryName = gloryName;
		this.intro = intro;
		this.floor = floor;
		this.sort = sort;
		this.parentCode = parentCode;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "name", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "spell", length = 20)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return this.del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	@Column(name = "org_code", length = 100)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "bigdepartment_sn", length = 22)
	public String getBigdepartmentSn() {
		return this.bigdepartmentSn;
	}
	public void setBigdepartmentSn(String bigdepartmentSn) {
		this.bigdepartmentSn = bigdepartmentSn;
	}
	@Column(name = "dept_tel", length = 30)
	public String getDeptTel() {
		return this.deptTel;
	}
	public void setDeptTel(String deptTel) {
		this.deptTel = deptTel;
	}
	@Column(name = "glory_name", length = 500)
	public String getGloryName() {
		return this.gloryName;
	}
	public void setGloryName(String gloryName) {
		this.gloryName = gloryName;
	}
	@Column(name = "intro", length = 1000)
	public String getIntro() {
		return this.intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	@Column(name = "floor", length = 20)
	public String getFloor() {
		return this.floor;
	}
	public void setFloor(String floor) {
		this.floor = floor;
	}
	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	@Column(name = "parent_code", length = 100)
	public String getParentCode() {
		return this.parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

+ 0 - 145
svr/svr-base/src/main/java/com/yihu/jw/hospital/model/BaseOrgHospital.java

@ -1,145 +0,0 @@
package com.yihu.jw.hospital.model;// default package
import javax.persistence.*;
import java.util.Date;
/**
 * 医院扩展信息表
 */
@Entity
@Table(name = "base_org_hospital")
public class BaseOrgHospital implements java.io.Serializable {
	// Fields
	private Integer id;//非业务主键
	private String code;//业务主键
	private String orgCode;//机构代码 关联base_org
	private String roadCode;//街道编码
	private String centerSite;//中心/站点
	private String ascriptionType;//医院归属1.部属医院2.省属医院3.市属医院9:未知
	private String levelId;//医院等级id:..参考国家标准
	private String levelName;//医院等级名称:三甲..参考国家标准
	private Date createTime;//创建时间
	private Date updateTime;//修改时间
	// Constructors
	/** default constructor */
	public BaseOrgHospital() {
	}
	/** minimal constructor */
	public BaseOrgHospital(Integer id, String code) {
		this.id = id;
		this.code = code;
	}
	/** full constructor */
	public BaseOrgHospital(Integer id, String code, String orgCode,
			String roadCode, String centerSite, String ascriptionType,
			String levelId, String levelName) {
		this.id = id;
		this.code = code;
		this.orgCode = orgCode;
		this.roadCode = roadCode;
		this.centerSite = centerSite;
		this.ascriptionType = ascriptionType;
		this.levelId = levelId;
		this.levelName = levelName;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "org_code", length = 100)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "road_code", length = 200)
	public String getRoadCode() {
		return this.roadCode;
	}
	public void setRoadCode(String roadCode) {
		this.roadCode = roadCode;
	}
	@Column(name = "center_site", length = 200)
	public String getCenterSite() {
		return this.centerSite;
	}
	public void setCenterSite(String centerSite) {
		this.centerSite = centerSite;
	}
	@Column(name = "ascription_type", length = 2)
	public String getAscriptionType() {
		return this.ascriptionType;
	}
	public void setAscriptionType(String ascriptionType) {
		this.ascriptionType = ascriptionType;
	}
	@Column(name = "level_id", length = 20)
	public String getLevelId() {
		return this.levelId;
	}
	public void setLevelId(String levelId) {
		this.levelId = levelId;
	}
	@Column(name = "level_name", length = 20)
	public String getLevelName() {
		return this.levelName;
	}
	public void setLevelName(String levelName) {
		this.levelName = levelName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

+ 0 - 439
svr/svr-base/src/main/java/com/yihu/jw/user/model/BaseEmployee.java

@ -1,439 +0,0 @@
package com.yihu.jw.user.model;// default package
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
/**
 * 员工表
 */
@Entity
@Table(name = "base_employee")
public class BaseEmployee implements java.io.Serializable {
	// Fields
	private Integer id;//'业务无关主键
	private String code;//'业务标识'
	private String accountCode;//'关联wlyy_login_account账号code'
	private String name;//'姓名'
	private String sex;//'性别(1男,2女) 用国家标准字典'
	private String idcard;//' 身份证'
	private Date birthday;//'生日'
	private String photo;//'../../../images/d-male.png' comment '头像http地址
	private String mobile;//'手机号'
	private String province;//省
	private String provinceName;//省名称
	private String city;//市
	private String cityName;//市名称
	private String town;//区
	private String townName;//区名称
	private String hospital;//机构
	private String hospitalName;//机构名称
	private String dept;//科室
	private String deptName;//科室名称
	private String expertise;//'医生专长'
	private String introduce;//'医生介绍'
	private Date createTime;//创建时间
	private Date updateTime;//修改时间
	private String iscertified;//'资格是否认证通过,1是,0否'
	private String qrcode;//二维码地址
	private String del;//'1: 正常 0: 删除'
	private String identityType;//'身份类型 1 医生 2其他'
	private String isFamous;//'是否是名医 1是  0 不是'
	private String isPasswordPrompt;//'是否提示设置密码  1 提示过 0未提示'
	private String saasId;//'saas配置id
	private String administrativeName;//'行政职位名称'
	private String administrativeCode;//'行政职位code'
	private String job;//'职称
	private String jobName;//'职称名称
	private String spell;//'名称拼音首字母'
	// Constructors
	/** default constructor */
	public BaseEmployee() {
	}
	/** minimal constructor */
	public BaseEmployee(Integer id, String code, String mobile,
			Date updateTime, String iscertified) {
		this.id = id;
		this.code = code;
		this.mobile = mobile;
		this.updateTime = updateTime;
		this.iscertified = iscertified;
	}
	/** full constructor */
	public BaseEmployee(Integer id, String code, String accountCode,
			String name, String sex, String idcard, Date birthday,
			String photo, String mobile, String province, String provinceName,
			String city, String cityName, String town, String townName,
			String hospital, String hospitalName, String dept, String deptName,
			String expertise, String introduce, Date updateTime,
			String iscertified, String qrcode, String del, String identityType,
			String isFamous, String isPasswordPrompt, String saasId,
			String administrativeName, String administrativeCode, String job,
			String jobName, String spell) {
		this.id = id;
		this.code = code;
		this.accountCode = accountCode;
		this.name = name;
		this.sex = sex;
		this.idcard = idcard;
		this.birthday = birthday;
		this.photo = photo;
		this.mobile = mobile;
		this.province = province;
		this.provinceName = provinceName;
		this.city = city;
		this.cityName = cityName;
		this.town = town;
		this.townName = townName;
		this.hospital = hospital;
		this.hospitalName = hospitalName;
		this.dept = dept;
		this.deptName = deptName;
		this.expertise = expertise;
		this.introduce = introduce;
		this.updateTime = updateTime;
		this.iscertified = iscertified;
		this.qrcode = qrcode;
		this.del = del;
		this.identityType = identityType;
		this.isFamous = isFamous;
		this.isPasswordPrompt = isPasswordPrompt;
		this.saasId = saasId;
		this.administrativeName = administrativeName;
		this.administrativeCode = administrativeCode;
		this.job = job;
		this.jobName = jobName;
		this.spell = spell;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", unique = true, nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "account_code", length = 100)
	public String getAccountCode() {
		return this.accountCode;
	}
	public void setAccountCode(String accountCode) {
		this.accountCode = accountCode;
	}
	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "sex", length = 2)
	public String getSex() {
		return this.sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name = "idcard", length = 20)
	public String getIdcard() {
		return this.idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 0)
	public Date getBirthday() {
		return this.birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Column(name = "photo", length = 100)
	public String getPhoto() {
		return this.photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column(name = "mobile", nullable = false, length = 20)
	public String getMobile() {
		return this.mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name = "province", length = 50)
	public String getProvince() {
		return this.province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@Column(name = "province_name", length = 50)
	public String getProvinceName() {
		return this.provinceName;
	}
	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}
	@Column(name = "city", length = 50)
	public String getCity() {
		return this.city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	@Column(name = "city_name", length = 50)
	public String getCityName() {
		return this.cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town", length = 50)
	public String getTown() {
		return this.town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	@Column(name = "town_name", length = 50)
	public String getTownName() {
		return this.townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	@Column(name = "hospital", length = 50)
	public String getHospital() {
		return this.hospital;
	}
	public void setHospital(String hospital) {
		this.hospital = hospital;
	}
	@Column(name = "hospital_name", length = 50)
	public String getHospitalName() {
		return this.hospitalName;
	}
	public void setHospitalName(String hospitalName) {
		this.hospitalName = hospitalName;
	}
	@Column(name = "dept", length = 50)
	public String getDept() {
		return this.dept;
	}
	public void setDept(String dept) {
		this.dept = dept;
	}
	@Column(name = "dept_name", length = 50)
	public String getDeptName() {
		return this.deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	@Column(name = "expertise", length = 300)
	public String getExpertise() {
		return this.expertise;
	}
	public void setExpertise(String expertise) {
		this.expertise = expertise;
	}
	@Column(name = "introduce", length = 1500)
	public String getIntroduce() {
		return this.introduce;
	}
	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "iscertified", nullable = false, length = 1)
	public String getIscertified() {
		return this.iscertified;
	}
	public void setIscertified(String iscertified) {
		this.iscertified = iscertified;
	}
	@Column(name = "qrcode", length = 30)
	public String getQrcode() {
		return this.qrcode;
	}
	public void setQrcode(String qrcode) {
		this.qrcode = qrcode;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return this.del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	@Column(name = "identity_type", length = 1)
	public String getIdentityType() {
		return this.identityType;
	}
	public void setIdentityType(String identityType) {
		this.identityType = identityType;
	}
	@Column(name = "is_famous", length = 1)
	public String getIsFamous() {
		return this.isFamous;
	}
	public void setIsFamous(String isFamous) {
		this.isFamous = isFamous;
	}
	@Column(name = "is_password_prompt", length = 1)
	public String getIsPasswordPrompt() {
		return this.isPasswordPrompt;
	}
	public void setIsPasswordPrompt(String isPasswordPrompt) {
		this.isPasswordPrompt = isPasswordPrompt;
	}
	@Column(name = "saas_id", length = 100)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "administrative_name", length = 10)
	public String getAdministrativeName() {
		return this.administrativeName;
	}
	public void setAdministrativeName(String administrativeName) {
		this.administrativeName = administrativeName;
	}
	@Column(name = "administrative_code", length = 10)
	public String getAdministrativeCode() {
		return this.administrativeCode;
	}
	public void setAdministrativeCode(String administrativeCode) {
		this.administrativeCode = administrativeCode;
	}
	@Column(name = "job", length = 50)
	public String getJob() {
		return this.job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	@Column(name = "job_name", length = 50)
	public String getJobName() {
		return this.jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	@Column(name = "spell", length = 10)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
}

+ 0 - 350
svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatient.java

@ -1,350 +0,0 @@
package com.yihu.jw.user.model;// default package
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
/**
 * 患者表
 */
@Entity
@Table(name = "base_patient")
public class BasePatient implements java.io.Serializable {
	// Fields
	private Integer id;//'业务无关主键'
	private String code;//'业务主键'
	private String accountCode;//'关联wlyy_login_account账号code'
	private String idcard;//'身份证号'
	private String name;//'姓名'
	private Date birthday;//'生日'
	private String sex;//'参考国家标准'
	private String mobile;//'手机号'
	private String phone;//''联系电话'
	private String ssc;//'社保卡号'
	private String photo;//default '../../../images/p-female.png' comment '头像http地址'
	private String province;//省
	private String provinceName;//省名称
	private String city;//市
	private String cityName;//市名称
	private String town;//区
	private String townName;//区名称
	private String street;//街道
	private String streetName;//街道名称
	private String address;//详细地址
	private Integer status;//'用户状态:1正常,0禁用,-1恶意注册,2审核中'
	private Date updateTime;//修改时间
	private Date createTime;//创建时间
	private String saasId;//'saas配置id
	private String email;//'邮箱'
	private String nation;//'籍贯'
	private String spell;//'名称拼音首字母'
	// Constructors
	/** default constructor */
	public BasePatient() {
	}
	/** minimal constructor */
	public BasePatient(Integer id, String code, String idcard, String photo,
			Date updateTime, Date createTime) {
		this.id = id;
		this.code = code;
		this.idcard = idcard;
		this.photo = photo;
		this.updateTime = updateTime;
		this.createTime = createTime;
	}
	/** full constructor */
	public BasePatient(Integer id, String code, String accountCode,
			String idcard, String name, Date birthday, String sex,
			String mobile, String phone, String ssc, String photo,
			String province, String provinceName, String city, String cityName,
			String town, String townName, String street, String streetName,
			String address, Integer status, Date updateTime, Date createTime,
			String saasId, String email, String nation, String spell) {
		this.id = id;
		this.code = code;
		this.accountCode = accountCode;
		this.idcard = idcard;
		this.name = name;
		this.birthday = birthday;
		this.sex = sex;
		this.mobile = mobile;
		this.phone = phone;
		this.ssc = ssc;
		this.photo = photo;
		this.province = province;
		this.provinceName = provinceName;
		this.city = city;
		this.cityName = cityName;
		this.town = town;
		this.townName = townName;
		this.street = street;
		this.streetName = streetName;
		this.address = address;
		this.status = status;
		this.updateTime = updateTime;
		this.createTime = createTime;
		this.saasId = saasId;
		this.email = email;
		this.nation = nation;
		this.spell = spell;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "account_code", length = 100)
	public String getAccountCode() {
		return this.accountCode;
	}
	public void setAccountCode(String accountCode) {
		this.accountCode = accountCode;
	}
	@Column(name = "idcard", unique = true, nullable = false, length = 50)
	public String getIdcard() {
		return this.idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 0)
	public Date getBirthday() {
		return this.birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Column(name = "sex", length = 2)
	public String getSex() {
		return this.sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name = "mobile", length = 11)
	public String getMobile() {
		return this.mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name = "phone", length = 200)
	public String getPhone() {
		return this.phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name = "ssc", length = 50)
	public String getSsc() {
		return this.ssc;
	}
	public void setSsc(String ssc) {
		this.ssc = ssc;
	}
	@Column(name = "photo", nullable = false, length = 100)
	public String getPhoto() {
		return this.photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column(name = "province", length = 50)
	public String getProvince() {
		return this.province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@Column(name = "province_name", length = 50)
	public String getProvinceName() {
		return this.provinceName;
	}
	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}
	@Column(name = "city", length = 50)
	public String getCity() {
		return this.city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	@Column(name = "city_name", length = 50)
	public String getCityName() {
		return this.cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town", length = 50)
	public String getTown() {
		return this.town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	@Column(name = "town_name", length = 50)
	public String getTownName() {
		return this.townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	@Column(name = "street", length = 50)
	public String getStreet() {
		return this.street;
	}
	public void setStreet(String street) {
		this.street = street;
	}
	@Column(name = "street_name", length = 100)
	public String getStreetName() {
		return this.streetName;
	}
	public void setStreetName(String streetName) {
		this.streetName = streetName;
	}
	@Column(name = "address", length = 200)
	public String getAddress() {
		return this.address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "saas_id", length = 100)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "email", length = 100)
	public String getEmail() {
		return this.email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name = "nation", length = 50)
	public String getNation() {
		return this.nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	@Column(name = "spell", length = 10)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
}

+ 0 - 187
svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatientExtend.java

@ -1,187 +0,0 @@
package com.yihu.jw.user.model;// default package
import java.util.Date;
import javax.persistence.*;
/**
 * BasePatientExtend entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_patient_extend")
public class BasePatientExtend implements java.io.Serializable {
	// Fields
	private Integer id;//'主键'
	private String code;//'业务code'
	private String patientCode;//'患者code关联 wlyy_patient'
	private Date entryDate;//'入职时间'
	private String workState;//'工作状态 1实习 2试用期 3转正 4兼职 5离职 6产假 7医疗期 8退休 9返聘'
	private Date workStateTime;//'状态开始时间'
	private String jobNumber;//'工号'
	private String companyId;//'企业id'
	private String companyName;//'企业名称'
	private String companyEmail;//'企业邮箱'
	private String remark;//'备注'
	private Date createTime;//'创建时间'
	private Date updateTime;//'修改时间'
	// Constructors
	/** default constructor */
	public BasePatientExtend() {
	}
	/** minimal constructor */
	public BasePatientExtend(Integer id, Date entryDate, Date workStateTime,
			Date createTime, Date updateTime) {
		this.id = id;
		this.entryDate = entryDate;
		this.workStateTime = workStateTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	/** full constructor */
	public BasePatientExtend(Integer id, String code, String patientCode,
			Date entryDate, String workState, Date workStateTime,
			String jobNumber, String companyId, String companyName,
			String companyEmail, String remark, Date createTime, Date updateTime) {
		this.id = id;
		this.code = code;
		this.patientCode = patientCode;
		this.entryDate = entryDate;
		this.workState = workState;
		this.workStateTime = workStateTime;
		this.jobNumber = jobNumber;
		this.companyId = companyId;
		this.companyName = companyName;
		this.companyEmail = companyEmail;
		this.remark = remark;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", length = 100)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "patient_code", length = 100)
	public String getPatientCode() {
		return this.patientCode;
	}
	public void setPatientCode(String patientCode) {
		this.patientCode = patientCode;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "entry_date", nullable = false, length = 0)
	public Date getEntryDate() {
		return this.entryDate;
	}
	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}
	@Column(name = "work_state", length = 2)
	public String getWorkState() {
		return this.workState;
	}
	public void setWorkState(String workState) {
		this.workState = workState;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "work_state_time", nullable = false, length = 0)
	public Date getWorkStateTime() {
		return this.workStateTime;
	}
	public void setWorkStateTime(Date workStateTime) {
		this.workStateTime = workStateTime;
	}
	@Column(name = "job_number", length = 20)
	public String getJobNumber() {
		return this.jobNumber;
	}
	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}
	@Column(name = "company_id", length = 100)
	public String getCompanyId() {
		return this.companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	@Column(name = "company_name", length = 30)
	public String getCompanyName() {
		return this.companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	@Column(name = "company_email", length = 50)
	public String getCompanyEmail() {
		return this.companyEmail;
	}
	public void setCompanyEmail(String companyEmail) {
		this.companyEmail = companyEmail;
	}
	@Column(name = "remark", length = 2000)
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

+ 0 - 124
svr/svr-base/src/main/java/com/yihu/jw/user/model/BasePatientWechat.java

@ -1,124 +0,0 @@
package com.yihu.jw.user.model;// default package
import java.util.Date;
import javax.persistence.*;
/**
 * BasePatientWechat entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_patient_wechat")
public class BasePatientWechat implements java.io.Serializable {
	// Fields
	private Integer id;//'主键'
	private String code;//'业务主键'
	private String saasId;///saas配置
	private String wechatCode;//关联的微信code 关联表 Wx_Wechat
	private String patientCode;//'关联wlyy_patient表code'
	private String openid;//
	private String unionid;//'微信union_id'
	private Date createTime;//'创建时间'
	// Constructors
	/** default constructor */
	public BasePatientWechat() {
	}
	/** minimal constructor */
	public BasePatientWechat(Integer id, Date createTime) {
		this.id = id;
		this.createTime = createTime;
	}
	/** full constructor */
	public BasePatientWechat(Integer id, String code, String saasId,
			String wechatCode, String patientCode, String openid,
			String unionid, Date createTime) {
		this.id = id;
		this.code = code;
		this.saasId = saasId;
		this.wechatCode = wechatCode;
		this.patientCode = patientCode;
		this.openid = openid;
		this.unionid = unionid;
		this.createTime = createTime;
	}
	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "code", length = 100)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "saas_id", length = 64)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "wechat_code", length = 10)
	public String getWechatCode() {
		return this.wechatCode;
	}
	public void setWechatCode(String wechatCode) {
		this.wechatCode = wechatCode;
	}
	@Column(name = "patient_code", length = 100)
	public String getPatientCode() {
		return this.patientCode;
	}
	public void setPatientCode(String patientCode) {
		this.patientCode = patientCode;
	}
	@Column(name = "openid", length = 50)
	public String getOpenid() {
		return this.openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	@Column(name = "unionid", length = 50)
	public String getUnionid() {
		return this.unionid;
	}
	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}

+ 3 - 50
svr/svr-base/src/main/resources/application.yml

@ -1,67 +1,20 @@
##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主
server:
server:
  port: 10020
  port: 10020
spring:
spring:
  application:
  application:
    name:  svr-user  ##注册到发现服务的id 如果id一样 eurika会自动做负载
    name:  svr-base  ##注册到发现服务的id 如果id一样 eurika会自动做负载
  cloud:
    config:
      enabled: false    ##是否加入配置服务
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://user:123456@127.0.0.1:8761/eureka/
    healthcheck:
      enabled: true #启动监控检查
  instance:
    #eurika使用IP不使用host
    prefer-ip-address: true
    #定制化在eurika中显示的名称
    instance-id: ${spring.application.name}:${spring.application.instance_id:${server.port}}
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
    max-idle: 50 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
    validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    idle-timeout: 30000
    connection-test-query: SELECT 1
    num-tests-per-eviction-run: 50 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
  ejb:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
---
---
spring:
spring:
  profiles: dev
  profiles: dev
  datasource:
    url: jdbc:mysql://172.19.103.77/jw2.0?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: 123456
---
---
spring:
spring:
  profiles: test
  profiles: test
---
---
spring:
spring:
  profiles: prod
  profiles: prod

+ 57 - 0
svr/svr-base/src/main/resources/bootstrap.yml

@ -0,0 +1,57 @@
##优先读取 boostarap配置 然后在读取application。yml的配置
spring:
  application:
    name: svr-user
  #从发现服务里面取配置服务的信息
  cloud:
    config:
      username: jw
      password: jkzl
      discovery:
        enabled: true ##开始发现服务
        service-id: svr-configurations ##配置服务的名字
eureka:
  client:
    healthcheck:
      enabled: true #启动监控检查
  instance:
    #eurika使用IP不使用host
    prefer-ip-address: true
    #定制化在eurika中显示的名称
    instance-id: ${spring.application.name}:${spring.application.instance_id:${server.port}}
---
spring:
  profiles: dev
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/
---
spring:
  profiles: test
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/
---
spring:
  profiles: prod
eureka:
  client:
    serviceUrl:
      #http://账号:密码@127.0.0.1:8761/eureka/
      defaultZone: http://jw:jkzl@127.0.0.1:8761/eureka/

+ 13 - 2
web-gateway/pom.xml

@ -17,7 +17,6 @@
        <dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <groupId>com.yihu</groupId>
            <artifactId>common-swagger</artifactId>
            <artifactId>common-swagger</artifactId>
            <version>1.0.0</version>
        </dependency>
        </dependency>
        <dependency>
        <dependency>
@ -44,7 +43,11 @@
        <dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka-server</artifactId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        </dependency>
        <dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
@ -54,5 +57,13 @@
            <groupId>org.springframework.cloud</groupId>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
        </dependency>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zuul</artifactId>
        </dependency>
    </dependencies>
    </dependencies>
</project>
</project>

+ 8 - 1
web-gateway/src/main/java/com/yihu/jw/Application.java

@ -8,15 +8,22 @@ import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfigurat
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.RestTemplate;
/**
/**
 * Created by chenweida on 2017/5/10.
 * Created by chenweida on 2017/5/10.
 */
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
//@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
@SpringBootApplication
@EnableDiscoveryClient//服务注册到发现服务
@EnableDiscoveryClient//服务注册到发现服务
@EnableFeignClients //声名式的客户端
@EnableFeignClients //声名式的客户端
@EnableHystrix //启动断路器
@EnableHystrixDashboard //启动Hystrix仪表盘(监控数据)
@EnableZuulProxy //启动zuul代理 路由
public class Application {
public class Application {
    public static void main(String[] args) {
    public static void main(String[] args) {

+ 16 - 0
web-gateway/src/main/java/com/yihu/jw/controller/PatientController.java

@ -1,5 +1,7 @@
package com.yihu.jw.controller;
package com.yihu.jw.controller;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.yihu.jw.fegin.PatientFegin;
import com.yihu.jw.fegin.PatientFegin;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
@ -8,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.context.annotation.SessionScope;
/**
/**
 * Created by chenweida on 2017/5/10.
 * Created by chenweida on 2017/5/10.
@ -21,8 +24,21 @@ public class PatientController {
    @ApiOperation(value = "根据code查找患者")
    @ApiOperation(value = "根据code查找患者")
    @GetMapping(value = "findByCode")
    @GetMapping(value = "findByCode")
    //配置HystrixProperty 则调用的方法和fallback是同一个线程 否则就不是
    //@HystrixCommand(fallbackMethod = "findByCodeFallback",commandProperties = @HystrixProperty(name = "execution.isolation.strategy",value = "SEMAPHORE"))
    @HystrixCommand(fallbackMethod = "findByCodeFallback" )
    public String findByCode(
    public String findByCode(
            @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code) {
            @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code) {
        return patientFegin.findByCode(code);
        return patientFegin.findByCode(code);
    }
    }
//    /**
//     * 参数要一致 返回值类型也要一致
//     *
//     * @param code
//     * @return
//     */
//    public String findByCodeFallback(String code) {
//        return "";
//    }
}
}

+ 7 - 2
web-gateway/src/main/java/com/yihu/jw/fegin/PatientFegin.java

@ -1,5 +1,6 @@
package com.yihu.jw.fegin;
package com.yihu.jw.fegin;
import com.yihu.jw.fegin.fallback.PatientFeginFallback;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
@ -11,11 +12,15 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
/**
 * Created by chenweida on 2017/5/10.
 * Created by chenweida on 2017/5/10.
 */
 */
@FeignClient("svr-user")// 值是eurika的实例名字
@FeignClient(
        name = "svr-user", // name值是eurika的实例名字
        fallback = PatientFeginFallback.class// fallback是请求超时或者错误的回调函数
//        ,configuration =   //可以配置当个fegin的配置 例如禁用单个feign的hystrix
    )
@RequestMapping("/patient")
@RequestMapping("/patient")
public interface PatientFegin {
public interface PatientFegin {
    @RequestMapping(value = "/findByCode",method = RequestMethod.GET)
    @RequestMapping(value = "/findByCode", method = RequestMethod.GET)
    public String findByCode(@RequestParam(value = "code", required = true) String code);
    public String findByCode(@RequestParam(value = "code", required = true) String code);
}
}

+ 16 - 0
web-gateway/src/main/java/com/yihu/jw/fegin/fallback/PatientFeginFallback.java

@ -0,0 +1,16 @@
package com.yihu.jw.fegin.fallback;
import com.yihu.jw.fegin.PatientFegin;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by chenweida on 2017/5/13.
 */
@Component
public class PatientFeginFallback implements PatientFegin{
    @Override
    public String findByCode(@RequestParam(value = "code", required = true) String code) {
        return "";
    }
}

+ 27 - 0
web-gateway/src/main/resources/application.yml

@ -1,3 +1,5 @@
##如果有配置服务的话,远程服务器和本地服务器配置不一致的情况下,优先远程的为主
server:
server:
server:
  port: 8088
  port: 8088
@ -26,6 +28,31 @@ eureka:
hystrix:
  metrics:
    polling-interval-ms: 20000 ##熔断间隔时间 默认是2秒 
#zuul 默认会代理所有的微服务  路径 /{appliction.name}/**
zuul:
  ignored-services: '*'  ##忽略全部的代理  忽略单个微服务   ignored-services: svr-user 多个逗号分割
  routes:
    svr-user: /user/**  ##svr-user方向代理到/user下多层级的路径
#    svr-user:    这种方式和  svr-user: /user/**  一样  svr-user可以随便写 唯一即可
#      path: /user/**  path是代理后的路径
#      serviceId: svr-user  serviceId是微服务name
#   svr-user: 这种方式和 上面一样 就是serviceId改成具体的url 但是这种配置方法不能利用eurika的负载均衡
#     path: /user/**
#     url: http://localhost:10020/
#svr-user: 这边是微服务ID  配置负载均衡
#  ribbon:
#    listOfService: http://localhost:10020/,http://localhost:10021/
---
---
spring:
spring:

+ 36 - 0
web-gateway/src/main/resources/bootstrap.yml

@ -0,0 +1,36 @@
##优先读取 boostarap配置 然后在读取application。yml的配置
##boostarap一般是配置基本不会修改的配置
spring:
  application:
    name: web-gateway  ##写这个配置的话 会先去服务器找web-gateway.yml的配置 没有的话就找application.yml
---
spring:
  profiles: dev
  cloud:
    config:
      username: jw
      password: jkzljw
      uri: http://127.0.0.1:1221
      #uri: http://192.168.1.221:1221
      label: dev
---
spring:
  profiles: test
  cloud:
    config:
      username: jw
      password: jkzljw
      uri: http://172.19.103.73:1221
      label: dev
---
spring:
  profiles: prod
  cloud:
    config:
      username: jw
      password: jkzljw
      uri: http://11.1.2.21:1221
      label: master