|
@@ -1,5 +1,6 @@
|
|
|
package thyyxxk.webserver.service.casefrontsheet;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -8,10 +9,10 @@ import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.dao.his.casefrontsheet.JieShouHuiZhenDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.JieShouHuiZhenPojo;
|
|
|
-import thyyxxk.webserver.utils.DateUtil;
|
|
|
-import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
-import thyyxxk.webserver.utils.StringUtil;
|
|
|
-import thyyxxk.webserver.utils.TokenUtil;
|
|
|
+import thyyxxk.webserver.service.PublicServer;
|
|
|
+import thyyxxk.webserver.utils.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -26,10 +27,12 @@ import thyyxxk.webserver.utils.TokenUtil;
|
|
|
public class JieShouHuiZhenService {
|
|
|
|
|
|
private final JieShouHuiZhenDao dao;
|
|
|
+ private final PublicServer publicServer;
|
|
|
|
|
|
@Autowired
|
|
|
- public JieShouHuiZhenService(JieShouHuiZhenDao dao) {
|
|
|
+ public JieShouHuiZhenService(JieShouHuiZhenDao dao, PublicServer publicServer) {
|
|
|
this.dao = dao;
|
|
|
+ this.publicServer = publicServer;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -41,9 +44,19 @@ public class JieShouHuiZhenService {
|
|
|
* @return 返回没有会诊的信息
|
|
|
*/
|
|
|
public ResultVo<Page<JieShouHuiZhenPojo>> getHuiZhenData(String deptCode, long currentPage, long pageSize, String startTime, String endTime) {
|
|
|
+ List<String> deptList = publicServer.getKeShiLieBiaoList(deptCode);
|
|
|
+
|
|
|
+ log.info("科室列表:{}", deptList);
|
|
|
+ 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));
|
|
|
+ }
|
|
|
Page<JieShouHuiZhenPojo> page = new Page<>(currentPage, pageSize);
|
|
|
log.info("会诊申请查看 开始时间:{},结束时间:{}", startTime, endTime);
|
|
|
- dao.getHuiZhenData(page, deptCode, startTime, endTime);
|
|
|
+ dao.getHuiZhenData(page, qw);
|
|
|
return ResultVoUtil.success(page);
|
|
|
}
|
|
|
|