|
@@ -8,8 +8,6 @@ import com.diagbot.dto.BehospitalInfoDTO;
|
|
|
import com.diagbot.dto.DeptBaseDTO;
|
|
|
import com.diagbot.dto.EntryDefectImprove;
|
|
|
import com.diagbot.dto.EntryDefectImproveInner;
|
|
|
-import com.diagbot.dto.ExportExcelBehospitalDTO;
|
|
|
-import com.diagbot.dto.ExportExcelDTO;
|
|
|
import com.diagbot.dto.GetEntryDefectImproveDTO;
|
|
|
import com.diagbot.dto.GetEntryInfoDTO;
|
|
|
import com.diagbot.dto.GetQcClickDTO;
|
|
@@ -53,6 +51,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.HashSet;
|
|
|
+import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
@@ -222,11 +221,11 @@ public class DataAnalysisFacade {
|
|
|
unitProcessing(behospitalCodeInfoList, totalMap, improveleMap);
|
|
|
//按照全院维度进行数据封装
|
|
|
for (Map.Entry<String, Long> stringLongEntry : totalMap.entrySet()) {
|
|
|
+ //封装DTO
|
|
|
GetEntryDefectImproveDTO getEntryDefectImprove = new GetEntryDefectImproveDTO();
|
|
|
getEntryDefectImprove.setDeptId(entryDefectImprove.getDeptId());
|
|
|
getEntryDefectImprove.setDeptName(entryDefectImprove.getDeptName());
|
|
|
getEntryDefectImprove.setEntryId(stringLongEntry.getKey());
|
|
|
- //封装信息
|
|
|
getEntryInfo(entryInfo, stringLongEntry, getEntryDefectImprove);
|
|
|
getEntryDefectImprove.setTotalNum(stringLongEntry.getValue());
|
|
|
if (improveleMap.containsKey(stringLongEntry.getKey())) {
|
|
@@ -236,6 +235,13 @@ public class DataAnalysisFacade {
|
|
|
getEntryDefectImproveDTO.add(getEntryDefectImprove);
|
|
|
}
|
|
|
}
|
|
|
+ //(部分模糊查询在此)
|
|
|
+ if (ListUtil.isNotEmpty(getEntryDefectImproveDTO)) {
|
|
|
+ if (StringUtils.isNotBlank(getEntryDefectImproveVO.getCasesName()) || StringUtils.isNotBlank(getEntryDefectImproveVO.getEntryName())) {
|
|
|
+ getEntryDefectImproveQuery(getEntryDefectImproveVO, getEntryDefectImproveDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//导出操作
|
|
|
if (getEntryDefectImproveVO.getExportType() == 1L) {
|
|
@@ -246,7 +252,7 @@ public class DataAnalysisFacade {
|
|
|
page.setCurrent(current);
|
|
|
//分页操作
|
|
|
List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS = page(getEntryDefectImproveDTO, size, current);
|
|
|
- if(ListUtil.isNotEmpty(getEntryDefectImproveDTOS)) {
|
|
|
+ if (ListUtil.isNotEmpty(getEntryDefectImproveDTOS)) {
|
|
|
//排序操作
|
|
|
getEntryDefectImproveDTOS = sortList(getEntryDefectImproveDTOS, getEntryDefectImproveVO.getAsc() != null ? getEntryDefectImproveVO.getAsc() : getEntryDefectImproveVO.getDesc() + " desc");
|
|
|
};
|
|
@@ -280,8 +286,8 @@ public class DataAnalysisFacade {
|
|
|
* @Author: cy
|
|
|
* @Date: 2021/12/3
|
|
|
*/
|
|
|
- public void unitProcessing(List<BehospitalCodeInfo> behospitalCodeInfoList, Map<String, Long> totalMap,
|
|
|
- Map<String, Long> improveleMap) {
|
|
|
+ public static void unitProcessing(List<BehospitalCodeInfo> behospitalCodeInfoList, Map<String, Long> totalMap,
|
|
|
+ Map<String, Long> improveleMap) {
|
|
|
for (BehospitalCodeInfo behospitalCodeInfo : behospitalCodeInfoList) {
|
|
|
//病历下
|
|
|
List<QcResultDetailInfo> qcResultDetailInfos = behospitalCodeInfo.getQcResultDetailInfos();
|
|
@@ -294,6 +300,23 @@ public class DataAnalysisFacade {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public void getEntryDefectImproveQuery(GetEntryDefectImproveVO getEntryDefectImproveVO, List<GetEntryDefectImproveDTO> getEntryDefectImproveDTO) {
|
|
|
+ Iterator<GetEntryDefectImproveDTO> iterator = getEntryDefectImproveDTO.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ boolean mark = true;
|
|
|
+ GetEntryDefectImproveDTO kfc = iterator.next();
|
|
|
+ if (StringUtils.isNotBlank(getEntryDefectImproveVO.getCasesName()) &&
|
|
|
+ !kfc.getCasesName().contains(getEntryDefectImproveVO.getCasesName())) {
|
|
|
+ iterator.remove();
|
|
|
+ mark = false;
|
|
|
+ }
|
|
|
+ if (mark && StringUtils.isNotBlank(getEntryDefectImproveVO.getEntryName()) &&
|
|
|
+ !kfc.getEntryName().contains(getEntryDefectImproveVO.getEntryName())) {
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @Description:分页数据
|
|
|
* @Param: [dataList, pageSize, currentPage]
|
|
@@ -301,7 +324,7 @@ public class DataAnalysisFacade {
|
|
|
* @Author: cy
|
|
|
* @Date: 2021/12/2
|
|
|
*/
|
|
|
- public static<T> List<T> page(List<T> retRecords, int pageSize, int currentPage) {
|
|
|
+ public static <T> List<T> page(List<T> retRecords, int pageSize, int currentPage) {
|
|
|
List<T> currentPageList = new ArrayList<>();
|
|
|
if (retRecords != null && retRecords.size() > 0) {
|
|
|
int currIdx = (currentPage > 1 ? (currentPage - 1) * pageSize : 0);
|
|
@@ -336,7 +359,7 @@ public class DataAnalysisFacade {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- public Map getEntryTotalMap(List<QcResultDetailInfo> qcResultDetailInfos, Map<String, Long> totalMap) {
|
|
|
+ public static Map getEntryTotalMap(List<QcResultDetailInfo> qcResultDetailInfos, Map<String, Long> totalMap) {
|
|
|
Set<String> totalSet = new HashSet<String>();
|
|
|
for (QcResultDetailInfo qcResultDetailInfo : qcResultDetailInfos) {
|
|
|
//质控下获取科室下总缺陷
|
|
@@ -347,7 +370,7 @@ public class DataAnalysisFacade {
|
|
|
return totalMap;
|
|
|
}
|
|
|
|
|
|
- public Map getEntryImproveleMap(QcResultDetailInfo qcResultDetailInfo, Map<String, Long> improveMap) {
|
|
|
+ public static Map getEntryImproveleMap(QcResultDetailInfo qcResultDetailInfo, Map<String, Long> improveMap) {
|
|
|
Set<String> improveleSet = new HashSet<String>();
|
|
|
String casesEntryIds = qcResultDetailInfo.getCasesEntryIds();
|
|
|
improveleSet = getSetEntry(casesEntryIds, improveleSet);
|
|
@@ -355,7 +378,7 @@ public class DataAnalysisFacade {
|
|
|
return improveMap;
|
|
|
}
|
|
|
|
|
|
- public Set getSetEntry(String casesEntryIds, Set set) {
|
|
|
+ public static Set getSetEntry(String casesEntryIds, Set set) {
|
|
|
if (StringUtils.isNotBlank(casesEntryIds) && !"0".equals(casesEntryIds)) {
|
|
|
if (casesEntryIds.contains("、")) {
|
|
|
String[] split = casesEntryIds.split("、");
|
|
@@ -369,7 +392,7 @@ public class DataAnalysisFacade {
|
|
|
return set;
|
|
|
}
|
|
|
|
|
|
- public Map getSetEntryCount(Map<String, Long> map, Set<String> sets) {
|
|
|
+ public static Map getSetEntryCount(Map<String, Long> map, Set<String> sets) {
|
|
|
for (String set : sets) {
|
|
|
if (map.containsKey(set)) {
|
|
|
long count = map.get(set) + 1l;
|
|
@@ -400,7 +423,7 @@ public class DataAnalysisFacade {
|
|
|
IPage<BehospitalInfoDTO> page = new Page<>();
|
|
|
List<BehospitalInfoDTO> behospitalInfoDTOS = new ArrayList<>();
|
|
|
entryDefectInnerSet(getEntryDefectImproveInnerVO);
|
|
|
- // List<GetEntryInfoDTO> entryInfo = medClickInfoService.getBaseMapper().getEntryInfo();
|
|
|
+ // List<GetEntryInfoDTO> entryInfo = medClickInfoService.getBaseMapper().getEntryInfo();
|
|
|
List<EntryDefectImproveInner> records = medClickInfoService.getBaseMapper().getEntryDefectImproveInner(getEntryDefectImproveInnerVO);
|
|
|
if (ListUtil.isNotEmpty(records) && records.size() == 1) {
|
|
|
EntryDefectImproveInner entryDefectImproveInner = records.get(0);
|
|
@@ -414,7 +437,7 @@ public class DataAnalysisFacade {
|
|
|
totalSet = getSetEntry(casesEntryIds, totalSet);
|
|
|
}
|
|
|
QcResultDetailInfo qcResultDetailInfo = qcResultDetailInfos.get(qcResultDetailInfos.size() - 1);
|
|
|
- if(null != qcResultDetailInfo && StringUtils.isNotBlank(qcResultDetailInfo.getCasesEntryIds())){
|
|
|
+ if (null != qcResultDetailInfo && StringUtils.isNotBlank(qcResultDetailInfo.getCasesEntryIds())) {
|
|
|
improveleSet = getSetEntry(qcResultDetailInfo.getCasesEntryIds(), improveleSet);
|
|
|
}
|
|
|
if ("0".equals(getEntryDefectImproveInnerVO.getTypeMark()) && totalSet.contains(getEntryDefectImproveInnerVO.getEntryId())) {
|
|
@@ -439,11 +462,11 @@ public class DataAnalysisFacade {
|
|
|
page.setCurrent(current);
|
|
|
//分页操作
|
|
|
List<BehospitalInfoDTO> behospitalInfoDTOList = page(behospitalInfoDTOS, size, current);
|
|
|
- if(ListUtil.isNotEmpty(behospitalInfoDTOList)){
|
|
|
+ if (ListUtil.isNotEmpty(behospitalInfoDTOList)) {
|
|
|
//排序操作
|
|
|
behospitalInfoDTOList = sortList(behospitalInfoDTOList, getEntryDefectImproveInnerVO.getAsc() != null ? getEntryDefectImproveInnerVO.getAsc() : getEntryDefectImproveInnerVO.getDesc() + " desc");
|
|
|
}
|
|
|
- page.setRecords(behospitalInfoDTOList);
|
|
|
+ page.setRecords(behospitalInfoDTOList);
|
|
|
return page;
|
|
|
}
|
|
|
|