huangwenjie 5 سال پیش
والد
کامیت
55f5659347

+ 35 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/YkyyController.java

@ -2,12 +2,17 @@ package com.yihu.jw.entrance.controller;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.prescription.HlwCf01DO;
import com.yihu.jw.entity.hospital.prescription.HlwCf02DO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -18,6 +23,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
@ -32,6 +39,14 @@ public class YkyyController extends EnvelopRestEndpoint {
    private YkyyEntranceService ykyyEntranceService;
    @Autowired
    private ObjectMapper objectMapper;
    
    @Autowired
    private PrescriptionService prescriptionService;
    @Autowired
    private ImService imService;
    
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @GetMapping(value = "/createSQLQuery")
    @ApiOperation(value = "视图统一查询")
@ -65,4 +80,24 @@ public class YkyyController extends EnvelopRestEndpoint {
        return success(envelop);
    }
    
    @GetMapping(value = "/getUpcomingByDoctor")
    @ApiOperation(value = "获取医生待办详情")
    public Envelop getUpcomingByDoctor(@ApiParam(name = "doctorIdcard", value = "doctorIdcard", required = true)
                                           @RequestParam(value = "doctorIdcard",required = true)String doctorIdcard){
        JSONObject result = new JSONObject();
        List<BaseDoctorDO> doctors = baseDoctorDao.findByIdcard(doctorIdcard);
        BaseDoctorDO doctor = new BaseDoctorDO();
        if(!doctors.isEmpty()){
            doctor = doctors.get(0);
        }else{
            return success("该身份证无法找到医生",-1);
        }
        //专家咨询
        result.put("zxCount",imService.sessionCountByType(doctor.getId(),1,0));
        result.put("fzCount",prescriptionService.getWaitVideoCount(doctor.getId(),"1","1"));//图文复诊数量
        return success("请求成功",result);
    }
    
    
}

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

@ -145,7 +145,7 @@ public class SpecialistController extends EnvelopRestEndpoint {
                                                 @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,
                                                       @ApiParam(name = "labelCode", value = "标签code") @RequestParam(required = false)String shareDoctor) {
                                                       @ApiParam(name = "shareDoctor", value = "共管医生CODE") @RequestParam(required = false)String shareDoctor) {
        try {
            return specialistService.getLabelpatientCount(doctor,labelType,labelCode,teamCode,shareDoctor);
        }catch (Exception e){

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

@ -288,18 +288,18 @@ public class SpecialistService{
                "   i.label = '"+label+"' "+
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.`status` = '1' " +
                " AND i.patient in (" +
                "SELECT" +
                "a.patient AS patient " +
                "FROM" +
                "wlyy_specialist_patient_relation a ";
                " AND i.patient in ( " +
                " SELECT " +
                " a.patient AS patient " +
                " FROM " +
                " wlyy_specialist_patient_relation a ";
        if(StringUtils.isNotBlank(shareDoctor)){
            sql = sql + " JOIN wlyy.wlyy_doctor_special_share b ON b.special_code = a.id AND b.doctor = '"+shareDoctor+"' ";
        }
        sql = sql+"WHERE" +
                "a.team_code = '"+teamCode+"' " +
                "AND a.STATUS >= 0 " +
                "AND a.sign_status > 0)";
        sql = sql+" WHERE " +
                " a.team_code = '"+teamCode+"' " +
                " AND a.STATUS >= 0 " +
                " AND a.sign_status > 0)";
        System.out.print("日志:"+sql);
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        Long count = 0L;