Forráskód Böngészése

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

huangwenjie 5 éve
szülő
commit
1990ca9cd8

+ 14 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1626,4 +1626,18 @@ public class ImService {
	public String updateParticipant(String sessionid, String userid, String olduserid)throws Exception {
		return imUtil.updateParticipant(sessionid,userid,olduserid);
	}
	
	/**
	 *会话发送消息
	 * @param sender_id
	 * @param sender_name
	 * @param session_id
	 * @param content_type
	 * @param content
	 * @param business_type
	 * @return
	 */
	public String patientGuaidenceAppend(String sender_id, String sender_name, String session_id,String content_type, String content, String business_type)throws Exception  {
		return imUtil.sendImMsg(sender_id, sender_name,session_id, content_type, content, "1");
	}
}

+ 12 - 2
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -353,9 +353,10 @@ public class BaseHospitalRequestMapping {
        
        //更新会话成员(新增或删除)
        public static final String updateConsultParticipant = "updateConsultParticipant";
        
        // 居民导诊会话发送消息
        public static final String patientGuaidenceAppend = "patientGuaidenceAppend";
    }
    
    /**
@ -423,6 +424,15 @@ public class BaseHospitalRequestMapping {
    
        //测试发送外层SOCKET消息
        public static final String testSendWaiSocketMessage = "testSendWaiSocketMessage";
    
        //医生端:进行中的专家咨询数量
        public static final String doctorSpecialistConsultCount="doctorSpecialistConsultCount";
    
        //医生端:图文复诊、视频复诊咨询数量、协同门诊候诊数量
        public static final String doctorReviewConsultCount="doctorReviewConsultCount";
    
        //医生端:可抢单数量
        public static final String doctorPickCount="doctorPickCount";
    }
    /**

+ 9 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleEndpoint.java

@ -16,6 +16,7 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
@ -123,7 +124,13 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "page", required = true,defaultValue = "1")Integer page,
			@ApiParam(name = "pageSize", value = "每页分页大小", required = true, defaultValue = "10")
			@RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize)throws Exception{
		List<KnowledgeCategoryDO> result  = knowledgeCategoryService.search(fields,filters,sorts,page,pageSize);
		List<KnowledgeCategoryDO> list  = knowledgeCategoryService.search(fields,filters,sorts,page,pageSize);
		List<KnowledgeCategoryDO> result = new ArrayList<>();
		for(KnowledgeCategoryDO knowledgeCategoryDO:list){
			if(knowledgeCategoryDO.getDel() == 1){
				result.add(knowledgeCategoryDO);
			}
		}
		return success(result);
	}
	
@ -142,7 +149,7 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "id", value = "id", required = true)
			@RequestParam(value = "id", required = true)String id)throws Exception {
		Boolean flag = knowledgeCategoryService.updateDel(id);
		if (!flag) {
		if (flag) {
			return success("操作成功");
		}else{
			return failed("操作失败");

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

@ -269,48 +269,6 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		return success("请求成功");
	}
	
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorIndexConsultCount)
	@ApiOperation(value = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数", notes = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数")
	public Envelop doctorIndexConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                           @RequestParam(value = "doctor",required = true) String doctor){
		
		//专家咨询
		Integer zjCount = imService.sessionCountByType(doctor,1,0);
		
		//复诊咨询
		Integer imgCount = imService.sessionCountByType(doctor,9,0);
		//正在进行中的视频复诊
		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
		Integer videoCount = _videoOnlineCount.intValue();
		
		//获取候诊居民数量(包含进行中的)
		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
		Integer waitVideoCount = _waitVideoCount.intValue();
		
		JSONObject result = new JSONObject();
		result.put("zjCount",zjCount);
		
		imgCount = imgCount - videoCount;
		if(imgCount <=0){
			imgCount = 0;
		}
		
		result.put("zjCount",zjCount);//专家咨询数量
		result.put("imgCount",imgCount);//图文复诊数量
		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"));
		
		
		return success("请求成功",result);
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.records)
	@ApiOperation(value = "医生咨询记录查询")
	public Envelop records(
@ -444,4 +402,98 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	}
	
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorIndexConsultCount)
	@ApiOperation(value = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数", notes = "复诊图文咨询人数,视频咨询人数、协同门诊人数,可抢单人数")
	public Envelop doctorIndexConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                       @RequestParam(value = "doctor",required = true) String doctor){
		
		//专家咨询
		Integer zjCount = imService.sessionCountByType(doctor,1,0);
		
		//复诊咨询
		Integer imgCount = imService.sessionCountByType(doctor,9,0);
		
		//正在进行中的视频复诊
		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
		Integer videoCount = _videoOnlineCount.intValue();
		
		//获取候诊居民数量(包含进行中的)
		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
		Integer waitVideoCount = _waitVideoCount.intValue();
		
		JSONObject result = new JSONObject();
		result.put("zjCount",zjCount);
		
		imgCount = imgCount - videoCount;
		if(imgCount <=0){
			imgCount = 0;
		}
		
		result.put("zjCount",zjCount);//专家咨询数量
		result.put("imgCount",imgCount);//图文复诊数量
		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"));
		
		
		return success("请求成功",result);
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorSpecialistConsultCount)
	@ApiOperation(value = "医生端:进行中的专家咨询数量", notes = "医生端:进行中的专家咨询数量")
	public Envelop doctorSpecialistConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                       @RequestParam(value = "doctor",required = true) String doctor){
		//专家咨询
		Integer zjCount = imService.sessionCountByType(doctor,1,0);
		JSONObject result = new JSONObject();
		result.put("zjCount",zjCount);//专家咨询数量
		return success("请求成功",result);
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorReviewConsultCount)
	@ApiOperation(value = "医生端:图文复诊、视频复诊咨询数量", notes = "医生端:图文复诊、视频复诊咨询数量")
	public Envelop doctorReviewConsultCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                            @RequestParam(value = "doctor",required = true) String doctor){
		
		//复诊咨询
		Integer imgCount = imService.sessionCountByType(doctor,9,0);
		
		//正在进行中的视频复诊
		Long _videoOnlineCount = prescriptionService.doctorIndexConsultCount(doctor);
		Integer videoCount = _videoOnlineCount.intValue();
		
		//获取候诊居民数量(包含进行中的)
		Long _waitVideoCount = prescriptionService.getWaitVideoCount(doctor);
		Integer waitVideoCount = _waitVideoCount.intValue();
		
		JSONObject result = new JSONObject();
		
		imgCount = imgCount - videoCount;
		if(imgCount <=0){
			imgCount = 0;
		}
		result.put("imgCount",imgCount);//图文复诊数量
		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
		result.put("xtCount",0);//协同门诊候诊数量
		return success("请求成功",result);
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.doctorPickCount)
	@ApiOperation(value = "医生端:可抢单数量", notes = "医生端:可抢单数量")
	public Envelop doctorPickCount(@ApiParam(name = "doctor", value = "医生CODE")
	                                        @RequestParam(value = "doctor",required = true) String doctor){
		
		JSONObject resultPick = prescriptionService.findWaitingRoomOutpatientNumberByDoctor(doctor);
		JSONObject result = new JSONObject();
		result.put("imgPickCount",resultPick.getIntValue("twCount"));
		result.put("videoPickCount",resultPick.getIntValue("spCount"));
		result.put("xtPickCount",resultPick.getIntValue("xtCount"));
		return success("请求成功",result);
	}
	
	
}

+ 18 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -440,6 +440,23 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
		return success("操作成功");
	}
	
	@PostMapping(value = BaseHospitalRequestMapping.PatientIM.patientGuaidenceAppend)
	@ApiOperation(value = "居民导诊会话发送消息", notes = "居民导诊会话发送消息")
	public Envelop patientGuaidenceAppend(
			@ApiParam(name = "sender_id", value = "发送者id", defaultValue = "")
			@RequestParam(value = "sender_id", required = true) String sender_id,
			@ApiParam(name = "sender_name", value = "发送者姓名", defaultValue = "")
			@RequestParam(value = "sender_name", required = true) String sender_name,
			@ApiParam(name = "session_id", value = "session_id", defaultValue = "")
			@RequestParam(value = "session_id", required = true) String session_id,
			@ApiParam(name = "content_type", value = "内容类型", defaultValue = "")
			@RequestParam(value = "content_type", required = true) String content_type,
			@ApiParam(name = "content", value = "消息内容", defaultValue = "")
			@RequestParam(value = "content", required = true) String content
	)throws Exception{
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1");
		return success(result);
	}
	
}

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeCategoryService.java

@ -9,6 +9,7 @@ import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;
@ -48,6 +49,7 @@ public class KnowledgeCategoryService extends BaseJpaService<KnowledgeCategoryDO
		return knowledgeCategoryDao.save(knowledgeCategoryDO);
	}
	
	@Transactional
	public Boolean updateDel(String code) {
		List<KnowledgeArticleDO> byCategory = articleDao.findByCategory(code);
		if (null != byCategory && byCategory.size() > 0) {