|
@@ -9,7 +9,9 @@ import com.platform.dao.dto.check.CheckJobDTO;
|
|
|
import com.platform.dao.dto.sb.SbMeasureLogDTO;
|
|
|
import com.platform.dao.util.ExcelUtil;
|
|
|
import com.platform.dao.vo.export.check.ExportCheckJobVO;
|
|
|
+import com.platform.dao.vo.export.sb.ExportSbMeasureLogVO;
|
|
|
import com.platform.dao.vo.query.check.CheckJobVO;
|
|
|
+import com.platform.dao.vo.query.sb.SbMeasureLogVO;
|
|
|
import com.platform.dao.vo.report.CheckJobReportVO;
|
|
|
import com.platform.dao.vo.report.CheckJobReportWeekHoursVO;
|
|
|
import com.platform.dao.vo.report.MeasureLogReportVO;
|
|
@@ -74,5 +76,33 @@ public class MeasureLogReportController {
|
|
|
ExcelUtil.exportResponseDict(response, MeasureLogReportVO.class, list, fileName);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 保养任务每月统计报表导出
|
|
|
+ *
|
|
|
+ * @param dto 查询条件
|
|
|
+ * @param year 查询年份
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @GetMapping("/export/month")
|
|
|
+ @SysLog("检定记录每月明细导出")
|
|
|
+ public void export(HttpServletResponse response, SbMeasureLogDTO dto, @RequestParam(required = false) Integer year,
|
|
|
+ @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth,
|
|
|
+ @RequestParam(required = false) Integer month) {
|
|
|
+ List<MeasureLogReportVO> list = sbMeasureLogService.getMonthReport(dto, year, startMonth, endMonth);
|
|
|
+ String fileName = "";
|
|
|
+ fileName = year + "-" + month + "-检定记录明细";
|
|
|
+ if (CollectionUtil.isNotEmpty(list)) {
|
|
|
+ for (MeasureLogReportVO vo : list) {
|
|
|
+ if (vo.getMonth() == month) {
|
|
|
+ List<SbMeasureLogVO> detailList = vo.getDetailList();
|
|
|
+ if (CollectionUtil.isNotEmpty(detailList)) {
|
|
|
+ ExcelUtil.exportResponseDict(response, ExportSbMeasureLogVO.class, BeanConverterUtil.copyListProperties(detailList, ExportSbMeasureLogVO.class), fileName);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|