Ver código fonte

Merge branch 'dev' of zengmengkang/wlyy2.0 into dev

huangwenjie 5 anos atrás
pai
commit
77f8cec50c

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

@ -672,5 +672,6 @@ public class BaseHospitalRequestMapping {
        public static final String findDoctorInfo="/findDoctorInfo";
        public static final String isExistsUnfinishedConsult ="/isExistsUnfinishedConsult";
        public static final String getJobBySaasId ="/getJobBySaasId";
        public static final String findWorkTimeInfo="/findWorkTimeInfo";
    }
}

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

@ -26,6 +26,7 @@ public class SpecialistMapping {
        public static final String getLabelpatientCount ="/getLabelpatientCount";
        public static final String getAssistantPatientCount ="/getAssistantPatientCount";
        public static final String getDoctorPatientByName ="/getDoctorPatientByName";
        public static final String getDoctorPatientByNameOrIdCard ="/getDoctorPatientByNameOrIdCard";
        public static final String findPatientNoAssistant ="/findPatientNoAssistant";
        public static final String signSpecialistTeam ="/signSpecialistTeam";
        public static final String agreeSpecialistTeam ="/agreeSpecialistTeam";

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

@ -13,8 +13,12 @@ public class PatientRelationVO {
    @ApiModelProperty("居民code")
    private String patient;
    @ApiModelProperty("code")
    private String code;
    @ApiModelProperty("居民姓名")
    private String patientName;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("年龄")
    private String age;
    @ApiModelProperty("性别")
@ -36,6 +40,14 @@ public class PatientRelationVO {
        this.patient = patient;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getPatientName() {
        return patientName;
    }
@ -44,6 +56,14 @@ public class PatientRelationVO {
        this.patientName = patientName;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAge() {
        return age;
    }

+ 8 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -173,4 +173,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findWorkTimeInfo)
    @ApiOperation(value = "获取具体号源", notes = "获取具体号源")
    public ListEnvelop findWorkTimeInfo(@ApiParam(name = "id", value = "排班id")
                                        @RequestParam(value = "id", required = false)String id) {
        return success(prescriptionService.findWorkTimeInfo(id));
    }
}

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

@ -181,6 +181,24 @@ public class SpecialistController extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.getDoctorPatientByNameOrIdCard)
    @ApiOperation(value = "根据姓名或身份证号搜索专科医生居民")
    public MixEnvelop<PatientRelationVO, PatientRelationVO> getDoctorPatientByNameOrIdCard(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
                                                                                   @ApiParam(name = "filter", value = "居民姓名模糊") @RequestParam(required = false)String filter,
                                                                                   @ApiParam(name = "teamCode", value = "医生当前所在团队") @RequestParam(required = true) String teamCode,
                                                                                   @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
                                                                                   @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
        try {
            return specialistService.getDoctorPatientByNameOrIdCard(doctor,filter,teamCode,page,size);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.specialist.findPatientNoAssistant)
    @ApiOperation(value = "获取未分配计管师居民列表")
    public MixEnvelop<PatientRelationVO, PatientRelationVO> findPatientNoAssistant(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,

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

@ -319,6 +319,44 @@ public class SpecialistService{
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
    }
    public MixEnvelop<PatientRelationVO, PatientRelationVO> getDoctorPatientByNameOrIdCard(String doctor, String filter,String teamCode, Integer page, Integer size){
        String sql ="SELECT " +
                " p.code AS code, " +
                " p.`name` AS name, " +
                " p.photo, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.sex ," +
                " h.label_name as health, " +
                " h.label AS healthcode " +
                " FROM " +
                " wlyy_specialist_patient_relation r " +
                " JOIN "+basedb+".wlyy_patient p ON r.patient = p.`code` " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = r.patient " +
                " WHERE " +
                " r.doctor IN ( SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m WHERE m.team_id ='" +teamCode+
                "' ) " +
                " AND r.status >=0  AND r.sign_status >0 " +
                " AND (r.patient_name LIKE '%"+filter+"%' OR p.idcard LIKE '%"+filter+"%') "+
                " LIMIT "+(page-1)*size+","+size;
        List<PatientRelationVO> patientRelationVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientRelationVO.class));
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
    }
    public MixEnvelop<PatientRelationVO, PatientRelationVO> findPatientNoAssistant(String doctor, Integer page, Integer size){
        String sqlTotal ="SELECT " +