1 år sedan
förälder
incheckning
861e6891b7

+ 133 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/repair/ExporHistoryFaultsVO.java

@@ -0,0 +1,133 @@
+package com.platform.dao.vo.export.repair;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 保修单导出VO
+ * @Author liuyu
+ * @Date 2020-05-12 09:30:26
+ * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExporHistoryFaultsVO implements Serializable {
+    /**
+     * 报修单号
+     */
+    @Excel(name = "主键", orderNum = "1")
+    private String id;
+    /**
+     * 设备编号
+     */
+    @Excel(name = "报修人", orderNum = "2")
+    private String userName;
+
+    /**
+     * 设备名称
+     */
+    @Excel(name = "维修人", orderNum = "3")
+    private String repairUserName;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "报修单号", orderNum = "4")
+    private String no;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "报修来源", orderNum = "5")
+    private String source;
+    /**
+     *
+     */
+    @Excel(name = "问题描述", orderNum = "6")
+    private String content;
+
+    /**
+     * 维修人
+     */
+    @Excel(name = "报修状态", orderNum = "7")
+    private Integer status;
+    /**
+     * 报修人id
+     */
+    @Excel(name = "报修时间", orderNum = "8")
+    private LocalDateTime applyTime;
+    /**
+     * 报修人id
+     */
+    @Excel(name = "维修完成时间", orderNum = "9")
+    private LocalDateTime repairEndTime;
+//    /**
+//     * 设备名称
+//     */
+//    @Excel(name = "维修时间", orderNum = "10")
+//    private Double repairMinutes;
+//    /**
+//     * 报修人id
+//     */
+//    @Excel(name = "修复时间", orderNum = "11")
+//    private Double dealMinutes;
+//    /**
+//     * 报修状态: 1-待分配 2-已分配 3-已完成 4-已撤销
+//     */
+//    @Excel(name = "报修状态", orderNum = "12", dicCode = "REPAIR_APPLICATION_FORM_STATUS")
+//    private Integer status;
+//
+//    /**
+//     * 报修时间
+//     */
+//    @Excel(name = "报修时间", orderNum = "13")
+//    private LocalDateTime applyTime;
+//    /**
+//     * 维修开始时间
+//     */
+//    @Excel(name = "维修开始时间", orderNum = "14")
+//    private LocalDateTime repairStartTime;
+//
+//    /**
+//     * 维修结束时间
+//     */
+//    @Excel(name = "维修结束时间", orderNum = "15")
+//    private LocalDateTime repairEndTime;
+//
+//    /**
+//     * 分析时间
+//     */
+//    @Excel(name = "分析时间", orderNum = "16")
+//    private LocalDate analyzeTime;
+//
+//    /**
+//     * 问题描述
+//     */
+//    @Excel(name = "问题描述", orderNum = "17")
+//    private String problemDesc;
+//    /**
+//     * 检查处理过程
+//     */
+//    @Excel(name = "检查处理过程", orderNum = "18")
+//    private String checkProcess;
+//    /**
+//     * 原因分析
+//     */
+//    @Excel(name = "原因分析", orderNum = "19")
+//    private String reasonAnalysis;
+//    /**
+//     * 更新维修计划
+//     */
+//    @Excel(name = "改进类别", orderNum = "20")
+//    private String changeRepairPlan;
+//
+//    /**
+//     * 更新维修计划
+//     */
+//    @Excel(name = "改进内容", orderNum = "21")
+//    private String changeRepairPlanContent;
+
+}

+ 69 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/repair/ExportHistoryRepairFeeVO.java

@@ -0,0 +1,69 @@
+package com.platform.dao.vo.export.repair;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 工单费用单导出VO
+ * @Author liuyu
+ * @Date 2020-05-12 10:01:21
+ * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportHistoryRepairFeeVO implements Serializable {
+
+    /**
+     * 主键
+     */
+    @Excel(name = "维修单号", orderNum = "1")
+    private String repairNo;
+
+    /**
+     * 设备编号
+     */
+    @Excel(name = "委外单号", orderNum = "2")
+    private String no;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "费用金额", orderNum = "3")
+    private Double fee;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "费用日期", orderNum = "4")
+    private LocalDate feeDate;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "货币单位", orderNum = "5",dicCode = "MONEY_TYPE")
+    private Integer moneyType;
+    /**
+     * 委外单号
+     */
+    @Excel(name = "费用类别", orderNum = "6",dicCode = "REPAIR_FEE_TYPE")
+    private Integer type;
+    /**
+     * 委外单号
+     */
+    @Excel(name = "费用原因", orderNum = "7")
+    private String reason;
+    /**
+     * 费用金额
+     */
+    @Excel(name = "费用描述", orderNum = "8")
+    private String descripition;
+    /**
+     * 费用类别
+     */
+    @Excel(name = "备注", orderNum = "9")
+    private String remark;
+
+
+}

