|
@@ -229,44 +229,22 @@ public class ConsoleExportFacade {
|
|
|
}
|
|
|
Date startDate = qcResultShortPageVO.getStartDate();
|
|
|
Date endDate = qcResultShortPageVO.getEndDate();
|
|
|
- //时间间隔7天
|
|
|
- long interval_7 = 7 * 24 * 60 * 60 * 1000;
|
|
|
- long interval_90 = 90l * 24 * 60 * 60 * 1000;
|
|
|
-
|
|
|
- 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天");
|
|
|
- }
|
|
|
+ //时间间隔90天
|
|
|
+ long interval = 90l * 24l * 60l * 60l * 1000l;
|
|
|
+ if (endDate.getTime() < startDate.getTime()) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
|
+ }
|
|
|
+ if (endDate.getTime() - startDate.getTime() > interval) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
|
|
|
}
|
|
|
|
|
|
qcResultShortPageVO.setCurrent(1L);
|
|
|
qcResultShortPageVO.setSize(Long.MAX_VALUE);
|
|
|
qcResultShortPageVO.setSearchCount(false);
|
|
|
- List<ExportExcelDTO> records = behospitalInfoFacade.qcResultShortPageExport(qcResultShortPageVO);
|
|
|
- List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if("2".equals(qcResultShortPageVO.getRadioCheck())){
|
|
|
- resWide = transList(records, resWide);
|
|
|
- }
|
|
|
+ List<ExportExcelDTO> record = behospitalInfoFacade.qcResultShortPageExport(qcResultShortPageVO);
|
|
|
String 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);
|
|
|
- }
|
|
|
- }
|
|
|
+ ExcelUtils.exportExcelUser(record, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 出院人数统计导出
|