trick9191 6 years ago
parent
commit
2b6a2763b2

+ 94 - 94
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/PatientLabelDO.java

@ -1,94 +1,94 @@
package com.yihu.jw.entity.specialist;
import com.yihu.jw.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Trick on 2018/5/29.
 */
@Entity
@Table(name = "wlyy_patient_label")
public class PatientLabelDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "label_name")
    private String labelName;//标签名称',
    @Column(name = "label_code")
    private String labelCode;//标签code',
    @Column(name = "label_type")
    private String labelType;//标签类型:1.装病类型;2.健康情况;3.自定义',
    @Column(name = "sort")
    private Integer sort;//排序',
    @Column(name = "team_code")
    private String teamCode;//团队code',
    @Column(name = "del")
    private String del;//1:有效;0:删除',
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getLabelName() {
        return labelName;
    }
    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }
    public String getLabelCode() {
        return labelCode;
    }
    public void setLabelCode(String labelCode) {
        this.labelCode = labelCode;
    }
    public String getLabelType() {
        return labelType;
    }
    public void setLabelType(String labelType) {
        this.labelType = labelType;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getTeamCode() {
        return teamCode;
    }
    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}
//package com.yihu.jw.entity.specialist;
//
//import com.yihu.jw.IdEntityWithOperation;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.io.Serializable;
//
///**
// * Created by Trick on 2018/5/29.
// */
//@Entity
//@Table(name = "wlyy_patient_label")
//public class PatientLabelDO extends IdEntityWithOperation implements Serializable {
//
//    @Column(name = "saas_id")
//    private String saasId;
//    @Column(name = "label_name")
//    private String labelName;//标签名称',
//    @Column(name = "label_code")
//    private String labelCode;//标签code',
//    @Column(name = "label_type")
//    private String labelType;//标签类型:1.装病类型;2.健康情况;3.自定义',
//    @Column(name = "sort")
//    private Integer sort;//排序',
//    @Column(name = "team_code")
//    private String teamCode;//团队code',
//    @Column(name = "del")
//    private String del;//1:有效;0:删除',
//
//
//    public String getSaasId() {
//        return saasId;
//    }
//
//    public void setSaasId(String saasId) {
//        this.saasId = saasId;
//    }
//
//
//    public String getLabelName() {
//        return labelName;
//    }
//
//    public void setLabelName(String labelName) {
//        this.labelName = labelName;
//    }
//
//
//    public String getLabelCode() {
//        return labelCode;
//    }
//
//    public void setLabelCode(String labelCode) {
//        this.labelCode = labelCode;
//    }
//
//
//    public String getLabelType() {
//        return labelType;
//    }
//
//    public void setLabelType(String labelType) {
//        this.labelType = labelType;
//    }
//
//
//    public Integer getSort() {
//        return sort;
//    }
//
//    public void setSort(Integer sort) {
//        this.sort = sort;
//    }
//
//
//    public String getTeamCode() {
//        return teamCode;
//    }
//
//    public void setTeamCode(String teamCode) {
//        this.teamCode = teamCode;
//    }
//
//
//    public String getDel() {
//        return del;
//    }
//
//    public void setDel(String del) {
//        this.del = del;
//    }
//}

+ 83 - 83
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/PatientLabelInfoDO.java

@ -1,83 +1,83 @@
package com.yihu.jw.entity.specialist;
import com.yihu.jw.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Trick on 2018/5/29.
 */
