Quellcode durchsuchen

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

Conflicts:
	common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/RehabilitationTemplateDetailDO.java
yeshijie vor 4 Jahren
Ursprung
Commit
35bcd7b05c
40 geänderte Dateien mit 376 neuen und 2546 gelöschten Zeilen
  1. 61 176
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java
  2. 0 49
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailTimeDO.java
  3. 0 97
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDetailsDO.java
  4. 99 18
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageItemDO.java
  5. 0 125
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageNormcatDO.java
  6. 0 153
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropDO.java
  7. 0 124
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackagePropvalueDO.java
  8. 0 124
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSkuDO.java
  9. 0 34
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/RehabilitationVO.java
  10. 0 46
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailTimeVO.java
  11. 0 98
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageDetailsVO.java
  12. 0 213
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java
  13. 0 106
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageNormcatVO.java
  14. 0 156
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropVO.java
  15. 0 126
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackagePropvalueVO.java
  16. 0 196
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSignRecordVO.java
  17. 0 133
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageSkuVO.java
  18. 0 151
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageVO.java
  19. 6 0
      svr/svr-base/pom.xml
  20. 1 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDao.java
  21. 0 13
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailTimeDao.java
  22. 0 14
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageDetailsDao.java
  23. 25 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageItemDao.java
  24. 0 13
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageNormcatDao.java
  25. 0 13
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropDao.java
  26. 0 14
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackagePropvalueDao.java
  27. 0 14
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageSkuDao.java
  28. 0 55
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/RehabilitationEndpoint.java
  29. 40 22
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageEndpoint.java
  30. 40 34
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageNormcatEndpoint.java
  31. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/system/SystemDictEntryEndpoint.java
  32. 0 8
      svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java
  33. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailTimeService.java
  34. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageDetailsService.java
  35. 64 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageItemService.java
  36. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageNormcatService.java
  37. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropService.java
  38. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackagePropvalueService.java
  39. 38 123
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageService.java
  40. 0 16
      svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSkuService.java

+ 61 - 176
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java

@ -1,12 +1,16 @@
package com.yihu.jw.entity.base.servicePackage;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.team.BaseTeamDO;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -18,125 +22,20 @@ import java.util.List;
@Table(name = "base_service_package")
public class ServicePackageDO extends UuidIdentityEntity implements Serializable {
    public enum Level {
        system("系统", "0"),
        hospital("社区", "1"),
        saas("租户", "2");
        private String name;
        private String value;
    private String name;//'服务包名称'
    private String type;//服务类型(1养老服务、2医疗服务、3安防监护、4慢病管理)
    private BigDecimal price;//价格
    private String introduce;//'服务介绍'
    private String del;//'是否有效(1生效,0失效)'
    private Date createTime;//'创建时间'
        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;
        }
    }
    private String provinceCode;
    private String provinceName;
    private String cityCode;
    private String cityName;
    private String saasId;
    private String name;//服务包名称
    private Integer num;//服务项数量
    private Long price;//预售价//单位分
    private String organization;//发布机构
    private String organizationName;//发布机构名称
    private String level;//服务包级别(0系统,1.医生,2团队,3社区,4区)
    private String creater;//创建者
    private Date createTime;//创建时间
    private String introduce;//服务介绍
    private String endIntroduce;//过期时间说明
    private String status;//审核状态(预留字段0待审核,1审核通过,2审核不通过)
    private Date endTime;//结束时间
    private Integer del;//是否有效(1有效,0失效)
    private Integer sort;//排序
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    private List<ServicePackageItemDO> packageItemDOList;//服务项
    private List<BaseOrgDO> orgDOList;//提供机构
    private List<BaseTeamDO> teamDOList;//服务团队
    private String teamNames;//服务团队
    private String orgNames;//服务机构
    @Column(name = "name")
    public String getName() {
        return name;
    }
