|
@@ -44,6 +44,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Comparator;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
@@ -250,8 +251,8 @@ public class DataAnalysisFacade {
|
|
List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS = page(getEntryDefectImproveDTO, size, 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");
|
|
|
|
- };
|
|
|
|
|
|
+ getEntryDefectImproveDTOS = sortEntryDefectList( getEntryDefectImproveDTOS ,getEntryDefectImproveVO);
|
|
|
|
+ };
|
|
page.setRecords(getEntryDefectImproveDTOS);
|
|
page.setRecords(getEntryDefectImproveDTOS);
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
@@ -332,6 +333,110 @@ public class DataAnalysisFacade {
|
|
return currentPageList;
|
|
return currentPageList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public List<BehospitalInfoDTO> getEntryDefectImproveInnerDTOS( List<BehospitalInfoDTO> behospitalInfoDTOList ,GetEntryDefectImproveInnerVO
|
|
|
|
+ getEntryDefectImproveInnerVO) {
|
|
|
|
+ if(StringUtils.isNotBlank(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ if("behDeptName".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getBehDeptName)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("doctorName".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getDoctorName)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("name".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getName)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("fileCode".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getFileCode)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("age".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getAge)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("behospitalDate".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getBehospitalDate)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("leaveHospitalDate".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getLeaveHospitalDate)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("scoreRes".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getScoreRes)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("level".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getLevel)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("gradeTime".equals(getEntryDefectImproveInnerVO.getAsc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getGradeTime)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotBlank(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ if("behDeptName".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getBehDeptName).reversed()).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("doctorName".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getDoctorName).reversed()).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("name".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getName).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("fileCode".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getFileCode).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("age".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getAge).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("behospitalDate".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getBehospitalDate).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("leaveHospitalDate".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getLeaveHospitalDate).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("scoreRes".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getScoreRes).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("level".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getLevel).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ if("gradeTime".equals(getEntryDefectImproveInnerVO.getDesc())){
|
|
|
|
+ behospitalInfoDTOList = behospitalInfoDTOList.stream().sorted(Comparator.comparing(BehospitalInfoDTO::getGradeTime).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return behospitalInfoDTOList;
|
|
|
|
+ }
|
|
|
|
+ public List<GetEntryDefectImproveDTO> sortEntryDefectList( List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS ,GetEntryDefectImproveVO getEntryDefectImproveVO) {
|
|
|
|
+ if(StringUtils.isNotBlank(getEntryDefectImproveVO.getAsc())){
|
|
|
|
+ if("totalNum".equals(getEntryDefectImproveVO.getAsc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getTotalNum)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("handleNum".equals(getEntryDefectImproveVO.getAsc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getHandleNum)).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("improveleNum".equals(getEntryDefectImproveVO.getAsc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getImproveleNum)).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotBlank(getEntryDefectImproveVO.getDesc())){
|
|
|
|
+ if("totalNum".equals(getEntryDefectImproveVO.getDesc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getTotalNum).reversed()).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("handleNum".equals(getEntryDefectImproveVO.getDesc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getHandleNum).reversed()).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if("improveleNum".equals(getEntryDefectImproveVO.getDesc())){
|
|
|
|
+ getEntryDefectImproveDTOS = getEntryDefectImproveDTOS.stream().sorted(Comparator.comparing(GetEntryDefectImproveDTO::getImproveleNum).reversed()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return getEntryDefectImproveDTOS;
|
|
|
|
+ }
|
|
|
|
+
|
|
public static 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>();
|
|
Set<String> totalSet = new HashSet<String>();
|
|
for (QcResultDetailInfo qcResultDetailInfo : qcResultDetailInfos) {
|
|
for (QcResultDetailInfo qcResultDetailInfo : qcResultDetailInfos) {
|
|
@@ -437,8 +542,7 @@ public class DataAnalysisFacade {
|
|
List<BehospitalInfoDTO> behospitalInfoDTOList = page(behospitalInfoDTOS, size, 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");
|
|
|
|
- }
|
|
|
|
|
|
+ behospitalInfoDTOList = getEntryDefectImproveInnerDTOS( behospitalInfoDTOList ,getEntryDefectImproveInnerVO); }
|
|
page.setRecords(behospitalInfoDTOList);
|
|
page.setRecords(behospitalInfoDTOList);
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|