trick9191 6 лет назад
Родитель
Сommit
6e3e26a93e

+ 39 - 21
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/PatientHospitalRecordDO.java

@ -13,29 +13,48 @@ import java.io.Serializable;
@Entity
@Table(name = "wlyy_patient_hospital_record")
public class PatientHospitalRecordDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;//
    @Column(name = "third_code")
    private String thirdCode;//智业记录code
    @Column(name = "event_code")
    private String eventCode; // 事件code
    @Column(name = "patient")
    private String patient;//患者
    @Column(name = "patient_name")
    private String patientName;//患者姓名
    @Column(name = "type")
    private String type;//出院:1;住院:0
    @Column(name = "hospital")
    private String hospital; //医院
    @Column(name = "hospital_name")
    private String hospitalName;
    @Column(name = "doctor")
    private String doctor; //医生
    @Column(name = "doctor_name")
    private String doctorName;
    @Column(name = "city")
    private String city; //城市
    @Column(name = "city_name")
    private String cityName;
    @Column(name = "town")
    private String town; //城镇
    @Column(name = "town_name")
    private String townName;
    @Column(name = "remark")
    private String remark; //备注
    @Column(name = "diagnosis")
    private String diagnosis; //诊断
    @Column(name = "label")
    private String label; //标签
    @Column(name = "label_name")
    private String labelName;
    @Column(name = "dept")
    private String dept;//部门
    @Column(name = "dept_name")
    private String deptName;
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -44,7 +63,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.saasId = saasId;
    }
    @Column(name = "third_code")
    public String getThirdCode() {
        return thirdCode;
    }
@ -53,7 +72,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.thirdCode = thirdCode;
    }
    @Column(name = "event_code")
    public String getEventCode() {
        return eventCode;
    }
@ -62,7 +81,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.eventCode = eventCode;
    }
    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
@ -71,7 +90,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.hospital = hospital;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
@ -80,7 +99,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.hospitalName = hospitalName;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -89,7 +108,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -98,7 +117,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.doctorName = doctorName;
    }
    @Column(name = "city")
    public String getCity() {
        return city;
    }
@ -107,7 +126,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.city = city;
    }
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
@ -116,7 +135,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.cityName = cityName;
    }
    @Column(name = "town")
    public String getTown() {
        return town;
    }
@ -125,7 +144,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.town = town;
    }
    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
@ -134,7 +153,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.townName = townName;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
@ -143,7 +162,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.remark = remark;
    }
    @Column(name = "diagnosis")
    public String getDiagnosis() {
        return diagnosis;
    }
@ -152,7 +171,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.diagnosis = diagnosis;
    }
    @Column(name = "label")
    public String getLabel() {
        return label;
    }
@ -161,7 +180,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.label = label;
    }
    @Column(name = "label_name")
    public String getLabelName() {
        return labelName;
    }
@ -170,7 +189,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.labelName = labelName;
    }
    @Column(name = "dept")
    public String getDept() {
        return dept;
    }
@ -179,7 +198,6 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.dept = dept;
    }
    @Column(name = "dept_ame")
    public String getDeptName() {
        return deptName;
    }
@ -188,7 +206,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.deptName = deptName;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
@ -197,7 +215,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.patient = patient;
    }
    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
@ -206,7 +224,7 @@ public class PatientHospitalRecordDO extends IdEntityWithOperation implements Se
        this.patientName = patientName;
    }
    @Column(name = "type")
    public String getType() {
        return type;
    }

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

@ -14,15 +14,22 @@ import java.io.Serializable;
@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:删除',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -31,7 +38,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.saasId = saasId;
    }
    @Column(name = "label_name")
    public String getLabelName() {
        return labelName;
    }
@ -40,7 +47,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.labelName = labelName;
    }
    @Column(name = "label_code")
    public String getLabelCode() {
        return labelCode;
    }
@ -49,7 +56,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.labelCode = labelCode;
    }
    @Column(name = "label_type")
    public String getLabelType() {
        return labelType;
    }
@ -58,7 +65,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.labelType = labelType;
    }
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }
@ -67,7 +74,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.sort = sort;
    }
    @Column(name = "team_code")
    public String getTeamCode() {
        return teamCode;
    }
@ -76,7 +83,7 @@ public class PatientLabelDO extends IdEntityWithOperation implements Serializabl
        this.teamCode = teamCode;
    }
    @Column(name = "del")
    public String getDel() {
        return del;
    }

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

@ -14,14 +14,20 @@ import java.io.Serializable;
@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',
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -30,7 +36,7 @@ public class PatientLabelInfoDO extends IdEntityWithOperation implements Seriali
        this.saasId = saasId;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