+ 59 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/sb/ExportSbStatusLogVO2.java

@@ -0,0 +1,59 @@
+package com.platform.dao.vo.export.sb;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 设备状态变更记录导出VO
+ * @Author future
+ * @Date 2021-05-15 18:37:43
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportSbStatusLogVO2 implements Serializable {
+
+    /**
+   * id
+   */
+  @Excel(name = "id", orderNum = "1")
+  private String id;
+
+    /**
+   * 设备id
+   */
+  @Excel(name = "变更人", orderNum = "2")
+  private String actualUser;
+
+    /**
+   * 变更时间
+   */
+  @Excel(name = "变更原因", orderNum = "3")
+  private String changeReason;
+
+    /**
+   * 变更原因
+   */
+  @Excel(name = "变更前状态", orderNum = "4")
+  private Integer preStatus;
+
+    /**
+   * 变更人
+   */
+  @Excel(name = "变更后状态", orderNum = "5")
+  private Integer afterStatus;
+
+    /**
+   * 变更前状态
+   */
+  @Excel(name = "变更时间", orderNum = "6")
+  private LocalDateTime changeTime;
+
+
+
+
+}

+ 72 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/sb/ExportSbStopLogVO2.java

@@ -0,0 +1,72 @@
+package com.platform.dao.vo.export.sb;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 设备停机记录表导出VO
+ * @Author future
+ * @Date 2021-05-15 21:34:24
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportSbStopLogVO2 implements Serializable {
+
+    /**
+   * id
+   */
+  @Excel(name = "id", orderNum = "1")
+  private String id;
+
+    /**
+   * 设备id
+   */
+  @Excel(name = "停用人", orderNum = "2")
+  private String stopUserId;
+
+    /**
+   * 停用时间
+   */
+  @Excel(name = "停用原因", orderNum = "3")
+  private String stopReason;
+
+    /**
+   * 停用原因
+   */
+  @Excel(name = "停用时间", orderNum = "4")
+  private LocalDateTime stopTime;
+
+    /**
+   * 停用人
+   */
+  @Excel(name = "启用时间", orderNum = "5")
+  private LocalDateTime startTime;
+
+    /**
+   * 启用时间
+   */
+  @Excel(name = "启用原因", orderNum = "6")
+  private String startReason;
+
+    /**
+   * 启用原因
+   */
+  @Excel(name = "启用人", orderNum = "7")
+  private String startUserId;
+
+    /**
+   * 启用人
+   */
+  @Excel(name = "停机时长", orderNum = "8")
+  private String stopDuration;
+
+
+
+
+}

+ 104 - 0
platform-dao/src/main/java/com/platform/dao/vo/export/sqarepartmanage/ExportSparePartUsedVO2.java

