Browse Source

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

Conflicts:
	svr/svr-iot/src/main/resources/application.yml
yeshijie 6 years ago
parent
commit
1032bb1d2a
67 changed files with 4573 additions and 2 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. 84 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionDO.java
  11. 86 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/DimensionQuotaDO.java
  12. 185 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/JobConfigDO.java
  13. 65 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/statistics/QuotaDO.java
  14. 43 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  15. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/im/ImGetuiConfigVO.java
  16. 34 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/RehabilitationVO.java
  17. 46 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailTimeVO.java
  18. 96 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailsVO.java
  19. 211 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java
  20. 106 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageNormcatVO.java
  21. 156 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropVO.java
  22. 124 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropvalueDO.java
  23. 196 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSignRecordVO.java
  24. 133 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSkuVO.java
  25. 151 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageVO.java
  26. 84 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionQuotaVO.java
  27. 86 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/DimensionVO.java
  28. 184 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/JobConfigVO.java
  29. 64 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/statistics/QuotaVO.java
  30. 10 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java
  31. 8 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  32. 71 0
      svr/svr-base/doc/es/服务包执行日志记录索引.txt
  33. 5 0
      svr/svr-base/pom.xml
  34. 11 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/ImGetuiConfigDao.java
  35. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDao.java
  36. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailTimeDao.java
  37. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailsDao.java
  38. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageNormcatDao.java
  39. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropDao.java
  40. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropvalueDao.java
  41. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSignRecordDao.java
  42. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSkuDao.java
  43. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionDao.java
  44. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/DimensionQuotaDao.java
  45. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/JobConfigDao.java
  46. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/statistics/QuotaDao.java
  47. 94 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/im/ImGetuiConfigEndpiont.java
  48. 70 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/RehabilitationEndpoint.java
  49. 94 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageEndpoint.java
  50. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/DimensionEndpoint.java
  51. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/JobConfigEndpoint.java
  52. 95 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/statistics/QuotaEndpoint.java
  53. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/ImGetuiConfigService.java
  54. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailTimeService.java
  55. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailsService.java
  56. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageNormcatService.java
  57. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropService.java
  58. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropvalueService.java
  59. 158 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageService.java
  60. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSignRecordService.java
  61. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSkuService.java
  62. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionQuotaService.java
  63. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/DimensionService.java
  64. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/JobConfigService.java
  65. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/statistics/QuotaService.java
  66. 31 1
      svr/svr-base/src/main/resources/application.yml
  67. 1 1
      svr/svr-iot/src/main/java/com/yihu/iot/config/jpa/IotJpa.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;
    }
}

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

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

@ -137,4 +137,47 @@ 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";
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 31 - 1
svr/svr-base/src/main/resources/application.yml

@ -22,6 +22,19 @@ spring:
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  elasticsearch: #ElasticsearchProperties
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    cluster-nodes-jest: http://172.19.103.45:9200,http://172.19.103.68:9200  #多个逗号分割
    local: false #是否本地连接
    properties: # Additional properties used to configure the client.
      enable: true
  # JEST (Elasticsearch HTTP client) (JestProperties)
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
#      uris: http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
@ -30,6 +43,7 @@ hibernate:
  implicit_naming_strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
---
spring:
  profiles: jwdev
@ -43,6 +57,12 @@ spring:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
---
spring:
  profiles: jwtest
@ -56,6 +76,11 @@ spring:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
---
spring:
  profiles: jwprod
@ -67,4 +92,9 @@ spring:
    base-url: http://192.168.131.173:${server.svr-logServer-port} #日志追踪的地址
  sleuth:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/config/jpa/IotJpa.java

@ -38,7 +38,7 @@ public class IotJpa {
        LocalContainerEntityManagerFactoryBean emfb = new LocalContainerEntityManagerFactoryBean();
        emfb.setDataSource(dataSource);
        emfb.setPackagesToScan("com.yihu.jw.iot");
        emfb.setPackagesToScan("com.yihu.jw.entity.iot");
        emfb.setPersistenceUnitName("iot");
        JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
        emfb.setJpaVendorAdapter(vendorAdapter);