|
@@ -487,6 +487,65 @@ public class ConsoleExportFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 病案首页不合格/合格数-XY
|
|
|
+ *
|
|
|
+ * @param qcResultShortPageVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public void badLevelPageXYExport(HttpServletResponse response, QcResultShortXYPageVO qcResultShortPageVO) {
|
|
|
+ String hospitalId = SysUserUtils.getCurrentHospitalID();
|
|
|
+ qcResultShortPageVO.setHospitalId(hospitalId);
|
|
|
+ if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
|
|
|
+ && qcResultShortPageVO.getDeptName().equals("全部")) {
|
|
|
+ qcResultShortPageVO.setDeptName("");
|
|
|
+ }
|
|
|
+ Date startDate = qcResultShortPageVO.getStartDate();
|
|
|
+ Date endDate = qcResultShortPageVO.getEndDate();
|
|
|
+ //时间间隔7天
|
|
|
+ long interval_7 = 7 * 24 * 60 * 60 * 1000;
|
|
|
+ long interval_90 = 90 * 24 * 60 * 60 * 1000l;
|
|
|
+
|
|
|
+ if("1".equals(qcResultShortPageVO.getRadioCheck())){
|
|
|
+ //时间间隔7天
|
|
|
+ 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天");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //时间间隔90天
|
|
|
+ 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天");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ qcResultShortPageVO.setCurrent(1L);
|
|
|
+ qcResultShortPageVO.setSize(Long.MAX_VALUE);
|
|
|
+ qcResultShortPageVO.setSearchCount(false);
|
|
|
+ List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().badLevelPageXYExport(qcResultShortPageVO);
|
|
|
+ List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
+ if("2".equals(qcResultShortPageVO.getRadioCheck())){
|
|
|
+ resWide = transList(records, resWide);
|
|
|
+ }
|
|
|
+ String fileName = null;
|
|
|
+ if("不合格数".equals(qcResultShortPageVO.getTitleName())){
|
|
|
+ fileName = "病案首页不合格数病历详情页.xls";
|
|
|
+ }else{
|
|
|
+ fileName = "病案首页合格数病历详情页.xls";
|
|
|
+ }
|
|
|
+ if("1".equals(qcResultShortPageVO.getRadioCheck())){
|
|
|
+ ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+ }
|
|
|
+ if("2".equals(qcResultShortPageVO.getRadioCheck())){
|
|
|
+ ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 未整改病历统计导出
|
|
|
*
|