Przeglądaj źródła

计算可抢单数量,增加部门参数过滤

huangwenjie 5 lat temu
rodzic
commit
e6427a7165

+ 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);
    

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

@ -394,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));
	}
	
	
@ -459,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);
@ -517,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"));