Browse Source

基础配置

trick9191 6 years ago
parent
commit
95d832cd10
100 changed files with 5473 additions and 177 deletions
  1. 64 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/im/ImGetuiConfigDO.java
  2. 230 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java
  3. 49 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailTimeDO.java
  4. 97 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailsDO.java
  5. 125 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageNormcatDO.java
  6. 153 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropDO.java
  7. 124 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropvalueDO.java
  8. 220 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSignRecordDO.java
  9. 124 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSkuDO.java
  10. 7 26
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java
  11. 54 20
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsGatewayDO.java
  12. 84 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionDO.java
  13. 86 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionQuotaDO.java
  14. 185 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/JobConfigDO.java
  15. 65 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/QuotaDO.java
  16. 6 6
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java
  17. 25 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/HospitalServiceItemDO.java
  18. 25 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateDO.java
  19. 12 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateLabelDO.java
  20. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistEvaluateScoreDO.java
  21. 14 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java
  22. 22 11
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java
  23. 11 10
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java
  24. 22 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationDetailDO.java
  25. 127 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationOperateRecordsDO.java
  26. 9 3
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationPlanTemplateDO.java
  27. 3 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationTemplateDetailDO.java
  28. 3 9
      common/common-exception/src/main/java/com/yihu/jw/exception/ApiException.java
  29. 1 0
      common/common-fegin/pom.xml
  30. 43 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  31. 20 2
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java
  32. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/im/ImGetuiConfigVO.java
  33. 34 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/RehabilitationVO.java
  34. 46 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailTimeVO.java
  35. 96 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailsVO.java
  36. 211 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java
  37. 106 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageNormcatVO.java
  38. 156 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropVO.java
  39. 124 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropvalueDO.java
  40. 196 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSignRecordVO.java
  41. 133 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSkuVO.java
  42. 151 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageVO.java
  43. 46 16
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsGatewayVO.java
  44. 56 51
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java
  45. 84 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionQuotaVO.java
  46. 86 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionVO.java
  47. 184 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/JobConfigVO.java
  48. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/QuotaVO.java
  49. 5 5
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java
  50. 96 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/PatientDisseaseInfoVO.java
  51. 10 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java
  52. 14 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/ObjEnvelop.java
  53. 8 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  54. 95 0
      server/svr-authentication/pom.xml
  55. 7 0
      server/svr-authentication/src/main/java/com/yihu/AuthServer.java
  56. 14 0
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyAuthorizationServerConfigurerAdapter.java
  57. 49 0
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/config/WlyyWebSecurityConfigurerAdapter.java
  58. 60 0
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/core/WlyyUserDetailsService.java
  59. 10 0
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserDetails.java
  60. 10 0
      server/svr-authentication/src/main/java/com/yihu/jw/oauth2/model/WlyyUserSimple.java
  61. 3 3
      server/svr-configuration/src/main/java/com/yihu/SvrConfiguration.java
  62. 3 3
      server/svr-discovery/src/main/java/com/yihu/SvrDiscovery.java
  63. 2 2
      server/svr-zipkin/src/main/java/com/yihu/SvrZipkin.java
  64. 71 0
      svr/svr-base/doc/es/服务包执行日志记录索引.txt
  65. 5 0
      svr/svr-base/pom.xml
  66. 11 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/ImGetuiConfigDao.java
  67. 5 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/SmsGatewayDao.java
  68. 4 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/SmsTemplateDao.java
  69. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDao.java
  70. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailTimeDao.java
  71. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailsDao.java
  72. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageNormcatDao.java
  73. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropDao.java
  74. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropvalueDao.java
  75. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSignRecordDao.java
  76. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSkuDao.java
  77. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionDao.java
  78. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionQuotaDao.java
  79. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/JobConfigDao.java
  80. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/QuotaDao.java
  81. 94 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/im/ImGetuiConfigEndpiont.java
  82. 70 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/RehabilitationEndpoint.java
  83. 94 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageEndpoint.java
  84. 10 7
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsGatewayEndpoint.java
  85. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/DimensionEndpoint.java
  86. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/JobConfigEndpoint.java
  87. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/QuotaEndpoint.java
  88. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/ImGetuiConfigService.java
  89. 111 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/SmsGatewayService.java
  90. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailTimeService.java
  91. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailsService.java
  92. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageNormcatService.java
  93. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropService.java
  94. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropvalueService.java
  95. 158 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageService.java
  96. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSignRecordService.java
  97. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSkuService.java
  98. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionQuotaService.java
  99. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionService.java
  100. 0 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/JobConfigService.java

+ 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;
    }
}

+ 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;
    }
}

+ 7 - 26
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java