@Entity
@Table(name = "wlyy_patient_label_info")
public class PatientLabelInfoDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "patient")
    private String patient;//居民code',
    @Column(name = "label_name")
    private String labelName;//标签名称',
    @Column(name = "label_code")
    private String labelCode;//标签code',
    @Column(name = "label_type")
    private String labelType;//标签类别',
    @Column(name = "team_code")
    private String teamCode;//团队code',
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getLabelName() {
        return labelName;
    }
    public void setLabelName(String labelName) {
        this.labelName = labelName;
    }
    public String getLabelCode() {
        return labelCode;
    }
    public void setLabelCode(String labelCode) {
        this.labelCode = labelCode;
    }
    public String getLabelType() {
        return labelType;
    }
    public void setLabelType(String labelType) {
        this.labelType = labelType;
    }
    public String getTeamCode() {
        return teamCode;
    }
    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }
}
//package com.yihu.jw.entity.specialist;
//
//import com.yihu.jw.IdEntityWithOperation;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.io.Serializable;
//
///**
// * Created by Trick on 2018/5/29.
// */
//@Entity
//@Table(name = "wlyy_patient_label_info")
//public class PatientLabelInfoDO extends IdEntityWithOperation implements Serializable {
//
//    @Column(name = "saas_id")
//    private String saasId;
//    @Column(name = "patient")
//    private String patient;//居民code',
//    @Column(name = "label_name")
//    private String labelName;//标签名称',
//    @Column(name = "label_code")
//    private String labelCode;//标签code',
//    @Column(name = "label_type")
//    private String labelType;//标签类别',
//    @Column(name = "team_code")
//    private String teamCode;//团队code',
//
//
//    public String getSaasId() {
//        return saasId;
//    }
//
//    public void setSaasId(String saasId) {
//        this.saasId = saasId;
//    }
//
//
//    public String getPatient() {
//        return patient;
//    }
//
//    public void setPatient(String patient) {
//        this.patient = patient;
//    }
//
//
//    public String getLabelName() {
//        return labelName;
//    }
//
//    public void setLabelName(String labelName) {
//        this.labelName = labelName;
//    }
//
//
//    public String getLabelCode() {
//        return labelCode;
//    }
//
//    public void setLabelCode(String labelCode) {
//        this.labelCode = labelCode;
//    }
//
//
//    public String getLabelType() {
//        return labelType;
//    }
//
//    public void setLabelType(String labelType) {
//        this.labelType = labelType;
//    }
//
//
//    public String getTeamCode() {
//        return teamCode;
//    }
//
//    public void setTeamCode(String teamCode) {
//        this.teamCode = teamCode;
//    }
//}

+ 83 - 83
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistArticleDO.java

@ -1,83 +1,83 @@
package com.yihu.jw.entity.specialist;
import com.yihu.jw.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Trick on 2018/4/24.
 */
@Entity
@Table(name = "wlyy_specialist_Article")
public class SpecialistArticleDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "patient")
    private String patient;//居民
    @Column(name = "patient_name")
    private String patientName;//居民
    @Column(name = "doctor")
    private String doctor;//医生
    @Column(name = "doctor_name")
    private String doctorName;//医生
    @Column(name = "article")
    private String article;//文章
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getArticle() {
        return article;
    }
    public void setArticle(String article) {
        this.article = article;
    }
}
//package com.yihu.jw.entity.specialist;
//
//import com.yihu.jw.IdEntityWithOperation;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.io.Serializable;
//
///**
// * Created by Trick on 2018/4/24.
// */
//@Entity
//@Table(name = "wlyy_specialist_Article")
//public class SpecialistArticleDO extends IdEntityWithOperation implements Serializable {
//
//    @Column(name = "saas_id")
//    private String saasId;
//    @Column(name = "patient")
//    private String patient;//居民
//    @Column(name = "patient_name")
//    private String patientName;//居民
//    @Column(name = "doctor")
//    private String doctor;//医生
//    @Column(name = "doctor_name")
//    private String doctorName;//医生
//    @Column(name = "article")
//    private String article;//文章
//
//
//    public String getSaasId() {
//        return saasId;
//    }
//
//    public void setSaasId(String saasId) {
//        this.saasId = saasId;
//    }
//
//
//    public String getPatient() {
//        return patient;
//    }
//
//    public void setPatient(String patient) {
//        this.patient = patient;
//    }
//
//
//    public String getPatientName() {
//        return patientName;
//    }
//
//    public void setPatientName(String patientName) {
//        this.patientName = patientName;
//    }
//
//
//    public String getDoctor() {
//        return doctor;
//    }
//
//    public void setDoctor(String doctor) {
//        this.doctor = doctor;
//    }
//
//
//    public String getDoctorName() {
//        return doctorName;
//    }
//
//    public void setDoctorName(String doctorName) {
//        this.doctorName = doctorName;
//    }
//
//
//    public String getArticle() {
//        return article;
//    }
//
//    public void setArticle(String article) {
//        this.article = article;
//    }
//}

