Просмотр исходного кода

检验意见通知书,上报的导出功能

liyuhui_ex 1 неделя назад
Родитель
Сommit
516a458357
14 измененных файлов с 815 добавлено и 199 удалено
  1. 85 76
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/BoilerTaskOrderInspectionController.java
  2. 33 23
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/vo/BoilerInspectionOpinionReportedExcelVO.java
  3. 123 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/vo/BoilerOpinionReportedExcelVo.java
  4. 80 72
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/PipeTaskOrderInspectionController.java
  5. 32 24
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/vo/PipeInspectionOpinionReportedExcelVO.java
  6. 125 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/vo/PipeOpinionReportedExcelVo.java
  7. 2 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderInspectionService.java
  8. 76 4
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderInspectionServiceImpl.java
  9. 2 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderService.java
  10. 90 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderServiceImpl.java
  11. 2 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderInspectionService.java
  12. 74 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderInspectionServiceImpl.java
  13. 2 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderService.java
  14. 89 0
      tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderServiceImpl.java

+ 85 - 76
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/BoilerTaskOrderInspectionController.java

@@ -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);
     }
 

+ 33 - 23
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/vo/BoilerInspectionOpinionReportedExcelVO.java

@@ -25,26 +25,36 @@ public class BoilerInspectionOpinionReportedExcelVO {
 
     @Schema(description = "设备登记区名称")
     @ExcelProperty("区域")
-    private String beDistrictName;
+    private String equipDistrictName;
+
+    @Schema(description ="客户剩余确认时间字符串")
+    @ExcelProperty("客户剩余确认时间")
+    private String confirmationTimeStr;
+
+    @Schema(description ="整改状态 (0=待确认,1=待整改,2=已提交,3=材料有误,4=整改通过)")
+    @ExcelProperty("检验通知书状态")
+    private String rectificationStatusStr;
+
+    @Schema(description = "意见书编号")
+    @ExcelProperty(value = "意见书编号")
+    private String reportedNo;
+
+    @Schema(description = "使用单位")
+    @ExcelProperty(value = "使用单位")
+    private String unitName;
 
     @Schema(description ="情况")
-    @ExcelProperty("情况")
+//    @ExcelProperty("情况")
     private String situation;
 
     @Schema(description ="反馈问题")
-    @ExcelProperty("反馈问题")
+//    @ExcelProperty("反馈问题")
     private String feedbackIssue;
 
-    @Schema(description ="客户剩余确认时间字符串")
-    @ExcelProperty("客户剩余确认时间")
-    private String confirmationTimeStr;
 
     @Schema(description ="整改状态 (0=待确认,1=待整改,2=已提交,3=材料有误,4=整改通过)")
     private Integer rectificationStatus;
 
-    @Schema(description ="整改状态 (0=待确认,1=待整改,2=已提交,3=材料有误,4=整改通过)")
-    @ExcelProperty("检验通知书状态")
-    private String rectificationStatusStr;
 
     @Schema(description = "是否上报(0=否,1=是)")
     private Integer isReported;
@@ -53,6 +63,11 @@ public class BoilerInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "隐患上报")
     private String isReportedStr;
 
+    @Schema(description = "隐患上报日期")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    @ExcelProperty(value = "隐患上报日期")
+    private LocalDateTime reportedTime;
+
     @Schema(description = "报告办结上报(0=否,1=是)")
     private Integer isCloseReported;
 
@@ -60,6 +75,9 @@ public class BoilerInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "报告办结上报")
     private String isCloseReportedStr;
 
+    @ExcelProperty(value = "报告办结上报日期")
+    private LocalDateTime finishUploadTime;
+
     @Schema(description ="客户剩余确认时间")
 //    @ExcelProperty("客户剩余确认时间")
     private LocalDateTime confirmationTime;
@@ -87,9 +105,6 @@ public class BoilerInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "设备注册代码")
     private String equipCode;
 
-    @Schema(description = "使用单位")
-    @ExcelProperty(value = "使用单位")
-    private String unitName;
 
     @Schema(description = "设备类别(0=锅炉,1=压力容器,2=压力管道,3=电梯,4=起重机械,5=客运索道,6=大型游乐设施,7=场(厂)内专用机动车辆)")
     private Integer equipmentType;
@@ -106,19 +121,10 @@ public class BoilerInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "检验项目")
     private String reportNames;
 
-    @Schema(description = "意见书编号")
-    @ExcelProperty(value = "意见书编号")
-    private String reportedNo;
-
     @Schema(description = "报告名称")
     @ExcelProperty(value = "意见书类型")
     private String reportName;
 
-    @Schema(description = "隐患上报日期")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    @ExcelProperty(value = "隐患上报日期")
-    private LocalDateTime reportedTime;
-
     @Schema(description = "检验时间")
     @ExcelProperty(value = "检验时间")
     private LocalDate checkDate;
@@ -171,6 +177,10 @@ public class BoilerInspectionOpinionReportedExcelVO {
     @Schema(description = "主任务状态")
     private Integer mainTaskStatus;
 
-    @ExcelProperty(value = "报告办结上报日期")
-    private LocalDateTime finishUploadTime;
+    @Schema(description = "意见书上报人列表")
+    private List<AdminUserRespDTO> reporterUserList;
+
+    @Schema(description = "意见书上报人")
+    @ExcelProperty(value = "意见书上报人")
+    private String handleUserNickName;
 }

