|
@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.AuthServiceClient;
|
|
|
import com.diagbot.dto.*;
|
|
|
import com.diagbot.entity.*;
|
|
|
-import com.diagbot.enums.CheckStatusEnum;
|
|
|
import com.diagbot.enums.CheckerRoleEnum;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.QualityContent;
|
|
@@ -32,8 +31,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.Valid;
|
|
|
-
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.time.LocalDateTime;
|
|
@@ -2217,18 +2214,23 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//时间设置
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresult(exportQcresultVO);
|
|
|
- List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- resWide = transList(res, resWide);
|
|
|
- }
|
|
|
+ //90天、1年都按含缺陷明细项处理
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
+ ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// response.setContentType("text/html;charset=UTF-8");
|
|
|
+// List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// resWide = transList(res, resWide);
|
|
|
+// }
|
|
|
+// String fileName = "抽查住院病历质量情况.xls";
|
|
|
+// response.setContentType("text/html;charset=UTF-8");
|
|
|
+// if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
public List<ExportWideExcelDTO> transList(List<ExportExcelDTO> res, List<ExportWideExcelDTO> resWide) {
|
|
@@ -2272,18 +2274,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//时间设置
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresultByPerson(exportQcresultVO);
|
|
|
- List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- resWide = transList(res, resWide);
|
|
|
- }
|
|
|
+ //90天、1年都按含缺陷明细项处理
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
+ ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// resWide = transList(res, resWide);
|
|
|
+// }
|
|
|
+// String fileName = "抽查住院病历质量情况.xls";
|
|
|
+// response.setContentType("text/html;charset=UTF-8");
|
|
|
+// if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2308,18 +2314,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
exportByDeptDTO.setExportExcelByDeptDTOS(records);
|
|
|
resDTO.add(exportByDeptDTO);
|
|
|
}
|
|
|
- List<ExportNinetyByDeptDTO> resWide = new ArrayList<ExportNinetyByDeptDTO>();
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- resWide = ConsoleByDeptExportFacade.transList(records, resWide);
|
|
|
- }
|
|
|
+ //90天、1年都按含缺陷明细项处理
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(resDTO, null, "sheet1", ExportSevenByDeptDTO.class, fileName, response);
|
|
|
- }
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportNinetyByDeptDTO.class, fileName, response);
|
|
|
- }
|
|
|
+ ExcelUtils.exportExcelUser(resDTO, null, "sheet1", ExportSevenByDeptDTO.class, fileName, response);
|
|
|
+// List<ExportNinetyByDeptDTO> resWide = new ArrayList<ExportNinetyByDeptDTO>();
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// resWide = ConsoleByDeptExportFacade.transList(records, resWide);
|
|
|
+// }
|
|
|
+// String fileName = "抽查住院病历质量情况.xls";
|
|
|
+// response.setContentType("text/html;charset=UTF-8");
|
|
|
+// if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(resDTO, null, "sheet1", ExportSevenByDeptDTO.class, fileName, response);
|
|
|
+// }
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportNinetyByDeptDTO.class, fileName, response);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2336,43 +2346,48 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//时间设置
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresultByGroup(exportQcresultVO);
|
|
|
- List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- resWide = transList(res, resWide);
|
|
|
- }
|
|
|
+ //90天、1年都按含缺陷明细项处理
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
- if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
- }
|
|
|
+ ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// resWide = transList(res, resWide);
|
|
|
+// }
|
|
|
+// String fileName = "抽查住院病历质量情况.xls";
|
|
|
+// response.setContentType("text/html;charset=UTF-8");
|
|
|
+// if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
+// if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
+// ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
public static void exportQcresultVOSet(ExportQcresultVO exportQcresultVO) {
|
|
|
//入参验证
|
|
|
- long interval_7 = 7 * 24 * 60 * 60 * 1000;
|
|
|
+// long interval_7 = 7 * 24 * 60 * 60 * 1000;
|
|
|
long interval_90 = 90 * 24 * 60 * 60 * 1000l;
|
|
|
+ long interval_365 = 366 * 24 * 60 * 60 * 1000l;
|
|
|
//入院时间
|
|
|
if (null != exportQcresultVO && null != exportQcresultVO.getBehosDateStart() && null != exportQcresultVO.getBehosDateEnd()) {
|
|
|
Date startDate = exportQcresultVO.getBehosDateStart();
|
|
|
Date endDate = exportQcresultVO.getBehosDateEnd();
|
|
|
if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- //时间间隔7天
|
|
|
+ //时间间隔90天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
|
}
|
|
|
- if (endDate.getTime() - startDate.getTime() > interval_7) {
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval_90) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
|
|
|
}
|
|
|
} else {
|
|
|
- //时间间隔90天
|
|
|
+ //时间间隔366天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
|
}
|
|
|
- if (endDate.getTime() - startDate.getTime() > interval_90) {
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval_365) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于366天");
|
|
|
}
|
|
|
}
|
|
|
exportQcresultVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getBehosDateStart()));
|
|
@@ -2383,20 +2398,20 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Date startDate = exportQcresultVO.getLeaveHosDateStart();
|
|
|
Date endDate = exportQcresultVO.getLeaveHosDateEnd();
|
|
|
if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
- //时间间隔7天
|
|
|
+ //时间间隔90天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
|
}
|
|
|
- if (endDate.getTime() - startDate.getTime() > interval_7) {
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval_90) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
|
|
|
}
|
|
|
} else {
|
|
|
- //时间间隔90天
|
|
|
+ //时间间隔365天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
|
}
|
|
|
- if (endDate.getTime() - startDate.getTime() > interval_90) {
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval_365) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于366天");
|
|
|
}
|
|
|
}
|
|
|
exportQcresultVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getLeaveHosDateStart()));
|