Kaynağa Gözat

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

zhangdan 6 yıl önce
ebeveyn
işleme
50bae02a5d
29 değiştirilmiş dosya ile 530 ekleme ve 1010 silme
  1. 0 14
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java
  2. 15 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorHospitalDO.java
  3. 2 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxReplySceneDO.java
  4. 20 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxWechatDO.java
  5. 12 12
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java
  6. 0 285
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgDO.java
  7. 0 134
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgDeptDO.java
  8. 0 86
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgHospitalDO.java
  9. 0 147
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/BasePatientExtendDO.java
  10. 0 112
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/BasePatientWechatDO.java
  11. 0 96
      common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/WlyyAdvertisementDO.java
  12. 2 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  13. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java
  14. 0 14
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/doctor/BaseDoctorVO.java
  15. 21 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/BaseDoctorEndpoint.java
  16. 10 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/patient/BasePatientEndpoint.java
  17. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/team/BaseTeamEndpoint.java
  18. 2 1
      svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorRoleDictService.java
  19. 50 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java
  20. 27 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/patient/BasePatientService.java
  21. 17 1
      svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WechatCoreService.java
  22. 203 0
      svr/svr-base/src/main/java/com/yihu/jw/base/util/JavaBeanUtils.java
  23. 15 2
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationManageController.java
  24. 1 1
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java
  25. 5 5
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistHospitalServiceItemService.java
  26. 0 2
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistServiceItemService.java
  27. 121 94
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java
  28. 1 0
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java
  29. 3 0
      svr/svr-wlyy-specialist/src/main/resources/application.yml

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

@ -18,11 +18,6 @@ import java.util.Date;
@Table(name = "base_doctor")
public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    /**
	 * 机构id
	 */
	private String orgId;
    /**
	 * 密码
	 */
@ -160,15 +155,6 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
	 */
	private String del;
	@Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@Column(name = "password")
    public String getPassword() {
        return password;

+ 15 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorHospitalDO.java

@ -28,6 +28,11 @@ public class BaseDoctorHospitalDO extends IntegerIdentityEntity {
	 */
	private String hospName;
    /**
     * 医生标识
     */
	private String doctorCode;
    /**
	 * 医生角色标识
	 */
@ -76,7 +81,16 @@ public class BaseDoctorHospitalDO extends IntegerIdentityEntity {
        this.hospName = hospName;
    }
	@Column(name = "role_code")
    @Column(name = "doctor_code")
    public String getDoctorCode() {
        return doctorCode;
    }
    public void setDoctorCode(String doctorCode) {
        this.doctorCode = doctorCode;
    }
    @Column(name = "role_code")
    public String getRoleCode() {
        return roleCode;
    }

+ 2 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxReplySceneDO.java

@ -18,7 +18,7 @@ public class WxReplySceneDO extends UuidIdentityEntityWithOperator implements ja
    private String appOriginId;//原始ID(唯一)
    private String msgType;//微信消息类型:text,event,image,voice,video,shortvideo,location,link
    private String event;//微信事件类型:SCAN,LOCATION,CLICK,subscribe,unsubscribe
    private String scene;//图文消息/自定义消息,分组场景
    private String scene;//图文消息/自定义消息,分组场景,微信的eventKey
    private String content;//居民回复内容,消息字段
    private Integer status;//状态(-1删除 0 冻结 1可用
@ -84,4 +84,5 @@ public class WxReplySceneDO extends UuidIdentityEntityWithOperator implements ja
    public void setStatus(Integer status) {
        this.status = status;
    }
}

+ 20 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxWechatDO.java

@ -29,6 +29,8 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    private String appSecret;//'微信app_secret'
    private String appOriginId;//原始ID
    private String baseUrl;//'微信base_url'
    private String userName;//公总号登录账户
    private String password;//用户密码
    private String remark;//'备注'
@ -158,4 +160,22 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    public void setState(String state) {
        this.state = state;
    }
    @Column(name = "user_name", length = 200)
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    @Column(name = "password", length = 200)
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
}

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

@ -53,16 +53,16 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    private Integer hospitalGrade; //医院等级
    @Column(name = "three_hospitals")
    private Integer threeHospitals; //三级医院收费标准
    private Double threeHospitals; //三级医院收费标准
    @Column(name = "two_hospitals")
    private Integer twoHospitals; //二级医院收费标准
    private Double twoHospitals; //二级医院收费标准
    @Column(name = "one_hospitals")
    private Integer oneHospitals;//一级医院以及一级以下的社区医院
    private Double oneHospitals;//一级医院以及一级以下的社区医院
    @Column(name = "unit")
    private Integer unit; //计价单位
    private String unit; //计价单位
    @Column(name = "add_item")
    private String addItem;//加收项目