+ 126 - 126
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistConsultDO.java

@ -1,126 +1,126 @@
package com.yihu.jw.entity.specialist;
import com.yihu.jw.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Trick on 2018/4/24.
 */
@Entity
@Table(name = "wlyy_specialist_consult")
public class SpecialistConsultDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "consult")
    private String consult;//关联咨询code
    @Column(name = "doctor")
    private String doctor;//专科医生
    @Column(name = "doctor_name")
    private String doctorName;//专科医生姓名
    @Column(name = "type")
    private String type;//类型:1.家庭医生咨询,2.居民咨询
    @Column(name = "member")
    private String member;//咨询对象
    @Column(name = "member_name")
    private String memberName;//咨询对象
    @Column(name = "status")
    private String status;// 1.咨询完成,0.咨询进行中
    @Column(name = "reply")
    private String reply;// 1.专科医生已经参与;0.~未参与
    @Column(name = "content")
    private String content;//咨询内容
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getConsult() {
        return consult;
    }
    public void setConsult(String consult) {
        this.consult = consult;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getMember() {
        return member;
    }
    public void setMember(String member) {
        this.member = member;
    }
    public String getMemberName() {
        return memberName;
    }
    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public String getReply() {
        return reply;
    }
    public void setReply(String reply) {
        this.reply = reply;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
}
//package com.yihu.jw.entity.specialist;
//
//import com.yihu.jw.IdEntityWithOperation;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.io.Serializable;
//
///**
// * Created by Trick on 2018/4/24.
// */
//@Entity
//@Table(name = "wlyy_specialist_consult")
//public class SpecialistConsultDO extends IdEntityWithOperation implements Serializable {
//    @Column(name = "saas_id")
//    private String saasId;
//    @Column(name = "consult")
//    private String consult;//关联咨询code
//    @Column(name = "doctor")
//    private String doctor;//专科医生
//    @Column(name = "doctor_name")
//    private String doctorName;//专科医生姓名
//    @Column(name = "type")
//    private String type;//类型:1.家庭医生咨询,2.居民咨询
//    @Column(name = "member")
//    private String member;//咨询对象
//    @Column(name = "member_name")
//    private String memberName;//咨询对象
//    @Column(name = "status")
//    private String status;// 1.咨询完成,0.咨询进行中
//    @Column(name = "reply")
//    private String reply;// 1.专科医生已经参与;0.~未参与
//    @Column(name = "content")
//    private String content;//咨询内容
//
//
//    public String getSaasId() {
//        return saasId;
//    }
//
//    public void setSaasId(String saasId) {
//        this.saasId = saasId;
//    }
//
//
//    public String getConsult() {
//        return consult;
//    }
//
//    public void setConsult(String consult) {
//        this.consult = consult;
//    }
//
//
//    public String getDoctor() {
//        return doctor;
//    }
//
//    public void setDoctor(String doctor) {
//        this.doctor = doctor;
//    }
//
//
//    public String getDoctorName() {
//        return doctorName;
//    }
//
//    public void setDoctorName(String doctorName) {
//        this.doctorName = doctorName;
//    }
//
//
//    public String getType() {
//        return type;
//    }
//
//    public void setType(String type) {
//        this.type = type;
//    }
//
//
//    public String getMember() {
//        return member;
//    }
//
//    public void setMember(String member) {
//        this.member = member;
//    }
//
//
//    public String getMemberName() {
//        return memberName;
//    }
//
//    public void setMemberName(String memberName) {
//        this.memberName = memberName;
//    }
//
//
//    public String getStatus() {
//        return status;
//    }
//
//    public void setStatus(String status) {
//        this.status = status;
//    }
//
//
//    public String getReply() {
//        return reply;
//    }
//
//    public void setReply(String reply) {
//        this.reply = reply;
//    }
//
//
//    public String getContent() {
//        return content;
//    }
//
//    public void setContent(String content) {
//        this.content = content;
//    }
//}

+ 116 - 116
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistDO.java

@ -1,116 +1,116 @@
package com.yihu.jw.entity.specialist;
import com.yihu.jw.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * Created by Trick on 2018/4/24.
 */
@Entity
@Table(name = "wlyy_specialist")
public class SpecialistDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "name")
    private String name; //专科医生姓名
    @Column(name = "profession")
    private String profession; //专业
    @Column(name = "profession_name")
    private String professionName; // 专业名称
    @Column(name = "dept")
    private String dept; //科室
    @Column(name = "dept_name")
    private String deptName; //科室名称
    @Column(name = "hospital")
    private String hospital;//医院
    @Column(name = "hospital_name")
    private String hospitalName;//医院名称
    @Column(name = "del")
    private String del;//1:有效;0:删除
    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 getProfession() {
        return profession;
    }
    public void setProfession(String profession) {
        this.profession = profession;
    }
    public String getProfessionName() {
        return professionName;
    }
    public void setProfessionName(String professionName) {
        this.professionName = professionName;
    }
    public String getDept() {
        return dept;
    }
    public void setDept(String dept) {
        this.dept = dept;
    }
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    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 String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}
//package com.yihu.jw.entity.specialist;
//
//import com.yihu.jw.IdEntityWithOperation;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.Table;
//import java.io.Serializable;
//
///**
// * Created by Trick on 2018/4/24.
// */
//@Entity
//@Table(name = "wlyy_specialist")
//public class SpecialistDO extends IdEntityWithOperation implements Serializable {
//    @Column(name = "saas_id")
//    private String saasId;
//    @Column(name = "name")
//    private String name; //专科医生姓名
//    @Column(name = "profession")
//    private String profession; //专业
//    @Column(name = "profession_name")
//    private String professionName; // 专业名称
//    @Column(name = "dept")
//    private String dept; //科室
//    @Column(name = "dept_name")
//    private String deptName; //科室名称
//
//    @Column(name = "hospital")
//    private String hospital;//医院
//    @Column(name = "hospital_name")
//    private String hospitalName;//医院名称
//    @Column(name = "del")
//    private String del;//1:有效;0:删除
//
//
//    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 getProfession() {
//        return profession;
//    }
//
//    public void setProfession(String profession) {
//        this.profession = profession;
//    }
//
//
//    public String getProfessionName() {
//        return professionName;
//    }
//
//
//    public void setProfessionName(String professionName) {
//        this.professionName = professionName;
//    }
//
//
//    public String getDept() {
//        return dept;
//    }
//
//    public void setDept(String dept) {
//        this.dept = dept;
//    }
//
//
//    public String getDeptName() {
//        return deptName;
//    }
//
//    public void setDeptName(String deptName) {
//        this.deptName = deptName;
//    }
//
//    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 String getDel() {
//        return del;
//    }
//
//    public void setDel(String del) {
//        this.del = del;
//    }
//}

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

