提交 74622231 authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 6038ee0d
package com.ebaiyihui.family.doctor.common.dto;
import lombok.Data;
/**
* @ClassName: ImNoReadMsgDTO
* @Author:yanliang
* @Date:2024/3/27 13:46
* @Description
*/
@Data
public class ImNoReadMsgDTO {
private String phone;
private String doctorId;
}
package com.ebaiyihui.family.doctor.common.dto;
import lombok.Data;
/**
* @ClassName: MasterUrlDTO
* @Author:yanliang
* @Date:2024/3/27 13:55
* @Description
*/
@Data
public class MasterUrlDTO {
private String phone;
private String signSeqId;
private String type;
}
package com.ebaiyihui.family.doctor.common.dto;
import lombok.Data;
/**
* @ClassName: ReportDetailDTO
* @Author:yanliang
* @Date:2024/3/27 14:14
* @Description
*/
@Data
public class ReportDetailDTO {
private String thirdId;
}
package com.ebaiyihui.family.doctor.common.vo;
import lombok.Data;
/**
* @ClassName: ImNoReadMsgVo
* @Author:yanliang
* @Date:2024/3/27 13:47
* @Description
*/
@Data
public class ImNoReadMsgVo {
private String userName;
private String messageNum;
private String groupId;
private String timestamp;
}
package com.ebaiyihui.family.doctor.common.vo;
import lombok.Data;
/**
* @ClassName: ReportDetailItemVo
* @Author:yanliang
* @Date:2024/3/27 14:17
* @Description
*/
@Data
public class ReportDetailItemVo {
private String fileUrl;
private String fileType;
}
package com.ebaiyihui.family.doctor.common.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName: ReportDetailVo
* @Author:yanliang
* @Date:2024/3/27 14:15
* @Description
*/
@Data
public class ReportDetailVo {
private String reprotName;
private String institution;
private String department;
private String diagnosis;
private String reportType;
private String createTime;
private String examinationTime;
private List<ReportDetailItemVo> reportFileList;
}
...@@ -65,4 +65,14 @@ public class UrlConstants { ...@@ -65,4 +65,14 @@ public class UrlConstants {
* 查询用户基础指标信息 * 查询用户基础指标信息
*/ */
public static final String USER_BASIC_IND_URL = "/auth/v1.0.0/userBasicIndicators"; public static final String USER_BASIC_IND_URL = "/auth/v1.0.0/userBasicIndicators";
/**
* 查询资源落地页
*/
public static final String MASTER_URL = "/auth/v1.0.0/family_doctor_master_url";
/**
* 查询用户报告详情
*/
public static final String REPORT_DETAIL_URL = "/auth/v1.0.0/report_detail";
} }
package com.ebaiyihui.family.doctor.server.controller; package com.ebaiyihui.family.doctor.server.controller;
import com.ebaiyihui.family.doctor.common.dto.ImNoReadMsgDTO;
import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO; import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO;
import com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo;
import com.ebaiyihui.family.doctor.server.service.ImMsgTemplateService; import com.ebaiyihui.family.doctor.server.service.ImMsgTemplateService;
import com.ebaiyihui.framework.response.BaseResponse; import com.ebaiyihui.framework.response.BaseResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -39,4 +41,16 @@ public class ImMsgTemplateController { ...@@ -39,4 +41,16 @@ public class ImMsgTemplateController {
} }
return BaseResponse.success("消息推送成功"); return BaseResponse.success("消息推送成功");
} }
@RequestMapping(value = "/queryImNoReadMsg", method = RequestMethod.POST)
public BaseResponse<ImNoReadMsgVo> queryImNoReadMsg(@RequestBody ImNoReadMsgDTO reqVo,
BindingResult bindingResult) {
BaseResponse<ImNoReadMsgVo> response = null;
try {
response = imMsgTemplateService.queryImNoReadMsg(reqVo);
} catch (Exception e) {
return BaseResponse.error(e.getMessage());
}
return response;
}
} }
...@@ -113,4 +113,17 @@ public class PatientSignController { ...@@ -113,4 +113,17 @@ public class PatientSignController {
public BaseResponse<IMQueryUserLoginRspVO> querySdkLogin(@RequestBody IMQueryUserLoginReqVO reqVO) { public BaseResponse<IMQueryUserLoginRspVO> querySdkLogin(@RequestBody IMQueryUserLoginReqVO reqVO) {
return patientSignService.querySdkLogin(reqVO); return patientSignService.querySdkLogin(reqVO);
} }
@RequestMapping(value = "/queryMasterUrl", method = RequestMethod.POST)
public BaseResponse<String> queryMasterUrl(@RequestBody MasterUrlDTO reqVo,
BindingResult bindingResult) {
BaseResponse<String> response = null;
try {
response = patientSignService.queryMasterUrl(reqVo);
} catch (Exception e) {
return BaseResponse.error(e.getMessage());
}
return response;
}
} }
package com.ebaiyihui.family.doctor.server.service; package com.ebaiyihui.family.doctor.server.service;
import com.ebaiyihui.family.doctor.common.dto.ImNoReadMsgDTO;
import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO; import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO;
import com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo;
import com.ebaiyihui.framework.response.BaseResponse; import com.ebaiyihui.framework.response.BaseResponse;
/** /**
...@@ -13,4 +15,6 @@ import com.ebaiyihui.framework.response.BaseResponse; ...@@ -13,4 +15,6 @@ import com.ebaiyihui.framework.response.BaseResponse;
public interface ImMsgTemplateService { public interface ImMsgTemplateService {
BaseResponse<String> sendImMsg(SendImMsgDTO reqVo); BaseResponse<String> sendImMsg(SendImMsgDTO reqVo);
BaseResponse<ImNoReadMsgVo> queryImNoReadMsg(ImNoReadMsgDTO reqVo);
} }
...@@ -3,6 +3,7 @@ package com.ebaiyihui.family.doctor.server.service; ...@@ -3,6 +3,7 @@ package com.ebaiyihui.family.doctor.server.service;
import com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO;
import com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO;
import com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO;
import com.ebaiyihui.family.doctor.common.dto.MasterUrlDTO;
import com.ebaiyihui.family.doctor.common.vo.ImAccountVo; import com.ebaiyihui.family.doctor.common.vo.ImAccountVo;
import com.ebaiyihui.family.doctor.common.vo.ImInfoDetailDocResVo; import com.ebaiyihui.family.doctor.common.vo.ImInfoDetailDocResVo;
import com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo; import com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo;
...@@ -50,4 +51,6 @@ public interface PatientSignService { ...@@ -50,4 +51,6 @@ public interface PatientSignService {
PatientSignEntity getOneByPhone(String phone); PatientSignEntity getOneByPhone(String phone);
int updateById(PatientSignEntity patientSignEntity); int updateById(PatientSignEntity patientSignEntity);
BaseResponse<String> queryMasterUrl(MasterUrlDTO reqVo);
} }
...@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON; ...@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ebaiyihui.family.doctor.common.bo.Components; import com.ebaiyihui.family.doctor.common.bo.Components;
import com.ebaiyihui.family.doctor.common.bo.MsgContent; import com.ebaiyihui.family.doctor.common.bo.MsgContent;
import com.ebaiyihui.family.doctor.common.dto.ImNoReadMsgDTO;
import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO; import com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO;
import com.ebaiyihui.family.doctor.common.vo.ImNoReadMsgVo;
import com.ebaiyihui.family.doctor.server.entity.ImMsgTemplateEntity; import com.ebaiyihui.family.doctor.server.entity.ImMsgTemplateEntity;
import com.ebaiyihui.family.doctor.server.exception.BusinessException; import com.ebaiyihui.family.doctor.server.exception.BusinessException;
import com.ebaiyihui.family.doctor.server.mapper.ImMsgTemplateMapper; import com.ebaiyihui.family.doctor.server.mapper.ImMsgTemplateMapper;
...@@ -54,4 +56,9 @@ public class ImMsgTemplateServiceImpl implements ImMsgTemplateService { ...@@ -54,4 +56,9 @@ public class ImMsgTemplateServiceImpl implements ImMsgTemplateService {
} }
return BaseResponse.success("消息推送成功"); return BaseResponse.success("消息推送成功");
} }
@Override
public BaseResponse<ImNoReadMsgVo> queryImNoReadMsg(ImNoReadMsgDTO reqVo) {
return null;
}
} }
...@@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.doctoruser.api.pojo.base.dto.doctor.QueryPersonnelInfoReq; import com.doctoruser.api.pojo.base.dto.doctor.QueryPersonnelInfoReq;
import com.doctoruser.api.pojo.base.vo.doctor.PersonnelInfo; import com.doctoruser.api.pojo.base.vo.doctor.PersonnelInfo;
import com.ebaiyihui.family.doctor.common.bo.Result;
import com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO;
import com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO;
import com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO; import com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO;
import com.ebaiyihui.family.doctor.common.dto.MasterUrlDTO;
import com.ebaiyihui.family.doctor.common.vo.*; import com.ebaiyihui.family.doctor.common.vo.*;
import com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants; import com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants;
import com.ebaiyihui.family.doctor.server.common.constants.ImConstants; import com.ebaiyihui.family.doctor.server.common.constants.ImConstants;
...@@ -24,6 +26,7 @@ import com.ebaiyihui.family.doctor.server.service.ImChatTemplate; ...@@ -24,6 +26,7 @@ import com.ebaiyihui.family.doctor.server.service.ImChatTemplate;
import com.ebaiyihui.family.doctor.server.service.PatientSignService; import com.ebaiyihui.family.doctor.server.service.PatientSignService;
import com.ebaiyihui.family.doctor.server.util.IDCardUtil; import com.ebaiyihui.family.doctor.server.util.IDCardUtil;
import com.ebaiyihui.family.doctor.server.util.PageUtil; import com.ebaiyihui.family.doctor.server.util.PageUtil;
import com.ebaiyihui.family.doctor.server.util.ThirdOrderPushUtil;
import com.ebaiyihui.framework.response.BaseResponse; import com.ebaiyihui.framework.response.BaseResponse;
import com.ebaiyihui.imforward.client.vo.*; import com.ebaiyihui.imforward.client.vo.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -63,6 +66,9 @@ public class PatientSignServiceImpl implements PatientSignService { ...@@ -63,6 +66,9 @@ public class PatientSignServiceImpl implements PatientSignService {
@Autowired @Autowired
private ImChatTemplate imChatTemplate; private ImChatTemplate imChatTemplate;
@Autowired
private ThirdOrderPushUtil thirdOrderPushUtil;
@Override @Override
public BaseResponse<List<IMSingleMsgResultVO>> getAllMsgContent(IMQueryMsgReqVO reqVO) { public BaseResponse<List<IMSingleMsgResultVO>> getAllMsgContent(IMQueryMsgReqVO reqVO) {
...@@ -311,6 +317,19 @@ public class PatientSignServiceImpl implements PatientSignService { ...@@ -311,6 +317,19 @@ public class PatientSignServiceImpl implements PatientSignService {
return patientSignMapper.updateById(patientSignEntity); return patientSignMapper.updateById(patientSignEntity);
} }
@Override
public BaseResponse<String> queryMasterUrl(MasterUrlDTO reqVo) {
String resulStr = "";
String result = thirdOrderPushUtil.getMasterUrl(reqVo);
if (StringUtils.isNotEmpty(result)) {
Result<String> muResult = JSON.parseObject(result, Result.class);
if (muResult.isSuccess()) {
resulStr = muResult.getData();
}
}
return BaseResponse.success(resulStr);
}
public ImAccountVo getImAccounts(PatientSignEntity patientSignEntity, String admId, String imAppCode, String doctorId) { public ImAccountVo getImAccounts(PatientSignEntity patientSignEntity, String admId, String imAppCode, String doctorId) {
ImAccountVo admission = new ImAccountVo(); ImAccountVo admission = new ImAccountVo();
......
...@@ -261,4 +261,41 @@ public class ThirdOrderPushUtil { ...@@ -261,4 +261,41 @@ public class ThirdOrderPushUtil {
} }
} }
/**
* 查询资源落地页
*
* @param masterUrlDTO
*/
public String getMasterUrl(MasterUrlDTO masterUrlDTO) {
String result = "";
try {
String param = JSONObject.toJSONString(masterUrlDTO);
log.info("getMasterUrl请求入参{}", param);
result = HttpKit.jsonPost(projProperties.getFamilyDoctorThirdUrl() + UrlConstants.MASTER_URL, param, getThirdHead(masterUrlDTO));
log.info("getMasterUrl请求返参{}", param);
} catch (Exception e) {
log.error("getMasterUrl请求失败:{}", e);
}
return result;
}
/**
* 查询用户报告详情
*
* @param reportDetailDTO
*/
public String getReportDetail(ReportDetailDTO reportDetailDTO) {
String result = "";
try {
String param = JSONObject.toJSONString(reportDetailDTO);
log.info("getReportDetail请求入参{}", param);
result = HttpKit.jsonPost(projProperties.getFamilyDoctorThirdUrl() + UrlConstants.REPORT_DETAIL_URL, param, getThirdHead(reportDetailDTO));
log.info("getReportDetail请求返参{}", param);
} catch (Exception e) {
log.error("getReportDetail请求失败:{}", e);
}
return result;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论