@@ -0,0 +1,104 @@
+package com.platform.dao.vo.export.sqarepartmanage;
+
+import com.platform.office.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 备件使用表导出VO
+ * @Author liuyu
+ * @Date 2020-05-03 13:02:01
+ * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@Data
+@Accessors(chain = true)
+public class ExportSparePartUsedVO2 implements Serializable {
+
+    /**
+   * 主键
+   */
+  @Excel(name = "主键", orderNum = "1")
+  private String id;
+  /**
+   * 二级库id
+   */
+  @Excel(name = "设备名称", orderNum = "2")
+  private String sbName;
+    /**
+   * 设备id
+   */
+  @Excel(name = "备件名称", orderNum = "3")
+  private String spareName;
+
+    /**
+   * 部件id
+   */
+  @Excel(name = "投用日期", orderNum = "4")
+  private LocalDate startDate;
+
+    /**
+   * 设备id
+   */
+  @Excel(name = "预计报废日期", orderNum = "5")
+  private LocalDate changeDate;
+
+    /**
+   * 投用日期
+   */
+  @Excel(name = "实际更换日期", orderNum = "6")
+  private LocalDate realChangeDate;
+
+    /**
+   * 使用状态:1-使用中;2-已替换
+   */
+  @Excel(name = "使用状态:1-使用中;2-已替换", orderNum = "7")
+  private Integer status;
+
+//    /**
+//   * 预计报废日期
+//   */
+//  @Excel(name = "预计报废日期", orderNum = "7")
+//  private LocalDate changeDate;
+//
+//    /**
+//   * 实际更换日期
+//   */
+//  @Excel(name = "实际更换日期", orderNum = "8")
+//  private LocalDate realChangeDate;
+//
+//    /**
+//   * 备注
+//   */
+//  @Excel(name = "备注", orderNum = "9")
+//  private String remark;
+//
+//    /**
+//   * 创建人
+//   */
+//  @Excel(name = "创建人", orderNum = "10")
+//  private String createdUserId;
+//
+//    /**
+//   * 更新人
+//   */
+//  @Excel(name = "更新人", orderNum = "11")
+//  private String updateUserId;
+//
+//    /**
+//   * 创建日期
+//   */
+//  @Excel(name = "创建日期", orderNum = "12")
+//  private LocalDateTime createdTime;
+//
+//    /**
+//   * 更新日期
+//   */
+//  @Excel(name = "更新日期", orderNum = "13")
+//  private LocalDateTime updateTime;
+
+
+}

+ 43 - 0
platform-rest/src/main/java/com/platform/rest/controller/repair/RepairApplicationFormController.java

@@ -1,8 +1,11 @@
 package com.platform.rest.controller.repair;
 
+import com.platform.common.enums.DataFilterTypeEnum;
 import com.platform.common.exception.BusinessException;
+import com.platform.common.model.UserInfo;
 import com.platform.common.util.BeanConverterUtil;
 import com.platform.common.util.R;
+import com.platform.common.util.SecurityUtils;
 import com.platform.common.validation.group.AddGroup;
 import com.platform.common.validation.group.UpdateGroup;
 import com.platform.dao.dto.repair.RepairApplicationFormDTO;
@@ -10,7 +13,9 @@ import com.platform.dao.dto.repair.RepairCheckDTO;
 import com.platform.dao.dto.repair.RepairFormDTO;
 import com.platform.dao.dto.repair.RepairReasonDTO;
 import com.platform.dao.entity.repair.RepairApplicationForm;
+import com.platform.dao.mapper.repair.RepairApplicationFormMapper;
 import com.platform.dao.util.ExcelUtil;
+import com.platform.dao.vo.export.repair.ExporHistoryFaultsVO;
 import com.platform.dao.vo.export.repair.ExportRepairApplicationFormMergeVO;
 import com.platform.dao.vo.export.repair.ExportRepairApplicationFormVO;
 import com.platform.dao.vo.export.repair.ExportRepairCheckVO;
@@ -43,6 +48,7 @@ import java.util.List;
 public class RepairApplicationFormController {
 
     private final RepairApplicationFormService repairApplicationFormService;
+    private final RepairApplicationFormMapper repairApplicationFormMapper;
 
     /**
      * 通过id查询单条记录
@@ -307,4 +313,41 @@ public class RepairApplicationFormController {
         ExcelUtil.exportResponseDict(response, ExportRepairApplicationFormVO.class, excelList, "维修工单");
     }
 
+    /**
+     * 历史故障导出
+     *
+     * @param repairApplicationFormDTO 保修单DTO
+     * @return R
+     */
+    @GetMapping("/export2")
+    @SysLog("历史故障导出")
+    @PreAuthorize("@pms.hasPermission('repair-application-forms-export')")
+    public void export2(HttpServletResponse response, RepairApplicationFormDTO record) {
+        if (record.getSearchType() != null) {
+            // 获取报修人
+            if (record.getSearchType() == 1) {
+                if (record.getFilter() != null && DataFilterTypeEnum.SELF.getValue() == record.getFilter().intValue()) {
+                    UserInfo userInfo = SecurityUtils.getUserInfo();
+                    record.setUserId(userInfo.getUserId());
+                }
+            }
+            // 获取维修人,包括第二维修人
+            if (record.getSearchType() == 2) {
+                if (record.getFilter() != null && DataFilterTypeEnum.SELF.getValue() == record.getFilter().intValue()) {
+                    UserInfo userInfo = SecurityUtils.getUserInfo();
+                    record.setRepairUserId(userInfo.getUserId());
+                }
+            }
+            // 获取验收人
+            if (record.getSearchType() == 3) {
+                if (record.getFilter() != null && DataFilterTypeEnum.SELF.getValue() == record.getFilter().intValue()) {
+                    UserInfo userInfo = SecurityUtils.getUserInfo();
+                    record.setCheckUserId(userInfo.getUserId());
+                }
+            }
+        }
+        List<RepairApplicationFormVO> excelList = repairApplicationFormMapper.selectPageList(record);
+        ExcelUtil.exportResponseDict(response, ExporHistoryFaultsVO.class, excelList, "历史故障统计");
+    }
+
 }