@ -13,15 +13,6 @@ import java.util.Date;
@Table(name = "base_sms")
public class SmsDO extends UuidIdentityEntity {
	/**
	 * 0 - 未发送
	 * 1 - 已发送
	 */
	public enum Status {
		unsent,
		sent
	}
	//应用ID
	private String clientId;
	//使用的网关
@ -29,17 +20,15 @@ public class SmsDO extends UuidIdentityEntity {
	//请求的ip地址
	private String requestIp;
	//短信接收号码
	private String mobile;
	private String to;
	//短信内容
	private String content;
	//过期时间
	private Date deadline;
	//验证码
	private String captcha;
	//短信类别
	//短信标签
	private SmsTemplateDO.Type type;
	//状态
	private Status status;
	@Column(name = "client_id", nullable = false)
	public String getClientId() {
@ -68,13 +57,13 @@ public class SmsDO extends UuidIdentityEntity {
		this.requestIp = requestIp;
	}
	@Column(name = "mobile", nullable = false)
	public String getMobile() {
		return mobile;
	@Column(name = "to", nullable = false)
	public String getTo() {
		return to;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	public void setTo(String to) {
		this.to = to;
	}
	@Column(name = "content", nullable = false)
@ -113,12 +102,4 @@ public class SmsDO extends UuidIdentityEntity {
		this.captcha = captcha;
	}
	@Column(name = "status", nullable = false)
	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}
}

+ 54 - 20
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsGatewayDO.java

@ -24,8 +24,8 @@ public class SmsGatewayDO extends UuidIdentityEntity {
		delete
	}
	//关联 base_saas id
	private String saasId;
	//关联 client id
	private String clientId;
	//名称
	private String name;
	//短信接口的账号
@ -34,21 +34,26 @@ public class SmsGatewayDO extends UuidIdentityEntity {
	private String password;
	//官网地址
	private String website;
	//超时时间(分钟)
	private Integer expireMin;
	//短信接口调用的地址
	private String url;
	private String requestUrl;
	//调用凭证(json串)
	private String certificate;
	private String requestCertificate;
	//短信接口调用状态标识
	private String responseCode;
	//调用成功的状态码
	private String successValue;
	//状态
	private Status status;
	@Column(name = "saas_id", nullable = false)
	public String getSaasId() {
		return saasId;
	@Column(name = "client_id", nullable = false)
	public String getClientId() {
		return clientId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	@Column(name = "name")
@ -87,22 +92,49 @@ public class SmsGatewayDO extends UuidIdentityEntity {
		this.website = website;
	}
	@Column(name = "url")
	public String getUrl() {
		return this.url;
	@Column(name = "expire_min")
	public Integer getExpireMin() {
		return expireMin;
	}
	public void setExpireMin(Integer expireMin) {
		this.expireMin = expireMin;
	}
	@Column(name = "request_url", nullable = false)
	public String getRequestUrl() {
		return requestUrl;
	}
	public void setRequestUrl(String requestUrl) {
		this.requestUrl = requestUrl;
	}
	public void setUrl(String url) {
		this.url = url;
	@Column(name = "request_certificate", nullable = false)
	public String getRequestCertificate() {
		return requestCertificate;
	}
	@Column(name = "certificate", nullable = false)
	public String getCertificate() {
		return certificate;
	public void setRequestCertificate(String requestCertificate) {
		this.requestCertificate = requestCertificate;
	}
	public void setCertificate(String certificate) {
		this.certificate = certificate;
	@Column(name = "response_code", nullable = false)
	public String getResponseCode() {
		return responseCode;
	}
	public void setResponseCode(String responseCode) {
		this.responseCode = responseCode;
	}
	@Column(name = "success_value", nullable = false)
	public String getSuccessValue() {
		return successValue;
	}
	public void setSuccessValue(String successValue) {
		this.successValue = successValue;
	}
	@Column(name = "status", nullable = false)
@ -113,4 +145,6 @@ public class SmsGatewayDO extends UuidIdentityEntity {
	public void setStatus(Status status) {
		this.status = status;
	}
}

+ 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;
    }
}

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

@ -38,7 +38,7 @@ public class UserDO extends UuidIdentityEntityWithOperator {
    //身份证号码
    private String idcard;
    //手机号码
    private String phone;
    private String mobile;
    //邮箱
    private String email;
    //是否可用
@ -106,13 +106,13 @@ public class UserDO extends UuidIdentityEntityWithOperator {
        this.idcard = idcard;
    }
    @Column(name = "phone", length = 200)
    public String getPhone() {
        return phone;
    @Column(name = "mobile", length = 200)
    public String getMobile() {
        return mobile;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    @Column(name = "email", length = 200)

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

@ -7,6 +7,7 @@ import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
/**
@ -34,6 +35,12 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    @Column(name = "status")
    private Integer status;//状态
    @Column(name = "expense")
    private Integer expense;//价格
    @Transient
    private SpecialistServiceItemDO specialistServiceItemDO;
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
@ -78,4 +85,22 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Transient
    public SpecialistServiceItemDO getSpecialistServiceItemDO() {
        return specialistServiceItemDO;
    }
    public void setSpecialistServiceItemDO(SpecialistServiceItemDO specialistServiceItemDO) {
        this.specialistServiceItemDO = specialistServiceItemDO;
    }
    @Column(name = "expense")
    public Integer getExpense() {
        return expense;
    }
    public void setExpense(Integer expense) {
        this.expense = expense;
    }
}

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

@ -45,6 +45,12 @@ public class SpecialistEvaluateDO extends UuidIdentityEntityWithOperator impleme
    @Transient
    private String content;//标签内容
    @Transient
    private String labelId;//标签Id
    @Transient
    private Integer flag;//标识标签
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
@ -117,6 +123,7 @@ public class SpecialistEvaluateDO extends UuidIdentityEntityWithOperator impleme
        this.type = type;
    }
    @Transient
    public String getContent() {
        return content;
    }
@ -124,4 +131,22 @@ public class SpecialistEvaluateDO extends UuidIdentityEntityWithOperator impleme
    public void setContent(String content) {
        this.content = content;
    }
    @Transient
    public String getLabelId() {
        return labelId;
    }
    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;
    }
}

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

@ -31,7 +31,7 @@ public class SpecialistEvaluateScoreDO extends UuidIdentityEntityWithOperator im
    private String relationCode;//关联code
    @Column(name = "score")
    private Integer score;//评论得分
    private Double score;//评论得分
    @Column(name = "saas_id")
@ -71,11 +71,11 @@ public class SpecialistEvaluateScoreDO extends UuidIdentityEntityWithOperator im
    }
    @Column(name = "score")
    public Integer getScore() {
    public Double getScore() {
        return score;
    }
    public void setScore(Integer score) {
    public void setScore(Double score) {
        this.score = score;
    }
}

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

@ -7,6 +7,7 @@ import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
/**
@ -72,6 +73,10 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    @Column(name = "status")
    private Integer status; //删除状态
    @Transient
    public Integer flag;
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
@ -233,4 +238,13 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Transient
    public Integer getFlag() {
        return flag;
    }
    public void setFlag(Integer flag) {
        this.flag = flag;
    }
}

+ 22 - 11
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java

@ -13,23 +13,18 @@ import java.io.Serializable;
@Entity
@Table(name = "wlyy_guidance_message_log")
public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "plan_detail_id")
    private String messageId;
    private String planDetailId;
    @Column(name = "content")
    private String content;
    @Column(name = "doctor")
    private String doctor;
    @Column(name = "doctor_name")
    private String doctorName;
    @Column(name = "doctor_type")
    private Integer doctorType;
    @Column(name = "admin_team_code")
    private String adminTeamCode;
    @Column(name = "admin_team_name")
    private Integer adminTeamCode;
    private String adminTeamName;
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -38,6 +33,7 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -46,6 +42,7 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        this.doctorName = doctorName;
    }
    @Column(name = "doctor_type")
    public Integer getDoctorType() {
        return doctorType;
    }
@ -54,11 +51,12 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        this.doctorType = doctorType;
    }
    public String getAdminTeamCode() {
    @Column(name = "admin_team_code")
    public Integer getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(String adminTeamCode) {
    public void setAdminTeamCode(Integer adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }
@ -66,10 +64,12 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        return adminTeamName;
    }
    @Column(name = "admin_team_name")
    public void setAdminTeamName(String adminTeamName) {
        this.adminTeamName = adminTeamName;
    }
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -78,6 +78,7 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        this.saasId = saasId;
    }
    @Column(name = "plan_detail_id")
    public String getPlanDetailId() {
        return planDetailId;
    }
@ -86,6 +87,7 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
        this.planDetailId = planDetailId;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }
@ -93,4 +95,13 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "message_id")
    public String getMessageId() {
        return messageId;
    }
    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }
}

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

@ -34,11 +34,10 @@ 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已完成)
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -47,6 +46,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.saasId = saasId;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
@ -55,6 +55,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.patient = patient;
    }
    @Column(name = "title")
    public String getTitle() {
        return title;
    }
@ -63,6 +64,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.title = title;
    }
    @Column(name = "payment")
    public Integer getPayment() {
        return payment;
    }
@ -71,6 +73,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.payment = payment;
    }
    @Column(name = "total_expense")
    public Integer getTotalExpense() {
        return totalExpense;
    }
@ -79,6 +82,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.totalExpense = totalExpense;
    }
    @Column(name = "plan_type")
    public Integer getPlanType() {
        return planType;
    }
@ -87,6 +91,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.planType = planType;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
@ -95,6 +100,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.name = name;
    }
    @Column(name = "service_package_id")
    public String getServicePackageId() {
        return servicePackageId;
    }
@ -103,6 +109,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.servicePackageId = servicePackageId;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
@ -111,6 +118,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.status = status;
    }
    @Column(name = "disease")
    public String getDisease() {
        return disease;
    }
@ -119,6 +127,7 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.disease = disease;
    }
    @Column(name = "disease_name")
    public String getDiseaseName() {
        return diseaseName;
    }
@ -126,12 +135,4 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
    public void setDiseaseName(String diseaseName) {
        this.diseaseName = diseaseName;
    }
    public String getServiceQrCode() {
        return serviceQrCode;
    }
    public void setServiceQrCode(String serviceQrCode) {
        this.serviceQrCode = serviceQrCode;
    }
}

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

@ -38,7 +38,10 @@ 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() {
        return saasId;
    }
@ -47,6 +50,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.saasId = saasId;
    }
    @Column(name = "plan_id")
    public String getPlanId() {
        return planId;
    }
@ -55,6 +59,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.planId = planId;
    }
    @Column(name = "hospital_service_item_id")
    public String getHospitalServiceItemId() {
        return hospitalServiceItemId;
    }
@ -63,6 +68,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.hospitalServiceItemId = hospitalServiceItemId;
    }
    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
@ -71,6 +77,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.hospital = hospital;
    }
    @Column(name = "execute_time")
    public Date getExecuteTime() {
        return executeTime;
    }
@ -79,6 +86,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.executeTime = executeTime;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
@ -87,6 +95,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.status = status;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
@ -95,6 +104,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.hospitalName = hospitalName;
    }
    @Column(name = "type")
    public Integer getType() {
        return type;
    }
@ -103,6 +113,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.type = type;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -111,6 +122,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -119,6 +131,7 @@ public class RehabilitationDetailDO extends UuidIdentityEntityWithOperator imple
        this.doctorName = doctorName;
    }
    @Column(name = "expense")
    public Integer getExpense() {
        return expense;
    }
@ -126,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;
    }
}

+ 127 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationOperateRecordsDO.java

@ -0,0 +1,127 @@
package com.yihu.jw.entity.specialist.rehabilitation;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * Created by 刘文彬 on 2018/8/29.
 */
@Entity
@Table(name = "wlyy_rehabilitation_operate_records")
public class RehabilitationOperateRecordsDO extends UuidIdentityEntityWithOperator implements Serializable {
    private String saasId;
    private String rehabilitationDetailId;//康复计划明细表id
    private String patientCode;//居民code
    private String patientName;//居民名称
    private String doctorCode;//执行医生code
    private String doctorName;//执行医生名称
    private Integer relationRecordType;//关联记录类型(1、随访记录,2、健康指导,3、健康教育)
    private String relationRecordCode;//关联记录code
    private Date reserveTime;//服务预定完成时间
    private Date completeTime;//服务完成时间
    private Integer status;//是否确认完成(0、未确认,1、已确认)
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "rehabilitation_detail_id")
    public String getRehabilitationDetailId() {
        return rehabilitationDetailId;
    }
    public void setRehabilitationDetailId(String rehabilitationDetailId) {
        this.rehabilitationDetailId = rehabilitationDetailId;
    }
    @Column(name = "patient_code")
    public String getPatientCode() {
        return patientCode;
    }
    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }
    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    @Column(name = "doctor_code")
    public String getDoctorCode() {
        return doctorCode;
    }
    public void setDoctorCode(String doctorCode) {
        this.doctorCode = doctorCode;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    @Column(name = "relation_record_type")
    public Integer getRelationRecordType() {
        return relationRecordType;
    }
    public void setRelationRecordType(Integer relationRecordType) {
        this.relationRecordType = relationRecordType;
    }
    @Column(name = "relation_record_code")
    public String getRelationRecordCode() {
        return relationRecordCode;
    }
    public void setRelationRecordCode(String relationRecordCode) {
        this.relationRecordCode = relationRecordCode;
    }
    @Column(name = "reserve_time")
    public Date getReserveTime() {
        return reserveTime;
    }
    public void setReserveTime(Date reserveTime) {
        this.reserveTime = reserveTime;
    }
    @Column(name = "complete_time")
    public Date getCompleteTime() {
        return completeTime;
    }
    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
}

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

@ -23,10 +23,11 @@ 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否)
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -35,6 +36,7 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
        this.saasId = saasId;
    }
    @Column(name = "title")
    public String getTitle() {
        return title;
    }
@ -43,6 +45,7 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
        this.title = title;
    }
    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
@ -51,6 +54,7 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
        this.hospital = hospital;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
@ -59,14 +63,16 @@ public class RehabilitationPlanTemplateDO extends UuidIdentityEntityWithOperator
        this.hospitalName = hospitalName;
    }
    public Integer getAdminTeamCode() {
    @Column(name = "admin_team_code")
    public Long getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(Integer adminTeamCode) {
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

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

@ -21,6 +21,7 @@ public class RehabilitationTemplateDetailDO extends UuidIdentityEntityWithOperat
    @Column(name = "hospital_service_item_id")
    private String hospitalServiceItemId;//机构服务项目id
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -29,6 +30,7 @@ public class RehabilitationTemplateDetailDO extends UuidIdentityEntityWithOperat
        this.saasId = saasId;
    }
    @Column(name = "template_id")
    public String getTemplateId() {
        return templateId;
    }
@ -37,6 +39,7 @@ public class RehabilitationTemplateDetailDO extends UuidIdentityEntityWithOperat
        this.templateId = templateId;
    }
    @Column(name = "hospital_service_item_id")
    public String getHospitalServiceItemId() {
        return hospitalServiceItemId;
    }

+ 3 - 9
common/common-exception/src/main/java/com/yihu/jw/exception/ApiException.java

@ -26,6 +26,7 @@ public class ApiException extends RuntimeException {
    private Integer errorCode = -10000;
    public ApiException() {
        super();
    }
    public ApiException(String message) {
@ -37,16 +38,9 @@ public class ApiException extends RuntimeException {
        this.errorCode = errorCode;
    }
    public ApiException(String message, Throwable cause) {
    public ApiException(String message, Integer errorCode, Throwable cause) {
        super(message, cause);
    }
    public ApiException(Throwable cause) {
        super(cause);
    }
    public ApiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorCode = errorCode;
    }
    public Integer getErrorCode() {

+ 1 - 0
common/common-fegin/pom.xml

@ -33,6 +33,7 @@
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model-es</artifactId>
            <version>${parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>

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

@ -137,6 +137,49 @@ 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";
    }
    /**
     * 家庭成员管理
     */

+ 20 - 2
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";
@ -63,6 +63,17 @@ public class SpecialistMapping {
        public static final String createPatientRehabilitationPlan = "/createPatientRehabilitationPlan";
        public static final String createServiceQrCode ="/createServiceQrCode";
        public static final String checkAfterQrCode = "checkAfterQrCode";
        public static final String findRehabilitationPlanList = "/findRehabilitationPlanList";
        public static final String findRehabilitationPlanDetailList = "/findRehabilitationPlanDetailList";
        public static final String calendarPlanDetail = "/calendarPlanDetail";
        public static final String calendarPlanDetailList = "/calendarPlanDetailList";
        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";
    }
@ -71,5 +82,12 @@ public class SpecialistMapping {
        public static final String getServiceItem = "/getServiceItem";
        public static final String batchDelete = "/batchDelete";
        public static final String updateServiceItem = "/updateServiceItem";
        public static final String createEvaluate = "/createEvaluate";
        public static final String getEvaluate = "/getEvaluate";
        public static final String updateEvaluate = "/updateEvaluate";
        public static final String createHospitalServiceItem = "/createHospitalServiceItem";
        public static final String selectByHospital = "/selectByHospital";
        public static final String selectById="/selectById";
        public static final String selectItemByHospital= "/selectItemByHospital";
    }
}

+ 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;
    }
}

+ 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;
    }
}

+ 46 - 16
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsGatewayVO.java

@ -12,8 +12,8 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "SmsGatewayVO", description = "短信网关")
public class SmsGatewayVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "402803ee656498890165649ad2da0000")
    private String saasId;
    @ApiModelProperty(value = "client id", example = "EwC0iRSrcS")
    private String clientId;
    @ApiModelProperty(value = "网关名称", example = "基础短信网关")
    private String name;
    @ApiModelProperty(value = "短信接口的账号", example = "user123")
@ -22,19 +22,25 @@ public class SmsGatewayVO extends UuidIdentityVO {
    private String password;
    @ApiModelProperty(value = "官网地址", example = "http://www.smsgateway.com")
    private String website;
    @ApiModelProperty(value = "超时时间(分钟)", example = "10")
    private Integer expireMin;
    @ApiModelProperty(value = "短信接口调用的地址", example = "http://www.smsgateway.com/api/v1.0")
    private String url;
    private String requestUrl;
    @ApiModelProperty(value = "调用凭证(json串)", example = "{\"app_id\":\"EwC0iRSrcS\",\"signature\":\"iREOlyuyKfRBIGOHbBGJ\"}")
    private String certificate;
    private String requestCertificate;
    @ApiModelProperty(value = "短信接口调用状态标识", example = "result")
    private String responseCode;
    @ApiModelProperty(value = "调用成功的状态码", example = "0")
    private String successValue;
    @ApiModelProperty(value = "状态", example = "available")
    private SmsGatewayDO.Status status;
    public String getSaasId() {
        return saasId;
    public String getClientId() {
        return clientId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    public String getName() {
@ -69,20 +75,44 @@ public class SmsGatewayVO extends UuidIdentityVO {
        this.website = website;
    }
    public String getUrl() {
        return url;
    public Integer getExpireMin() {
        return expireMin;
    }
    public void setUrl(String url) {
        this.url = url;
    public void setExpireMin(Integer expireMin) {
        this.expireMin = expireMin;
    }
    public String getCertificate() {
        return certificate;
    public String getRequestUrl() {
        return requestUrl;
    }
    public void setCertificate(String certificate) {
        this.certificate = certificate;
    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }
    public String getRequestCertificate() {
        return requestCertificate;
    }
    public void setRequestCertificate(String requestCertificate) {
        this.requestCertificate = requestCertificate;
    }
    public String getResponseCode() {
        return responseCode;
    }
    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }
    public String getSuccessValue() {
        return successValue;
    }
    public void setSuccessValue(String successValue) {
        this.successValue = successValue;
    }
    public SmsGatewayDO.Status getStatus() {

+ 56 - 51
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java

@ -1,68 +1,73 @@
package com.yihu.jw.restmodel.base.sms;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * Created by chenweida on 2017/5/22.
 * VO - 短信记录
 * Created by progr1mmer on 2018/8/28.
 */
public class SmsVO {
    private String id;
    private String saasId;	//saasid 关联base_saas code
    private String mobile;	//电话号码
    private String ip;	//发送短信的ip地址
    private Integer type;	//发送短信的类别
    private String captcha;	//验证码 1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录
    private String content;	// 短信内容
    private Date deadline;	//过期时间
    private Integer status;	//短信状态 状态,0未发送,1已发送
    private Date czrq; //操作时间
    public String getId() {
        return id;
    }
@ApiModel(value = "SmsVO", description = "短信记录")
public class SmsVO extends UuidIdentityVO {
    public void setId(String id) {
        this.id = id;
    }
    //应用ID
    @ApiModelProperty(value = "应用ID", example = "EwC0iRSrcS")
    private String clientId;
    //使用的网关
    @ApiModelProperty(value = "使用的网关", example = "402803f9657fa37b01657fb58b9b0000")
    private String smsGatewayId;
    //请求的ip地址
    @ApiModelProperty(value = "请求的ip地址", example = "192.168.0.121")
    private String requestIp;
    //短信接收号码
    @ApiModelProperty(value = "短信接收号码", example = "18888888888")
    private String to;
    //短信内容
    @ApiModelProperty(value = "短信内容", example = "【i健康综合管理平台】您使用的是i健康综合管理平台短信模板,您的验证码是826612,请于10分钟内正确输入!")
    private String content;
    //过期时间
    @ApiModelProperty(value = "应用ID", example = "EwC0iRSrcS")
    private Date deadline;
    //验证码
    private String captcha;
    @ApiModelProperty(value = "标签", example = "login")
    private SmsTemplateDO.Type type;
    public String getSaasId() {
        return saasId;
    public String getClientId() {
        return clientId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    public String getMobile() {
        return mobile;
    public String getSmsGatewayId() {
        return smsGatewayId;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    public void setSmsGatewayId(String smsGatewayId) {
        this.smsGatewayId = smsGatewayId;
    }
    public String getIp() {
        return ip;
    public String getRequestIp() {
        return requestIp;
    }
    public void setIp(String ip) {
        this.ip = ip;
    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }
    public Integer getType() {
        return type;
    public String getTo() {
        return to;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getCaptcha() {
        return captcha;
    }
    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    public void setTo(String to) {
        this.to = to;
    }
    public String getContent() {
@ -81,19 +86,19 @@ public class SmsVO {
        this.deadline = deadline;
    }
    public Integer getStatus() {
        return status;
    public String getCaptcha() {
        return captcha;
    }
    public void setStatus(Integer status) {
        this.status = status;
    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }
    public Date getCzrq() {
        return czrq;
    public SmsTemplateDO.Type getType() {
        return type;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    public void setType(SmsTemplateDO.Type type) {
        this.type = type;
    }
}

+ 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;
    }
}

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

@ -34,7 +34,7 @@ public class UserVO extends UuidIdentityVOWithOperator {
    private String idcard;
    //手机号码
    @ApiModelProperty(value = "手机号码", example = "18888888888")
    private String phone;
    private String mobile;
    //邮箱
    @ApiModelProperty(value = "邮箱", example = "wxm@jkzl.com")
    private String email;
@ -102,12 +102,12 @@ public class UserVO extends UuidIdentityVOWithOperator {
        this.idcard = idcard;
    }
    public String getPhone() {
        return phone;
    public String getMobile() {
        return mobile;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getEmail() {

+ 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);

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

@ -34,4 +34,18 @@ public class ObjEnvelop<J> extends Envelop {
    public void setObj(J obj) {
        this.obj = obj;
    }
    public static ObjEnvelop getSuccess(String message, Object obj) {
        ObjEnvelop envelop = new ObjEnvelop();
        envelop.setMessage(message);
        envelop.setObj(obj);
        envelop.setStatus(200);
        return envelop;
    }
    public static ObjEnvelop getError(String message) {
        ObjEnvelop envelop = new ObjEnvelop();
        envelop.setMessage(message);
        envelop.setStatus(-1);
        return envelop;
    }
}

+ 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);
    }

+ 95 - 0
server/svr-authentication/pom.xml

@ -12,5 +12,100 @@
    <artifactId>svr-authentication</artifactId>
    <dependencies>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <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>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <!-- Redis  -->
        <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  -->
        <!-- JdbcTemplate-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
        </dependency>
        <!-- JdbcTemplate-->
    </dependencies>
</project>

+ 7 - 0
server/svr-authentication/src/main/java/com/yihu/AuthServer.java

@ -0,0 +1,7 @@
package com.yihu;
/**
 * Created by progr1mmer on 2018/8/29.
 */
public class AuthServer {
}

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

@ -0,0 +1,14 @@
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 {
}

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

@ -0,0 +1,49 @@
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;
    }
}

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

@ -0,0 +1,60 @@
package com.yihu.jw.oauth2.core;
import com.yihu.jw.oauth2.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 java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
 * Service - 用户加载
 * Created by progr1mmer on 2018/8/29.
 */
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 = ?";
    /**
     * 用户登录判读接口
     *
     * @param username
     * @return
     * @throws UsernameNotFoundException
     */
    @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);
        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;*/
    }
    private Collection<? extends GrantedAuthority> getGrantedAuthorities(String username) {
        Collection<GrantedAuthority> authorities = new ArrayList<>(1);
        authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
        return authorities;
    }
    public WlyyUserSimple loadUserSimpleByUsername(String username) throws UsernameNotFoundException {
        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);
        }
        return users.get(0);
    }
}

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

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

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

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

+ 3 - 3
server/svr-configuration/src/main/java/com/yihu/SvrConfiguration.java

@ -11,14 +11,14 @@ import org.springframework.cloud.config.server.EnableConfigServer;
 */
@SpringBootApplication
@EnableConfigServer
public class SvrConfiguration extends SpringBootServletInitializer {
public class ConfigServer extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(SvrConfiguration.class, args);
        SpringApplication.run(ConfigServer.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SvrConfiguration.class);
        return application.sources(ConfigServer.class);
    }
}

+ 3 - 3
server/svr-discovery/src/main/java/com/yihu/SvrDiscovery.java

@ -11,14 +11,14 @@ import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
 */
@SpringBootApplication
@EnableEurekaServer
public class SvrDiscovery extends SpringBootServletInitializer {
public class DiscoveryServer extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(SvrDiscovery.class, args);
        SpringApplication.run(DiscoveryServer.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SvrDiscovery.class);
        return application.sources(DiscoveryServer.class);
    }
}

+ 2 - 2
server/svr-zipkin/src/main/java/com/yihu/SvrZipkin.java

@ -9,9 +9,9 @@ import zipkin.server.EnableZipkinServer;
 */
@SpringBootApplication
@EnableZipkinServer
public class SvrZipkin {
public class ZipkinTrackServer {
    public static void main(String[] args) {
        SpringApplication.run(SvrZipkin.class, args);
        SpringApplication.run(ZipkinTrackServer.class, args);
    }
}

+ 71 - 0
svr/svr-base/doc/es/服务包执行日志记录索引.txt

@ -0,0 +1,71 @@
创建索引
POST  http://172.19.103.68:9200/base_service_package_log
查询索引
GET http://172.19.103.68:9200/base_service_package_log/
给索引加mapping
POST http://172.19.103.68:9200/base_service_package_log/base_service_package_log/_mapping
{
	"base_service_package_log": {
		"properties": {
			"createTime": {
			    "format": "yyyy-MM-dd HH:mm:ss",
				"type": "date"
			},
            "id": {
                "type": "string",
                "index": "not_analyzed"
            },
			"saasId": {
				"type": "string",
				"index": "not_analyzed"
			},"sevicePackageId": {
				"type": "string",
				"index": "not_analyzed"
            },"sevicePackageDetailId": {
                "type": "string",
                "index": "not_analyzed"
			},"userCode": {
                "type": "string",
                "index": "not_analyzed"
            },"userName": {
                "type": "string",
                "index": "not_analyzed"
            },"userType": {
                "type": "string",
                "index": "not_analyzed"
            },"relationType": {
                "type": "string",
                "index": "not_analyzed"
            },"relationId": {
                "type": "string",
                "index": "not_analyzed"
            },"message": {
                "type": "string",
                "index": "not_analyzed"
            },"flag": {
                "type": "integer"
            },"finish": {
				"type": "integer"
			},"ext": {
                 "type": "string",
                 "index": "not_analyzed"
            }
		}
	}
}
字段说明:
"id": uuid
"createTime": 时间
"saasId": saasid
"sevicePackageId": 服务包id
"sevicePackageDetailId": 服务包明细id
"userCode": 医生或者患者code
"userName": 医生或者患者name
"userType": 1 患者 2医生
"relationType": 关联类型(1健康指导,2健康文章,3代预约)
"relationId": 关联id
"message": 操作说明
"flag": 操作是否成功 1成功 0失败
"finish": 完成项目数
"ext": 扩展字段存json

+ 5 - 0
svr/svr-base/pom.xml

@ -100,6 +100,11 @@
            <artifactId>mysql-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>elasticsearch-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>

+ 11 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/ImGetuiConfigDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.base.dao;
import com.yihu.jw.entity.base.im.ImGetuiConfigDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author yeshijie on 2018/8/29.
 */
public interface ImGetuiConfigDao extends PagingAndSortingRepository<ImGetuiConfigDO, String>, JpaSpecificationExecutor<ImGetuiConfigDO> {
}

+ 5 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/SmsGatewayDao.java

@ -4,9 +4,14 @@ import com.yihu.jw.entity.base.sms.SmsGatewayDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Dao - 短信网关
 * Created by progr1mmer on 2018/8/23.
 */
public interface SmsGatewayDao extends PagingAndSortingRepository<SmsGatewayDO, String>, JpaSpecificationExecutor<SmsGatewayDO> {
    List<SmsGatewayDO> findByClientIdAndStatus(String clientId, SmsGatewayDO.Status status);
}

+ 4 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/SmsTemplateDao.java

@ -4,10 +4,14 @@ import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Dao - 短信模板
 * Created by progr1mmer on 2018/8/23.
 */
public interface SmsTemplateDao extends PagingAndSortingRepository<SmsTemplateDO, String>, JpaSpecificationExecutor<SmsTemplateDO> {
    List<SmsTemplateDO> findByClientIdAndType(String clientId, SmsTemplateDO.Type type);
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
public interface ServicePackageDao extends PagingAndSortingRepository<ServicePackageDO, String>, JpaSpecificationExecutor<ServicePackageDO> {
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailTimeDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDetailTimeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
public interface ServicePackageDetailTimeDao extends PagingAndSortingRepository<ServicePackageDetailTimeDO, String>, JpaSpecificationExecutor<ServicePackageDetailTimeDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailsDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDetailsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
public interface ServicePackageDetailsDao extends PagingAndSortingRepository<ServicePackageDetailsDO, String>, JpaSpecificationExecutor<ServicePackageDetailsDO> {
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageNormcatDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageNormcatDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
public interface ServicePackageNormcatDao extends PagingAndSortingRepository<ServicePackageNormcatDO, String>, JpaSpecificationExecutor<ServicePackageNormcatDO> {
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackagePropDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
public interface ServicePackagePropDao extends PagingAndSortingRepository<ServicePackagePropDO, String>, JpaSpecificationExecutor<ServicePackagePropDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropvalueDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackagePropvalueDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
public interface ServicePackagePropvalueDao extends PagingAndSortingRepository<ServicePackagePropvalueDO, String>, JpaSpecificationExecutor<ServicePackagePropvalueDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSignRecordDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
public interface ServicePackageSignRecordDao extends PagingAndSortingRepository<ServicePackageSignRecordDO, String>, JpaSpecificationExecutor<ServicePackageSignRecordDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSkuDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSkuDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
public interface ServicePackageSkuDao extends PagingAndSortingRepository<ServicePackageSkuDO, String>, JpaSpecificationExecutor<ServicePackageSkuDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.statistics;
import com.yihu.jw.entity.base.statistics.DimensionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
public interface DimensionDao extends PagingAndSortingRepository<DimensionDO, String>, JpaSpecificationExecutor<DimensionDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionQuotaDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.statistics;
import com.yihu.jw.entity.base.statistics.DimensionQuotaDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
public interface DimensionQuotaDao extends PagingAndSortingRepository<DimensionQuotaDO, String>, JpaSpecificationExecutor<DimensionQuotaDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/JobConfigDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.statistics;
import com.yihu.jw.entity.base.statistics.JobConfigDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
public interface JobConfigDao extends PagingAndSortingRepository<JobConfigDO, String>, JpaSpecificationExecutor<JobConfigDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/QuotaDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.statistics;
import com.yihu.jw.entity.base.statistics.QuotaDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
public interface QuotaDao extends PagingAndSortingRepository<QuotaDO, String>, JpaSpecificationExecutor<QuotaDO> {
}

+ 94 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/im/ImGetuiConfigEndpiont.java

@ -0,0 +1,94 @@
package com.yihu.jw.base.endpoint.im;
import com.yihu.jw.base.service.ImGetuiConfigService;
import com.yihu.jw.entity.base.im.ImGetuiConfigDO;
import com.yihu.jw.restmodel.base.im.ImGetuiConfigVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author yeshijie on 2018/8/29.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.ImGetuiConfig.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "im管理", description = "im管理服务接口", tags = {"wlyy基础服务 - im管理服务接口"})
public class ImGetuiConfigEndpiont extends EnvelopRestEndpoint {
    @Autowired
    private ImGetuiConfigService imGetuiConfigService;
    @PostMapping(value = BaseRequestMapping.ImGetuiConfig.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<ImGetuiConfigVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ImGetuiConfigDO imGetuiConfigDO = toEntity(jsonData, ImGetuiConfigDO.class);
        imGetuiConfigDO = imGetuiConfigService.save(imGetuiConfigDO);
        return success(convertToModel(imGetuiConfigDO, ImGetuiConfigVO.class));
    }
    @PostMapping(value = BaseRequestMapping.ImGetuiConfig.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        imGetuiConfigService.delete(ids);
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.ImGetuiConfig.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<ImGetuiConfigVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ImGetuiConfigDO imGetuiConfigDO = toEntity(jsonData, ImGetuiConfigDO.class);
        if (null == imGetuiConfigDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        imGetuiConfigDO = imGetuiConfigService.save(imGetuiConfigDO);
        return success(convertToModel(imGetuiConfigDO, ImGetuiConfigVO.class));
    }
    @GetMapping(value = BaseRequestMapping.ImGetuiConfig.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<ImGetuiConfigVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<ImGetuiConfigDO> list = imGetuiConfigService.search(fields, filters, sorts, page, size);
        int count = (int)imGetuiConfigService.getCount(filters);
        return success(list, count, page, size, ImGetuiConfigVO.class);
    }
    @GetMapping(value = BaseRequestMapping.ImGetuiConfig.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ImGetuiConfigVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<ImGetuiConfigDO> list = imGetuiConfigService.search(fields, filters, sorts);
        return success(list, ImGetuiConfigVO.class);
    }
}

+ 70 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/RehabilitationEndpoint.java

@ -0,0 +1,70 @@
package com.yihu.jw.base.endpoint.servicePackage;
import com.yihu.jw.base.service.servicePackage.ServicePackageService;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.restmodel.base.servicePackage.RehabilitationVO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageLogVO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * @author yeshijie on 2018/8/30.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.BaseRehabilitation.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "康复计划管理", description = "康复计划管理服务接口", tags = {"wlyy基础服务 - 康复计划管理服务接口"})
public class RehabilitationEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ServicePackageService servicePackageService;
    @PostMapping(value = BaseRequestMapping.BaseRehabilitation.CREATE)
    @ApiOperation(value = "创建")
    public Envelop create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestBody String jsonData) {
        try {
            RehabilitationVO rehabilitationVO = toEntity(jsonData, RehabilitationVO.class);
            ServicePackageSignRecordDO signRecordDO = convertToModel(rehabilitationVO.getSignRecordVO(), ServicePackageSignRecordDO.class);
            ServicePackageDO servicePackageDO = servicePackageService.addRehabilitation(rehabilitationVO,signRecordDO);
            return success(convertToModel(servicePackageDO, ServicePackageVO.class));
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("创建失败");
        }
    }
    @PostMapping(value = BaseRequestMapping.BaseRehabilitation.CREATELOG)
    @ApiOperation(value = "新增服务包日志")
    public Envelop addRehabilitationLog(@ApiParam(name = "jsonData", value = "Json数据", required = true)
                          @RequestBody String jsonData){
        try{
            ServicePackageLogVO logVO = toEntity(jsonData,ServicePackageLogVO.class);
            return success(servicePackageService.addRehabilitationLog(logVO));
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("新增失败");
        }
    }
    @GetMapping(value = BaseRequestMapping.BaseRehabilitation.FINDBYID)
    @ApiOperation(value = "查找完成度")
    public Envelop getFinish(@ApiParam(name = "servicePackId", value = "服务包id", required = true)
                             @RequestParam(value = "servicePackId") String servicePackId){
        try {
            return success(servicePackageService.getFinish(servicePackId));
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("获取失败");
        }
    }
}

+ 94 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageEndpoint.java

@ -0,0 +1,94 @@
package com.yihu.jw.base.endpoint.servicePackage;
import com.yihu.jw.base.service.servicePackage.ServicePackageService;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author yeshijie on 2018/8/29.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.ServicePackage.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "服务包管理", description = "服务包管理服务接口", tags = {"wlyy基础服务 - 服务包管理服务接口"})
public class ServicePackageEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ServicePackageService servicePackageService;
    @PostMapping(value = BaseRequestMapping.ServicePackage.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<ServicePackageVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ServicePackageDO servicePackageDO = toEntity(jsonData, ServicePackageDO.class);
        servicePackageDO = servicePackageService.save(servicePackageDO);
        return success(convertToModel(servicePackageDO, ServicePackageVO.class));
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        servicePackageService.delete(ids);
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<ServicePackageVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ServicePackageDO servicePackageDO = toEntity(jsonData, ServicePackageDO.class);
        if (null == servicePackageDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        servicePackageDO = servicePackageService.save(servicePackageDO);
        return success(convertToModel(servicePackageDO, ServicePackageVO.class));
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<ServicePackageVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<ServicePackageDO> servicePackageDOS = servicePackageService.search(fields, filters, sorts, page, size);
        int count = (int)servicePackageService.getCount(filters);
        return success(servicePackageDOS, count, page, size, ServicePackageVO.class);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ServicePackageVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<ServicePackageDO> servicePackageDOS = servicePackageService.search(fields, filters, sorts);
        return success(servicePackageDOS, ServicePackageVO.class);
    }
}

+ 10 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsGatewayEndpoint.java

@ -1,8 +1,11 @@
package com.yihu.jw.base.endpoint.sms;
import com.yihu.jw.base.service.SmsGatewayService;
import com.yihu.jw.entity.base.sms.SmsDO;
import com.yihu.jw.entity.base.sms.SmsGatewayDO;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.restmodel.base.sms.SmsGatewayVO;
import com.yihu.jw.restmodel.base.sms.SmsVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -93,16 +96,16 @@ public class SmsGatewayEndpoint extends EnvelopRestEndpoint {
        return success(smsGatewayDOS, SmsGatewayVO.class);
    }
    @GetMapping(value = BaseRequestMapping.SmsGateway.SEND)
    @PostMapping(value = BaseRequestMapping.SmsGateway.SEND)
    @ApiOperation(value = "发送短信")
    public Envelop send (
    public ObjEnvelop<SmsVO> send (
            @ApiParam(name = "clientId", value = "应用ID", required = true)
            @RequestParam(value = "clientId") String clientId,
            @ApiParam(name = "type", value = "短信标签类型", required = true)
            @RequestParam(value = "type") Integer type,
            @ApiParam(name = "mobile", value = "手机号码", required = true)
            @RequestParam(value = "mobile") String mobile) {
        return success("");
            @RequestParam(value = "type") SmsTemplateDO.Type type,
            @ApiParam(name = "to", value = "手机号码", required = true)
            @RequestParam(value = "to") String to) throws Exception {
        SmsDO smsDO = smsGatewayService.send(clientId, type, to);
        return success(smsDO, SmsVO.class);
    }
}

+ 95 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/DimensionEndpoint.java

@ -0,0 +1,95 @@
package com.yihu.jw.base.endpoint.statistics;
import com.yihu.jw.base.service.statistics.DimensionService;
import com.yihu.jw.entity.base.statistics.DimensionDO;
import com.yihu.jw.restmodel.base.statistics.DimensionVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.Dimension.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "统计维度管理", description = "统计维度管理服务接口", tags = {"wlyy基础服务 - 统计维度管理服务接口"})
public class DimensionEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private DimensionService dimensionService;
    @PostMapping(value = BaseRequestMapping.Dimension.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<DimensionVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        DimensionDO dimensionDO = toEntity(jsonData, DimensionDO.class);
        dimensionDO = dimensionService.save(dimensionDO);
        return success(convertToModel(dimensionDO, DimensionVO.class));
    }
    @PostMapping(value = BaseRequestMapping.Dimension.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        dimensionService.delete(ids);
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.Dimension.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<DimensionVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        DimensionDO dimensionDO = toEntity(jsonData, DimensionDO.class);
        if (null == dimensionDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        dimensionDO = dimensionService.save(dimensionDO);
        return success(convertToModel(dimensionDO, DimensionVO.class));
    }
    @GetMapping(value = BaseRequestMapping.Dimension.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<DimensionVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<DimensionDO> dimensionDOList = dimensionService.search(fields, filters, sorts, page, size);
        int count = (int)dimensionService.getCount(filters);
        return success(dimensionDOList, count, page, size, DimensionVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Dimension.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<DimensionVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<DimensionDO> dimensionDOList = dimensionService.search(fields, filters, sorts);
        return success(dimensionDOList, DimensionVO.class);
    }
}

+ 95 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/JobConfigEndpoint.java

@ -0,0 +1,95 @@
package com.yihu.jw.base.endpoint.statistics;
import com.yihu.jw.base.service.statistics.JobConfigService;
import com.yihu.jw.entity.base.statistics.JobConfigDO;
import com.yihu.jw.restmodel.base.statistics.JobConfigVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.JobConfig.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "统计job配置管理", description = "统计job配置管理服务接口", tags = {"wlyy基础服务 - 统计job配置管理服务接口"})
public class JobConfigEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private JobConfigService jobConfigService;
    @PostMapping(value = BaseRequestMapping.ServicePackage.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<JobConfigVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        JobConfigDO jobConfigDO = toEntity(jsonData, JobConfigDO.class);
        jobConfigDO = jobConfigService.save(jobConfigDO);
        return success(convertToModel(jobConfigDO, JobConfigVO.class));
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        jobConfigService.delete(ids);
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<JobConfigVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        JobConfigDO jobConfigDO = toEntity(jsonData, JobConfigDO.class);
        if (null == jobConfigDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        jobConfigDO = jobConfigService.save(jobConfigDO);
        return success(convertToModel(jobConfigDO, JobConfigVO.class));
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<JobConfigVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<JobConfigDO> jobConfigDOList = jobConfigService.search(fields, filters, sorts, page, size);
        int count = (int)jobConfigService.getCount(filters);
        return success(jobConfigDOList, count, page, size, JobConfigVO.class);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<JobConfigVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<JobConfigDO> jobConfigDOList = jobConfigService.search(fields, filters, sorts);
        return success(jobConfigDOList, JobConfigVO.class);
    }
}

+ 95 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/QuotaEndpoint.java

@ -0,0 +1,95 @@
package com.yihu.jw.base.endpoint.statistics;
import com.yihu.jw.base.service.statistics.QuotaService;
import com.yihu.jw.entity.base.statistics.QuotaDO;
import com.yihu.jw.restmodel.base.statistics.QuotaVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 *
 * @author yeshijie on 2018/8/31.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.Quota.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "统计指标管理", description = "统计指标管理服务接口", tags = {"wlyy基础服务 - 统计指标管理服务接口"})
public class QuotaEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private QuotaService quotaService;
    @PostMapping(value = BaseRequestMapping.Quota.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<QuotaVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        QuotaDO quotaDO = toEntity(jsonData, QuotaDO.class);
        quotaDO = quotaService.save(quotaDO);
        return success(convertToModel(quotaDO, QuotaVO.class));
    }
    @PostMapping(value = BaseRequestMapping.Quota.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        quotaService.delete(ids);
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.Quota.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<QuotaVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        QuotaDO quotaDO = toEntity(jsonData, QuotaDO.class);
        if (null == quotaDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        quotaDO = quotaService.save(quotaDO);
        return success(convertToModel(quotaDO, QuotaVO.class));
    }
    @GetMapping(value = BaseRequestMapping.Quota.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<QuotaVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<QuotaDO> quotaDOList = quotaService.search(fields, filters, sorts, page, size);
        int count = (int)quotaService.getCount(filters);
        return success(quotaDOList, count, page, size, QuotaVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Quota.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<QuotaVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<QuotaDO> quotaDOList = quotaService.search(fields, filters, sorts);
        return success(quotaDOList, QuotaVO.class);
    }
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/ImGetuiConfigService.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.service;
import com.yihu.jw.base.dao.ImGetuiConfigDao;
import com.yihu.jw.entity.base.im.ImGetuiConfigDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * @author yeshijie on 2018/8/29.
 */
@Service
public class ImGetuiConfigService extends BaseJpaService<ImGetuiConfigDO, ImGetuiConfigDao> {
}

+ 111 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/SmsGatewayService.java

@ -1,9 +1,28 @@
package com.yihu.jw.base.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.base.dao.SmsDao;
import com.yihu.jw.base.dao.SmsGatewayDao;
import com.yihu.jw.base.dao.SmsTemplateDao;
import com.yihu.jw.entity.base.sms.SmsDO;
import com.yihu.jw.entity.base.sms.SmsGatewayDO;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.exception.ApiException;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.network.HttpResponse;
import com.yihu.utils.network.HttpUtils;
import com.yihu.utils.network.IPInfoUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.MalformedParameterizedTypeException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * Service - 短信网关
@ -12,4 +31,96 @@ import org.springframework.stereotype.Service;
@Service
public class SmsGatewayService extends BaseJpaService<SmsGatewayDO, SmsGatewayDao> {
    private static final Pattern PATTERN  = Pattern.compile("\\$\\{[A-Za-z0-9]+\\}");
    @Autowired
    private SmsTemplateDao smsTemplateDao;
    @Autowired
    private SmsGatewayDao smsGatewayDao;
    @Autowired
    private SmsDao smsDao;
    @Autowired
    private ObjectMapper objectMapper;
    public SmsDO send(String clientId, SmsTemplateDO.Type type, String to) throws Exception {
        List<SmsGatewayDO> smsGatewayDOS = smsGatewayDao.findByClientIdAndStatus(clientId, SmsGatewayDO.Status.available);
        if (smsGatewayDOS.size() == 0) {
            throw new ApiException("no gateway available");
        }
        List<SmsTemplateDO> smsTemplateDOS = smsTemplateDao.findByClientIdAndType(clientId, type);
        if (smsTemplateDOS.size() == 0) {
            throw new ApiException("no template available");
        }
        Random random = new Random();
        SmsGatewayDO smsGatewayDO = smsGatewayDOS.get(random.nextInt(smsGatewayDOS.size()));
        SmsTemplateDO smsTemplateDO = smsTemplateDOS.get(random.nextInt(smsTemplateDOS.size()));
        //生成内容
        String rawContent = smsTemplateDO.getContent();
        /*
         * 0 - 验证码
         * 1 - 过期时间(分钟)
         */
        String [] contentDatas = new String[] {
                randomInt(6),
                smsGatewayDO.getExpireMin().toString()
        };
        Matcher contentMatcher = PATTERN.matcher(rawContent);
        int index = 0;
        while (contentMatcher.find()) {
            String matchWord = contentMatcher.group(0);
            rawContent = rawContent.replace(matchWord, contentDatas[index]);
            index ++;
        }
        String sendContent = smsTemplateDO.getHeader() + rawContent;
        //第三方API服务请求参数
        String rawCertificate = smsGatewayDO.getRequestCertificate();
        /*
         * 0 - 接收手机号码
         * 1 - 短信内容
         */
        String [] certificateDatas = new String[] {
                to,
                sendContent
        };
        Matcher certificateMatcher = PATTERN.matcher(rawCertificate);
        index = 0;
        while (certificateMatcher.find()) {
            String matchWord = certificateMatcher.group(0);
            rawCertificate = rawCertificate.replace(matchWord, certificateDatas[index]);
            index ++;
        }
        HttpResponse httpResponse = HttpUtils.doPost(smsGatewayDO.getRequestUrl(), objectMapper.readValue(rawCertificate, Map.class));
        if (httpResponse.isSuccessFlg()) {
            Map<String, Object> response = objectMapper.readValue(httpResponse.getContent(), Map.class);
            if (response.get(smsGatewayDO.getResponseCode()).equals(smsGatewayDO.getSuccessValue())) {
                HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
                SmsDO smsDO = new SmsDO();
                smsDO.setClientId(clientId);
                smsDO.setSmsGatewayId(smsGatewayDO.getId());
                smsDO.setRequestIp(IPInfoUtils.getIPAddress(request));
                smsDO.setTo(to);
                smsDO.setContent(sendContent);
                smsDO.setDeadline(DateUtils.addMinutes(new Date(), smsGatewayDO.getExpireMin()));
                smsDO.setCaptcha(contentDatas[0]);
                smsDO.setType(type);
                return smsDao.save(smsDO);
            } else {
                throw new ApiException(httpResponse.getContent());
            }
        } else {
            throw new ApiException(httpResponse.getContent());
        }
    }
    private String randomInt(int length) {
        String str = "0123456789";
        StringBuffer buffer = new StringBuffer();
        Random random = new Random();
        for(int i = 0; i < length; ++i) {
            int pos = random.nextInt(str.length());
            buffer.append(str.charAt(pos));
        }
        return buffer.toString();
    }
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailTimeService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDetailTimeDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDetailTimeDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@Service
public class ServicePackageDetailTimeService extends BaseJpaService<ServicePackageDetailTimeDO, ServicePackageDetailTimeDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailsService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDetailsDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDetailsDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@Service
public class ServicePackageDetailsService extends BaseJpaService<ServicePackageDetailsDO, ServicePackageDetailsDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageNormcatService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageNormcatDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageNormcatDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@Service
public class ServicePackageNormcatService extends BaseJpaService<ServicePackageNormcatDO, ServicePackageNormcatDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackagePropDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackagePropDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@Service
public class ServicePackagePropService extends BaseJpaService<ServicePackagePropDO, ServicePackagePropDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropvalueService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackagePropvalueDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackagePropvalueDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@Service
public class ServicePackagePropvalueService extends BaseJpaService<ServicePackagePropvalueDO, ServicePackagePropvalueDao> {
}

+ 158 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageService.java

@ -0,0 +1,158 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.elasticsearch.ElasticSearchHelper;
import com.yihu.elasticsearch.ElasticSearchUtil;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDetailsDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageSignRecordDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDetailsDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.restmodel.base.servicePackage.RehabilitationVO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageLogVO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageVO;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ServicePackageService extends BaseJpaService<ServicePackageDO, ServicePackageDao> {
    private Logger logger = LoggerFactory.getLogger(ServicePackageService.class);
    @Autowired
    private ServicePackageDao servicePackageDao;
    @Autowired
    private ServicePackageDetailsDao servicePackageDetailsDao;
    @Autowired
    private ServicePackageSignRecordDao servicePackageSignRecordDao;
    @Autowired
    private ElasticSearchUtil elasticSearchUtil;
    @Autowired
    private ElasticSearchHelper elastricSearchHelper;
    @Value("${es.index.servicePackLog}")
    private String servicePackLongIndex;
    @Value("${es.type.servicePackLog}")
    private String servicePackLongType;
    /**
     * 新增康复计划
     */
    public ServicePackageDO addRehabilitation(RehabilitationVO rehabilitationVO,ServicePackageSignRecordDO signRecordDO) throws Exception{
        ServicePackageVO servicePackageVO = rehabilitationVO.getServicePackageVO();
        ServicePackageDO servicePackageDO = convertToModelDO(servicePackageVO);
        List<ServicePackageDetailsDO> detailsDOList = servicePackageDO.getDetailsDOList();
        //新增服务包主表
        servicePackageDO.setCreateTime(new Date());
        servicePackageDO.setDel(1);
        servicePackageDO.setLevel(ServicePackageDO.Level.doctor.getValue());
        servicePackageDO.setLevelCode(servicePackageDO.getCreater());
        servicePackageDO.setStatus(ServicePackageDO.Status.pass.getValue());
        servicePackageDO.setNum(detailsDOList.size());
        servicePackageDO.setType(ServicePackageDO.Type.rehabilitation.getValue());
        servicePackageDao.save(servicePackageDO);
        //新增服务项明细表
        detailsDOList.forEach(one->{
            one.setCreateTime(new Date());
            one.setSaasId(servicePackageDO.getSaasId());
            one.setServicePackageId(servicePackageDO.getId());
        });
        servicePackageDetailsDao.save(detailsDOList);
        //新增签约服务包记录表
        signRecordDO.setCreateTime(new Date());
        signRecordDO.setServicePackageId(servicePackageDO.getId());
        signRecordDO.setStatus(ServicePackageSignRecordDO.Status.create.getValue());
        servicePackageSignRecordDao.save(signRecordDO);
        //新增服务包日志
        ServicePackageLogVO logVO = new ServicePackageLogVO();
        logVO.setCreateTime(new Date());
        logVO.setFlag(ServicePackageLogVO.Flag.success.getValue());
        logVO.setFinish(0);
        logVO.setId(getCode());
        logVO.setMessage(signRecordDO.getSignDoctorName()+"新增了一条康复计划");
        logVO.setSaasId(servicePackageVO.getSaasId());
        logVO.setSevicePackageId(servicePackageDO.getId());
        logVO.setUserType(ServicePackageLogVO.UserType.doctor.getValue());
        logVO.setUserCode(signRecordDO.getSignDoctor());
        logVO.setUserName(signRecordDO.getSignDoctorName());
        List<ServicePackageLogVO> logVOList = new ArrayList<>(1);
        logVOList.add(logVO);
        elastricSearchHelper.save(servicePackLongIndex,servicePackLongType,logVOList);
        return servicePackageDO;
    }
    /**
     * 获取完成度
     * @param servicePackageId
     * @return
     */
    public Integer getFinish(String servicePackageId) throws Exception{
        Integer finish = 0;
        String sql = "select finish from " + servicePackLongIndex + " where servicePackageId='" + servicePackageId + "' and sevicePackageDetailId is not null order by createTime desc limit 1";
        List<Map<String, Object>> returnList = elastricSearchHelper.executeSQL(sql);
        if(returnList!=null&&returnList.size()>0){
            finish = Integer.valueOf(returnList.get(0).get("finish").toString());
        }
        return finish;
    }
    /**
     * 保存康复计划日志
     * @param logVO
     * @return
     */
    public ServicePackageLogVO addRehabilitationLog(ServicePackageLogVO logVO) throws Exception{
        logVO.setId(getCode());
        int finish = 0;
        String sql = "select finish from " + servicePackLongIndex + " where servicePackageId='" + logVO.getSevicePackageId() + "' and sevicePackageDetailId is not null order by createTime desc limit 1";
        List<Map<String, Object>> returnList = elastricSearchHelper.executeSQL(sql);
        if(returnList!=null&&returnList.size()>0){
            finish = Integer.valueOf(returnList.get(0).get("finish").toString());
            if(StringUtils.isNotBlank(logVO.getSevicePackageDetailId())){
                finish++;
            }
        }
        logVO.setCreateTime(new Date());
        logVO.setFinish(finish);
        if(logVO.getFlag()==null){
            logVO.setFlag(ServicePackageLogVO.Flag.success.getValue());
        }
        List<ServicePackageLogVO> logVOList = new ArrayList<>(1);
        logVOList.add(logVO);
        elastricSearchHelper.save(servicePackLongIndex,servicePackLongType,logVOList);
        return logVO;
    }
    /**
     * 单个转换
     * @return
     */
    public ServicePackageDO convertToModelDO(ServicePackageVO servicePackageVO){
        ServicePackageDO target = new ServicePackageDO();
        BeanUtils.copyProperties(servicePackageVO, target);
        List<ServicePackageDetailsDO> voList = convertToModels(servicePackageVO.getDetailsVOList(),new ArrayList<>(servicePackageVO.getDetailsVOList().size()),ServicePackageDetailsDO.class);
        target.setDetailsDOList(voList);
        return target;
    }
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSignRecordService.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageSignRecordDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/17.
 */
@Service
public class ServicePackageSignRecordService extends BaseJpaService<ServicePackageSignRecordDO, ServicePackageSignRecordDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSkuService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageSkuDao;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSkuDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 *
 * @author yeshijie on 2018/8/29.
 */
@Service
public class ServicePackageSkuService extends BaseJpaService<ServicePackageSkuDO, ServicePackageSkuDao> {
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionQuotaService.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.service.statistics;
import com.yihu.jw.base.dao.statistics.DimensionQuotaDao;
import com.yihu.jw.entity.base.statistics.DimensionQuotaDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * 统计维度指标表
 * @author yeshijie on 2018/8/31.
 */
@Service
public class DimensionQuotaService extends BaseJpaService<DimensionQuotaDO, DimensionQuotaDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.statistics;
import com.yihu.jw.base.dao.statistics.DimensionDao;
import com.yihu.jw.entity.base.statistics.DimensionDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * 统计维度表
 * @author yeshijie on 2018/8/31.
 */
@Service
public class DimensionService extends BaseJpaService<DimensionDO, DimensionDao> {
}

+ 0 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/JobConfigService.java


Some files were not shown because too many files changed in this diff