|
|
@@ -521,4 +521,58 @@ public class RepairReportController {
|
|
|
ExcelUtil.exportResponseDict(response, ExportRepairApplicationFormVO.class,
|
|
|
BeanConverterUtil.copyListProperties(list, ExportRepairApplicationFormVO.class), "维修工时统计-明细");
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 维修工时统计:按月度统计所有设备的单次平均维修工时
|
|
|
+ * @param dto 查询条件(设备名称/编号模糊、维修开始时间范围)
|
|
|
+ * @param pageNum 页码
|
|
|
+ * @param pageSize 每页条数
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @GetMapping("/workhour/month")
|
|
|
+ @SysLog("维修工时统计-按月度")
|
|
|
+ public R<AbstractPageResultBean<RepairWorkHourReportVO>> statisticsWorkHourByMonth(RepairApplicationFormDTO dto,
|
|
|
+ @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "20") int pageSize) {
|
|
|
+ return new R<>(repairApplicationFormService.statisticsWorkHourByMonth(dto, pageNum, pageSize));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 维修工时统计明细:按月度统计所有设备的单次平均维修工时
|
|
|
+ * @param dto 查询条件(维修人主维修人精确匹配、设备、维修开始时间范围)
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @GetMapping("/workhour/month/detail")
|
|
|
+ @SysLog("月度统计维修工时统计-明细")
|
|
|
+ public R<List<RepairApplicationFormVO>> getWorkHourMonthDetail(RepairApplicationFormDTO dto) {
|
|
|
+ return new R<>(repairApplicationFormService.getWorkHourDetailByMonth(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 维修工时统计明细导出:某维修人或某设备已完成维修的报修单列表
|
|
|
+ *
|
|
|
+ * @param dto 查询条件(维修人主维修人精确匹配、设备、维修开始时间范围)
|
|
|
+ */
|
|
|
+ @GetMapping("/workhour/month/export/detail")
|
|
|
+ @SysLog("维修工时统计-明细导出")
|
|
|
+ public void exportWorkHourMonthDetail(HttpServletResponse response, RepairApplicationFormDTO dto) {
|
|
|
+ List<RepairApplicationFormVO> list = repairApplicationFormService.getWorkHourDetailByMonth(dto);
|
|
|
+ ExcelUtil.exportResponseDict(response, ExportRepairApplicationFormVO.class,
|
|
|
+ BeanConverterUtil.copyListProperties(list, ExportRepairApplicationFormVO.class), "设备维修明细导出");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 维修工时统计导出:按设备
|
|
|
+ *
|
|
|
+ * @param dto 查询条件(设备名称/编号模糊、维修开始时间范围)
|
|
|
+ */
|
|
|
+ @GetMapping("/workhour/export/month")
|
|
|
+ @SysLog("维修工时统计-按月度导出")
|
|
|
+ public void exportWorkHourMonth(HttpServletResponse response, RepairApplicationFormDTO dto) {
|
|
|
+ List<RepairWorkHourReportVO> list = repairApplicationFormService.statisticsWorkHourByMonth(dto, 1, Integer.MAX_VALUE)
|
|
|
+ .getRows();
|
|
|
+ String[] arr = dto.getYearMonth().split("-");
|
|
|
+ String title = arr[0] + "年" + arr[1] + "月" + "-平均工时数据导出";
|
|
|
+ ExcelUtil.exportResponseDict(response, ExportRepairWorkHourSbVO.class,
|
|
|
+ BeanConverterUtil.copyListProperties(list, ExportRepairWorkHourSbVO.class), title);
|
|
|
+ }
|
|
|
}
|