|
@@ -3,6 +3,7 @@ package com.diagbot.facade;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.diagbot.dto.BasDeptInfoDTO;
|
|
import com.diagbot.dto.CheckWorkDTO;
|
|
import com.diagbot.dto.CheckWorkDTO;
|
|
import com.diagbot.dto.MedicalRecordDTO;
|
|
import com.diagbot.dto.MedicalRecordDTO;
|
|
import com.diagbot.entity.MedBehospitalType;
|
|
import com.diagbot.entity.MedBehospitalType;
|
|
@@ -24,11 +25,11 @@ import com.diagbot.vo.CheckWorkPageVO;
|
|
import com.diagbot.vo.MedCheckWorkAddVO;
|
|
import com.diagbot.vo.MedCheckWorkAddVO;
|
|
import com.diagbot.vo.RecordTypeVO;
|
|
import com.diagbot.vo.RecordTypeVO;
|
|
import com.diagbot.vo.SysUserBaseVO;
|
|
import com.diagbot.vo.SysUserBaseVO;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@@ -153,9 +154,8 @@ public class MedCheckWorkFacade {
|
|
recordContentVO.setHospitalId(hospiatlId);
|
|
recordContentVO.setHospitalId(hospiatlId);
|
|
recordContentVO.setModeList(new ArrayList<>(typeValue.keySet()));
|
|
recordContentVO.setModeList(new ArrayList<>(typeValue.keySet()));
|
|
List<MedicalRecordDTO> medicalRecordList = medicalRecordServiceImpl.getMedicalRecord(recordContentVO);
|
|
List<MedicalRecordDTO> medicalRecordList = medicalRecordServiceImpl.getMedicalRecord(recordContentVO);
|
|
- if(medicalRecordList!=null&&!medicalRecordList.isEmpty())
|
|
|
|
- {
|
|
|
|
- getPatientRecordType(medBehospitalTypeMap,medicalRecordList, typeValue, typeName, hospiatlId);
|
|
|
|
|
|
+ if (medicalRecordList != null && !medicalRecordList.isEmpty()) {
|
|
|
|
+ getPatientRecordType(medBehospitalTypeMap, medicalRecordList, typeValue, typeName, hospiatlId);
|
|
}
|
|
}
|
|
//2.批量执行插入操作
|
|
//2.批量执行插入操作
|
|
try {
|
|
try {
|
|
@@ -219,6 +219,19 @@ public class MedCheckWorkFacade {
|
|
public IPage<CheckWorkDTO> pageFac(CheckWorkPageVO checkWorkPageVO) {
|
|
public IPage<CheckWorkDTO> pageFac(CheckWorkPageVO checkWorkPageVO) {
|
|
checkWorkPageSet(checkWorkPageVO);
|
|
checkWorkPageSet(checkWorkPageVO);
|
|
IPage<CheckWorkDTO> res = medCheckInfoFacade.getBaseMapper().getCheckWorkPage(checkWorkPageVO);
|
|
IPage<CheckWorkDTO> res = medCheckInfoFacade.getBaseMapper().getCheckWorkPage(checkWorkPageVO);
|
|
|
|
+ if (res == null || ListUtil.isEmpty(res.getRecords())) {
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ res.getRecords().forEach(i -> {
|
|
|
|
+ String age = "";
|
|
|
|
+ if (StringUtil.isNotBlank(i.getAgeYear()) && !i.getAgeYear().equals("0")) {
|
|
|
|
+ age += i.getAgeYear() + "岁";
|
|
|
|
+ } else {
|
|
|
|
+ age += (StringUtil.isNotBlank(i.getAgeMon()) && !i.getAgeMon().equals("0") ? (i.getAgeMon() + "个月") : "")
|
|
|
|
+ + (StringUtil.isNotBlank(i.getAgeDay()) && !i.getAgeDay().equals("0") ? (i.getAgeDay() + "天") : "");
|
|
|
|
+ }
|
|
|
|
+ i.setAge(age);
|
|
|
|
+ });
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -247,7 +260,11 @@ public class MedCheckWorkFacade {
|
|
if (StringUtil.isNotBlank(checkWorkPageVO.getJobType()) && (CheckJobTypeEnum.DEPT_SUPERVISOR.getKey() + "").equals(checkWorkPageVO.getJobType())) {
|
|
if (StringUtil.isNotBlank(checkWorkPageVO.getJobType()) && (CheckJobTypeEnum.DEPT_SUPERVISOR.getKey() + "").equals(checkWorkPageVO.getJobType())) {
|
|
SysUserBaseVO sysUserBaseVO = new SysUserBaseVO();
|
|
SysUserBaseVO sysUserBaseVO = new SysUserBaseVO();
|
|
sysUserBaseVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
|
|
sysUserBaseVO.setUserId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
|
|
- List<String> deptIds = sysUserFacade.getUserDepts(sysUserBaseVO).getSelDepts().stream().map(i -> i.getDeptId()).collect(Collectors.toList());
|
|
|
|
|
|
+ List<String> deptIds = Lists.newArrayList();
|
|
|
|
+ List<BasDeptInfoDTO> selDepts = sysUserFacade.getUserDepts(sysUserBaseVO).getSelDepts();
|
|
|
|
+ if (ListUtil.isNotEmpty(selDepts)) {
|
|
|
|
+ deptIds = selDepts.stream().map(i -> i.getDeptId()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
if (ListUtil.isNotEmpty(checkWorkPageVO.getDepartment())) {
|
|
if (ListUtil.isNotEmpty(checkWorkPageVO.getDepartment())) {
|
|
deptIds.retainAll(checkWorkPageVO.getDepartment());
|
|
deptIds.retainAll(checkWorkPageVO.getDepartment());
|
|
}
|
|
}
|