@ -39,7 +45,7 @@ public class PatientLabelInfoDO extends IdEntityWithOperation implements Seriali
        this.patient = patient;
    }
    @Column(name = "label_name")
    public String getLabelName() {
        return labelName;
    }
@ -48,7 +54,7 @@ public class PatientLabelInfoDO extends IdEntityWithOperation implements Seriali
        this.labelName = labelName;
    }
    @Column(name = "label_code")
    public String getLabelCode() {
        return labelCode;
    }
@ -57,7 +63,7 @@ public class PatientLabelInfoDO extends IdEntityWithOperation implements Seriali
        this.labelCode = labelCode;
    }
    @Column(name = "label_type")
    public String getLabelType() {
        return labelType;
    }
@ -66,7 +72,7 @@ public class PatientLabelInfoDO extends IdEntityWithOperation implements Seriali
        this.labelType = labelType;
    }
    @Column(name = "team_code")
    public String getTeamCode() {
        return teamCode;
    }

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

@ -14,14 +14,20 @@ import java.io.Serializable;
@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;//文章
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -30,7 +36,7 @@ public class SpecialistArticleDO extends IdEntityWithOperation implements Serial
        this.saasId = saasId;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
@ -39,7 +45,7 @@ public class SpecialistArticleDO extends IdEntityWithOperation implements Serial
        this.patient = patient;
    }
    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
@ -48,7 +54,7 @@ public class SpecialistArticleDO extends IdEntityWithOperation implements Serial
        this.patientName = patientName;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -57,7 +63,7 @@ public class SpecialistArticleDO extends IdEntityWithOperation implements Serial
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -66,7 +72,7 @@ public class SpecialistArticleDO extends IdEntityWithOperation implements Serial
        this.doctorName = doctorName;
    }
    @Column(name = "article")
    public String getArticle() {
        return article;
    }

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

@ -13,19 +13,28 @@ import java.io.Serializable;
@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;//咨询内容
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -34,7 +43,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.saasId = saasId;
    }
    @Column(name = "consult")
    public String getConsult() {
        return consult;
    }
@ -43,7 +52,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.consult = consult;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -52,7 +61,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -61,7 +70,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.doctorName = doctorName;
    }
    @Column(name = "type")
    public String getType() {
        return type;
    }
@ -70,7 +79,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.type = type;
    }
    @Column(name = "member")
    public String getMember() {
        return member;
    }
@ -79,7 +88,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.member = member;
    }
    @Column(name = "member_name")
    public String getMemberName() {
        return memberName;
    }
@ -88,7 +97,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.memberName = memberName;
    }
    @Column(name = "status")
    public String getStatus() {
        return status;
    }
@ -97,7 +106,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.status = status;
    }
    @Column(name = "reply")
    public String getReply() {
        return reply;
    }
@ -106,7 +115,7 @@ public class SpecialistConsultDO extends IdEntityWithOperation implements Serial
        this.reply = reply;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }

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

@ -13,18 +13,27 @@ import java.io.Serializable;
@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:删除
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -33,7 +42,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.saasId = saasId;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
@ -42,7 +51,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.name = name;
    }
    @Column(name = "profession")
    public String getProfession() {
        return profession;
    }
@ -51,7 +60,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.profession = profession;
    }
    @Column(name = "profession_name")
    public String getProfessionName() {
        return professionName;
    }
@ -61,7 +70,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.professionName = professionName;
    }
    @Column(name = "dept")
    public String getDept() {
        return dept;
    }
@ -70,7 +79,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.dept = dept;
    }
    @Column(name = "dept_name")
    public String getDeptName() {
        return deptName;
    }
@ -79,7 +88,6 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.deptName = deptName;
    }
    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
@ -88,7 +96,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.hospital = hospital;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
@ -97,7 +105,7 @@ public class SpecialistDO extends IdEntityWithOperation implements Serializable
        this.hospitalName = hospitalName;
    }
    @Column(name = "del")
    public String getDel() {
        return del;
    }

+ 38 - 20
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistPatientRelationDO.java