@ -177,38 +177,38 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    }
    @Column(name = "three_hospitals")
    public Integer getThreeHospitals() {
    public Double getThreeHospitals() {
        return threeHospitals;
    }
    public void setThreeHospitals(Integer threeHospitals) {
    public void setThreeHospitals(Double threeHospitals) {
        this.threeHospitals = threeHospitals;
    }
    @Column(name = "two_hospitals")
    public Integer getTwoHospitals() {
    public Double getTwoHospitals() {
        return twoHospitals;
    }
    public void setTwoHospitals(Integer twoHospitals) {
    public void setTwoHospitals(Double twoHospitals) {
        this.twoHospitals = twoHospitals;
    }
    @Column(name = "one_hospitals")
    public Integer getOneHospitals() {
    public Double getOneHospitals() {
        return oneHospitals;
    }
    public void setOneHospitals(Integer oneHospitals) {
    public void setOneHospitals(Double oneHospitals) {
        this.oneHospitals = oneHospitals;
    }
    @Column(name = "unit")
    public Integer getUnit() {
    public String getUnit() {
        return unit;
    }
    public void setUnit(Integer unit) {
    public void setUnit(String unit) {
        this.unit = unit;
    }

+ 0 - 285
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgDO.java

@ -1,285 +0,0 @@
package com.yihu.jw.entity.wlyy.hospital;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseOrg entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_org")
public class BaseOrgDO extends UuidIdentityEntityWithOperator implements java.io.Serializable {
	// Fields
	private String province;
	private String provinceName;
	private String city;
	private String cityName;
	private String town;
	private String townName;
	private String name;
	private String alias;
	private String spell;
	private String type;
	private String address;
	private String traffic;
	private String photo;
	private String saasId;
	private String longitude;
	private String latitude;
	private String legalperson;
	private String parentCode;
	private String combinationCode;
	private String orgUrl;
	private String del;
	private String intro;
	// Constructors
	/** default constructor */
	public BaseOrgDO() {
	}
	/** full constructor */
	public BaseOrgDO(String id, String province, String provinceName,
			String city, String cityName, String town, String townName,
			String name, String alias, String spell, String type,
			String address, String traffic, String photo, String saasId,
			String longitude, String latitude, String legalperson,
			String parentCode, String combinationCode, String orgUrl,
			String del, String intro, Timestamp createTime, Timestamp updateTime) {
		this.id = id;
		this.province = province;
		this.provinceName = provinceName;
		this.city = city;
		this.cityName = cityName;
		this.town = town;
		this.townName = townName;
		this.name = name;
		this.alias = alias;
		this.spell = spell;
		this.type = type;
		this.address = address;
		this.traffic = traffic;
		this.photo = photo;
		this.saasId = saasId;
		this.longitude = longitude;
		this.latitude = latitude;
		this.legalperson = legalperson;
		this.parentCode = parentCode;
		this.combinationCode = combinationCode;
		this.orgUrl = orgUrl;
		this.del = del;
		this.intro = intro;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Column(name = "province", length = 50)
	public String getProvince() {
		return this.province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@Column(name = "province_name", length = 50)
	public String getProvinceName() {
		return this.provinceName;
	}
	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}
	@Column(name = "city", length = 50)
	public String getCity() {
		return this.city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	@Column(name = "city_name", length = 50)
	public String getCityName() {
		return this.cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	@Column(name = "town", length = 50)
	public String getTown() {
		return this.town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	@Column(name = "town_name", length = 50)
	public String getTownName() {
		return this.townName;
	}
	public void setTownName(String townName) {
		this.townName = townName;
	}
	@Column(name = "name", length = 100)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "alias", length = 10)
	public String getAlias() {
		return this.alias;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	@Column(name = "spell", length = 20)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
	@Column(name = "type", length = 2)
	public String getType() {
		return this.type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "address", length = 300)
	public String getAddress() {
		return this.address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name = "traffic", length = 500)
	public String getTraffic() {
		return this.traffic;
	}
	public void setTraffic(String traffic) {
		this.traffic = traffic;
	}
	@Column(name = "photo", length = 200)
	public String getPhoto() {
		return this.photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column(name = "saas_id", length = 100)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "longitude", length = 10)
	public String getLongitude() {
		return this.longitude;
	}
	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	@Column(name = "latitude", length = 10)
	public String getLatitude() {
		return this.latitude;
	}
	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}
	@Column(name = "legalperson", length = 50)
	public String getLegalperson() {
		return this.legalperson;
	}
	public void setLegalperson(String legalperson) {
		this.legalperson = legalperson;
	}
	@Column(name = "parent_code", length = 100)
	public String getParentCode() {
		return this.parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	@Column(name = "combination_code", length = 100)
	public String getCombinationCode() {
		return this.combinationCode;
	}
	public void setCombinationCode(String combinationCode) {
		this.combinationCode = combinationCode;
	}
	@Column(name = "org_url", length = 200)
	public String getOrgUrl() {
		return this.orgUrl;
	}
	public void setOrgUrl(String orgUrl) {
		this.orgUrl = orgUrl;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return this.del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	@Column(name = "intro", length = 65535)
	public String getIntro() {
		return this.intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
}

+ 0 - 134
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgDeptDO.java

@ -1,134 +0,0 @@
package com.yihu.jw.entity.wlyy.hospital;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseOrgDept entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_org_dept")
public class BaseOrgDeptDO extends UuidIdentityEntityWithOperator implements java.io.Serializable {
	// Fields
	private String orgId;
	private String parentId;
	private String name;
	private String spell;
	private String del;
	private String bigdepartmentSn;
	private String deptTel;
	private String gloryName;
	private String intro;
	private String floor;
	private Integer sort;
	// Constructors
	/** default constructor */
	public BaseOrgDeptDO() {
	}
	@Column(name = "org_id", nullable = false, length = 100)
	public String getOrgId() {
		return this.orgId;
	}
	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}
	@Column(name = "parent_id", nullable = false, length = 100)
	public String getParentId() {
		return this.parentId;
	}
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	@Column(name = "name", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "spell", length = 20)
	public String getSpell() {
		return this.spell;
	}
	public void setSpell(String spell) {
		this.spell = spell;
	}
	@Column(name = "del", length = 1)
	public String getDel() {
		return this.del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	@Column(name = "bigdepartment_sn", length = 22)
	public String getBigdepartmentSn() {
		return this.bigdepartmentSn;
	}
	public void setBigdepartmentSn(String bigdepartmentSn) {
		this.bigdepartmentSn = bigdepartmentSn;
	}
	@Column(name = "dept_tel", length = 30)
	public String getDeptTel() {
		return this.deptTel;
	}
	public void setDeptTel(String deptTel) {
		this.deptTel = deptTel;
	}
	@Column(name = "glory_name", length = 500)
	public String getGloryName() {
		return this.gloryName;
	}
	public void setGloryName(String gloryName) {
		this.gloryName = gloryName;
	}
	@Column(name = "intro", length = 1000)
	public String getIntro() {
		return this.intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	@Column(name = "floor", length = 20)
	public String getFloor() {
		return this.floor;
	}
	public void setFloor(String floor) {
		this.floor = floor;
	}
	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
}

+ 0 - 86
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/hospital/BaseOrgHospitalDO.java

@ -1,86 +0,0 @@
package com.yihu.jw.entity.wlyy.hospital;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by Administrator on 2017/6/7 0007.
 */
@Entity
@Table(name = "base_org_hospital")
public class BaseOrgHospitalDO extends UuidIdentityEntityWithOperator {
    private static final long serialVersionUID = 5463913446686402252L;
    private String orgId;//
    private String roadCode;
    private String centerSite;
    private String ascriptionType;
    private String levelId;
    private String levelName;
    @Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
    
    @Column(name = "road_code")
    public String getRoadCode() {
        return roadCode;
    }
    public void setRoadCode(String roadCode) {
        this.roadCode = roadCode;
    }
    
    @Column(name = "center_site")
    public String getCenterSite() {
        return centerSite;
    }
    public void setCenterSite(String centerSite) {
        this.centerSite = centerSite;
    }
    
    @Column(name = "ascription_type")
    public String getAscriptionType() {
        return ascriptionType;
    }
    public void setAscriptionType(String ascriptionType) {
        this.ascriptionType = ascriptionType;
    }
    
    @Column(name = "level_id")
    public String getLevelId() {
        return levelId;
    }
    public void setLevelId(String levelId) {
        this.levelId = levelId;
    }
    
    @Column(name = "level_name")
    public String getLevelName() {
        return levelName;
    }
    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }
}

+ 0 - 147
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/BasePatientExtendDO.java

@ -1,147 +0,0 @@
package com.yihu.jw.entity.wlyy.patient;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BasePatientExtend entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_patient_extend")
public class BasePatientExtendDO extends UuidIdentityEntityWithOperator implements java.io.Serializable {
	// Fields
	private String id;
	private String patientId;
	private Date entryDate;
	private String workState;
	private Date workStateTime;
	private String jobNumber;
	private String companyId;
	private String companyName;
	private String companyEmail;
	private String remark;
	// Constructors
	/** default constructor */
	public BasePatientExtendDO() {
	}
	/** minimal constructor */
	public BasePatientExtendDO(String id, Date entryDate,
			Date workStateTime, Date createTime, Date updateTime) {
		this.id = id;
		this.entryDate = entryDate;
		this.workStateTime = workStateTime;
	}
	/** full constructor */
	public BasePatientExtendDO(String id, String patientId, Date entryDate,
			String workState, Date workStateTime, String jobNumber,
			String companyId, String companyName, String companyEmail,
			String remark, String createUser, String createUserName,
			Date createTime, String updateUser, String updateUserName,
			Date updateTime) {
		this.id = id;
		this.patientId = patientId;
		this.entryDate = entryDate;
		this.workState = workState;
		this.workStateTime = workStateTime;
		this.jobNumber = jobNumber;
		this.companyId = companyId;
		this.companyName = companyName;
		this.companyEmail = companyEmail;
		this.remark = remark;
	}
	// Property accessors
	@Column(name = "patient_id", length = 100)
	public String getPatientId() {
		return this.patientId;
	}
	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}
	@Column(name = "entry_date", nullable = false, length = 0)
	public Date getEntryDate() {
		return this.entryDate;
	}
	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}
	@Column(name = "work_state", length = 2)
	public String getWorkState() {
		return this.workState;
	}
	public void setWorkState(String workState) {
		this.workState = workState;
	}
	@Column(name = "work_state_time", nullable = false, length = 0)
	public Date getWorkStateTime() {
		return this.workStateTime;
	}
	public void setWorkStateTime(Date workStateTime) {
		this.workStateTime = workStateTime;
	}
	@Column(name = "job_number", length = 20)
	public String getJobNumber() {
		return this.jobNumber;
	}
	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}
	@Column(name = "company_id", length = 100)
	public String getCompanyId() {
		return this.companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	@Column(name = "company_name", length = 30)
	public String getCompanyName() {
		return this.companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	@Column(name = "company_email", length = 50)
	public String getCompanyEmail() {
		return this.companyEmail;
	}
	public void setCompanyEmail(String companyEmail) {
		this.companyEmail = companyEmail;
	}
	@Column(name = "remark", length = 2000)
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}

+ 0 - 112
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/BasePatientWechatDO.java

@ -1,112 +0,0 @@
package com.yihu.jw.entity.wlyy.patient;// default package
import com.yihu.jw.entity.UuidIdentityEntity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BasePatientWechat entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_patient_wechat")
public class BasePatientWechatDO extends UuidIdentityEntity implements java.io.Serializable {
    // Fields
    private String id;
    private String saasId;
    private String wechatId;
    private String patientId;
    private String openid;
    private String unionid;
    private Date createTime;
    // Constructors
    /**
     * default constructor
     */
    public BasePatientWechatDO() {
    }
    /**
     * minimal constructor
     */
    public BasePatientWechatDO(String id, Date createTime) {
        this.id = id;
        this.createTime = createTime;
    }
    /**
     * full constructor
     */
    public BasePatientWechatDO(String id, String saasId, String wechatId,
                             String patientId, String openid, String unionid,
                             Date createTime) {
        this.id = id;
        this.saasId = saasId;
        this.wechatId = wechatId;
        this.patientId = patientId;
        this.openid = openid;
        this.unionid = unionid;
        this.createTime = createTime;
    }
    @Column(name = "saas_id", length = 64)
    public String getSaasId() {
        return this.saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "wechat_id", length = 10)
    public String getWechatId() {
        return this.wechatId;
    }
    public void setWechatId(String wechatId) {
        this.wechatId = wechatId;
    }
    @Column(name = "patient_id", length = 100)
    public String getPatientId() {
        return this.patientId;
    }
    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }
    @Column(name = "openid", length = 50)
    public String getOpenid() {
        return this.openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    @Column(name = "unionid", length = 50)
    public String getUnionid() {
        return this.unionid;
    }
    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
    @Column(name = "create_time", nullable = false, length = 0)
    public Date getCreateTime() {
        return this.createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 0 - 96
common/common-entity/src/main/java/com/yihu/jw/entity/wlyy/patient/WlyyAdvertisementDO.java

@ -1,96 +0,0 @@
package com.yihu.jw.entity.wlyy.patient;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
@Entity
@Table(name = "wlyy_advertisement")
public class WlyyAdvertisementDO extends UuidIdentityEntityWithOperator implements Serializable {
    private static final long serialVersionUID = 1497635003375865515L;
    private String saasId;//0,为默认广告
    private String name;//名称
    private String picture;//展示的图片
    private String url;//链接
    private Integer sort;//排序( 数字越小排越前面)
    private Integer status;//状态 -1 删除 0 禁用 1可用
    private String remark;//备注
    
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name = "picture")
    public String getPicture() {
        return picture;
    }
    public void setPicture(String picture) {
        this.picture = picture;
    }
    
    @Column(name = "url")
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

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

@ -237,6 +237,7 @@ public class BaseRequestMapping {
     */
    public static class BaseDoctor extends Basic {
        public static final String PREFIX  = "/baseDoctor";
        public static final String DOCINFO  = "/docInfo";
    }
@ -269,6 +270,7 @@ public class BaseRequestMapping {
     */
    public static class BasePatient extends Basic {
        public static final String PREFIX  = "/basePatient";
        public static final String getPatientById  = "/getPatientById";
    }
    /**

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

@ -83,6 +83,7 @@ public class SpecialistMapping {
        public static final String updatePlanDetailStatusById = "/updatePlanDetailStatusById";
        public static final String updatePlanStatusById = "/updatePlanStatusById";
        public static final String planSchedule = "/planSchedule";
        public static final String planListByPatient = "/planListByPatient";
    }
    public static class serviceItem{

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

@ -22,12 +22,6 @@ import java.util.Date;
@ApiModel(value = "BaseDoctorVO", description = "医生基本信息")
public class BaseDoctorVO extends UuidIdentityVOWithOperator {
    /**
	 * 机构id
	 */
	@ApiModelProperty(value = "机构id", example = "q8q39888jojuuasdnfadf8j8h736ljv")
    private String orgId;
    /**
	 * 密码
	 */
@ -192,14 +186,6 @@ public class BaseDoctorVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "1")
    private String del;
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
    public String getPassword() {
        return password;
    }

+ 21 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/BaseDoctorEndpoint.java

@ -16,6 +16,7 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -100,4 +101,24 @@ public class BaseDoctorEndpoint extends EnvelopRestEndpoint {
        return success(baseDoctors, BaseDoctorVO.class);
    }
    /**
     * 医生信息(基本信息 + 医院执业信息)
     * @param orgId
     * @param doctorId
     * @return
     * @throws Exception
     */
    @PostMapping(value = BaseRequestMapping.BaseDoctor.DOCINFO)
    @ApiOperation(value = "获取列表")
    public Envelop doctorHosplist(
            @ApiParam(name = "orgId", value = "医院id")
            @RequestParam(value = "orgId", required = true) String orgId,
            @ApiParam(name = "doctorId", value = "医生id")
            @RequestParam(value = "doctorId", required = true) String doctorId) throws Exception {
        Map<String,Object> map = baseDoctorService.getDoctorInfo(orgId, doctorId);
        return success(map.toString());
    }
}

+ 10 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/patient/BasePatientEndpoint.java

@ -16,6 +16,7 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import com.yihu.jw.entity.base.patient.BasePatientDO;
@ -69,6 +70,15 @@ public class BasePatientEndpoint extends EnvelopRestEndpoint {
        return success(basePatient, BasePatientVO.class);
    }
    @PostMapping(value = BaseRequestMapping.BasePatient.getPatientById)
    @ApiOperation(value = "获取列表")
    public Envelop getPatientById(
            @ApiParam(name = "id", value = "居民id")
            @RequestParam(value = "id", required = true) String id) throws Exception {
        Map<String,Object> basePatients = basePatientService.getPatientInfo(id);
        return success(basePatients.toString());
    }
    @GetMapping(value = BaseRequestMapping.BasePatient.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<BasePatientVO> page(

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/team/BaseTeamEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.base.endpoint.team;
import com.yihu.jw.base.service.team.BaseTeamService;
import com.yihu.jw.entity.base.team.BaseTeamDO;
import com.yihu.jw.restmodel.base.team.BaseTeamVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -14,9 +15,8 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.yihu.jw.entity.base.team.BaseTeamDO;
import java.util.List;
/**
*

+ 2 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorRoleDictService.java

@ -9,7 +9,8 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDictDO;
 * 
 * 医生角色字典服务service
 * 
 * @version 
 * @version
 *
 * <pre>
 * Author	Version		Date		Changes
 * litaohong    1.0  2018年08月31日 Created

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

@ -1,9 +1,19 @@
package com.yihu.jw.base.service.doctor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.base.dao.doctor.BaseDoctorDao;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 
@ -19,4 +29,44 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 */
@Service
public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDao> {
    @Autowired
    private BaseDoctorHospitalService baseDoctorHospitalService;
    @Autowired
    private BaseDoctorRoleDictService baseDoctorRoleDictService;
    /**
     * 获取医生信息
     * @param orgId 医生所属机构id
     * @param doctorId 医生id
     * @return
     */
    public Map<String,Object> getDoctorInfo(String orgId, String doctorId) throws Exception{
        Map<String,Object> resultMap = new HashMap<>();
        if(StringUtils.isEmpty(orgId) || StringUtils.isEmpty(doctorId)){
            return resultMap;
        }
        //医生基本信息
        List<BaseDoctorDO> doctors = this.findByField("id",doctorId);
        if(CollectionUtils.isEmpty(doctors)){
            return resultMap;
        }
        resultMap = JavaBeanUtils.bean2Map(doctors.get(0));
        //医生执业信息
        String[] paramNames = {"hospCode","doctorCode"};
        Object[] paramValue = {orgId,doctorId};
        List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalService.findByFields(paramNames,paramValue);
        if(CollectionUtils.isEmpty(baseDoctorHospitalDOS)){
            return resultMap;
        }
        Map<String,Object> doctorHospMap = JavaBeanUtils.bean2Map(baseDoctorHospitalDOS.get(0));
        resultMap.putAll(doctorHospMap);
        return resultMap;
    }
}

+ 27 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/patient/BasePatientService.java

@ -1,9 +1,18 @@
package com.yihu.jw.base.service.patient;
import com.yihu.jw.base.dao.patient.BasePatientDao;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 
@ -19,4 +28,22 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
 */
@Service
public class BasePatientService extends BaseJpaService<BasePatientDO, BasePatientDao> {
    /**
     * 居民id
     * @param patientId
     * @return
     */
    public Map<String,Object> getPatientInfo(String patientId) throws Exception{
        Map<String,Object> resultMap = new HashMap<>();
        if(StringUtils.isEmpty(patientId)){
            return resultMap;
        }
        List<BasePatientDO> patientDOList = this.findByField("id",patientId);
        if(CollectionUtils.isEmpty(patientDOList)){
            return resultMap;
        }
        resultMap = JavaBeanUtils.bean2Map(patientDOList.get(0));
        return resultMap;
    }
}

+ 17 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WechatCoreService.java

@ -224,7 +224,23 @@ public class WechatCoreService {
     * @param message
     * @return
     */
    public String clickProcess(Map<String, String> message){
    public String clickProcess(Map<String, String> message)throws Exception{
        //获取原始id
        String toUserName = message.get("ToUserName");
        //EventKey值为菜单的场景值
        String eventKey = message.get("EventKey");
        //查询需要对应匹配的点击事件值
        List<WxReplySceneDO> scenes = wxReplySceneDao.findByAppOriginIdAndMsgTypeAndEventAndStatus(toUserName,WeiXinMessageUtils.REQ_MESSAGE_TYPE_EVENT,WeiXinMessageUtils.EVENT_TYPE_CLICK,1);
        if(scenes!=null&&scenes.size()>0){
            //匹配对应点击事件场景值
            for(WxReplySceneDO scene:scenes){
                //判断带参二维码中前缀是否包该场景值
                if(StringUtils.isNotBlank(scene.getScene())&&eventKey.indexOf(scene.getScene())!=-1){
                    return getGraphicXMl(scene.getScene(),scene.getWechatId(),message);
                }
            }
        }
        return "";
    }

+ 203 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/util/JavaBeanUtils.java

@ -0,0 +1,203 @@
package com.yihu.jw.base.util;
import org.apache.commons.beanutils.BeanUtils;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
/**
 * @author litaohong on 2018/9/10
 * @project jw2.0
 */
public class JavaBeanUtils {
    /**
     * 将一个 Map 对象转化为一个 JavaBean
     *
     * @param type
     *            要转化的类型
     * @param map
     *            包含属性值的 map
     * @return 转化出来的 JavaBean 对象
     * @throws IntrospectionException
     *             如果分析类属性失败
     * @throws IllegalAccessException
     *             如果实例化 JavaBean 失败
     * @throws InstantiationException
     *             如果实例化 JavaBean 失败
     * @throws InvocationTargetException
     *             如果调用属性的 setter 方法失败
     */
    @SuppressWarnings("unchecked")
    public static Object map2Bean(Class type, Map map)
            throws IntrospectionException, IllegalAccessException,
            InstantiationException, InvocationTargetException {
        Object obj = type.newInstance(); // 创建 JavaBean 对象
        BeanUtils.populate(obj, map);
        return obj;
    }
    /**
     * 将一个 JavaBean 对象转化为一个 Map
     *
     * @param bean
     *            要转化的JavaBean 对象
     * @return 转化出来的 Map 对象
     * @throws IntrospectionException
     *             如果分析类属性失败
     * @throws IllegalAccessException
     *             如果实例化 JavaBean 失败
     * @throws InvocationTargetException
     *             如果调用属性的 setter 方法失败
     */
    @SuppressWarnings("unchecked")
    public static Map bean2Map(Object bean) throws IntrospectionException,
            IllegalAccessException, InvocationTargetException {
        Class type = bean.getClass();
        Map returnMap = new HashMap();
        BeanInfo beanInfo = Introspector.getBeanInfo(type);
        PropertyDescriptor[] propertyDescriptors = beanInfo
                .getPropertyDescriptors();
        for (int i = 0; i < propertyDescriptors.length; i++) {
            PropertyDescriptor descriptor = propertyDescriptors[i];
            String propertyName = descriptor.getName();
            if (!propertyName.equals("class")) {
                Method readMethod = descriptor.getReadMethod();
                Object result = readMethod.invoke(bean, new Object[0]);
                if (result != null) {
                    returnMap.put(propertyName, result);
                } else {
                    returnMap.put(propertyName, "");
                }
            }
        }
        return returnMap;
    }
    /**
     * 将对象集合转为集合map
     *
     * @describe:TODO
     * @param beans
     * @return
     * @throws IllegalAccessException
     * @throws InvocationTargetException
     * @throws IntrospectionException
     * @time:2014年9月3日上午10:37:32
     */
    @SuppressWarnings("unchecked")
    public static List<Map> beans2Maps(List<Object> beans)
            throws IllegalAccessException, InvocationTargetException,
            IntrospectionException {
        List<Map> maps = new ArrayList<Map>();
        for (Iterator iterator = beans.iterator(); iterator.hasNext();) {
            Object bean = (Object) iterator.next();
            maps.add(bean2Map(bean));
        }
        return maps;
    }
    /**
     * 将对多个Map转对对象集合返回
     *
     * @describe:TODO
     * @param type
     * @param maps
     * @return
     * @throws IntrospectionException
     * @throws IllegalAccessException
     * @throws InstantiationException
     * @throws InvocationTargetException
     * @time:2014年9月3日上午10:40:00
     */
    @SuppressWarnings("unchecked")
    public static List<Object> mapstoBeans(Class type, List<Map> maps)
            throws IntrospectionException, IllegalAccessException,
            InstantiationException, InvocationTargetException {
        List<Object> beans = new ArrayList<Object>();
        for (Map map : maps) {
            beans.add(map2Bean(type, map));
        }
        return beans;
    }
    /**
     * 对象复制
     *
     * @describe:TODO
     * @param toBean
     *            目标对象
     * @param fromBean
     *            对象来源
     * @return
     * @throws IllegalAccessException
     * @throws InvocationTargetException
     * @time:2014年9月3日上午11:47:45
     */
    public static Object copyProperties(Object toBean, Object fromBean)
            throws IllegalAccessException, InvocationTargetException {
        if (fromBean == null) {
            return null;
        }
        org.springframework.beans.BeanUtils.copyProperties(toBean, fromBean);
        return toBean;
    }
    /**
     * 对象复制(将给定的对象转化为给定的Class 类型对象并返回)
     *
     * @describe:TODO
     * @param toClassBean
     * @param fromBean
     * @return
     * @throws IllegalAccessException
     * @throws InvocationTargetException
     * @throws InstantiationException
     * @throws ClassNotFoundException
     * @time:2014年9月3日下午12:05:23
     */
    public static Object copyProperties(Class toClassBean, Object fromBean)
            throws IllegalAccessException, InvocationTargetException,
            InstantiationException, ClassNotFoundException {
        if (fromBean == null) {
            return null;
        }
        Object toBean = Class.forName(toClassBean.getCanonicalName())
                .newInstance();
        return copyProperties(toBean, fromBean);
    }
    /**
     * 将给定的对象集合转换为指定的类对象集合
     *
     * @describe:TODO
     * @param toClassBean
     *            类 类型
     * @param beans
     *            对象集合
     * @return
     * @throws IllegalAccessException
     * @throws InvocationTargetException
     * @throws InstantiationException
     * @throws ClassNotFoundException
     * @time:2014年9月3日下午12:33:24
     */
    public static List copyProperties(Class toClassBean, List beans)
            throws IllegalAccessException, InvocationTargetException,
            InstantiationException, ClassNotFoundException {
        List list = new ArrayList();
        for (Iterator iterator = beans.iterator(); iterator.hasNext();) {
            Object object = (Object) iterator.next();
            list.add(copyProperties(toClassBean, object));
        }
        return list;
    }
}

+ 15 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationManageController.java

@ -80,7 +80,7 @@ public class RehabilitationManageController {
                                          @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                          @ApiParam(name = "planId", value = "计划id", required = true)
                                          @RequestParam(value = "planId", required = true)String planId,
                                          @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                          @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                          @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                          @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                          @RequestParam(value = "status", required = false)Integer status,
@ -103,7 +103,7 @@ public class RehabilitationManageController {
                                         @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                         @ApiParam(name = "planId", value = "计划id", required = true)
                                         @RequestParam(value = "planId", required = true)String planId,
                                         @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                         @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                         @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                         @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                         @RequestParam(value = "status", required = false)Integer status,
@ -333,4 +333,17 @@ public class RehabilitationManageController {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.rehabilitation.planListByPatient)
    @ApiOperation(value = "康复管理-根据居民获取康复计划")
    public ObjEnvelop planListByPatient(@ApiParam(name = "patientCode", value = "居民code", required = true)
                                   @RequestParam(value = "patientCode", required = true)String patientCode){
        try {
            return rehabilitationManageService.planListByPatient(patientCode);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -162,7 +162,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            }
            String planDetails = array.toString();
            ObjectMapper object = new ObjectMapper();
            object.setDateFormat(new SimpleDateFormat("yyyy-MM-dd hh:mm"));
            object.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm"));
            List<RehabilitationDetailDO> details = object.readValue(planDetails, new TypeReference<List<RehabilitationDetailDO>>(){});
            PatientRehabilitationPlanDO planDO = toEntity(rehabilitationPlan, PatientRehabilitationPlanDO.class);
            planDO = rehabilitationPlanService.createPatientRehabilitationPlan(planDO);

+ 5 - 5
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistHospitalServiceItemService.java

@ -139,22 +139,22 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
                        }
                    }else{
                        if (isTrue == false){
                            hospitalServiceItemDO1.setFlag(2);
                            hospitalServiceItemDO1.setFlag(1);
                            hospitalServiceItemDOS1.add(hospitalServiceItemDO1);
                        }
                    }
                }
                if (flag==false){
                    boolean isTure1 = false;
                    boolean isTrue1 = false;
                    if (hospitalServiceItemDOS1 != null && hospitalServiceItemDOS1.size() != 0){
                        for (HospitalServiceItemDO hospitalServiceItemDO2:hospitalServiceItemDOS1){
                            if (hospitalServiceItemDO.getServiceItemId().equals(hospitalServiceItemDO2.getServiceItemId())){
                                isTure1 = true;
                                isTrue1 = true;
                            }
                        }
                    }
                    if (isTure1 == false){
                        hospitalServiceItemDO.setFlag(1);
                    if (isTrue1 == false){
                        hospitalServiceItemDO.setFlag(2);
                        hospitalServiceItemDOS1.add(hospitalServiceItemDO);
                    }
                }

+ 0 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistServiceItemService.java

@ -181,9 +181,7 @@ public class SpecialistServiceItemService {
                    specialistServiceItemDOList.add(specialistServiceItemDO);
                }
            }else {
                if (hospitalServiceItemDOS.size() == 0 || hospitalServiceItemDOS == null){
                    specialistServiceItemDOList.add(specialistServiceItemDO);
                }
            }
        }
        envelop.setDetailModelList(specialistServiceItemDOList);

+ 121 - 94
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -73,7 +73,7 @@ public class RehabilitationManageService {
//            leftSql += " left join "+basedb+".wlyy_patient_disease_server s on p.patient=s.patient and s.del=1 and s.disease ='"+diseaseCode+"'" ;
//        }
        if(doctorType==2){//家医是根据签约关系过滤
            leftSql+=" and f.doctor='"+doctorCode+"' ";
            leftSql+=" and (f.doctor='"+doctorCode+"' or f.doctor_health='"+doctorCode+"') ";
        }
        String sql = " select p.*,f.idcard,f.hospital_name from wlyy_specialist.wlyy_patient_rehabilitation_plan p  " +leftSql+
                " where 1=1 " ;
@ -128,7 +128,6 @@ public class RehabilitationManageService {
                resultMap.put("patientName",one.get("name"));
                resultMap.put("patientCode",one.get("patient"));
                resultMap.put("id",one.get("id"));
                resultMap.put("patientCode",one.get("patient"));
                resultMap.put("status",one.get("status"));//康复计划状态
                //健康情况
                resultMap.put("healthyCondition","康复期");
@ -141,6 +140,7 @@ public class RehabilitationManageService {
                    case 3:planTypeName="(转)转家庭病床" ;break;
                }
                resultMap.put("planTypeName",planTypeName);
                resultMap.put("planCreateUser",one.get("create_user"));
                //今日待办(即今日全部的项目)
                Date beginTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"00:00:00");
                Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"23:59:59");
@ -261,95 +261,106 @@ public class RehabilitationManageService {
    /**
     * 康复管理更多计划
     * @param doctorCode
     * @param currentDoctorCode
     * @param patientCode
     * @return
     * @throws Exception
     */
    public ObjEnvelop findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
        Map<String,Object> resultMap = new HashMap<>();
        resultMap.put("patientCode",patientCode);//居民code
        //专科医生
        String specialistRelationSql = "select r.*,t.name as teamName,h.name as specialistHospitalName from wlyy_specialist.wlyy_specialist_patient_relation r left join "+basedb+".wlyy_admin_team t on r.team_code=t.id left join "+basedb+".dm_hospital h on t.org_code=h.code where r.sign_status ='1' and r.status in('0','1') and r.patient='"+patientCode+"' and r.doctor='"+doctorCode+"'";
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
        Map<String,Object> specialistMap = specialistRelationList.get(0);
        resultMap.put("specialistAdminTeamName",specialistMap.get("teamName"));
        resultMap.put("specialistHospitalName",specialistMap.get("specialistHospitalName"));//专科医生所在医院
        String specialistFinishItemSql = "";
        Integer specialistUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(doctorCode,patientCode,1);
        Integer specialistFinishCount = rehabilitationDetailDao.findItemByDoctor(doctorCode,patientCode);
        Integer specialistServiceCount = rehabilitationDetailDao.completeServiceByDoctor(doctorCode,patientCode,1);
        resultMap.put("specialistFinishItemCount",specialistFinishCount-specialistUnfinishCount);//完成项目
        resultMap.put("specialistServiceRecordCount",specialistServiceCount);//服务次数
    public ObjEnvelop findRehabilitationPlanDetailList(String currentDoctorCode,String patientCode) throws Exception{
        String sql = " select DISTINCT r.* from wlyy_specialist.wlyy_specialist_patient_relation r join wlyy_patient_rehabilitation_plan p on r.patient=p.patient where r.sign_status ='1' and r.status in('0','1') and r.patient='"+patientCode+"' ";
        List<Map<String,Object>> specialistPatientRelationList = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> resultList = new ArrayList<>();
        for(Map<String,Object> temp: specialistPatientRelationList){
            String doctorCode = temp.get("doctor")+"";
            Map<String,Object> resultMap = new HashMap<>();
            Integer isOperator = 0;
            resultMap.put("patientCode",patientCode);//居民code
            //专科医生
            String specialistRelationSql = "select r.*,t.name as teamName,h.name as specialistHospitalName from wlyy_specialist.wlyy_specialist_patient_relation r left join "+basedb+".wlyy_admin_team t on r.team_code=t.id left join "+basedb+".dm_hospital h on t.org_code=h.code where r.sign_status ='1' and r.status in('0','1') and r.patient='"+patientCode+"' and r.doctor='"+doctorCode+"'";
            List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
            Map<String,Object> specialistMap = specialistRelationList.get(0);
            resultMap.put("specialistAdminTeamName",specialistMap.get("teamName"));
            resultMap.put("specialistHospitalName",specialistMap.get("specialistHospitalName"));//专科医生所在医院
            Integer specialistUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(doctorCode,patientCode,1);
            Integer specialistFinishCount = rehabilitationDetailDao.findItemByDoctor(doctorCode,patientCode);
            Integer specialistServiceCount = rehabilitationDetailDao.completeServiceByDoctor(doctorCode,patientCode,1);
            resultMap.put("specialistFinishItemCount",specialistFinishCount-specialistUnfinishCount);//完成项目
            resultMap.put("specialistServiceRecordCount",specialistServiceCount);//服务次数
        //家庭医生(包括全科医生、健管师)
        String signFamilySql = "SELECT f.*,t.name as teamName FROM "+basedb+".wlyy_sign_family f LEFT JOIN "+basedb+".wlyy_admin_team t on f.admin_team_code=t.id where f.status =1 and f.expenses_status='1' and f.patient='"+patientCode+"'";
        List<Map<String,Object>> signFamilyList = jdbcTemplate.queryForList(signFamilySql);
        Map<String,Object> signFamilyMap = signFamilyList.get(0);
        resultMap.put("signFamilyAdminTeamName",signFamilyMap.get("teamName"));
        resultMap.put("familyHospitalName",signFamilyMap.get("hospital_name"));//家庭医生所在医院
        Integer familyUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
        Integer familyFinishCount = rehabilitationDetailDao.findItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode);
        Integer familyServiceCount = rehabilitationDetailDao.completeServiceByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
        resultMap.put("signFamilyFinishItemCount",familyFinishCount-familyUnfinishCount);//完成项目
        resultMap.put("signFamilyServiceRecordCount",familyServiceCount);//服务次数
            //家庭医生(包括全科医生、健管师)
            String signFamilySql = "SELECT f.*,t.name as teamName FROM "+basedb+".wlyy_sign_family f LEFT JOIN "+basedb+".wlyy_admin_team t on f.admin_team_code=t.id where f.status =1 and f.expenses_status='1' and f.patient='"+patientCode+"'";
            List<Map<String,Object>> signFamilyList = jdbcTemplate.queryForList(signFamilySql);
            Map<String,Object> signFamilyMap = signFamilyList.get(0);
            resultMap.put("signFamilyAdminTeamName",signFamilyMap.get("teamName"));
            resultMap.put("familyHospitalName",signFamilyMap.get("hospital_name"));//家庭医生所在医院
            Integer familyUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
            Integer familyFinishCount = rehabilitationDetailDao.findItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode);
            Integer familyServiceCount = rehabilitationDetailDao.completeServiceByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
            resultMap.put("signFamilyFinishItemCount",familyFinishCount-familyUnfinishCount);//完成项目
            resultMap.put("signFamilyServiceRecordCount",familyServiceCount);//服务次数
        //基础信息
        resultMap.put("hospitalName",signFamilyMap.get("hospital_name"));
        Integer age = IdCardUtil.getAgeForIdcard(signFamilyMap.get("idcard")+"");
        String sex = IdCardUtil.getSexForIdcard_new(signFamilyMap.get("idcard")+"");
        resultMap.put("age",age);
        resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
        resultMap.put("patientName",signFamilyMap.get("name"));
        //疾病类型
        String diseaseSql = " select s.* from "+basedb+".wlyy_patient_disease_server s where s.del=1 and s.patient='"+patientCode+"' and s.specialist_relation_code='"+specialistMap.get("id")+"' ";
        List<Map<String,Object>> diseaseList = jdbcTemplate.queryForList(diseaseSql);
        List<String> disease = new ArrayList<>();
        for(Map<String,Object> one2:diseaseList){
            disease.add(one2.get("disease_name")+"");
        }
        resultMap.put("diseaseList",disease);
        //计划列表
        List<PatientRehabilitationPlanDO> list = patientRehabilitationPlanDao.findByPatientAndCreateUser(patientCode,doctorCode);
        List<Map<String,Object>> rehabilitationPlanList = new ArrayList<>();
        for(PatientRehabilitationPlanDO one:list){
            Map<String,Object> planMap = new HashMap<>();
            planMap.put("planId",one.getId());
            //安排类型
            String planTypeName = null;
            Integer planTypeTemp = one.getPlanType();
            switch (planTypeTemp){
                case 1:planTypeName="康复计划" ;break;
                case 2:planTypeName="(转)社区医院" ;break;
                case 3:planTypeName="(转)转家庭病床" ;break;
            //基础信息
            resultMap.put("hospitalName",signFamilyMap.get("hospital_name"));
            Integer age = IdCardUtil.getAgeForIdcard(signFamilyMap.get("idcard")+"");
            String sex = IdCardUtil.getSexForIdcard_new(signFamilyMap.get("idcard")+"");
            resultMap.put("age",age);
            resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
            resultMap.put("patientName",signFamilyMap.get("name"));
            //疾病类型
            String diseaseSql = " select s.* from "+basedb+".wlyy_patient_disease_server s where s.del=1 and s.patient='"+patientCode+"' and s.specialist_relation_code='"+specialistMap.get("id")+"' ";
            List<Map<String,Object>> diseaseList = jdbcTemplate.queryForList(diseaseSql);
            List<String> disease = new ArrayList<>();
            for(Map<String,Object> one2:diseaseList){
                disease.add(one2.get("disease_name")+"");
            }
            planMap.put("planTypeName",planTypeName);
            planMap.put("status",one.getStatus());//0已中止,1进行中,2已完成
            resultMap.put("diseaseList",disease);
            //状态(0未完成,1已完成,2已预约)
            //今日待办
            Date beginTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"00:00:00");
            Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"23:59:59");
            Integer todayBacklogCount = rehabilitationDetailDao.todayBacklogCount(one.getId(),beginTime,endTime);
            planMap.put("todayBacklogCount",todayBacklogCount);
            //已完成
            Integer finishedCount = rehabilitationDetailDao.completenessCount(1,one.getId(),beginTime,endTime);
            planMap.put("finishedCount",finishedCount);//已完成
            //未完成
            Integer notstartedCount = rehabilitationDetailDao.completenessCount(0,one.getId(),beginTime,endTime);//未完成
            Integer underwayCount = rehabilitationDetailDao.completenessCount(2,one.getId(),beginTime,endTime);//已预约
            Integer unfinishedCount = notstartedCount+underwayCount;
            planMap.put("unfinishedCount",unfinishedCount);//未完成
            //完成度(已完成/(已完成+未完成))
            Integer allFinishCount = rehabilitationDetailDao.findByStatusAndPlanId(1,one.getId());
            Integer allCount = rehabilitationDetailDao.findAllByPlanId(one.getId());
            planMap.put("allCount",allCount);//总数
            planMap.put("allFinishCount",allFinishCount);//全部已完成数
            rehabilitationPlanList.add(planMap);
            //计划列表
            List<PatientRehabilitationPlanDO> list = patientRehabilitationPlanDao.findByPatientAndCreateUser(patientCode,doctorCode);
            List<Map<String,Object>> rehabilitationPlanList = new ArrayList<>();
            for(PatientRehabilitationPlanDO one:list){
                Map<String,Object> planMap = new HashMap<>();
                planMap.put("planId",one.getId());
                //安排类型
                String planTypeName = null;
                Integer planTypeTemp = one.getPlanType();
                switch (planTypeTemp){
                    case 1:planTypeName="康复计划" ;break;
                    case 2:planTypeName="(转)社区医院" ;break;
                    case 3:planTypeName="(转)转家庭病床" ;break;
                }
                planMap.put("planTypeName",planTypeName);
                planMap.put("status",one.getStatus());//0已中止,1进行中,2已完成
                if(currentDoctorCode.equals(doctorCode)){
                    isOperator = 1;
                }
                planMap.put("isOperator",isOperator);
                //状态(0未完成,1已完成,2已预约)
                //今日待办
                Date beginTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"00:00:00");
                Date endTime = DateUtil.strToDateLong(DateUtil.getStringDateShort()+ " "+"23:59:59");
                Integer todayBacklogCount = rehabilitationDetailDao.todayBacklogCount(one.getId(),beginTime,endTime);
                planMap.put("todayBacklogCount",todayBacklogCount);
                //已完成
                Integer finishedCount = rehabilitationDetailDao.completenessCount(1,one.getId(),beginTime,endTime);
                planMap.put("finishedCount",finishedCount);//已完成
                //未完成
                Integer notstartedCount = rehabilitationDetailDao.completenessCount(0,one.getId(),beginTime,endTime);//未完成
                Integer underwayCount = rehabilitationDetailDao.completenessCount(2,one.getId(),beginTime,endTime);//已预约
                Integer unfinishedCount = notstartedCount+underwayCount;
                planMap.put("unfinishedCount",unfinishedCount);//未完成
                //完成度(已完成/(已完成+未完成))
                Integer allFinishCount = rehabilitationDetailDao.findByStatusAndPlanId(1,one.getId());
                Integer allCount = rehabilitationDetailDao.findAllByPlanId(one.getId());
                planMap.put("allCount",allCount);//总数
                planMap.put("allFinishCount",allFinishCount);//全部已完成数
                rehabilitationPlanList.add(planMap);
            }
            resultMap.put("rehabilitationPlanList",rehabilitationPlanList);
            resultList.add(resultMap);
        }
        resultMap.put("rehabilitationPlanList",rehabilitationPlanList);
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultList);
    }
@ -373,12 +384,14 @@ public class RehabilitationManageService {
//                    sql+="and d.type='"+role+"' " ;
//                }
                sql+=" and d.doctor='"+doctorCode+"' " ;
            }else{
                sql+=" and i.type='"+searchTask+"' " ;
            }else if(searchTask==2||searchTask==4){
                sql+=" and i.type="+searchTask+" " ;
            }else if(searchTask==3){
                sql+=" and i.reserve="+searchTask+" " ;
            }
        }
        if(status!=null){
            sql+= "and d.status="+status;
            sql+= " and d.status="+status;
        }
        List<Map<String,Object>> rehabilitationDetailList = jdbcTemplate.queryForList(sql);
@ -488,8 +501,10 @@ public class RehabilitationManageService {
        if(searchTask!=null){
            if(searchTask==1){
                sql+="and d.doctor='"+doctorCode+"' ";
            }else{
                sql+=" and i.type='"+searchTask+"' " ;
            }else if(searchTask==2||searchTask==4){
                sql+=" and i.type="+searchTask+" " ;
            }else if(searchTask==3){
                sql+=" and i.reserve="+searchTask+" " ;
            }
        }
        if(status!=null){
@ -532,9 +547,10 @@ public class RehabilitationManageService {
                isMyTask=1;
            }
            resultMap.put("isMyTask",isMyTask);//0不是自己的任务,1是自己的任务
            if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
                executeDoctorList.add(one.get("create_user_name")+"");
            }
//            if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
//                executeDoctorList.add(one.get("create_user_name")+"");
//            }
            resultMap.put("executeDoctorCode",one.get("specialistDoctor")+"");//执行医生code
            executeDoctorList.add(one.get("specialistDoctorName")+"");
            resultMap.put("specialistDoctorCode",one.get("create_user")+"");//专科医生code
            resultMap.put("specialistDoctorName",one.get("create_user_name")+"");//专科医生名字
@ -610,11 +626,12 @@ public class RehabilitationManageService {
            isMyTask=1;
        }
        resultMap.put("isMyTask",isMyTask);//0不是自己的任务,1是自己的任务
        if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
            executeDoctorList.add(one.get("create_user_name")+"");
        }
//        if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
//            executeDoctorList.add(one.get("create_user_name")+"");
//        }
        executeDoctorList.add(one.get("specialistDoctorName")+"");
        resultMap.put("executeDoctorList",executeDoctorList);
        resultMap.put("executeDoctorCode",one.get("specialistDoctor")+"");//执行医生code
        resultMap.put("specialistDoctorCode",one.get("create_user")+"");//专科医生code
        resultMap.put("specialistDoctorName",one.get("create_user_name")+"");//专科医生名字
        resultMap.put("title",one.get("title"));//项目标题
@ -727,7 +744,7 @@ public class RehabilitationManageService {
            serviceDoctorList.add(healthDoctorMap);
        }
        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status >=0  ";
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
        for(Map<String,Object> one:specialistRelationList){
            String doctor = one.get("doctor")+"";
@ -1161,4 +1178,14 @@ public class RehabilitationManageService {
        resultMap.put("healthyCondition","康复期");
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
    }
    /**
     * 根据居民获取康复计划
     * @param patient
     * @return
     */
    public ObjEnvelop planListByPatient(String patient){
        List<PatientRehabilitationPlanDO> list = patientRehabilitationPlanDao.findbyPatients(patient);
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,list);
    }
}

+ 1 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -256,6 +256,7 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        }
        //服务包数据
        servicePackageVO.put("detailsVOList", detailsVOList);
        servicePackageVO.put("num", detailsVOList.size());
        servicePackageVO.put("saasId", "xmihealth");
        servicePackageVO.put("name", planDO.getTitle());
        servicePackageVO.put("introduce", planDO.getTitle());

+ 3 - 0
svr/svr-wlyy-specialist/src/main/resources/application.yml

@ -170,6 +170,9 @@ neiwang:
  enable: false
  #wlyy: http://59.61.92.90:9099/iot/
base:
  url: http://172.17.110.212:10020/
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3