+ 18 - 0
platform-rest/src/main/java/com/platform/rest/controller/repair/RepairFeeController.java

@@ -3,6 +3,8 @@ package com.platform.rest.controller.repair;
 import com.platform.common.util.R;
 import com.platform.dao.dto.repair.RepairFeeDTO;
 import com.platform.dao.entity.repair.RepairFee;
+import com.platform.dao.mapper.repair.RepairFeeMapper;
+import com.platform.dao.vo.export.repair.ExportHistoryRepairFeeVO;
 import com.platform.service.repair.RepairFeeService;
 import com.platform.dao.util.ExcelUtil;
 import com.platform.dao.vo.export.repair.ExportRepairFeeVO;
@@ -31,6 +33,8 @@ public class RepairFeeController {
 
   private final  RepairFeeService repairFeeService;
 
+  private final RepairFeeMapper repairFeeMapper;
+
   /**
    * 通过id查询单条记录
    *
@@ -135,4 +139,18 @@ public class RepairFeeController {
     ExcelUtil.exportResponseDict(response, ExportRepairFeeVO.class, BeanConverterUtil.copyListProperties(list, ExportRepairFeeVO.class), "维修费用单");
   }
 
+  /**
+   * 历史费用
+   *
+   * @param repairFeeDTO 维修费用单DTO
+   * @return R
+   */
+  @GetMapping("/export2")
+  @SysLog("维修费用单导出")
+  @PreAuthorize("@pms.hasPermission('repair-fees-export')")
+  public void export2(HttpServletResponse response, RepairFeeDTO repairFeeDTO) {
+    List<RepairFee> list = repairFeeMapper.selectPageList(repairFeeDTO);
+    ExcelUtil.exportResponseDict(response, ExportRepairFeeVO.class, BeanConverterUtil.copyListProperties(list, ExportHistoryRepairFeeVO.class), "维修费用单");
+  }
+
 }

+ 17 - 0
platform-rest/src/main/java/com/platform/rest/controller/sb/SbStatusLogController.java

@@ -9,6 +9,8 @@ import com.platform.dao.entity.check.CheckJob;
 import com.platform.dao.entity.sb.SbStatusLog;
 import com.platform.dao.enums.SbInfoStatusEnum;
 import com.platform.dao.mapper.check.CheckJobMapper;
+import com.platform.dao.mapper.sb.SbStatusLogMapper;
+import com.platform.dao.vo.export.sb.ExportSbStatusLogVO2;
 import com.platform.service.check.CheckJobService;
 import com.platform.service.sb.SbStatusLogService;
 import com.platform.dao.util.ExcelUtil;
@@ -42,6 +44,8 @@ public class SbStatusLogController {
 
   private final CheckJobMapper checkJobMapper;
 
+  private final SbStatusLogMapper sbStatusLogMapper;
+
   /**
    * 通过id查询单条记录
    *
@@ -156,4 +160,17 @@ public class SbStatusLogController {
     ExcelUtil.exportResponseDict(response, ExportSbStatusLogVO.class, BeanConverterUtil.copyListProperties(list, ExportSbStatusLogVO.class), "设备状态变更记录");
   }
 
+    /**
+     * 设备状态变更记录导出
+     *
+     * @param sbStatusLogDTO 设备状态变更记录DTO
+     */
+    @GetMapping("/export2")
+    @SysLog("设备状态变更记录导出")
+    //@PreAuthorize("@pms.hasPermission('sb-status-logs-export')")
+    public void export2(HttpServletResponse response, SbStatusLogDTO sbStatusLogDTO) {
+        List<SbStatusLogVO> list = sbStatusLogMapper.selectList(sbStatusLogDTO);
+        ExcelUtil.exportResponseDict(response, ExportSbStatusLogVO2.class, BeanConverterUtil.copyListProperties(list, ExportSbStatusLogVO2.class), "设备状态变更记录");
+    }
+
 }