@ -23,6 +23,7 @@ public class SpecialistMapping {
        public static final String getPatientByLabel ="/getPatientByLabel";
        public static final String getLabelpatientCount ="/getLabelpatientCount";
        public static final String getAssistantPatientCount ="/getAssistantPatientCount";
        public static final String getDoctorPatientByName ="/getDoctorPatientByName";
    }
}

+ 58 - 46
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -4,9 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.specialist.SpecialistArticleDO;
import com.yihu.jw.entity.specialist.SpecialistConsultDO;
import com.yihu.jw.entity.specialist.SpecialistDO;
import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.EnvelopRestController;
@ -39,20 +36,6 @@ public class SpecialistController extends EnvelopRestController {
    @Autowired
    private Tracer tracer;
    @PostMapping(value = SpecialistMapping.specialist.createSpecialists)
    @ApiOperation(value = "创建专科医生")
    public Envelop<Boolean> createSpecialists(@ApiParam(name = "specialists", value = "专科医生实体")
                                                  @RequestParam(value = "code", required = false)String specialists){
        try {
            List<SpecialistDO> infos = new ObjectMapper().readValue(specialists, new TypeReference<List<SpecialistDO>>(){});
            return specialistService.createSpecialists(infos);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = SpecialistMapping.specialist.createSpecialistRelation)
    @ApiOperation(value = "创建专科医生与患者匹配关系")
    public Envelop<Boolean> createSpecialistPatientRelation(@ApiParam(name = "specialistPatientRelation", value = "实体JSON")
@ -67,34 +50,6 @@ public class SpecialistController extends EnvelopRestController {
        }
    }
    @PostMapping(value = SpecialistMapping.specialist.createConsult)
    @ApiOperation(value = "创建专科医生咨询")
    public Envelop<Boolean> createSpscialistConsult(@ApiParam(name = "specialistConsult", value = "专科医生咨询实体JSON")
                                                        @RequestParam(value = "specialistConsult", required = false)String specialistConsult){
        try {
            SpecialistConsultDO ps = toEntity(specialistConsult, SpecialistConsultDO.class);
            return specialistService.createSpscialistConsult(ps);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = SpecialistMapping.specialist.createArticle)
    @ApiOperation(value = "创建专科医生健康文章")
    public Envelop<Boolean> createSpecialistArticle(@ApiParam(name = "specialistArticle", value = "专科医生健康文章JSON")
                                                        @RequestParam(value = "specialistArticle", required = false)String specialistArticle){
        try {
            SpecialistArticleDO ps = toEntity(specialistArticle, SpecialistArticleDO.class);
            return specialistService.createSpecialistArticle(ps);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.findSpecialistPatientRelation)
    @ApiOperation(value = "获取专科医生关系列表")
    public Envelop<SpecialistPatientRelationVO> findSpecialistPatientRelation(@ApiParam(name = "doctor", value = "专科医生ID")
@ -136,7 +91,7 @@ public class SpecialistController extends EnvelopRestController {
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.saveHealthAssistant)
    @PostMapping(value = SpecialistMapping.specialist.saveHealthAssistant)
    @ApiOperation(value = "保存配置居民计管师居民")
    public Envelop<Boolean> saveHealthAssistant(@ApiParam(name = "json", value = "计管师居民实体") @RequestParam(required = true)String json){
        try {
@ -206,4 +161,61 @@ public class SpecialistController extends EnvelopRestController {
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.getDoctorPatientByName)
    @ApiOperation(value = "搜索专科医生居民")
    public Envelop<PatientRelationVO> getDoctorPatientByName(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
                                                             @ApiParam(name = "name", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
                                                             @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
                                                             @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
        try {
            return specialistService.getDoctorPatientByName(doctor,nameKey,page,size);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
//    @PostMapping(value = SpecialistMapping.specialist.createArticle)
//    @ApiOperation(value = "创建专科医生健康文章")
//    public Envelop<Boolean> createSpecialistArticle(@ApiParam(name = "specialistArticle", value = "专科医生健康文章JSON")
//                                                    @RequestParam(value = "specialistArticle", required = false)String specialistArticle){
//        try {
//            SpecialistArticleDO ps = toEntity(specialistArticle, SpecialistArticleDO.class);
//            return specialistService.createSpecialistArticle(ps);
//        }catch (Exception e){
//            e.printStackTrace();
//            tracer.getCurrentSpan().logEvent(e.getMessage());
//            return Envelop.getError(e.getMessage());
//        }
//    }
//    @PostMapping(value = SpecialistMapping.specialist.createConsult)
//    @ApiOperation(value = "创建专科医生咨询")
//    public Envelop<Boolean> createSpscialistConsult(@ApiParam(name = "specialistConsult", value = "专科医生咨询实体JSON")
//                                                    @RequestParam(value = "specialistConsult", required = false)String specialistConsult){
//        try {
//            SpecialistConsultDO ps = toEntity(specialistConsult, SpecialistConsultDO.class);
//            return specialistService.createSpscialistConsult(ps);
//        }catch (Exception e){
//            e.printStackTrace();
//            tracer.getCurrentSpan().logEvent(e.getMessage());
//            return Envelop.getError(e.getMessage());
//        }
//    }
//    @PostMapping(value = SpecialistMapping.specialist.createSpecialists)
//    @ApiOperation(value = "创建专科医生")
//    public Envelop<Boolean> createSpecialists(@ApiParam(name = "specialists", value = "专科医生实体")
//                                              @RequestParam(value = "code", required = false)String specialists){
//        try {
//            List<SpecialistDO> infos = new ObjectMapper().readValue(specialists, new TypeReference<List<SpecialistDO>>(){});
//            return specialistService.createSpecialists(infos);
//        }catch (Exception e){
//            e.printStackTrace();
//            tracer.getCurrentSpan().logEvent(e.getMessage());
//            return Envelop.getError(e.getMessage());
//        }
//    }
}

+ 12 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/PatientLabelDao.java

@ -1,12 +1,12 @@
package com.yihu.jw.dao;
import com.yihu.jw.entity.specialist.PatientLabelDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2018/5/29.
 */
public interface PatientLabelDao extends PagingAndSortingRepository<PatientLabelDO, String>,
        JpaSpecificationExecutor<PatientLabelDO> {
}
//package com.yihu.jw.dao;
//
//import com.yihu.jw.entity.specialist.PatientLabelDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by Trick on 2018/5/29.
// */
//public interface PatientLabelDao extends PagingAndSortingRepository<PatientLabelDO, String>,
//        JpaSpecificationExecutor<PatientLabelDO> {
//}

+ 12 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/PatientLabelInfoDao.java

@ -1,12 +1,12 @@
package com.yihu.jw.dao;
import com.yihu.jw.entity.specialist.PatientLabelDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2018/5/29.
 */
public interface PatientLabelInfoDao extends PagingAndSortingRepository<PatientLabelDO, String>,
        JpaSpecificationExecutor<PatientLabelDO> {
}
//package com.yihu.jw.dao;
//
//import com.yihu.jw.entity.specialist.PatientLabelDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by Trick on 2018/5/29.
// */
//public interface PatientLabelInfoDao extends PagingAndSortingRepository<PatientLabelDO, String>,
//        JpaSpecificationExecutor<PatientLabelDO> {
//}

+ 12 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistArticleDao.java

@ -1,12 +1,12 @@
package com.yihu.jw.dao;
import com.yihu.jw.entity.specialist.SpecialistArticleDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2018/4/25.
 */
public interface SpecialistArticleDao extends PagingAndSortingRepository<SpecialistArticleDO, String>,
        JpaSpecificationExecutor<SpecialistArticleDO> {
}
//package com.yihu.jw.dao;
//
//import com.yihu.jw.entity.specialist.SpecialistArticleDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by Trick on 2018/4/25.
// */
//public interface SpecialistArticleDao extends PagingAndSortingRepository<SpecialistArticleDO, String>,
//        JpaSpecificationExecutor<SpecialistArticleDO> {
//}

+ 12 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistConsultDao.java

@ -1,12 +1,12 @@
package com.yihu.jw.dao;
import com.yihu.jw.entity.specialist.SpecialistConsultDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2018/4/25.
 */
public interface SpecialistConsultDao extends PagingAndSortingRepository<SpecialistConsultDO, String>,
        JpaSpecificationExecutor<SpecialistConsultDO> {
}
//package com.yihu.jw.dao;
//
//import com.yihu.jw.entity.specialist.SpecialistConsultDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by Trick on 2018/4/25.
// */
//public interface SpecialistConsultDao extends PagingAndSortingRepository<SpecialistConsultDO, String>,
//        JpaSpecificationExecutor<SpecialistConsultDO> {
//}

+ 12 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistDao.java

@ -1,12 +1,12 @@
package com.yihu.jw.dao;
import com.yihu.jw.entity.specialist.SpecialistDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2018/4/25.
 */
public interface SpecialistDao extends PagingAndSortingRepository<SpecialistDO, String>,
        JpaSpecificationExecutor<SpecialistDO> {
}
//package com.yihu.jw.dao;
//
//import com.yihu.jw.entity.specialist.SpecialistDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by Trick on 2018/4/25.
// */
//public interface SpecialistDao extends PagingAndSortingRepository<SpecialistDO, String>,
//        JpaSpecificationExecutor<SpecialistDO> {
//}

+ 42 - 21
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -23,41 +23,26 @@ import java.util.Map;
@Transactional
public class SpecialistService{
    @Autowired
    private SpecialistArticleDao specialistArticleDao;
    @Autowired
    private SpecialistConsultDao specialistConsultDao;
//    @Autowired
//    private SpecialistArticleDao specialistArticleDao;
//    @Autowired
//    private SpecialistConsultDao specialistConsultDao;
//    @Autowired
//    private SpecialistDao specialistDao;
    @Autowired
    private SpecialistPatientRelationDao specialistPatientRelationDao;
    @Autowired
    private SpecialistDao specialistDao;
    @Autowired
    private PatientHospitalRecordDao patientHospitalRecordDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${basedb.name}")
    private String basedb;
    public Envelop<Boolean> createSpecialists(List<SpecialistDO> info){
        specialistDao.save(info);
        return Envelop.getSuccess(SpecialistMapping.api_success,true);
    }
    public Envelop<Boolean> createSpecialistsPatientRelation(SpecialistPatientRelationDO specialistPatientRelationDO){
        specialistPatientRelationDao.save(specialistPatientRelationDO);
        return Envelop.getSuccess(SpecialistMapping.api_success,true);
    }
    public Envelop<Boolean> createSpecialistArticle(SpecialistArticleDO articleDO){
        specialistArticleDao.save(articleDO);
        return Envelop.getSuccess(SpecialistMapping.api_success,true);
    }
    public Envelop<Boolean> createSpscialistConsult(SpecialistConsultDO consultDO){
        specialistConsultDao.save(consultDO);
        return Envelop.getSuccess(SpecialistMapping.api_success,true);
    }
    public Envelop<SpecialistPatientRelationVO> findSpecialistPatientRelation(String doctor,Integer page,Integer size)throws ParseException {
        String sql = "SELECT " +
                " r.id, " +
@ -263,4 +248,40 @@ public class SpecialistService{
        }
        return Envelop.getSuccess(SpecialistMapping.api_success,count);
    }
    public Envelop<PatientRelationVO> getDoctorPatientByName(String doctor,String nameKey,Integer page,Integer size){
        String sql ="SELECT " +
                " p.code AS patient, " +
                " p.`name` AS patientName, " +
                " p.photo, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.sex " +
                " FROM " +
                " wlyy_specialist_patient_relation r " +
                " JOIN "+basedb+".wlyy_patient p ON r.patient = p.`code` " +
                " WHERE " +
                " r.doctor='"+doctor+"' " +
                " AND r.`status`<>'-1'" +
                " AND r.patient_name LIKE '%"+nameKey+"%' "+
                " LIMIT "+(page-1)*size+","+size;
        List<PatientRelationVO> patientRelationVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientRelationVO.class));
        return Envelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
    }
//    public Envelop<Boolean> createSpecialists(List<SpecialistDO> info){
//        specialistDao.save(info);
//        return Envelop.getSuccess(SpecialistMapping.api_success,true);
//    }
//    public Envelop<Boolean> createSpecialistArticle(SpecialistArticleDO articleDO){
//        specialistArticleDao.save(articleDO);
//        return Envelop.getSuccess(SpecialistMapping.api_success,true);
//    }
//
//    public Envelop<Boolean> createSpscialistConsult(SpecialistConsultDO consultDO){
//        specialistConsultDao.save(consultDO);
//        return Envelop.getSuccess(SpecialistMapping.api_success,true);
//    }
}