Kaynağa Gözat

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

huangwenjie 5 yıl önce
ebeveyn
işleme
bc830b7d29

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

@ -1732,10 +1732,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
               BaseOrgDO org = baseOrgDao.findByCode(hospitalDOs.get(0).getOrgCode());
               rs.put("winNo",org.getWinNo());
               rs.put("deptName",hospitalDOs.get(0).getDeptName());
                rs.put("deptCode",hospitalDOs.get(0).getDeptCode());
            }else{
               rs.put("hospital",null);
               rs.put("winNo",null);
               rs.put("deptName",null);
                rs.put("deptCode",null);
            }
@ -2329,7 +2331,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
    
        if(StringUtils.isNotBlank(outpatientType)){
            sql+=" AND d.outpatient_type = '"+outpatientType+"' ";
            sql+=" AND d.outpatient_type like '%"+outpatientType+"%' ";
        }
    
        if(StringUtils.isNotBlank(keyName)){

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

@ -1592,4 +1592,38 @@ public class ImService {
	public void sendWaiSocketMessage(String sender,String reciver,String content,String contentType){
		imUtil.sendMessage(sender,reciver,contentType,content);
	}
	
	/**
	 * 导诊的咨询对话
	 * @param patientCode
	 * @param session_id
	 * @return
	 */
	public String getPatientGuaidenceConsult(String patientCode, String session_id) throws Exception{
		
		Boolean re = false;
		re = imUtil.sessionIsExist(session_id);
		if(re){
			return session_id;
		}else{
			JSONObject participants = new JSONObject();
			participants.put(patientCode,0);
			JSONObject sessionJson  = imUtil.createSession(participants,imUtil.SESSION_TYPE_GUIDANCE_HOSPITAL,"居民求助导诊护士",session_id);
			if(sessionJson.getInteger("status") ==-1){
				throw  new RuntimeException(sessionJson.getString("message"));
			}else{
				return session_id;
			}
		}
	}
	
	/**
	 * 更新会话成员(新增或删除)
	 * @param sessionId 会话id
	 * @param user 新增的成员id
	 * @param oldUserId  删除的成员id
	 */
	public String updateParticipant(String sessionid, String userid, String olduserid)throws Exception {
		return imUtil.updateParticipant(sessionid,userid,olduserid);
	}
}

+ 3 - 0
business/im-service/src/main/java/com/yihu/jw/im/util/ImUtil.java

@ -673,6 +673,8 @@ public class ImUtil {
	public static final String SESSION_TYPE_PRESCRIPTION = "8";//续方
	public static final String SESSION_TYPE_EXAMINATION = "9";//在线复诊
	public static final String SESSION_TYPE_ONDOOR_NURSING = "11";//上门护理
	public static final String SESSION_TYPE_COLLABORATION_HOSPITAL = "12";///互联网医院协同门诊
	public static final String SESSION_TYPE_GUIDANCE_HOSPITAL = "14";//互联网医院居民导诊聊天
	public static final String SESSION_STATUS_PROCEEDINGS = "0";
	public static final String SESSION_STATUS_END = "1";
	
@ -696,4 +698,5 @@ public class ImUtil {
			return 0;
		}
	}
}

+ 54 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDO.java

@ -17,9 +17,14 @@ import java.util.Date;
public class KnowledgeArticleDO extends UuidIdentityEntity {
	
