瀏覽代碼

bug对应

zdm 6 年之前
父節點
當前提交
bf01b1a7b4

+ 2 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -140,9 +140,10 @@ public class SpecialistController extends EnvelopRestEndpoint {
    @ApiOperation(value = "根据标签获取居民数量")
    public MixEnvelop<Long, Long> getLabelpatientCount(@ApiParam(name = "doctor", value = "医生") @RequestParam(required = true)String doctor,
                                                 @ApiParam(name = "labelType", value = "标签类型") @RequestParam(required = true)String labelType,
                                                       @ApiParam(name = "teamCode", value = "医生团队") @RequestParam(required = true)Long teamCode,
                                                 @ApiParam(name = "labelCode", value = "标签code") @RequestParam(required = true)String labelCode) {
        try {
            return specialistService.getLabelpatientCount(doctor,labelType,labelCode);
            return specialistService.getLabelpatientCount(doctor,labelType,labelCode,teamCode);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());

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

@ -252,7 +252,7 @@ public class SpecialistService{
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
    }
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String labelType, String label){
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String labelType, String label,Long teamCode){
        String sql = "SELECT " +
                " COUNT(1) as total " +
                " FROM " +
@ -269,8 +269,10 @@ public class SpecialistService{
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.`status` = '1' " +
                " AND i.patient in ( " +
                " select patient from  wlyy_specialist_patient_relation  WHERE " +
                "( doctor = '"+doctor+"' OR health_doctor = '"+doctor+"' OR health_assistant='"+doctor+ "' ) AND STATUS >= 0 AND sign_status > 0 )";
                " select patient from  wlyy_specialist_patient_relation  WHERE doctor in" +
                "  (SELECT m.doctor_code FROM  wlyy.wlyy_admin_team_member m where m.team_id ='" +teamCode+"') "+
               /* "*//*( doctor = '"+doctor+"' OR health_doctor = '"+doctor+"' OR health_assistant='"+doctor+ "' ) *//*" +*/
                " AND STATUS >= 0 AND sign_status > 0 )";
//                +" ) lb ";
        System.out.print("日志:"+sql);
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
@ -527,8 +529,9 @@ public class SpecialistService{
                " JOIN "+basedb+".wlyy_admin_team t ON t.id = r.team_code " +
                " WHERE " +
                " r.id = '"+code+"'";
        List<PatientSignInfoVO> patientSignInfoVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientSignInfoVO.class));
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientSignInfoVOs.get(0));
        List<PatientSignInfoVO> patientSignInfoVOs = jdbcTemplate.query(sql, new BeanPropertyRowMapper(PatientSignInfoVO.class));
        PatientSignInfoVO patientSignInfoVO = (null != patientSignInfoVOs && patientSignInfoVOs.size() > 0 ? patientSignInfoVOs.get(0) : new PatientSignInfoVO());
        return MixEnvelop.getSuccess(SpecialistMapping.api_success, patientSignInfoVO);
    }
    public MixEnvelop<SpecialistTeamVO, SpecialistTeamVO> findPatientTeamList(String patient){