|
@@ -21,6 +21,7 @@ import com.diagbot.dto.QcResultPercentDTO;
|
|
|
import com.diagbot.dto.QcResultShortDTO;
|
|
|
import com.diagbot.dto.UnModifyMRDTO;
|
|
|
import com.diagbot.dto.UnModifyMRDetailDTO;
|
|
|
+import com.diagbot.entity.QcCasesEntry;
|
|
|
import com.diagbot.entity.SysHospitalSet;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -38,7 +39,6 @@ import com.diagbot.vo.FilterVO;
|
|
|
import com.diagbot.vo.QcResultShortPageVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -80,6 +80,8 @@ public class ConsoleFacade {
|
|
|
private BehospitalInfoFacade behospitalInfoFacade;
|
|
|
@Autowired
|
|
|
private SysHospitalSetFacade sysHospitalSetFacade;
|
|
|
+ @Autowired
|
|
|
+ private QcCasesEntryFacade qcCasesEntryFacade;
|
|
|
|
|
|
//region-----------------------聚合接口开始-------------------------------
|
|
|
|
|
@@ -1047,8 +1049,20 @@ public class ConsoleFacade {
|
|
|
orderNo++;
|
|
|
}
|
|
|
}
|
|
|
+ //条目未维护
|
|
|
+ if (ListUtil.isEmpty(casesEntryIds)) {
|
|
|
+ return unModifyMRDTO;
|
|
|
+ }
|
|
|
|
|
|
+ //casesEntryIds
|
|
|
filterUnModifyMRVO.setCasesEntryIds(casesEntryIds);
|
|
|
+ QueryWrapper<QcCasesEntry> qcCasesEntryQueryWrapper = new QueryWrapper<>();
|
|
|
+ qcCasesEntryQueryWrapper.eq("is_deleted", "N")
|
|
|
+ .in("id", casesEntryIds);
|
|
|
+ List<QcCasesEntry> casesEntryList = qcCasesEntryFacade.list(qcCasesEntryQueryWrapper);
|
|
|
+ Map<Long, String> basCasesEntryMap = EntityUtil.makeMapWithKeyValue(casesEntryList, "id", "name");
|
|
|
+
|
|
|
+
|
|
|
List<UnModifyMRDetailDTO> records = behospitalInfoFacade.unModifyMRStatistics(filterUnModifyMRVO);
|
|
|
Map<String, List<UnModifyMRDetailDTO>> deptMap = EntityUtil.makeEntityListMap(records, "deptId");
|
|
|
Map<String, String> deptInfoMap = EntityUtil.makeMapWithKeyValue(records, "deptId", "deptName");
|
|
@@ -1071,15 +1085,15 @@ public class ConsoleFacade {
|
|
|
for (ColumnDTO item : columns) {
|
|
|
if (item.getFieldName().lastIndexOf("_id") > 0) {
|
|
|
addMap.put(item.getFieldName(), Class.forName("java.lang.Long"));
|
|
|
- if (entry.getValue().containsKey(item.getId())) {
|
|
|
- addValMap.put(item.getFieldName(), entry.getValue().get(item.getId()).getCasesEntryId());
|
|
|
+ if (item.getId() != null) {
|
|
|
+ addValMap.put(item.getFieldName(), item.getId());
|
|
|
} else {
|
|
|
addValMap.put(item.getFieldName(), null);
|
|
|
}
|
|
|
} else if (item.getFieldName().lastIndexOf("_name") > 0) {
|
|
|
addMap.put(item.getFieldName(), Class.forName("java.lang.String"));
|
|
|
- if (entry.getValue().containsKey(item.getId())) {
|
|
|
- addValMap.put(item.getFieldName(), entry.getValue().get(item.getId()).getCasesEntryName());
|
|
|
+ if (basCasesEntryMap.containsKey(item.getId())) {
|
|
|
+ addValMap.put(item.getFieldName(), basCasesEntryMap.get(item.getId()));
|
|
|
} else {
|
|
|
addValMap.put(item.getFieldName(), "");
|
|
|
}
|
|
@@ -1149,28 +1163,16 @@ public class ConsoleFacade {
|
|
|
for (ColumnDTO item : columns) {
|
|
|
if (item.getFieldName().lastIndexOf("_id") > 0) {
|
|
|
addMap.put(item.getFieldName(), Class.forName("java.lang.Long"));
|
|
|
- List<Object> entryIds = retList
|
|
|
- .stream()
|
|
|
- .map(i -> ObjectUtil.getValueByKey(i, item.getFieldName()))
|
|
|
- .filter(i -> i != null)
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(entryIds)) {
|
|
|
- addValMap.put(item.getFieldName(), entryIds.get(0));
|
|
|
+ if (item.getId() != null) {
|
|
|
+ addValMap.put(item.getFieldName(), item.getId());
|
|
|
} else {
|
|
|
addValMap.put(item.getFieldName(), null);
|
|
|
}
|
|
|
|
|
|
} else if (item.getFieldName().lastIndexOf("_name") > 0) {
|
|
|
addMap.put(item.getFieldName(), Class.forName("java.lang.String"));
|
|
|
- List<Object> entryNames = retList
|
|
|
- .stream()
|
|
|
- .map(i -> ObjectUtil.getValueByKey(i, item.getFieldName()))
|
|
|
- .filter(i -> i != null)
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(entryNames)) {
|
|
|
- addValMap.put(item.getFieldName(), entryNames.get(0));
|
|
|
+ if (basCasesEntryMap.containsKey(item.getId())) {
|
|
|
+ addValMap.put(item.getFieldName(), basCasesEntryMap.get(item.getId()));
|
|
|
} else {
|
|
|
addValMap.put(item.getFieldName(), "");
|
|
|
}
|