+ 17 - 0
platform-rest/src/main/java/com/platform/rest/controller/sb/SbStopLogController.java

@@ -5,6 +5,8 @@ import com.platform.common.util.SecurityUtils;
 import com.platform.common.util.StringUtils;
 import com.platform.dao.dto.sb.SbStopLogDTO;
 import com.platform.dao.entity.sb.SbStopLog;
+import com.platform.dao.mapper.sb.SbStopLogMapper;
+import com.platform.dao.vo.export.sb.ExportSbStopLogVO2;
 import com.platform.service.sb.SbStopLogService;
 import com.platform.dao.util.ExcelUtil;
 import com.platform.dao.vo.export.sb.ExportSbStopLogVO;
@@ -35,6 +37,8 @@ public class SbStopLogController {
 
   private final  SbStopLogService sbStopLogService;
 
+  private final SbStopLogMapper sbStopLogMapper;
+
   /**
    * 通过id查询单条记录
    *
@@ -142,4 +146,17 @@ public class SbStopLogController {
     ExcelUtil.exportResponseDict(response, ExportSbStopLogVO.class, BeanConverterUtil.copyListProperties(list, ExportSbStopLogVO.class), "设备停机记录表");
   }
 
+    /**
+     * 设备停机记录表导出
+     *
+     * @param sbStopLogDTO 设备停机记录表DTO
+     */
+    @GetMapping("/export2")
+    @SysLog("设备停机记录表导出")
+    //@PreAuthorize("@pms.hasPermission('sb-stop-logs-export')")
+    public void export2(HttpServletResponse response, SbStopLogDTO sbStopLogDTO) {
+        List<SbStopLogVO> list = sbStopLogMapper.selectList(sbStopLogDTO);
+        ExcelUtil.exportResponseDict(response, ExportSbStopLogVO2.class, BeanConverterUtil.copyListProperties(list, ExportSbStopLogVO2.class), "设备停机记录表");
+    }
+
 }

+ 18 - 0
platform-rest/src/main/java/com/platform/rest/controller/sqarepartmanage/SparePartUsedController.java

@@ -11,8 +11,10 @@ import com.platform.dao.bean.MyVOPage;
 import com.platform.dao.dto.repair.RepairProjectRelationDTO;
 import com.platform.dao.dto.sqarepartmanage.SparePartUsedDTO;
 import com.platform.dao.entity.sqarepartmanage.SparePartUsed;
+import com.platform.dao.mapper.sqarepartmanage.SparePartUsedMapper;
 import com.platform.dao.util.ExcelUtil;
 import com.platform.dao.vo.export.sqarepartmanage.ExportSparePartUsedVO;
+import com.platform.dao.vo.export.sqarepartmanage.ExportSparePartUsedVO2;
 import com.platform.dao.vo.repair.RepairProjectVO;
 import com.platform.dao.vo.spare.SparePartUsedVO;
 import com.platform.rest.log.annotation.SysLog;
@@ -37,6 +39,7 @@ import java.util.List;
 public class SparePartUsedController {
 
     private final SparePartUsedService sparePartUsedService;
+    private final SparePartUsedMapper sparePartUsedMapper;
 
     /**
      * 通过id查询单条记录
@@ -192,4 +195,19 @@ public class SparePartUsedController {
         return new R<>(sparePartUsedService.statisticsByGroupBySparePage(model, pageNum, pageSize));
     }
 
+
+    /**
+     * 设备配件记录导出
+     *
+     * @param sparePartUsedDTO
+     * @return R
+     */
+    @GetMapping("/export2")
+    @SysLog("备件使用表导出")
+    //@PreAuthorize("@pms.hasPermission('sqarepartmanage-spare-part-used-export')")
+    public void export2(HttpServletResponse response, SparePartUsedDTO sparePartUsedDTO) {
+        List<SparePartUsedVO> list = sparePartUsedMapper.selectVOList(sparePartUsedDTO);
+        ExcelUtil.exportResponseDict(response, ExportSparePartUsedVO2.class, BeanConverterUtil.copyListProperties(list, ExportSparePartUsedVO2.class), "配件记录表");
+    }
+
 }