@ -15,26 +15,61 @@ import java.util.Date;
@Table(name = "wlyy_specialist_patient_relation")
public class SpecialistPatientRelationDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId;
    @Column(name = "discharge_record")
    private String dischargeRecord;//最新出院记录
    @Column(name = "doctor")
    private String doctor;//专科医生
    @Column(name = "doctor_name")
    private String doctorName;//专科医生姓名
    @Column(name = "patient")
    private String patient;// 居民(患者)
    @Column(name = "patient_name")
    private String patientName;//居民(患者)姓名
    @Column(name = "health_assistant")
    private String healthAssistant;//计管师
    @Column(name = "health_assistant_name")
    private String healthAssistantName;//计管师
    @Column(name = "status")
    private String status;//1.已经分配,0,待分配
    @Column(name = "pk_code")
    private String pkCode; //服务包code
    @Column(name = "sign_code")
    private String signCode;//签约code
    @Column(name = "sign_doctor")
    private String signDoctor;//签约医生
    @Column(name = "sign_doctor_name")
    private String signDoctorName;//签约医生
    @Column(name = "health_doctor")
    private String healthDoctor;//健康管理师
    @Column(name = "health_doctor_name")
    private String healthDoctorName;//健康管理师姓名
    @Column(name = "sign_year")
    private String signYear;//签约年度
    @Column(name = "team_code")
    private Integer teamCode;//签约团队
    @Column(name = "sign_date")
    private Date signDate;//签约日期
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
@ -43,7 +78,7 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.saasId = saasId;
    }
    @Column(name = "discharge_record")
    public String getDischargeRecord() {
        return dischargeRecord;
    }
@ -52,7 +87,7 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.dischargeRecord = dischargeRecord;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
@ -61,7 +96,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
@ -70,7 +104,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.doctorName = doctorName;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
@ -79,7 +112,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.patient = patient;
    }
    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
@ -88,7 +120,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.patientName = patientName;
    }
    @Column(name = "status")
    public String getStatus() {
        return status;
    }
@ -97,7 +128,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.status = status;
    }
    @Column(name = "sign_code")
    public String getSignCode() {
        return signCode;
    }
@ -106,7 +136,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.signCode = signCode;
    }
    @Column(name = "sign_doctor")
    public String getSignDoctor() {
        return signDoctor;
    }
@ -115,7 +144,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.signDoctor = signDoctor;
    }
    @Column(name = "sign_doctor_name")
    public String getSignDoctorName() {
        return signDoctorName;
    }
@ -124,7 +152,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.signDoctorName = signDoctorName;
    }
    @Column(name = "health_doctor")
    public String getHealthDoctor() {
        return healthDoctor;
    }
@ -133,7 +160,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.healthDoctor = healthDoctor;
    }
    @Column(name = "health_doctor_name")
    public String getHealthDoctorName() {
        return healthDoctorName;
    }
@ -142,7 +168,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.healthDoctorName = healthDoctorName;
    }
    @Column(name = "sign_year")
    public String getSignYear() {
        return signYear;
    }
@ -151,9 +176,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.signYear = signYear;
    }
    @Column(name = "sign_date")
    public Date getSignDate() {
        return signDate;
    }
@ -162,7 +184,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.signDate = signDate;
    }
    @Column(name = "team_code")
    public Integer getTeamCode() {
        return teamCode;
    }
@ -171,7 +192,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.teamCode = teamCode;
    }
    @Column(name = "health_assistant")
    public String getHealthAssistant() {
        return healthAssistant;
    }
@ -180,7 +200,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.healthAssistant = healthAssistant;
    }
    @Column(name = "health_assistant_name")
    public String getHealthAssistantName() {
        return healthAssistantName;
    }
@ -189,7 +208,6 @@ public class SpecialistPatientRelationDO extends IdEntityWithOperation implement
        this.healthAssistantName = healthAssistantName;
    }
    @Column(name = "pk_code")
    public String getPkCode() {
        return pkCode;
    }

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

@ -16,5 +16,9 @@ public class SpecialistMapping {
        public static final String createConsult = "/createConsult";
        public static final String createArticle = "/createArticle";
        public static final String findSpecialistPatientRelation = "/findSpecialistPatientRelation";
        public static final String findSpecialistPatientRelationCout = "/findSpecialistPatientRelationCout";
        public static final String findNoLabelPatientRelation ="/findNoLabelPatientRelation";
        public static final String saveHealthAssistant ="/saveHealthAssistant";
    }
}

+ 13 - 0
common/common-rest-model/pom.xml

