|
|
@@ -18,6 +18,7 @@ import cn.start.tz.module.pressure2.service.boilertaskorder.BoilerTaskOrderServi
|
|
|
import cn.start.tz.module.pressure2.service.boilertaskorderitemreport.BoilerAppTaskOrderItemReportService;
|
|
|
import cn.start.tz.module.pressure2.service.boilertaskorderitemreport.BoilerTaskOrderItemReportService;
|
|
|
import cn.start.tz.module.pressure2.service.boilertaskorderoperation.BoilerTaskOrderOperationService;
|
|
|
+import cn.start.tz.module.system.api.dict.dto.DictDataRespDTO;
|
|
|
import cn.start.tz.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
@@ -105,12 +106,20 @@ public class BoilerTaskOrderInspectionController {
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
|
+// @PostMapping("/opinionReportedExcel/export-excel")
|
|
|
+// @Operation(summary = "检验意见通知导出")
|
|
|
+// @Tag(name = "检验意见通知导出")
|
|
|
+// public void opinionReportedExcel(@RequestBody BoilerTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
|
|
+// List<OpinionReportedExcelExcelVO> opinionReportedExcelExcelVOS = boilerTaskOrderInspectionService.opinionReportedExcel(pageReqVO);
|
|
|
+// ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", OpinionReportedExcelExcelVO.class, opinionReportedExcelExcelVOS);
|
|
|
+// }
|
|
|
+
|
|
|
@PostMapping("/opinionReportedExcel/export-excel")
|
|
|
@Operation(summary = "检验意见通知导出")
|
|
|
@Tag(name = "检验意见通知导出")
|
|
|
public void opinionReportedExcel(@RequestBody BoilerTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
|
|
- List<OpinionReportedExcelExcelVO> opinionReportedExcelExcelVOS = boilerTaskOrderInspectionService.opinionReportedExcel(pageReqVO);
|
|
|
- ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", OpinionReportedExcelExcelVO.class, opinionReportedExcelExcelVOS);
|
|
|
+ List<BoilerOpinionReportedExcelVo> opinionReportedExcelExcelVOS = boilerTaskOrderInspectionService.boilerOpinionReportedExcel(pageReqVO);
|
|
|
+ ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", BoilerOpinionReportedExcelVo.class, opinionReportedExcelExcelVOS);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/reported")
|
|
|
@@ -148,80 +157,80 @@ public class BoilerTaskOrderInspectionController {
|
|
|
@Operation(summary = "隐患上报记录导出")
|
|
|
@Tag(name = "检验意见通知书隐患上报")
|
|
|
public void getAppointmentConfirmOrderRefuseItemReportedExcel(@RequestBody BoilerTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
|
|
- PageResult<BoilerOrderItemPageRespVO> pageResult = boilerTaskOrderService.inspectionOpinionPage(pageReqVO);
|
|
|
- if (pageResult.getList() == null || pageResult.getList().isEmpty()){
|
|
|
- throw new ServiceException(500,"没有数据需要导出");
|
|
|
- }
|
|
|
- List<BoilerInspectionOpinionReportedExcelVO> list = BeanUtils.toBean(pageResult.getList(), BoilerInspectionOpinionReportedExcelVO.class);
|
|
|
- list.forEach(item -> {
|
|
|
- if (!CollUtil.isEmpty(item.getReportDOList())) {
|
|
|
- item.setReportNames(item.getReportDOList().stream().map(BoilerTaskOrderItemReportDO::getReportName).collect(Collectors.joining(",")));
|
|
|
- }
|
|
|
-
|
|
|
- if (!ObjectUtil.isEmpty(item.getManager())) {
|
|
|
- item.setManagerName(item.getManager().getNickname());
|
|
|
- }
|
|
|
-
|
|
|
- if (!ObjectUtil.isEmpty(item.getMainCheckerUser())) {
|
|
|
- item.setMainCheckerUserName(item.getMainCheckerUser().getNickname());
|
|
|
- }
|
|
|
-
|
|
|
- if (!CollUtil.isEmpty(item.getCheckUsers())) {
|
|
|
- item.setCheckUserNames(item.getCheckUsers().stream().map(AdminUserRespDTO::getNickname).collect(Collectors.joining(",")));
|
|
|
- }
|
|
|
-
|
|
|
- if (Integer.valueOf(100).equals(item.getCheckType())) {
|
|
|
- item.setCheckTypeStr("定期检验");
|
|
|
- } else if (Integer.valueOf(200).equals(item.getCheckType())) {
|
|
|
- item.setCheckTypeStr("年度检验");
|
|
|
- } else if (Integer.valueOf(300).equals(item.getCheckType())) {
|
|
|
- item.setCheckTypeStr("超期限检验");
|
|
|
- }
|
|
|
-
|
|
|
- if (item.getTaskStatus() != null) {
|
|
|
- item.setTaskStatusStr(TaskOrderStatusEnum.getByStatus(item.getMainTaskStatus()).getName());
|
|
|
- }
|
|
|
-
|
|
|
- if (Integer.valueOf(0).equals(item.getMpSendStatus())) {
|
|
|
- item.setMpSendStatusStr("成功");
|
|
|
- } else if (Integer.valueOf(1).equals(item.getMpSendStatus())) {
|
|
|
- item.setMpSendStatusStr("拒绝接收");
|
|
|
- } else if (Integer.valueOf(2).equals(item.getMpSendStatus())) {
|
|
|
- item.setMpSendStatusStr("其他原因失败");
|
|
|
- } else if (Integer.valueOf(3).equals(item.getMpSendStatus())) {
|
|
|
- item.setMpSendStatusStr("发送失败");
|
|
|
- } else if (Integer.valueOf(4).equals(item.getMpSendStatus())) {
|
|
|
- item.setMpSendStatusStr("未发送");
|
|
|
- }
|
|
|
-
|
|
|
- if (Integer.valueOf(0).equals(item.getRectificationStatus())) {
|
|
|
- item.setRectificationStatusStr("待确认");
|
|
|
- } else if (Integer.valueOf(1).equals(item.getRectificationStatus())) {
|
|
|
- item.setRectificationStatusStr("待整改");
|
|
|
- } else if (Integer.valueOf(2).equals(item.getRectificationStatus())) {
|
|
|
- item.setRectificationStatusStr("已提交");
|
|
|
- } else if (Integer.valueOf(3).equals(item.getRectificationStatus())) {
|
|
|
- item.setRectificationStatusStr("材料有误");
|
|
|
- } else if (Integer.valueOf(4).equals(item.getRectificationStatus())) {
|
|
|
- item.setRectificationStatusStr("整改通过");
|
|
|
- }
|
|
|
-
|
|
|
- if (item.getEquipmentType() != null) {
|
|
|
- item.setEquipmentTypeStr(EquipmentTypeEnum.getByType(item.getEquipmentType()).getName());
|
|
|
- }
|
|
|
-
|
|
|
- if (item.getIsReported() != null && Integer.valueOf(0).equals(item.getIsReported())) {
|
|
|
- item.setIsReportedStr("否");
|
|
|
- } else {
|
|
|
- item.setIsReportedStr("是");
|
|
|
- }
|
|
|
-
|
|
|
- if (item.getIsCloseReported() != null && Integer.valueOf(0).equals(item.getIsCloseReported())) {
|
|
|
- item.setIsCloseReportedStr("否");
|
|
|
- } else {
|
|
|
- item.setIsCloseReportedStr("是");
|
|
|
- }
|
|
|
- });
|
|
|
+// PageResult<BoilerOrderItemPageRespVO> pageResult = boilerTaskOrderService.inspectionOpinionPage(pageReqVO);
|
|
|
+// if (pageResult.getList() == null || pageResult.getList().isEmpty()){
|
|
|
+// throw new ServiceException(500,"没有数据需要导出");
|
|
|
+// }
|
|
|
+ List<BoilerInspectionOpinionReportedExcelVO> list = boilerTaskOrderService.exportBoilerInspectionOpinionReportedExcel(pageReqVO);
|
|
|
+// list.forEach(item -> {
|
|
|
+// if (!CollUtil.isEmpty(item.getReportDOList())) {
|
|
|
+// item.setReportNames(item.getReportDOList().stream().map(BoilerTaskOrderItemReportDO::getReportName).collect(Collectors.joining(",")));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (!ObjectUtil.isEmpty(item.getManager())) {
|
|
|
+// item.setManagerName(item.getManager().getNickname());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (!ObjectUtil.isEmpty(item.getMainCheckerUser())) {
|
|
|
+// item.setMainCheckerUserName(item.getMainCheckerUser().getNickname());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (!CollUtil.isEmpty(item.getCheckUsers())) {
|
|
|
+// item.setCheckUserNames(item.getCheckUsers().stream().map(AdminUserRespDTO::getNickname).collect(Collectors.joining(",")));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (Integer.valueOf(100).equals(item.getCheckType())) {
|
|
|
+// item.setCheckTypeStr("内部检验");
|
|
|
+// } else if (Integer.valueOf(200).equals(item.getCheckType())) {
|
|
|
+// item.setCheckTypeStr("外部检验");
|
|
|
+// } else if (Integer.valueOf(300).equals(item.getCheckType())) {
|
|
|
+// item.setCheckTypeStr("耐压检验");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (item.getTaskStatus() != null) {
|
|
|
+// item.setTaskStatusStr(TaskOrderStatusEnum.getByStatus(item.getMainTaskStatus()).getName());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (Integer.valueOf(0).equals(item.getMpSendStatus())) {
|
|
|
+// item.setMpSendStatusStr("成功");
|
|
|
+// } else if (Integer.valueOf(1).equals(item.getMpSendStatus())) {
|
|
|
+// item.setMpSendStatusStr("拒绝接收");
|
|
|
+// } else if (Integer.valueOf(2).equals(item.getMpSendStatus())) {
|
|
|
+// item.setMpSendStatusStr("其他原因失败");
|
|
|
+// } else if (Integer.valueOf(3).equals(item.getMpSendStatus())) {
|
|
|
+// item.setMpSendStatusStr("发送失败");
|
|
|
+// } else if (Integer.valueOf(4).equals(item.getMpSendStatus())) {
|
|
|
+// item.setMpSendStatusStr("未发送");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (Integer.valueOf(0).equals(item.getRectificationStatus())) {
|
|
|
+// item.setRectificationStatusStr("待确认");
|
|
|
+// } else if (Integer.valueOf(1).equals(item.getRectificationStatus())) {
|
|
|
+// item.setRectificationStatusStr("待整改");
|
|
|
+// } else if (Integer.valueOf(2).equals(item.getRectificationStatus())) {
|
|
|
+// item.setRectificationStatusStr("已提交");
|
|
|
+// } else if (Integer.valueOf(3).equals(item.getRectificationStatus())) {
|
|
|
+// item.setRectificationStatusStr("材料有误");
|
|
|
+// } else if (Integer.valueOf(4).equals(item.getRectificationStatus())) {
|
|
|
+// item.setRectificationStatusStr("整改通过");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (item.getEquipmentType() != null) {
|
|
|
+// item.setEquipmentTypeStr(EquipmentTypeEnum.getByType(item.getEquipmentType()).getName());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (item.getIsReported() != null && Integer.valueOf(0).equals(item.getIsReported())) {
|
|
|
+// item.setIsReportedStr("否");
|
|
|
+// } else {
|
|
|
+// item.setIsReportedStr("是");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (item.getIsCloseReported() != null && Integer.valueOf(0).equals(item.getIsCloseReported())) {
|
|
|
+// item.setIsCloseReportedStr("否");
|
|
|
+// } else {
|
|
|
+// item.setIsCloseReportedStr("是");
|
|
|
+// }
|
|
|
+// });
|
|
|
ExcelUtils.write(response, LocalDate.now().format(DatePattern.NORM_DATE_FORMATTER) + "-意见书.xls", "数据", BoilerInspectionOpinionReportedExcelVO.class, list);
|
|
|
}
|
|
|
|