+ 123 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/boilertaskorder/vo/BoilerOpinionReportedExcelVo.java

@@ -0,0 +1,123 @@
+package cn.start.tz.module.pressure2.controller.admin.boilertaskorder.vo;
+
+import cn.start.tz.module.system.api.user.dto.AdminUserRespDTO;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+import static cn.start.tz.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 锅炉检验意见通知导出 Request VO")
+@Data
+@ExcelIgnoreUnannotated
+public class BoilerOpinionReportedExcelVo {
+    @Schema(description = "序号")
+    @ExcelProperty(value = "序号")
+    private Integer serialNumber;
+
+    @Schema(description = "意见书编号")
+    @ExcelProperty(value = "意见书编号")
+    private String reportedNo;
+
+    @Schema(description = "单位名称")
+    @ExcelProperty(value = "单位名称")
+    private String unitName;
+
+    @Schema(description = "检验通知书状态")
+    @ExcelProperty(value = "检验通知书状态")
+    private String rectificationStatusName;
+
+    @Schema(description = "回收截止时间")
+    @ExcelProperty(value = "回收截止时间")
+    private String handleDate;
+
+    @Schema(description ="签收人/接收人")
+    @ExcelProperty(value = "签收人/接收人")
+    private String recipient;
+
+    @Schema(description ="联系电话")
+    @ExcelProperty(value = "联系电话")
+    private String recipientPhone;
+
+//    @Schema(description = "检验意见通知书详细信息")
+//    @ExcelProperty(value = "检验意见通知书详细信息")
+//    private String detailedInfo;
+
+    @Schema(description = "发送方式")
+    @ExcelProperty(value = "发送方式")
+    private String distributionMethod;
+
+    @Schema(description = "发送时间")
+    @ExcelProperty(value = "发送时间")
+    @ColumnWidth(30)
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime sendTime;
+
+    @Schema(description ="确认接收时间")
+    @ExcelProperty(value = "确认接收时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime signTime;
+
+
+    @Schema(description = "回收时间", example = "1")
+    @ExcelProperty(value = "回收时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime rectificationTime;
+
+    @Schema(description = "检验员对象")
+    private List<AdminUserRespDTO> checkUsers;
+
+    @Schema(description = "检验员")
+    @ExcelProperty(value = "检验员")
+    private String checkUserName;
+
+    @Schema(description = "客户剩余确认时间(天)")
+    @ExcelProperty(value = "客户剩余确认时间(天)")
+    private String confirmationTimeStr;
+
+    @Schema(description = "区域")
+    @ExcelProperty(value = "区域")
+    private String equipDistrictName;
+
+    @Schema(description = "公众号推送客户状态")
+    @ExcelProperty(value = "公众号推送客户状态")
+    private String mpSendStatusName;
+
+    @Schema(description = "任务单号")
+    @ExcelProperty(value = "任务单号")
+    private String orderNo;
+
+    @Schema(description = "设备注册代码")
+    @ExcelProperty(value = "设备注册代码")
+    private String equipCode;
+
+    @Schema(description = "使用证编号")
+    @ExcelProperty(value = "使用证编号")
+    private String useRegisterNo;
+
+    @Schema(description = "设备类别")
+    @ExcelProperty(value = "设备类别")
+    private String equipmentType;
+
+    @Schema(description = "检验性质")
+    @ExcelProperty(value = "检验性质")
+    private String checkType;
+
+    @Schema(description = "检验时间")
+    @ExcelProperty(value = "检验时间")
+    private String checkDate;
+
+    @Schema(description = "所属部门")
+    @ExcelProperty(value = "所属部门")
+    private String deptName;
+
+    @Schema(description = "意见书经办人")
+    @ExcelProperty(value = "意见书经办人")
+    private String handleUserNickname;
+}

+ 80 - 72
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/PipeTaskOrderInspectionController.java

@@ -12,6 +12,7 @@ import cn.start.tz.module.pressure.enums.EquipmentTypeEnum;
 import cn.start.tz.module.pressure.enums.TaskOrderStatusEnum;
 import cn.start.tz.module.pressure2.controller.admin.boilertaskorder.vo.*;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeInspectionOpinionReportedExcelVO;
+import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeOpinionReportedExcelVo;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeOrderItemPageRespVO;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeTaskOrderPageReqVO;
 import cn.start.tz.module.pressure2.controller.app.taskorderitemreport.vo.InspectionOpinionUploadReqVo;
@@ -107,12 +108,19 @@ public class PipeTaskOrderInspectionController {
         return success(true);
     }
 
+//    @PostMapping("/opinionReportedExcel/export-excel")
+//    @Operation(summary = "检验意见通知导出")
+//    @Tag(name = "检验意见通知导出")
+//    public void opinionReportedExcel(@RequestBody PipeTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
+//        List<OpinionReportedExcelExcelVO> opinionReportedExcelExcelVOS = pipeTaskOrderInspectionService.opinionReportedExcel(pageReqVO);
+//        ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", OpinionReportedExcelExcelVO.class, opinionReportedExcelExcelVOS);
+//    }
     @PostMapping("/opinionReportedExcel/export-excel")
     @Operation(summary = "检验意见通知导出")
     @Tag(name = "检验意见通知导出")
     public void opinionReportedExcel(@RequestBody PipeTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
-        List<OpinionReportedExcelExcelVO> opinionReportedExcelExcelVOS = pipeTaskOrderInspectionService.opinionReportedExcel(pageReqVO);
-        ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", OpinionReportedExcelExcelVO.class, opinionReportedExcelExcelVOS);
+        List<PipeOpinionReportedExcelVo> opinionReportedExcelExcelVOS = pipeTaskOrderInspectionService.pipeOpinionReportedExcel(pageReqVO);
+        ExcelUtils.write(response, "承压报告-检验意见通知导出.xls", "数据", PipeOpinionReportedExcelVo.class, opinionReportedExcelExcelVOS);
     }
 
     @PostMapping("/reported")
@@ -150,76 +158,76 @@ public class PipeTaskOrderInspectionController {
     @Operation(summary = "隐患上报记录导出")
     @Tag(name = "检验意见通知书隐患上报")
     public void getAppointmentConfirmOrderRefuseItemReportedExcel(@RequestBody PipeTaskOrderPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
-        PageResult<PipeOrderItemPageRespVO> pageResult = pipeTaskOrderService.inspectionOpinionPage(pageReqVO);
-        if (pageResult.getList() == null || pageResult.getList().isEmpty()){
-            throw new ServiceException(500,"没有数据需要导出");
-        }
-        List<PipeInspectionOpinionReportedExcelVO> list = BeanUtils.toBean(pageResult.getList(), PipeInspectionOpinionReportedExcelVO.class);
-        list.forEach(item -> {
-            if (!CollUtil.isEmpty(item.getReportDOList())) {
-                item.setReportNames(item.getReportDOList().stream().map(PipeTaskOrderItemReportDO::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.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<PipeOrderItemPageRespVO> pageResult = pipeTaskOrderService.inspectionOpinionPage(pageReqVO);
+//        if (pageResult.getList() == null || pageResult.getList().isEmpty()){
+//            throw new ServiceException(500,"没有数据需要导出");
+//        }
+        List<PipeInspectionOpinionReportedExcelVO> list = pipeTaskOrderService.exportPipeInspectionOpinionReportedExcel(pageReqVO);
+//        list.forEach(item -> {
+//            if (!CollUtil.isEmpty(item.getReportDOList())) {
+//                item.setReportNames(item.getReportDOList().stream().map(PipeTaskOrderItemReportDO::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.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", "数据", PipeInspectionOpinionReportedExcelVO.class, list);
     }
 }

+ 32 - 24
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/vo/PipeInspectionOpinionReportedExcelVO.java

@@ -26,20 +26,20 @@ public class PipeInspectionOpinionReportedExcelVO {
 
     @Schema(description = "设备登记区名称")
     @ExcelProperty("区域")
-    private String beDistrictName;
-
-    @Schema(description ="情况")
-    @ExcelProperty("情况")
-    private String situation;
-
-    @Schema(description ="反馈问题")
-    @ExcelProperty("反馈问题")
-    private String feedbackIssue;
+    private String equipDistrictName;
 
     @Schema(description ="客户剩余确认时间字符串")
     @ExcelProperty("客户剩余确认时间")
     private String confirmationTimeStr;
 
+//    @Schema(description ="情况")
+//    @ExcelProperty("情况")
+//    private String situation;
+//
+//    @Schema(description ="反馈问题")
+//    @ExcelProperty("反馈问题")
+//    private String feedbackIssue;
+
     @Schema(description ="整改状态 (0=待确认,1=待整改,2=已提交,3=材料有误,4=整改通过)")
     private Integer rectificationStatus;
 
@@ -47,6 +47,14 @@ public class PipeInspectionOpinionReportedExcelVO {
     @ExcelProperty("检验通知书状态")
     private String rectificationStatusStr;
 
+    @Schema(description = "意见书编号")
+    @ExcelProperty(value = "意见书编号")
+    private String reportedNo;
+
+    @Schema(description = "使用单位")
+    @ExcelProperty(value = "使用单位")
+    private String unitName;
+
     @Schema(description = "是否上报(0=否,1=是)")
     private Integer isReported;
 
@@ -54,6 +62,11 @@ public class PipeInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "隐患上报")
     private String isReportedStr;
 
+    @Schema(description = "隐患上报日期")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    @ExcelProperty(value = "隐患上报日期")
+    private LocalDateTime reportedTime;
+
     @Schema(description = "报告办结上报(0=否,1=是)")
     private Integer isCloseReported;
 
@@ -61,6 +74,9 @@ public class PipeInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "报告办结上报")
     private String isCloseReportedStr;
 
+    @ExcelProperty(value = "报告办结上报日期")
+    private LocalDateTime finishUploadTime;
+
     @Schema(description ="客户剩余确认时间")
 //    @ExcelProperty("客户剩余确认时间")
     private LocalDateTime confirmationTime;
@@ -88,10 +104,6 @@ public class PipeInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "工程号")
     private String equipCode;
 
-    @Schema(description = "使用单位")
-    @ExcelProperty(value = "使用单位")
-    private String unitName;
-
     @Schema(description = "设备类别(0=锅炉,1=压力容器,2=压力管道,3=电梯,4=起重机械,5=客运索道,6=大型游乐设施,7=场(厂)内专用机动车辆)")
     private String equipmentType;
 
@@ -107,19 +119,10 @@ public class PipeInspectionOpinionReportedExcelVO {
     @ExcelProperty(value = "检验项目")
     private String reportNames;
 
-    @Schema(description = "意见书编号")
-    @ExcelProperty(value = "意见书编号")
-    private String reportedNo;
-
     @Schema(description = "报告名称")
     @ExcelProperty(value = "意见书类型")
     private String reportName;
 
-    @Schema(description = "隐患上报日期")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    @ExcelProperty(value = "隐患上报日期")
-    private LocalDateTime reportedTime;
-
     @Schema(description = "检验时间")
     @ExcelProperty(value = "检验时间")
     private LocalDate checkDate;
@@ -172,6 +175,11 @@ public class PipeInspectionOpinionReportedExcelVO {
     @Schema(description = "主任务状态")
     private Integer mainTaskStatus;
 
-    @ExcelProperty(value = "报告办结上报日期")
-    private LocalDateTime finishUploadTime;
+    @Schema(description = "意见书上报人列表")
+    private List<AdminUserRespDTO> reporterUserList;
+
+    @Schema(description = "意见书上报人")
+    @ExcelProperty(value = "意见书上报人")
+    private String handleUserNickName;
+
 }

+ 125 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/controller/admin/pipetaskorder/vo/PipeOpinionReportedExcelVo.java

@@ -0,0 +1,125 @@
+package cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo;
+
+import cn.start.tz.module.system.api.user.dto.AdminUserRespDTO;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+import static cn.start.tz.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+import static cn.start.tz.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
+
+@Schema(description = "管理后台 - 管道检验意见通知导出 Request VO")
+@Data
+@ExcelIgnoreUnannotated
+public class PipeOpinionReportedExcelVo {
+
+    @Schema(description = "序号")
+    @ExcelProperty(value = "序号")
+    private Integer serialNumber;
+
+    @Schema(description = "意见书编号")
+    @ExcelProperty(value = "意见书编号")
+    private String reportedNo;
+
+    @Schema(description = "单位名称")
+    @ExcelProperty(value = "单位名称")
+    private String unitName;
+
+    @Schema(description = "检验通知书状态")
+    @ExcelProperty(value = "检验通知书状态")
+    private String rectificationStatusName;
+
+    @Schema(description = "回收截止时间")
+    @ExcelProperty(value = "回收截止时间")
+    private String handleDate;
+
+    @Schema(description ="签收人/接收人")
+    @ExcelProperty(value = "签收人/接收人")
+    private String recipient;
+
+    @Schema(description ="联系电话")
+    @ExcelProperty(value = "联系电话")
+    private String recipientPhone;
+
+//    @Schema(description = "检验意见通知书详细信息")
+//    @ExcelProperty(value = "检验意见通知书详细信息")
+//    private String detailedInfo;
+
+    @Schema(description = "发送方式")
+    @ExcelProperty(value = "发送方式")
+    private String distributionMethod;
+
+    @Schema(description = "发送时间")
+    @ExcelProperty(value = "发送时间")
+    @ColumnWidth(30)
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime sendTime;
+
+    @Schema(description ="确认接收时间")
+    @ExcelProperty(value = "确认接收时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime signTime;
+
+
+    @Schema(description = "回收时间", example = "1")
+    @ExcelProperty(value = "回收时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime rectificationTime;
+
+    @Schema(description = "检验员对象")
+    private List<AdminUserRespDTO> checkUsers;
+
+    @Schema(description = "检验员")
+    @ExcelProperty(value = "检验员")
+    private String checkUserName;
+
+    @Schema(description = "客户剩余确认时间(天)")
+    @ExcelProperty(value = "客户剩余确认时间(天)")
+    private String confirmationTimeStr;
+
+    @Schema(description = "区域")
+    @ExcelProperty(value = "区域")
+    private String equipDistrictName;
+
+    @Schema(description = "公众号推送客户状态")
+    @ExcelProperty(value = "公众号推送客户状态")
+    private String mpSendStatusName;
+
+    @Schema(description = "任务单号")
+    @ExcelProperty(value = "任务单号")
+    private String orderNo;
+
+    @Schema(description = "工程号")
+    @ExcelProperty(value = "工程号")
+    private String equipCode;
+
+    @Schema(description = "使用证编号")
+    @ExcelProperty(value = "使用证编号")
+    private String useRegisterNo;
+
+    @Schema(description = "设备类别")
+    @ExcelProperty(value = "设备类别")
+    private String equipmentType;
+
+    @Schema(description = "检验性质")
+    @ExcelProperty(value = "检验性质")
+    private String checkType;
+
+    @Schema(description = "检验时间")
+    @ExcelProperty(value = "检验时间")
+    private String checkDate;
+
+    @Schema(description = "所属部门")
+    @ExcelProperty(value = "所属部门")
+    private String deptName;
+
+    @Schema(description = "意见书经办人")
+    @ExcelProperty(value = "意见书经办人")
+    private String handleUserNickname;
+}

+ 2 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderInspectionService.java

@@ -23,6 +23,8 @@ public interface BoilerTaskOrderInspectionService {
 
     List<OpinionReportedExcelExcelVO> opinionReportedExcel(@Valid BoilerTaskOrderPageReqVO pageReqVO);
 
+    List<BoilerOpinionReportedExcelVo> boilerOpinionReportedExcel(@Valid BoilerTaskOrderPageReqVO pageReqVO);
+
     /**
      * 检验意见通知书上报
      */

+ 76 - 4
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderInspectionServiceImpl.java

@@ -33,24 +33,26 @@ import cn.start.tz.module.pressure2.service.boilertaskorderitem.BoilerTaskOrderI
 import cn.start.tz.module.pressure2.service.opinionnotificationfollowrecord.OpinionNotificationFollowRecordService;
 import cn.start.tz.module.pressure2.service.orderitemhiddendanger.OrderItemHiddenDangerService;
 import cn.start.tz.module.pressure2.service.orderitemreportcompleted.OrderItemReportCompletedService;
+import cn.start.tz.module.system.api.dict.DictDataApi;
+import cn.start.tz.module.system.api.dict.dto.DictDataRespDTO;
 import cn.start.tz.module.system.api.user.AdminUserApi;
 import cn.start.tz.module.system.api.user.dto.AdminUserRespDTO;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.redisson.api.RLock;
 import org.redisson.api.RedissonClient;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
 import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 import static cn.start.tz.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -107,6 +109,9 @@ public class BoilerTaskOrderInspectionServiceImpl implements BoilerTaskOrderInsp
 
     public static final String PRESSURE_INSPECTION_OPINION_SEND_LOCK_PREFIX_KEY = "redissonLock:pressure:inspectionOpinionSend:";
 
+    @Autowired
+    private DictDataApi dictDataApi;
+
     @Override
     public Boolean inspectionOpinionSend(InspectionOpinionSendVo inspectionOpinionSendVo) {
         RLock lock = redissonClient.getLock(PRESSURE_INSPECTION_OPINION_SEND_LOCK_PREFIX_KEY + inspectionOpinionSendVo.getId());
@@ -291,6 +296,73 @@ public class BoilerTaskOrderInspectionServiceImpl implements BoilerTaskOrderInsp
         return list;
     }
 
+    @Override
+    public List<BoilerOpinionReportedExcelVo> boilerOpinionReportedExcel(BoilerTaskOrderPageReqVO pageReqVO) {
+        PageResult<BoilerOrderItemPageRespVO> pageResult = boilerTaskOrderService.inspectionOpinionPage(pageReqVO);
+        List<BoilerOpinionReportedExcelVo> list = new ArrayList<>();
+        if (ObjectUtil.isNotEmpty(pageResult) && CollUtil.isNotEmpty(pageResult.getList())) {
+            int SerialNumber = 1;
+
+            List<BoilerOrderItemPageRespVO> list1 = pageResult.getList();
+            // 按照HandleDate正序排序
+            list1.sort((a, b) -> {
+                if (a.getHandleDate() == null && b.getHandleDate() == null) {
+                    return 0;
+                }
+                if (a.getHandleDate() == null) {
+                    return 1;
+                }
+                if (b.getHandleDate() == null) {
+                    return -1;
+                }
+                return a.getHandleDate().compareTo(b.getHandleDate());
+            });
+
+            List<DictDataRespDTO> checkTypeDTOs = dictDataApi.getDictDataList("pressure_inspection_nature_boiler").getCheckedData();
+            List<DictDataRespDTO> equipTypeDTOs = dictDataApi.getDictDataList("system_equip_boiler_type").getCheckedData();
+            Map<Integer,String> rectificationStatusMap = Map.of(0,"待确认",1,"待整改",2,"已提交",3,"材料有误",4,"整改通过",5,"整改不通过");
+            Map<Integer,String> mpSendStatusMap = Map.of(0,"成功",1,"拒绝接收",2,"其他原因失败",3,"发送失败",4,"未发送");
+
+            for (BoilerOrderItemPageRespVO item : list1) {
+                BoilerOpinionReportedExcelVo boilerOpinionReportedExcelVo = new BoilerOpinionReportedExcelVo();
+                boilerOpinionReportedExcelVo.setSerialNumber(SerialNumber);
+                SerialNumber++;
+                boilerOpinionReportedExcelVo.setReportedNo(item.getReportedNo());
+                boilerOpinionReportedExcelVo.setUnitName(item.getUnitName());
+                boilerOpinionReportedExcelVo.setHandleDate(item.getHandleDate());
+                boilerOpinionReportedExcelVo.setRecipient(item.getRecipient());
+                boilerOpinionReportedExcelVo.setRecipientPhone(item.getRecipientPhone());
+                boilerOpinionReportedExcelVo.setDistributionMethod(item.getDistributionMethod());
+                boilerOpinionReportedExcelVo.setSendTime(item.getSendTime());
+                boilerOpinionReportedExcelVo.setSignTime(item.getSignTime());
+                boilerOpinionReportedExcelVo.setRectificationTime(item.getRectificationTime());
+                boilerOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers().get(0).getNickname());
+                boilerOpinionReportedExcelVo.setRectificationStatusName(rectificationStatusMap.get(item.getRectificationStatus()));
+                if (item.getRectificationStatus() == 0){
+                    boilerOpinionReportedExcelVo.setConfirmationTimeStr(item.getConfirmationTimeStr());
+                }
+                boilerOpinionReportedExcelVo.setEquipmentType(equipTypeDTOs.stream()
+                        .filter(equipType ->equipType.getValue().equals(item.getEquipmentType().toString()))
+                        .map(DictDataRespDTO::getLabel).findFirst().orElse(""));
+                boilerOpinionReportedExcelVo.setMpSendStatusName(mpSendStatusMap.get(item.getMpSendStatus()));
+                boilerOpinionReportedExcelVo.setEquipDistrictName(item.getEquipDistrictName());
+                boilerOpinionReportedExcelVo.setOrderNo(item.getOrderNo());
+                boilerOpinionReportedExcelVo.setEquipCode(item.getEquipCode());
+                boilerOpinionReportedExcelVo.setUseRegisterNo(item.getUseRegisterNo());
+                boilerOpinionReportedExcelVo.setCheckType(
+                        checkTypeDTOs.stream().filter(checkType ->checkType.getValue().equals(item.getCheckType().toString()))
+                                .map(DictDataRespDTO::getLabel)
+                                .findFirst()
+                                .orElse(""));
+                boilerOpinionReportedExcelVo.setCheckDate(item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
+                boilerOpinionReportedExcelVo.setDeptName(item.getDeptName());
+                boilerOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList().get(0).getNickname());
+                list.add(boilerOpinionReportedExcelVo);
+            }
+        }
+        return list;
+    }
+
     @Override
     public String opinionReported(InspectionOpinionReportedVo inspectionOpinionReportedVo) {
         //TODO

+ 2 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderService.java

@@ -213,4 +213,6 @@ public interface BoilerTaskOrderService extends IService<BoilerTaskOrderDO>  {
     Boolean updateFeeType(String serviceNo, int feeType, String contractNo);
 
     CommonResult<Boolean> nonTaxPayStatus(NonTaxPayStatusDTO dto);
+
+    List<BoilerInspectionOpinionReportedExcelVO> exportBoilerInspectionOpinionReportedExcel(@Valid BoilerTaskOrderPageReqVO pageReqVO);
 }

+ 90 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderServiceImpl.java

@@ -30,6 +30,7 @@ import cn.start.tz.module.member.api.templatesendlog.dto.TemplateSendLogRespDto;
 import cn.start.tz.module.member.api.user.MemberUserApi;
 import cn.start.tz.module.member.api.user.dto.MemberUserRespDTO;
 import cn.start.tz.module.pressure.api.taskorder.dto.NonTaxPayStatusDTO;
+import cn.start.tz.module.pressure.enums.EquipmentTypeEnum;
 import cn.start.tz.module.pressure2.api.taskorder.dto.UpdatePayStatusDTO;
 import cn.start.tz.module.pressure2.constant.TemplateIdConstants;
 import cn.start.tz.module.pressure2.controller.admin.boilertaskorderitempart.vo.BoilerTaskOrderItemPartSaveReqVO;
@@ -6467,4 +6468,93 @@ public class BoilerTaskOrderServiceImpl extends ServiceImpl<BoilerTaskOrderMappe
 
         return CommonResult.success(true);
     }
+
+    @Override
+    public List<BoilerInspectionOpinionReportedExcelVO> exportBoilerInspectionOpinionReportedExcel(BoilerTaskOrderPageReqVO pageReqVO) {
+        PageResult<BoilerOrderItemPageRespVO> pageResult = inspectionOpinionPage(pageReqVO);
+        if (pageResult.getList() == null || pageResult.getList().isEmpty()){
+            throw new ServiceException(500,"没有数据需要导出");
+        }
+        List<BoilerInspectionOpinionReportedExcelVO> list = BeanUtils.toBean(pageResult.getList(), BoilerInspectionOpinionReportedExcelVO.class);
+        List<DictDataRespDTO> equipTypeDTOs = dictDataApi.getDictDataList("system_equip_boiler_type").getCheckedData();
+        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("待整改");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(2).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("已提交");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(3).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("材料有误");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(4).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("整改通过");
+                item.setConfirmationTimeStr("");
+            }
+
+            if (item.getEquipmentType() != null) {
+                item.setEquipmentTypeStr(equipTypeDTOs.stream()
+                        .filter(equipType ->equipType.getValue().equals(item.getEquipmentType().toString()))
+                        .map(DictDataRespDTO::getLabel).findFirst().orElse(""));
+            }
+
+            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("是");
+            }
+            if(!item.getReporterUserList().isEmpty()){
+                item.setHandleUserNickName(item.getReporterUserList().get(0).getNickname());
+            }
+        });
+        return list;
+    }
 }

+ 2 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderInspectionService.java

@@ -1,6 +1,7 @@
 package cn.start.tz.module.pressure2.service.pipetaskorder;
 
 import cn.start.tz.module.pressure2.controller.admin.boilertaskorder.vo.*;
+import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeOpinionReportedExcelVo;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeTaskOrderPageReqVO;
 import jakarta.validation.Valid;
 
@@ -19,6 +20,7 @@ public interface PipeTaskOrderInspectionService {
 
     List<OpinionReportedExcelExcelVO> opinionReportedExcel(@Valid PipeTaskOrderPageReqVO pageReqVO);
 
+    List<PipeOpinionReportedExcelVo> pipeOpinionReportedExcel(@Valid PipeTaskOrderPageReqVO pageReqVO);
     /**
      * 检验意见通知书上报
      */

+ 74 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderInspectionServiceImpl.java

@@ -18,6 +18,7 @@ import cn.start.tz.module.pressure2.controller.admin.boilertaskorder.vo.*;
 import cn.start.tz.module.pressure2.controller.admin.opinionnotificationfollowrecord.vo.OpinionNotificationFollowRecordSaveReqVO;
 import cn.start.tz.module.pressure2.controller.admin.orderitemhiddendanger.vo.OrderItemHiddenDangerSaveReqVO;
 import cn.start.tz.module.pressure2.controller.admin.orderitemreportcompleted.vo.OrderItemReportCompletedSaveReqVO;
+import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeOpinionReportedExcelVo;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeOrderItemPageRespVO;
 import cn.start.tz.module.pressure2.controller.admin.pipetaskorder.vo.PipeTaskOrderPageReqVO;
 import cn.start.tz.module.pressure2.dal.dataobject.boilertaskorder.BoilerTaskOrderDO;
@@ -39,6 +40,8 @@ import cn.start.tz.module.pressure2.service.boilertaskorder.BoilerTaskOrderInspe
 import cn.start.tz.module.pressure2.service.opinionnotificationfollowrecord.OpinionNotificationFollowRecordService;
 import cn.start.tz.module.pressure2.service.orderitemhiddendanger.OrderItemHiddenDangerService;
 import cn.start.tz.module.pressure2.service.orderitemreportcompleted.OrderItemReportCompletedService;
+import cn.start.tz.module.system.api.dict.DictDataApi;
+import cn.start.tz.module.system.api.dict.dto.DictDataRespDTO;
 import cn.start.tz.module.system.api.user.AdminUserApi;
 import cn.start.tz.module.system.api.user.dto.AdminUserRespDTO;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -47,6 +50,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.redisson.api.RLock;
 import org.redisson.api.RedissonClient;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
@@ -55,6 +59,7 @@ import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import static cn.start.tz.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -109,6 +114,8 @@ public class PipeTaskOrderInspectionServiceImpl implements PipeTaskOrderInspecti
     private OpinionNotificationFollowRecordService opinionNotificationFollowRecordService;
 
     public static final String PRESSURE_INSPECTION_OPINION_SEND_LOCK_PREFIX_KEY = "redissonLock:pressure:inspectionOpinionSend:";
+    @Autowired
+    private DictDataApi dictDataApi;
 
     @Override
     public Boolean inspectionOpinionSend(InspectionOpinionSendVo inspectionOpinionSendVo) {
@@ -300,6 +307,73 @@ public class PipeTaskOrderInspectionServiceImpl implements PipeTaskOrderInspecti
         return list;
     }
 
+    @Override
+    public List<PipeOpinionReportedExcelVo> pipeOpinionReportedExcel(PipeTaskOrderPageReqVO pageReqVO) {
+        PageResult<PipeOrderItemPageRespVO> pageResult = pipeTaskOrderService.inspectionOpinionPage(pageReqVO);
+        List<PipeOpinionReportedExcelVo> list = new ArrayList<>();
+        if (ObjectUtil.isNotEmpty(pageResult) && CollUtil.isNotEmpty(pageResult.getList())) {
+            int SerialNumber = 1;
+
+            List<PipeOrderItemPageRespVO> list1 = pageResult.getList();
+            // 按照HandleDate正序排序
+            list1.sort((a, b) -> {
+                if (a.getHandleDate() == null && b.getHandleDate() == null) {
+                    return 0;
+                }
+                if (a.getHandleDate() == null) {
+                    return 1;
+                }
+                if (b.getHandleDate() == null) {
+                    return -1;
+                }
+                return a.getHandleDate().compareTo(b.getHandleDate());
+            });
+
+            List<DictDataRespDTO> checkTypeDTOs = dictDataApi.getDictDataList("pressure_inspection_nature_pipe").getCheckedData();
+            List<DictDataRespDTO> equipTypeDTOs = dictDataApi.getDictDataList("PIPE_TYPE").getCheckedData();
+            Map<Integer,String> rectificationStatusMap = Map.of(0,"待确认",1,"待整改",2,"已提交",3,"材料有误",4,"整改通过",5,"整改不通过");
+            Map<Integer,String> mpSendStatusMap = Map.of(0,"成功",1,"拒绝接收",2,"其他原因失败",3,"发送失败",4,"未发送");
+            for (PipeOrderItemPageRespVO item : list1) {
+
+                PipeOpinionReportedExcelVo pipeOpinionReportedExcelVo = new PipeOpinionReportedExcelVo();
+                pipeOpinionReportedExcelVo.setSerialNumber(SerialNumber);
+                SerialNumber++;
+                pipeOpinionReportedExcelVo.setReportedNo(item.getReportedNo());
+                pipeOpinionReportedExcelVo.setUnitName(item.getUnitName());
+                pipeOpinionReportedExcelVo.setHandleDate(item.getHandleDate());
+                pipeOpinionReportedExcelVo.setRecipient(item.getRecipient());
+                pipeOpinionReportedExcelVo.setRecipientPhone(item.getRecipientPhone());
+                pipeOpinionReportedExcelVo.setDistributionMethod(item.getDistributionMethod());
+                pipeOpinionReportedExcelVo.setSendTime(item.getSendTime());
+                pipeOpinionReportedExcelVo.setSignTime(item.getSignTime());
+                pipeOpinionReportedExcelVo.setRectificationTime(item.getRectificationTime());
+                pipeOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers().get(0).getNickname());
+                pipeOpinionReportedExcelVo.setRectificationStatusName(rectificationStatusMap.get(item.getRectificationStatus()));
+                if (item.getRectificationStatus() == 0){
+                    pipeOpinionReportedExcelVo.setConfirmationTimeStr(item.getConfirmationTimeStr());
+                }
+                pipeOpinionReportedExcelVo.setEquipmentType(equipTypeDTOs.stream()
+                        .filter(equipType ->equipType.getValue().equals(item.getEquipmentType().toString()))
+                        .map(DictDataRespDTO::getLabel).findFirst().orElse(""));
+                pipeOpinionReportedExcelVo.setMpSendStatusName(mpSendStatusMap.get(item.getMpSendStatus()));
+                pipeOpinionReportedExcelVo.setEquipDistrictName(item.getEquipDistrictName());
+                pipeOpinionReportedExcelVo.setOrderNo(item.getOrderNo());
+                pipeOpinionReportedExcelVo.setEquipCode(item.getEquipCode());
+                pipeOpinionReportedExcelVo.setUseRegisterNo(item.getUseRegisterNo());
+                pipeOpinionReportedExcelVo.setCheckType(
+                        checkTypeDTOs.stream().filter(checkType ->checkType.getValue().equals(item.getCheckType().toString()))
+                        .map(DictDataRespDTO::getLabel)
+                        .findFirst()
+                        .orElse(""));
+                pipeOpinionReportedExcelVo.setCheckDate(item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
+                pipeOpinionReportedExcelVo.setDeptName(item.getDeptName());
+                pipeOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList().get(0).getNickname());
+                list.add(pipeOpinionReportedExcelVo);
+            }
+        }
+        return list;
+    }
+
     @Override
     public String opinionReported(InspectionOpinionReportedVo inspectionOpinionReportedVo) {
         //TODO

+ 2 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderService.java

@@ -201,4 +201,6 @@ public interface PipeTaskOrderService extends IService<PipeTaskOrderDO>  {
 
     Boolean updatePayStatus(UpdatePayStatusDTO payInfo);
 
+    List<PipeInspectionOpinionReportedExcelVO> exportPipeInspectionOpinionReportedExcel(@Valid PipeTaskOrderPageReqVO pageReqVO);
+
 }

+ 89 - 0
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderServiceImpl.java

@@ -5719,4 +5719,93 @@ public class PipeTaskOrderServiceImpl extends ServiceImpl<PipeTaskOrderMapper, P
         return true;
     }
 
+    @Override
+    public List<PipeInspectionOpinionReportedExcelVO> exportPipeInspectionOpinionReportedExcel(PipeTaskOrderPageReqVO pageReqVO) {
+        PageResult<PipeOrderItemPageRespVO> pageResult = inspectionOpinionPage(pageReqVO);
+        if (pageResult.getList() == null || pageResult.getList().isEmpty()){
+            throw new ServiceException(500,"没有数据需要导出");
+        }
+        List<PipeInspectionOpinionReportedExcelVO> list = BeanUtils.toBean(pageResult.getList(), PipeInspectionOpinionReportedExcelVO.class);
+        List<DictDataRespDTO> equipTypeDTOs = dictDataApi.getDictDataList("PIPE_TYPE").getCheckedData();
+        list.forEach(item -> {
+            if (!CollUtil.isEmpty(item.getReportDOList())) {
+                item.setReportNames(item.getReportDOList().stream().map(PipeTaskOrderItemReportDO::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("待整改");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(2).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("已提交");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(3).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("材料有误");
+                item.setConfirmationTimeStr("");
+            } else if (Integer.valueOf(4).equals(item.getRectificationStatus())) {
+                item.setRectificationStatusStr("整改通过");
+                item.setConfirmationTimeStr("");
+            }
+
+            if (item.getEquipmentType() != null) {
+                item.setEquipmentTypeStr(equipTypeDTOs.stream()
+                        .filter(equipType ->equipType.getValue().equals(item.getEquipmentType().toString()))
+                        .map(DictDataRespDTO::getLabel).findFirst().orElse(""));
+            }
+
+            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("是");
+            }
+            if(!item.getReporterUserList().isEmpty()){
+                item.setHandleUserNickName(item.getReporterUserList().get(0).getNickname());
+            }
+        });
+        return list;
+    }
+
 }