	private String createUser; // 创建人
	private String createUserName; // 创建人
	private String createUserDept; // 创建人科室CODE
	private String createUserDeptName; // 创建人科室名称
	private String title;   // 文章标题
	private String categoryFirst;    // 1级分类标识
	private String categoryFirstName;    // 1级分类标识
	private String categorySecond;    // 2级分类标识
	private String categorySecondName;    // 2级分类标识
	private String content; // 文章内容
	private String source;  // 文章来源--客服
	private String image;   // 封面图片
@ -29,6 +34,7 @@ public class KnowledgeArticleDO extends UuidIdentityEntity {
	private Date updateTime;  // 编辑时间
	private Integer del; // 是否删除,1正常,0删除
	private Integer status;// 0未审核 1已审核
	private String cancelReason;//退回理由
	
	
	public String getCreateUser() {
@ -118,4 +124,52 @@ public class KnowledgeArticleDO extends UuidIdentityEntity {
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public String getCancelReason() {
		return cancelReason;
	}
	
	public void setCancelReason(String cancelReason) {
		this.cancelReason = cancelReason;
	}
	
	public String getCreateUserName() {
		return createUserName;
	}
	
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	
	public String getCategoryFirstName() {
		return categoryFirstName;
	}
	
	public void setCategoryFirstName(String categoryFirstName) {
		this.categoryFirstName = categoryFirstName;
	}
	
	public String getCategorySecondName() {
		return categorySecondName;
	}
	
	public void setCategorySecondName(String categorySecondName) {
		this.categorySecondName = categorySecondName;
	}
	
	public String getCreateUserDept() {
		return createUserDept;
	}
	
	public void setCreateUserDept(String createUserDept) {
		this.createUserDept = createUserDept;
	}
	
	public String getCreateUserDeptName() {
		return createUserDeptName;
	}
	
	public void setCreateUserDeptName(String createUserDeptName) {
		this.createUserDeptName = createUserDeptName;
	}
}

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

@ -341,6 +341,12 @@ public class BaseHospitalRequestMapping {
    
        //获取微信签名
        public static final String getSign ="/getSign";
        
        //获取居民-导诊的咨询对话
        public static final String getPatientGuaidenceConsult = "getPatientGuaidenceConsult";
        
        //更新会话成员(新增或删除)
        public static final String updateConsultParticipant = "updateConsultParticipant";
        

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

@ -1,5 +1,6 @@
package com.yihu.jw.hospital.endpoint.article;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDO;
import com.yihu.jw.entity.hospital.article.KnowledgeCategoryDO;
import com.yihu.jw.hospital.service.consult.KnowledgeArticleService;
@ -34,7 +35,7 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
	
	@GetMapping(value = BaseHospitalRequestMapping.KnowledgeArticle.searchKnowledgePageList)
	@ApiOperation(value = "获取文章列表")
	public ListEnvelop searchKnowledgePageList(
	public Envelop searchKnowledgePageList(
//			@ApiParam(name = "category_first", value = "1级分类编码")
//			@RequestParam(value = "category_first", required = false) String category_first,
//			@ApiParam(name = "category_secend", value = "2级分类编码")
@ -57,7 +58,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<KnowledgeArticleDO> result  = knowledgeArticleService.search(fields,filters,sorts,page,pageSize);
		List<KnowledgeArticleDO> list  = knowledgeArticleService.search(fields,filters,sorts,page,pageSize);
		List<KnowledgeArticleDO> totals  = knowledgeArticleService.search(fields,filters,sorts);
		
		JSONObject result = new JSONObject();
		result.put("total",totals.size());
		result.put("detailModelList",list);
		
		return success(result);
	}
	
@ -94,9 +101,11 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "articleId", value = "文章ID")
			@RequestParam(value = "articleId", required = true) String articleId,
			@ApiParam(name = "status", value = "0未审核,1已审核,2退回")
			@RequestParam(value = "status", required = true) Integer status
			@RequestParam(value = "status", required = true) Integer status,
			@ApiParam(name = "reason", value = "退回理由")
			@RequestParam(value = "reason", required = false) String reason
	)throws Exception {
		knowledgeArticleService.reviewArticle(articleId,status);
		knowledgeArticleService.reviewArticle(articleId,status,reason);
		return success("操作成功");
	}
	

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

@ -417,6 +417,29 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			throw new Exception(e.getMessage());
		}
	}
	
	@PostMapping(value = BaseHospitalRequestMapping.PatientIM.getPatientGuaidenceConsult)
	@ApiOperation(value = "导诊的咨询对话", notes = "导诊的咨询对话")
	public Envelop getPatientGuaidenceConsult(@ApiParam(name = "patientCode", value = "居民CODE")
	                       @RequestParam(value = "patientCode", required = true)String patientCode) throws Exception {
		String session_id = patientCode+"_guidance_14";
		session_id = imService.getPatientGuaidenceConsult(patientCode,session_id);
		return success(session_id);
	}
	
	
	@PostMapping(value = BaseHospitalRequestMapping.PatientIM.updateConsultParticipant)
	@ApiOperation(value = "更新会话成员(新增或删除)", notes = "更新会话成员(新增或删除)")
	public Envelop updateConsultParticipant(@ApiParam(name = "sessionid", value = "会话ID", defaultValue = "1")
	                                       @RequestParam(value = "sessionid", required = true) String sessionid,
	                                       @ApiParam(name = "userid", value = "新增成员ID,多个以英文逗号隔开", defaultValue = "1")
	                                       @RequestParam(value = "userid", required = true) String userid,
	                                       @ApiParam(name = "olduserid", value = "删除的成员id")
	                                       @RequestParam(value = "olduserid", required = false) String olduserid)throws Exception{
		imService.updateParticipant(sessionid,userid,olduserid);
		return success("操作成功");
	}
	
}

+ 4 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -73,7 +73,7 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
	}
	
	//审核/退回文章
	public KnowledgeArticleDO reviewArticle(String articleId,Integer status) throws Exception{
	public KnowledgeArticleDO reviewArticle(String articleId,Integer status,String reason) throws Exception{
		
		KnowledgeArticleDO knowledgeArticleDO = knowledgeArticleDao.findOne(articleId);
		if (null == knowledgeArticleDO) {
@ -81,6 +81,9 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
		} else {
			knowledgeArticleDO.setStatus(status);
			knowledgeArticleDO.setUpdateTime(new Date());
			if(StringUtils.isNotBlank(reason)){
				knowledgeArticleDO.setCancelReason(reason);
			}
			knowledgeArticleDao.save(knowledgeArticleDO);
			return  knowledgeArticleDO;
		}