瀏覽代碼

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

huangwenjie 5 年之前
父節點
當前提交
10b933128c

+ 6 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -3723,9 +3723,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    /**
     * 查询医生所有可抢单的数量
     * @param doctor
     * @param dept
     * @return
     */
    public com.alibaba.fastjson.JSONObject findWaitingRoomOutpatientNumberByDoctor(String doctor) {
    public com.alibaba.fastjson.JSONObject findWaitingRoomOutpatientNumberByDoctor(String doctor,String dept) {
    
        com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
        
@ -3738,7 +3739,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND outpatient.dept='"+dept+"' ";
    
        List<Map<String, Object>> alltotal = jdbcTemplate.queryForList(sqlAll);
    
@ -3757,7 +3758,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=1 ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=1 AND outpatient.dept='"+dept+"' ";
    
        List<Map<String, Object>> imgtotal = jdbcTemplate.queryForList(imgAll);
    
@ -3776,7 +3777,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=2 ";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=1 AND room.consult_type=2 AND outpatient.dept='"+dept+"' ";
    
        List<Map<String, Object>> sptotal = jdbcTemplate.queryForList(spsql);
    
@ -3796,7 +3797,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "wlyy_outpatient outpatient " +
                "WHERE " +
                " room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=2";
                "AND outpatient.status = 0 AND room.doctor IS NULL AND room.reservation_type=2 AND outpatient.dept='"+dept+"' ";
    
        List<Map<String, Object>> xttotal = jdbcTemplate.queryForList(xtsql);
    

+ 24 - 9
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
@ -206,7 +207,17 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "doctorCode",required = false) String doctorCode
	) throws Exception {
		int resutl = imService.finish(consult,doctorCode,2);
		return success(resutl);
		BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctorCode);
		JSONObject msgObj = new JSONObject();
		msgObj.put("msg",baseDoctorDO.getName()+"结束了咨询");
		msgObj.put("consultcode",consult);
		
		String jsonStr = "";
		
		if(1 == resutl){
			jsonStr = "{\"id\":\""+ UUID.randomUUID().toString()+"\",\"sender_id\":\""+doctorCode+"\",\"sender_name\":\"系统\",\"timestamp\":"+new Date().getTime()+",\"content_type\":7,\"content\":"+msgObj.toString()+",\"business_type\":1}";
		}
		return success(jsonStr);
	}
	
	
@ -383,8 +394,10 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	@ApiOperation(value = "查询医生所有可抢单的数量", notes = "查询医生所有可抢单的数量")
	public Envelop findWaitingRoomOutpatientNumberByDoctor(
			@ApiParam(name = "doctor", value = "医生CODE",defaultValue = "1cd15ffe6b3a11e69f7c005056850d66")
			@RequestParam(value = "doctor",required = true) String doctor){
		return success("请求成功",prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor));
			@RequestParam(value = "doctor",required = true) String doctor,
			@ApiParam(name = "dept", value = "部门CODE",defaultValue = "")
			@RequestParam(value = "dept",required = true) String dept){
		return success("请求成功",prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor,dept));
	}
	
	
@ -448,10 +461,10 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
		result.put("xtCount",0);//协同门诊候诊数量
		
		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
		result.put("imgPickCount",resultPick.getIntValue("twCount"));
		result.put("videoPickCount",resultPick.getIntValue("spCount"));
		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
//		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
//		result.put("imgPickCount",resultPick.getIntValue("twCount"));
//		result.put("videoPickCount",resultPick.getIntValue("spCount"));
//		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
		
		
		return success("请求成功",result);
@ -506,9 +519,11 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorPickCount)
	@ApiOperation(value = "医生端:可抢单数量", notes = "医生端:可抢单数量")
	public Envelop doctorPickCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                        @RequestParam(value = "doctor",required = true) String doctor){
	                                        @RequestParam(value = "doctor",required = true) String doctor,
	                               @ApiParam(name = "dept", value = "部门")
	                               @RequestParam(value = "dept",required = true) String dept){
		
		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor,dept);
		JSONObject result = new JSONObject();
		result.put("imgPickCount",resultPick.getIntValue("twCount"));
		result.put("videoPickCount",resultPick.getIntValue("spCount"));