Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
53951240
提交
53951240
authored
6月 18, 2024
作者:
luzhangjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:分页
上级
1bc2e13e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
59 行增加
和
7 行删除
+59
-7
OrderDetailResDTO.java
...ebaiyihui/family/doctor/common/dto/OrderDetailResDTO.java
+3
-1
GetPresListReqVO.java
...m/ebaiyihui/family/doctor/common/vo/GetPresListReqVO.java
+7
-0
OrderManagementController.java
...y/doctor/server/controller/OrderManagementController.java
+16
-0
OrderManagementService.java
.../family/doctor/server/service/OrderManagementService.java
+8
-0
OrderManagementServiceImpl.java
...octor/server/service/impl/OrderManagementServiceImpl.java
+25
-6
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/OrderDetailResDTO.java
浏览文件 @
53951240
...
...
@@ -3,12 +3,14 @@ package com.ebaiyihui.family.doctor.common.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
OrderDetailResDTO
{
public
class
OrderDetailResDTO
extends
PageDTO
{
@ApiModelProperty
(
value
=
"订单ID【必填】"
)
@NotBlank
(
message
=
"订单ID不能为空"
)
...
...
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/GetPresListReqVO.java
浏览文件 @
53951240
...
...
@@ -2,8 +2,15 @@ package com.ebaiyihui.family.doctor.common.vo;
import
lombok.Data
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
@Data
public
class
GetPresListReqVO
{
private
String
admId
;
private
String
appCode
;
@NotNull
(
message
=
"当前页不能为空"
)
@Min
(
value
=
1
,
message
=
"当前页不能小于1"
)
private
Integer
pageNum
=
1
;
private
Integer
pageSize
=
20
;
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/controller/OrderManagementController.java
浏览文件 @
53951240
...
...
@@ -2,17 +2,21 @@ package com.ebaiyihui.family.doctor.server.controller;
import
com.ebaiyihui.family.doctor.common.dto.OrderDetailResDTO
;
import
com.ebaiyihui.family.doctor.common.dto.OrderListReqDTO
;
import
com.ebaiyihui.family.doctor.common.vo.GetPresListResVO
;
import
com.ebaiyihui.family.doctor.common.vo.OrderDetailsResVo
;
import
com.ebaiyihui.family.doctor.common.vo.OrderListResVo
;
import
com.ebaiyihui.family.doctor.server.service.OrderManagementService
;
import
com.ebaiyihui.family.doctor.server.util.PageUtil
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
com.ebaiyihui.imforward.client.vo.IMSingleMsgResultVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 问诊订单管理
*/
...
...
@@ -38,4 +42,16 @@ public class OrderManagementController {
return
orderManagementService
.
getOrderDetails
(
param
);
}
@ApiOperation
(
"订单详情-处方分页"
)
@PostMapping
(
"/v1/getPrePage"
)
public
BaseResponse
<
PageUtil
<
GetPresListResVO
>>
getPrePage
(
@RequestBody
OrderDetailResDTO
param
)
{
return
orderManagementService
.
getPrePage
(
param
);
}
@ApiOperation
(
"订单详情-聊天记录分页"
)
@PostMapping
(
"/v1/getChatPage"
)
public
BaseResponse
<
PageUtil
<
IMSingleMsgResultVO
>>
getChatPage
(
@RequestBody
OrderDetailResDTO
param
)
{
return
orderManagementService
.
getChatPage
(
param
);
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/OrderManagementService.java
浏览文件 @
53951240
...
...
@@ -3,14 +3,22 @@ package com.ebaiyihui.family.doctor.server.service;
import
com.ebaiyihui.family.doctor.common.dto.OrderDetailResDTO
;
import
com.ebaiyihui.family.doctor.common.dto.OrderListReqDTO
;
import
com.ebaiyihui.family.doctor.common.vo.GetPresListResVO
;
import
com.ebaiyihui.family.doctor.common.vo.OrderDetailsResVo
;
import
com.ebaiyihui.family.doctor.common.vo.OrderListResVo
;
import
com.ebaiyihui.family.doctor.server.util.PageUtil
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
com.ebaiyihui.imforward.client.vo.IMSingleMsgResultVO
;
import
java.util.List
;
public
interface
OrderManagementService
{
BaseResponse
<
PageUtil
<
OrderListResVo
>>
orderList
(
OrderListReqDTO
param
);
BaseResponse
<
OrderDetailsResVo
>
getOrderDetails
(
OrderDetailResDTO
param
);
BaseResponse
<
PageUtil
<
GetPresListResVO
>>
getPrePage
(
OrderDetailResDTO
param
);
BaseResponse
<
PageUtil
<
IMSingleMsgResultVO
>>
getChatPage
(
OrderDetailResDTO
param
);
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/OrderManagementServiceImpl.java
浏览文件 @
53951240
...
...
@@ -69,27 +69,44 @@ public class OrderManagementServiceImpl implements OrderManagementService {
return
BaseResponse
.
error
(
"订单不存在"
);
}
// 处方信息
resVo
.
setPresListResVOS
(
getPresList
(
patientSignEntity
.
getAdmId
()));
//
resVo.setPresListResVOS(getPresList(patientSignEntity.getAdmId()));
// 订单信息
resVo
.
setOrderInfo
(
buildOrderInfo
(
patientSignEntity
));
// 沟通记录
resVo
.
setImSingleMsgResultVOS
(
queryImMsg
(
patientSignEntity
));
//
resVo.setImSingleMsgResultVOS(queryImMsg(patientSignEntity));
return
BaseResponse
.
success
(
resVo
);
}
@Override
public
BaseResponse
<
PageUtil
<
GetPresListResVO
>>
getPrePage
(
OrderDetailResDTO
param
)
{
List
<
GetPresListResVO
>
presList
=
getPresList
(
param
.
getOrderId
(),
param
.
getPageNum
(),
param
.
getPageSize
());
PageUtil
<
GetPresListResVO
>
pageUtil
=
new
PageUtil
<>();
pageUtil
.
setList
(
presList
);
return
BaseResponse
.
success
(
pageUtil
);
}
@Override
public
BaseResponse
<
PageUtil
<
IMSingleMsgResultVO
>>
getChatPage
(
OrderDetailResDTO
param
)
{
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectById
(
param
.
getOrderId
());
List
<
IMSingleMsgResultVO
>
msgResultVOS
=
queryImMsg
(
patientSignEntity
,
param
.
getPageNum
(),
param
.
getPageSize
());
PageUtil
<
IMSingleMsgResultVO
>
pageUtil
=
new
PageUtil
<>();
pageUtil
.
setList
(
msgResultVOS
);
return
BaseResponse
.
success
(
pageUtil
);
}
/**
* 获取聊天记录
*/
private
List
<
IMSingleMsgResultVO
>
queryImMsg
(
PatientSignEntity
patientSignEntity
){
private
List
<
IMSingleMsgResultVO
>
queryImMsg
(
PatientSignEntity
patientSignEntity
,
Integer
pageNum
,
Integer
pageSize
){
List
<
IMSingleMsgResultVO
>
imSingleMsgResultVOS
=
new
ArrayList
<>();
IMQueryMsgReqVO
reqVO
=
new
IMQueryMsgReqVO
();
List
<
String
>
admIdList
=
new
ArrayList
<>();
admIdList
.
add
(
patientSignEntity
.
getAdmId
());
reqVO
.
setAppointmentId
(
admIdList
);
reqVO
.
setBusinessCode
(
"jtys"
);
reqVO
.
setPage
(
0
);
reqVO
.
setPageSize
(
9999
);
reqVO
.
setPage
(
pageNum
-
1
);
reqVO
.
setPageSize
(
pageSize
);
reqVO
.
setMsgType
(
"1"
);
reqVO
.
setUserId
(
patientSignEntity
.
getPatientUserId
());
...
...
@@ -148,9 +165,11 @@ public class OrderManagementServiceImpl implements OrderManagementService {
/**
* 获取处方信息
*/
private
List
<
GetPresListResVO
>
getPresList
(
String
admId
)
{
private
List
<
GetPresListResVO
>
getPresList
(
String
admId
,
Integer
pageNum
,
Integer
pageSize
)
{
GetPresListReqVO
reqVo
=
new
GetPresListReqVO
();
reqVo
.
setAdmId
(
admId
);
reqVo
.
setPageNum
(
pageNum
);
reqVo
.
setPageSize
(
pageSize
);
try
{
log
.
info
(
"查询处方列表URL:{},入参{}, "
,
projProperties
.
getPresListByAdmId
(),
JSON
.
toJSONString
(
reqVo
));
String
body
=
HttpKit
.
jsonPost
(
projProperties
.
getPresListByAdmId
(),
JSON
.
toJSONString
(
reqVo
));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论