|
@@ -48,25 +48,29 @@ public class JieShouHuiZhenService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param deptCode 科室code
|
|
|
- * @param currentPage 当前页
|
|
|
- * @param pageSize 页大小
|
|
|
- * @param startTime 开始时间
|
|
|
- * @param endTime 接受时间
|
|
|
+ * @param startTime 开始时间
|
|
|
+ * @param endTime 接受时间
|
|
|
* @return 返回没有会诊的信息
|
|
|
*/
|
|
|
- public ResultVo<Page<JieShouHuiZhenPojo>> getHuiZhenData(String deptCode, long currentPage, long pageSize, String startTime, String endTime) {
|
|
|
- List<String> deptList = publicServer.getKeShiLieBiaoList(deptCode);
|
|
|
+ public ResultVo<List<JieShouHuiZhenPojo>> getHuiZhenData(String startTime, String endTime, boolean history) {
|
|
|
+ log.info("数据:{}", history);
|
|
|
+ UserInfo userInfo = redisLikeService.getUserInfoByToken();
|
|
|
+ List<String> deptList = publicServer.getKeShiLieBiaoList(userInfo.getDeptCode());
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
- qw.eq("status_flag", "1")
|
|
|
- .ge("req_date", startTime)
|
|
|
- .le("req_date", endTime);
|
|
|
- if (ListUtil.notBlank(deptList)) {
|
|
|
- qw.and(QueryWrapper -> QueryWrapper.in("req_dept1", deptList).or().in("req_dept2", deptList));
|
|
|
+
|
|
|
+ if (history) {
|
|
|
+ qw.eq("input_id", userInfo.getCode());
|
|
|
+ } else {
|
|
|
+ qw.eq("status_flag", "1");
|
|
|
+ }
|
|
|
+ if (StringUtil.notBlank(startTime)) {
|
|
|
+ qw.ge("req_date", startTime)
|
|
|
+ .le("req_date", endTime);
|
|
|
+ }
|
|
|
+ if (ListUtil.notBlank(deptList) && !history) {
|
|
|
+ qw.and(q -> q.in("req_dept1", deptList).or().in("req_dept2", deptList));
|
|
|
}
|
|
|
- Page<JieShouHuiZhenPojo> page = new Page<>(currentPage, pageSize);
|
|
|
- dao.getHuiZhenData(page, qw);
|
|
|
- return ResultVoUtil.success(page);
|
|
|
+ return ResultVoUtil.success(dao.getHuiZhenData(qw));
|
|
|
}
|
|
|
|
|
|
/**
|