@ -145,47 +44,25 @@ public class ServicePackageDO extends UuidIdentityEntity implements Serializable
        this.name = name;
    }
    public Integer getNum() {
        return num;
    @Column(name = "type")
    public String getType() {
        return type;
    }
    public void setNum(Integer num) {
        this.num = num;
    public void setType(String type) {
        this.type = type;
    }
    public Long getPrice() {
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }
    public void setPrice(Long price) {
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    public String getLevel() {
        return level;
    }
    public void setLevel(String level) {
        this.level = level;
    }
    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;
    }
    @Column(name = "introduce")
    public String getIntroduce() {
        return introduce;
    }
@ -194,59 +71,67 @@ public class ServicePackageDO extends UuidIdentityEntity implements Serializable
        this.introduce = introduce;
    }
    public String getStatus() {
        return status;
    @Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setStatus(String status) {
        this.status = status;
    public void setDel(String del) {
        this.del = del;
    }
    public Integer getDel() {
        return del;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "create_time", nullable = false, length = 0,updatable = false)
    public Date getCreateTime() {
        return createTime;
    }
    public void setDel(Integer del) {
        this.del = del;
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getSort() {
        return sort;
    @Transient
    public List<ServicePackageItemDO> getPackageItemDOList() {
        return packageItemDOList;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    public void setPackageItemDOList(List<ServicePackageItemDO> packageItemDOList) {
        this.packageItemDOList = packageItemDOList;
    }
    public String getEndIntroduce() {
        return endIntroduce;
    @Transient
    public List<BaseOrgDO> getOrgDOList() {
        return orgDOList;
    }
    public void setEndIntroduce(String endIntroduce) {
        this.endIntroduce = endIntroduce;
    public void setOrgDOList(List<BaseOrgDO> orgDOList) {
        this.orgDOList = orgDOList;
    }
    public String getOrganization() {
        return organization;
    @Transient
    public List<BaseTeamDO> getTeamDOList() {
        return teamDOList;
    }
    public void setOrganization(String organization) {
        this.organization = organization;
    public void setTeamDOList(List<BaseTeamDO> teamDOList) {
        this.teamDOList = teamDOList;
    }
    public String getOrganizationName() {
        return organizationName;
    @Transient
    public String getTeamNames() {
        return teamNames;
    }
    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    public void setTeamNames(String teamNames) {
        this.teamNames = teamNames;
    }
    public Date getEndTime() {
        return endTime;
    @Transient
    public String getOrgNames() {
        return orgNames;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    public void setOrgNames(String orgNames) {
        this.orgNames = orgNames;
    }
}

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

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

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

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

+ 99 - 18
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageItemDO.java

@ -1,22 +1,31 @@
package com.yihu.jw.entity.base.servicePackage;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
 * Created by Trick on 2018/11/26.
 * Created by yeshijie on 2021/2/23.
 */
@Entity
@Table(name = "base_service_package_item")
public class ServicePackageItemDO extends UuidIdentityEntityWithOperator implements java.io.Serializable {
public class ServicePackageItemDO extends UuidIdentityEntity implements java.io.Serializable {
    private String servicePackageId;//服务包ID
    private String itemName;//服务包名称
    private Double price;//价格
    private String times;//次数/频次
    private String code;//服务包code
    private String name;//服务包名称
    private BigDecimal price;//价格
    private String feeType;//'收费标准(1免费)'
    private String orgCode;//'机构编码'
    private String orgName;//'机构名称'
    private String introduce;//'服务简介'
    private String del;//是否生效(1 生效,0 失效)
    private String teamCode;//'服务团队code'
    private String teamName;//'服务团队名称'
    private String createTime;//
    @Column(name = "service_package_id")
    public String getServicePackageId() {
@ -27,30 +36,102 @@ public class ServicePackageItemDO extends UuidIdentityEntityWithOperator impleme
        this.servicePackageId = servicePackageId;
    }
    @Column(name = "item_name")
    public String getItemName() {
        return itemName;
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setItemName(String itemName) {
        this.itemName = itemName;
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "price")
    public Double getPrice() {
    public BigDecimal getPrice() {
        return price;
    }
    public void setPrice(Double price) {
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    @Column(name = "times")
    public String getTimes() {
        return times;
    @Column(name = "fee_type")
    public String getFeeType() {
        return feeType;
    }
    public void setFeeType(String feeType) {
        this.feeType = feeType;
    }
    @Column(name = "org_code")
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    @Column(name = "introduce")
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    @Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
    @Column(name = "team_code")
    public String getTeamCode() {
        return teamCode;
    }
    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }
    @Column(name = "team_name")
    public String getTeamName() {
        return teamName;
    }
    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }
    @Column(name = "create_time")
    public String getCreateTime() {
        return createTime;
    }
    public void setTimes(String times) {
        this.times = times;
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,98 +0,0 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.fasterxml.jackson.annotation.JsonFormat;
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 = "执行时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    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;
    }
}

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

@ -1,213 +0,0 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    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;
    }
}

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

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

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

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

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

@ -1,126 +0,0 @@
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 = "ServicePackagePropvalueVO", description = "服务包属性值表")
public class ServicePackagePropvalueVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saasId")
    private String saasId;
    @ApiModelProperty(value = "类目ID")
    private Long cid;//类目ID',
    @ApiModelProperty(value = "属性 ID")
    private Long pid;//属性 ID',
    @ApiModelProperty(value = "属性名")
    private String propName;//属性名',
    @ApiModelProperty(value = "属性值ID")
    private Long vid;//属性值ID',
    @ApiModelProperty(value = "属性值")
    private String name;//属性值',
    @ApiModelProperty(value = "属性值别名")
    private String nameAlias;//属性值别名',
    @ApiModelProperty(value = "是否为父类目属性")
    private Integer isParent;//是否为父类目属性',
    @ApiModelProperty(value = "排列序号")
    private Long sortOrder;//排列序号。取值范围:大于零的整数',
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "状态。可选值:1(正常),0(删除)")
    private Integer del;//',
    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;
    }
    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;
    }
    public String getNameAlias() {
        return nameAlias;
    }
    public void setNameAlias(String nameAlias) {
        this.nameAlias = nameAlias;
    }
    public Integer getIsParent() {
        return isParent;
    }
    public void setIsParent(Integer isParent) {
        this.isParent = isParent;
    }
    public Long getSortOrder() {
        return sortOrder;
    }
    public void setSortOrder(Long sortOrder) {
        this.sortOrder = sortOrder;
    }
    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;
    }
}

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

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

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

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

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

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

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

@ -182,6 +182,12 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>base-service</artifactId>
            <version>2.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>

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

@ -10,4 +10,5 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
public interface ServicePackageDao extends PagingAndSortingRepository<ServicePackageDO, String>, JpaSpecificationExecutor<ServicePackageDO> {
}

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

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

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

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

+ 25 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/servicePackage/ServicePackageItemDao.java

@ -0,0 +1,25 @@
package com.yihu.jw.base.dao.servicePackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by yeshijie on 2021/2/23.
 */
public interface ServicePackageItemDao extends PagingAndSortingRepository<ServicePackageItemDO, String>, JpaSpecificationExecutor<ServicePackageItemDO> {
    @Query("from ServicePackageItemDO w where w.teamCode =?1 and w.code=?2")
    List<ServicePackageItemDO> findByTeamCode(String teamCode,String code);
    @Query("from ServicePackageItemDO w where w.servicePackageId =?1 and w.del='1'")
    List<ServicePackageItemDO> findByServicePackageId(String servicePackageId);
    @Modifying
    @Query("delete from ServicePackageItemDO p where p.servicePackageId=?1")
    void deleteByServicePackageId(String servicePackageId);
}

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

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

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

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

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

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

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

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

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

@ -1,55 +0,0 @@
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.ObjEnvelop;
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 ObjEnvelop<ServicePackageVO> create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception{
        RehabilitationVO rehabilitationVO = toDateEntity(jsonData, RehabilitationVO.class);
        ServicePackageSignRecordDO signRecordDO = convertToModel(rehabilitationVO.getSignRecordVO(), ServicePackageSignRecordDO.class);
        ServicePackageDO servicePackageDO = servicePackageService.addRehabilitation(rehabilitationVO,signRecordDO);
        return success(convertToModel(servicePackageDO, ServicePackageVO.class));
    }
    @PostMapping(value = BaseRequestMapping.BaseRehabilitation.CREATELOG)
    @ApiOperation(value = "新增服务包日志")
    public ObjEnvelop<ServicePackageLogVO> addRehabilitationLog(@ApiParam(name = "jsonData", value = "Json数据", required = true)
                          @RequestBody String jsonData) throws Exception{
        ServicePackageLogVO logVO = toEntity(jsonData,ServicePackageLogVO.class);
        return success(servicePackageService.addRehabilitationLog(logVO));
    }
    @GetMapping(value = BaseRequestMapping.BaseRehabilitation.FINDBYID)
    @ApiOperation(value = "查找完成度",notes = "返回值中的obj=完成数")
    public ObjEnvelop getFinish(@ApiParam(name = "servicePackId", value = "服务包id", required = true)
                             @RequestParam(value = "servicePackId") String servicePackId) throws Exception{
        return success(servicePackageService.getFinish(servicePackId));
    }
}

+ 40 - 22
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageEndpoint.java

@ -1,8 +1,10 @@
package com.yihu.jw.base.endpoint.servicePackage;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageItemDao;
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.entity.base.servicePackage.ServicePackageItemDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -12,11 +14,13 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author yeshijie on 2018/8/29.
@ -28,15 +32,19 @@ public class ServicePackageEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ServicePackageService servicePackageService;
    @Autowired
    private ServicePackageDao servicePackageDao;
    @Autowired
    private ServicePackageItemDao servicePackageItemDao;
    @PostMapping(value = BaseRequestMapping.ServicePackage.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<ServicePackageVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
    public Envelop create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        ServicePackageDO servicePackageDO = toEntity(jsonData, ServicePackageDO.class);
        servicePackageDO = servicePackageService.save(servicePackageDO);
        return success(convertToModel(servicePackageDO, ServicePackageVO.class));
        servicePackageService.create(servicePackageDO);
        return success("操作成功");
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.DELETE)
@ -48,22 +56,10 @@ public class ServicePackageEndpoint extends EnvelopRestEndpoint {
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.ServicePackage.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<ServicePackageVO> update (
            @ApiParam(name = "jsonData", 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(servicePackageDO, ServicePackageVO.class);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<ServicePackageVO> page (
    public PageEnvelop<ServicePackageDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -75,13 +71,35 @@ public class ServicePackageEndpoint extends EnvelopRestEndpoint {
            @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);
        for (ServicePackageDO servicePackageDO:servicePackageDOS){
            List<ServicePackageItemDO> itemDOList = servicePackageItemDao.findByServicePackageId(servicePackageDO.getId());
            List<String> orgNames = itemDOList.stream().map(p -> p.getOrgName()).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList());
            List<String> teamNames = itemDOList.stream().map(p -> p.getTeamName()).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList());
            servicePackageDO.setOrgNames(StringUtils.join(orgNames,","));
            servicePackageDO.setTeamNames(StringUtils.join(teamNames,","));
        }
        int count = (int)servicePackageService.getCount(filters);
        return success(servicePackageDOS, count, page, size, ServicePackageVO.class);
        return success(servicePackageDOS, count, page, size);
    }
    @GetMapping(value = "findById")
    @ApiOperation(value = "按id查找")
    public ObjEnvelop<ServicePackageDO> findById (
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) throws Exception {
        ServicePackageDO servicePackageDO = servicePackageDao.findOne(id);
        List<ServicePackageItemDO> itemDOList = servicePackageItemDao.findByServicePackageId(servicePackageDO.getId());
        List<String> orgNames = itemDOList.stream().map(p -> p.getOrgName()).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList());
        List<String> teamNames = itemDOList.stream().map(p -> p.getTeamName()).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList());
        servicePackageDO.setOrgNames(StringUtils.join(orgNames,","));
        servicePackageDO.setTeamNames(StringUtils.join(teamNames,","));
        servicePackageDO.setPackageItemDOList(itemDOList);
        return success(servicePackageDO);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackage.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ServicePackageVO> list (
    public ListEnvelop<ServicePackageDO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -89,6 +107,6 @@ public class ServicePackageEndpoint extends EnvelopRestEndpoint {
            @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);
        return success(servicePackageDOS);
    }
}

+ 40 - 34
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/servicePackage/ServicePackageNormcatEndpoint.java

@ -1,69 +1,73 @@
package com.yihu.jw.base.endpoint.servicePackage;
import com.yihu.jw.base.service.servicePackage.ServicePackageNormcatService;
import com.yihu.jw.entity.base.servicePackage.ServicePackageNormcatDO;
import com.yihu.jw.restmodel.base.servicePackage.ServicePackageNormcatVO;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.service.servicePackage.ServicePackageItemService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
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.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author yeshijie on 2018/9/7.
 * @author yeshijie on 2021/2/23.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.ServicePackageNormcat.PREFIX, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "服务包类目管理", description = "服务包类目管理服务接口", tags = {"wlyy基础服务 - 服务包类目管理服务接口"})
public class ServicePackageNormcatEndpoint extends EnvelopRestEndpoint {
@RequestMapping(value = "servicePackageItem", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "服务项管理", description = "服务项管理服务接口", tags = {"wlyy基础服务 - 服务项管理服务接口"})
public class ServicePackageItemEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ServicePackageNormcatService servicePackageNormcatService;
    private ServicePackageItemService servicePackageItemService;
    @PostMapping(value = BaseRequestMapping.ServicePackageNormcat.CREATE)
    @PostMapping(value = "create")
    @ApiOperation(value = "创建")
    public ObjEnvelop<ServicePackageNormcatVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ServicePackageNormcatDO normcatDO = toEntity(jsonData, ServicePackageNormcatDO.class);
        normcatDO = servicePackageNormcatService.save(normcatDO);
        return success(convertToModel(normcatDO, ServicePackageNormcatVO.class));
    public Envelop create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        ServicePackageItemDO servicePackageItemDO = toEntity(jsonData, ServicePackageItemDO.class);
        JSONObject result = servicePackageItemService.create(servicePackageItemDO);
        if(StringUtils.endsWithIgnoreCase(ConstantUtils.FAIL,result.getString("response"))){
            return failed(result.getString("msg"));
        }
        return success(result.get("msg"));
    }
    @PostMapping(value = BaseRequestMapping.ServicePackageNormcat.DELETE)
    @PostMapping(value = "delete")
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) throws Exception{
        servicePackageNormcatService.delete(ids.split(","));
        servicePackageItemService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.ServicePackageNormcat.UPDATE)
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    public ObjEnvelop<ServicePackageNormcatVO> update (
    public ObjEnvelop<ServicePackageItemDO> update (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ServicePackageNormcatDO normcatDO = toEntity(jsonData, ServicePackageNormcatDO.class);
        if (null == normcatDO.getId()) {
            @RequestParam String jsonData) throws Exception {
        ServicePackageItemDO servicePackageItemDO = toEntity(jsonData, ServicePackageItemDO.class);
        if (null == servicePackageItemDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        normcatDO = servicePackageNormcatService.save(normcatDO);
        return success(normcatDO, ServicePackageNormcatVO.class);
        servicePackageItemDO = servicePackageItemService.save(servicePackageItemDO);
        return success(servicePackageItemDO);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackageNormcat.PAGE)
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<ServicePackageNormcatVO> page (
    public PageEnvelop<ServicePackageItemDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -74,21 +78,23 @@ public class ServicePackageNormcatEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<ServicePackageNormcatDO> normcatDOS = servicePackageNormcatService.search(fields, filters, sorts, page, size);
        int count = (int)servicePackageNormcatService.getCount(filters);
        return success(normcatDOS, count, page, size, ServicePackageNormcatVO.class);
        List<ServicePackageItemDO> servicePackageItemDOS = servicePackageItemService.search(fields, filters, sorts, page, size);
        int count = (int)servicePackageItemService.getCount(filters);
        return success(servicePackageItemDOS, count, page, size);
    }
    @GetMapping(value = BaseRequestMapping.ServicePackageNormcat.LIST)
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ServicePackageNormcatVO> list (
    public ListEnvelop<ServicePackageItemDO> 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<ServicePackageNormcatDO> normcatDOS = servicePackageNormcatService.search(fields, filters, sorts);
        return success(normcatDOS, ServicePackageNormcatVO.class);
        List<ServicePackageItemDO> servicePackageItemDOS = servicePackageItemService.search(fields, filters, sorts);
        return success(servicePackageItemDOS);
    }
}

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/system/SystemDictEntryEndpoint.java

@ -162,14 +162,14 @@ public class SystemDictEntryEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        if(StringUtils.isBlank(saasId)){
/*        if(StringUtils.isBlank(saasId)){
            saasId = defaultSaasId;
        }
        if (StringUtils.isBlank(filters)) {
            filters = "saasId=" + saasId+";";
        } else {
            filters = "saasId=" + saasId + ";" + filters;
        }
        }*/
        List<SystemDictEntryDO> systemDictEntryDOS = systemDictEntryService.search(fields, filters, sorts);
        return success(systemDictEntryDOS, SystemDictEntryVO.class);
    }

+ 0 - 8
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -3,7 +3,6 @@ package com.yihu.jw.base.service.doctor;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.tools.corba.se.idl.ExceptionEntry;
import com.yihu.jw.base.dao.dict.DictJobTitleDao;
import com.yihu.jw.base.service.dict.DictDoctorDutyService;
import com.yihu.jw.base.service.doctor.excelImport.BaseDoctorExcelDO;
@ -29,22 +28,15 @@ import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.restmodel.base.wx.WxGraphicMessageVO;
import com.yihu.jw.restmodel.base.wx.WxReplySceneVO;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

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

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

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

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

+ 64 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageItemService.java

@ -0,0 +1,64 @@
package com.yihu.jw.base.service.servicePackage;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.dao.servicePackage.ServicePackageItemDao;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
/**
 * Created by yeshijie on 2021/2/23.
 */
@Service
public class ServicePackageItemService extends BaseJpaService<ServicePackageItemDO, ServicePackageItemDao> {
    @Autowired
    private ServicePackageItemDao servicePackageItemDao;
    public JSONObject create(ServicePackageItemDO itemDO){
        JSONObject result = new JSONObject();
/*         if(StringUtils.isEmpty(itemDO.getTeamCode())){
            result.put("msg","请选择服务团队");
            result.put("response", ConstantUtils.FAIL);
            return result;
        }
       List<ServicePackageItemDO> itemDOList = servicePackageItemDao.findByTeamCode(itemDO.getTeamCode(),itemDO.getCode());
        if(itemDOList.size()>0){
            result.put("msg","该服务团队已存在此服务项,请勿重复添加");
            result.put("response", ConstantUtils.FAIL);
            return result;
        }*/
        if(StringUtil.isEmpty(itemDO.getId())){
            //新增
            itemDO.setPrice(new BigDecimal(0));
            itemDO.setServicePackageId("system");
            itemDO.setCreateTime(DateUtil.getStringDate());
            servicePackageItemDao.save(itemDO);
        }else{
            //修改
            ServicePackageItemDO oldItemDO = servicePackageItemDao.findOne(itemDO.getId());
            oldItemDO.setName(itemDO.getName());
            oldItemDO.setDel(itemDO.getDel());
            oldItemDO.setCode(itemDO.getCode());
            oldItemDO.setFeeType(itemDO.getFeeType());
            oldItemDO.setIntroduce(itemDO.getIntroduce());
            oldItemDO.setOrgCode(itemDO.getOrgCode());
            oldItemDO.setOrgName(itemDO.getOrgName());
            oldItemDO.setTeamCode(itemDO.getTeamCode());
            oldItemDO.setTeamName(itemDO.getTeamName());
            servicePackageItemDao.save(oldItemDO);
        }
        result.put("response",ConstantUtils.SUCCESS);
        result.put("msg","操作成功");
        return result;
    }
}

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

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

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

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

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

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

+ 38 - 123
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageService.java

@ -1,31 +1,25 @@
package com.yihu.jw.base.service.servicePackage;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.elasticsearch.ElasticSearchHelper;
import com.yihu.elasticsearch.ElasticSearchUtil;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageDetailsDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageItemDao;
import com.yihu.jw.base.dao.servicePackage.ServicePackageSignRecordDao;
import com.yihu.jw.base.util.ConstantUtils;
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.jw.entity.base.servicePackage.ServicePackageItemDO;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
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;
/**
 *
@ -40,124 +34,45 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
    @Autowired
    private ServicePackageDao servicePackageDao;
    @Autowired
    private ServicePackageDetailsDao servicePackageDetailsDao;
    private ServicePackageItemDao servicePackageItemDao;
    @Autowired
    private ServicePackageSignRecordDao servicePackageSignRecordDao;
    @Autowired
    private ElasticSearchUtil elasticSearchUtil;
    @Autowired
    private ElasticSearchHelper elastricSearchHelper;
    @Autowired
    private ObjectMapper objectMapper;
    @Value("${es.index.servicePackLog}")
    private String servicePackLongIndex;
    @Value("${es.type.servicePackLog}")
    private String servicePackLongType;
    @Transactional(rollbackFor = Exception.class)
    public JSONObject create(ServicePackageDO servicePackageDO){
        JSONObject result = new JSONObject();
    /**
     * 新增康复计划
     */
    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());
        String message = "新增了一条康复计划";
        if(StringUtils.isNotBlank(signRecordDO.getSignDoctorName())){
            message = signRecordDO.getSignDoctorName()+message;
        List<ServicePackageItemDO> itemDOList = servicePackageDO.getPackageItemDOList();
        if(StringUtil.isEmpty(servicePackageDO.getId())){
            //新增
            servicePackageDO.setCreateTime(new Date());
            servicePackageDao.save(servicePackageDO);
        }else{
            //修改
            ServicePackageDO oldDO = servicePackageDao.findOne(servicePackageDO.getId());
            oldDO.setName(servicePackageDO.getName());
            oldDO.setDel(servicePackageDO.getDel());
            oldDO.setType(servicePackageDO.getType());
            oldDO.setIntroduce(servicePackageDO.getIntroduce());
            servicePackageDao.save(oldDO);
            servicePackageItemDao.deleteByServicePackageId(oldDO.getId());
        }
        logVO.setMessage(message);
        logVO.setSaasId(servicePackageVO.getSaasId());
        logVO.setSevicePackageId(servicePackageDO.getId());
        logVO.setUserType(ServicePackageLogVO.UserType.doctor.getValue());
        logVO.setUserCode(signRecordDO.getSignDoctor());
        logVO.setUserName(signRecordDO.getSignDoctorName());
        elastricSearchHelper.save(servicePackLongIndex,servicePackLongType, objectMapper.writeValueAsString(logVO));*/
        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());
        List<ServicePackageItemDO> itemDOs = new ArrayList<>();
        for (ServicePackageItemDO itemDO:itemDOList){
            itemDO = servicePackageItemDao.findOne(itemDO.getId());
            ServicePackageItemDO itemDO1 = new ServicePackageItemDO();
            BeanUtils.copyProperties(itemDO,itemDO1);
            itemDO1.setId(null);
            itemDO1.setServicePackageId(servicePackageDO.getId());
            itemDO1.setCreateTime(DateUtil.getStringDate());
            itemDOs.add(itemDO1);
        }
        servicePackageItemDao.save(itemDOs);
        return finish;
        result.put("response", ConstantUtils.SUCCESS);
        result.put("msg","操作成功");
        return result;
    }
    /**
     * 保存康复计划日志
     * @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;
    }
}

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

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