|
@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@ -101,13 +102,13 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.findClinicRoomStatus)
|
|
|
@ApiOperation(value = "查询单个诊室状态", notes = "查询单个诊室状态")
|
|
|
@ApiOperation(value = "查询单个医生诊室状态", notes = "查询单个医生诊室状态")
|
|
|
public Envelop findClinicRoomStatus(
|
|
|
@ApiParam(name = "id", value = "诊室ID")
|
|
|
@RequestParam(value = "id",required = false) String id){
|
|
|
@ApiParam(name = "doctorCode", value = "医生CODE")
|
|
|
@RequestParam(value = "doctorCode",required = true) String doctorCode){
|
|
|
// String result = "{\"id\":\"XXD2019887711\",\"doctor_name\":\"蔡建春\",\"visit_status\":0,\"patient_name\":\"张三\",\"visit_time\":\"2019-06-21 08:30:00\",\"waiting_count\":26}";
|
|
|
// JSONObject obj = JSON.parseObject(result);
|
|
|
return success("请求成功",prescriptionService.findClinicRoomStatus(id));
|
|
|
return success("请求成功",prescriptionService.findClinicRoomStatus(doctorCode));
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.addPrescriptionConsult)
|
|
@ -467,15 +468,21 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
public Envelop doctorReviewConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
|
|
|
@RequestParam(value = "doctor",required = true) String doctor){
|
|
|
|
|
|
logger.info("action:doctorReviewConsultCount--start:"+DateUtil.dateToStrLong(new Date()));
|
|
|
|
|
|
//复诊咨询
|
|
|
Integer imgCount = imService.sessionCountByType(doctor,9,0);
|
|
|
logger.info("action:doctorReviewConsultCount--imgCount:"+DateUtil.dateToStrLong(new Date()));
|
|
|
|
|
|
//正在进行中的视频复诊
|
|
|
Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
|
|
|
Integer videoCount = _videoOnlineCount.intValue();
|
|
|
logger.info("action:doctorReviewConsultCount--videoCount:"+DateUtil.dateToStrLong(new Date()));
|
|
|
|
|
|
//获取候诊居民数量(包含进行中的)
|
|
|
Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
|
|
|
|
|
|
logger.info("action:doctorReviewConsultCount--waitVideoCount:"+DateUtil.dateToStrLong(new Date()));
|
|
|
Integer waitVideoCount = _waitVideoCount.intValue();
|
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
@ -487,6 +494,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
result.put("imgCount",imgCount);//图文复诊数量
|
|
|
result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
|
|
|
result.put("xtCount",0);//协同门诊候诊数量
|
|
|
logger.info("action:doctorReviewConsultCount--end:"+DateUtil.dateToStrLong(new Date()));
|
|
|
return success("请求成功",result);
|
|
|
}
|
|
|
|