@ -31,6 +31,7 @@
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
            <version>${parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
@ -52,5 +53,17 @@
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
        </dependency>
    </dependencies>
</project>

+ 1 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/common/EnvelopRestController.java

@ -4,6 +4,7 @@ package com.yihu.jw.restmodel.common;
import com.fasterxml.jackson.databind.ObjectMapper;
//import com.yihu.jw.exception.ApiException;
//import com.yihu.jw.exception.code.ExceptionCode;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.exception.code.ExceptionCode;
import com.yihu.jw.util.date.DateUtil;

+ 44 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/specialist/AssistantVO.java

@ -0,0 +1,44 @@
package com.yihu.jw.restmodel.specialist;
/**
 * Created by Trick on 2018/5/31.
 */
public class AssistantVO {
    private String doctor;
    private String patient;
    private String healthAssistant;
    private String healthAssistantName;
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getHealthAssistant() {
        return healthAssistant;
    }
    public void setHealthAssistant(String healthAssistant) {
        this.healthAssistant = healthAssistant;
    }
    public String getHealthAssistantName() {
        return healthAssistantName;
    }
    public void setHealthAssistantName(String healthAssistantName) {
        this.healthAssistantName = healthAssistantName;
    }
}

+ 40 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -1,5 +1,7 @@
package com.yihu.jw.controller;
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;
@ -8,6 +10,8 @@ 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;
import com.yihu.jw.restmodel.specialist.AssistantVO;
import com.yihu.jw.restmodel.specialist.PatientRelationVO;
import com.yihu.jw.restmodel.specialist.SpecialistPatientRelationVO;
import com.yihu.jw.rm.archives.PatientArchivesMapping;
import com.yihu.jw.rm.specialist.SpecialistMapping;
@ -107,5 +111,41 @@ public class SpecialistController extends EnvelopRestController {
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.findSpecialistPatientRelationCout)
    @ApiOperation(value = "获取专科医生下未分配标签居民数目")
    public Envelop<Long> findSpecialistPatientRelationCout(String doctor){
        try {
            return specialistService.findSpecialistPatientRelationCout(doctor);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.findNoLabelPatientRelation)
    @ApiOperation(value = "获取专科医生下未分配标签居民")
    public Envelop<PatientRelationVO> findNoLabelPatientRelation(String doctor){
        try {
            return specialistService.findNoLabelPatientRelation(doctor);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.saveHealthAssistant)
    @ApiOperation(value = "保存配置居民计管师居民")
    public Envelop<Boolean> saveHealthAssistant(String json){
        try {
            List<SpecialistPatientRelationDO> info = (List<SpecialistPatientRelationDO>) JSONArray.parseArray(json, SpecialistPatientRelationDO.class);
            return specialistService.saveHealthAssistant(info);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
}

+ 2 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistPatientRelationDao.java

@ -12,4 +12,6 @@ import java.util.List;
public interface SpecialistPatientRelationDao extends PagingAndSortingRepository<SpecialistPatientRelationDO, String>,
        JpaSpecificationExecutor<SpecialistPatientRelationDO> {
    public List<SpecialistPatientRelationDO> findByDoctorAndStatus(String doctor,String status);
    public SpecialistPatientRelationDO findByDoctorAndPatient(String doctor,String patient);
}

+ 38 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -109,7 +109,8 @@ public class SpecialistService{
                " FROM " +
                " "+basedb+".wlyy_sign_patient_label_info i " +
                " WHERE " +
                " i.label_type = '5' " +
                " i.label_type = '5' AND " +
                " i.status = 1 " +
                " )";
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        Long count = 0L;
@ -119,6 +120,41 @@ public class SpecialistService{
        return Envelop.getSuccess(SpecialistMapping.api_success,count);
    }
//    public Envelop<PatientRelationVO>
    public Envelop<PatientRelationVO> findNoLabelPatientRelation(String doctor){
        String sql ="SELECT " +
                " r.patient, " +
                " r.patient_name AS patientName, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo, " +
                " rd.create_time AS createTime " +
                " FROM " +
                " wlyy_specialist_patient_relation r JOIN "+basedb+".wlyy_patient p ON p.code = r.patient  " +
                " LEFT JOIN wlyy_patient_hospital_record rd ON r.discharge_record = rd.id " +
                " WHERE " +
                " r.patient " +
                " NOT IN ( " +
                "  SELECT " +
                "   i.patient " +
                "  FROM " +
                "   wlyy.wlyy_sign_patient_label_info i " +
                "  WHERE " +
                "   i.label_type = '5' AND " +
                "   i.status = 1 " +
                " )";
        List<PatientRelationVO> patientRelationVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientRelationVO.class));
        return Envelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
    }
    public Envelop<Boolean> saveHealthAssistant(List<SpecialistPatientRelationDO> specialistPatientRelationDOs){
        for(SpecialistPatientRelationDO r : specialistPatientRelationDOs){
            SpecialistPatientRelationDO relationDO = specialistPatientRelationDao.findByDoctorAndPatient(r.getDoctor(),r.getPatient());
            if(relationDO!=null){
                relationDO.setHealthAssistant(r.getHealthAssistant());
                relationDO.setHealthAssistantName(r.getHealthAssistantName());
                specialistPatientRelationDao.save(relationDO);
            }
        }
        return Envelop.getSuccess(SpecialistMapping.api_success,true);
    }
}