From ecb44bd073cdfd191515152ffb9a01805d2970c9 Mon Sep 17 00:00:00 2001
From: xiebin <vip_xiaobin810@163.com>
Date: Fri, 09 Jan 2026 14:17:25 +0800
Subject: [PATCH] add-反无大屏-基础管理-设备维护记录相关
---
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainRecordDTO.java | 44 ++++++++
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainRecordController.java | 86 ++++++----------
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainRecordVO.java | 44 ++++++++
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceMaintainRecordWrapper.java | 12 +-
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceMaintainRecordExcel.java | 7 -
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainRecordServiceImpl.java | 3
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainPlanDTO.java | 1
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.xml | 34 ------
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceMaintainRecordService.java | 3
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java | 3
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceMaintainRecordEntity.java | 9 -
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.java | 3
12 files changed, 134 insertions(+), 115 deletions(-)
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java
index 89644b3..8fdb320 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainPlanController.java
@@ -96,6 +96,9 @@
@ApiOperationSupport(order = 3)
@ApiOperation(value = "新增或修改", notes = "传入fwDeviceMaintainPlan")
public R submit(@Valid @RequestBody FwDeviceMaintainPlanDTO fwDeviceMaintainPlan) {
+ if (null == fwDeviceMaintainPlan.getDeviceId()) {
+ return R.fail("参数错误");
+ }
return R.status(fwDeviceMaintainPlanService.saveOrUpdate(FwDeviceMaintainPlanWrapper.build().entityDTO(fwDeviceMaintainPlan)));
}
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainRecordController.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainRecordController.java
index 48beb97..f829f54 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainRecordController.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceMaintainRecordController.java
@@ -16,34 +16,35 @@
*/
package org.sxkj.fw.device.controller;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.sxkj.fw.device.dto.FwDeviceMaintainRecordDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
-import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
import org.sxkj.fw.device.excel.FwDeviceMaintainRecordExcel;
-import org.sxkj.fw.device.wrapper.FwDeviceMaintainRecordWrapper;
import org.sxkj.fw.device.service.IFwDeviceMaintainRecordService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
+import org.sxkj.fw.device.wrapper.FwDeviceMaintainRecordWrapper;
import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
/**
* 设备维护记录表 控制器
@@ -65,67 +66,45 @@
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入fwDeviceMaintainRecord")
- public R<FwDeviceMaintainRecordVO> detail(FwDeviceMaintainRecordEntity fwDeviceMaintainRecord) {
- FwDeviceMaintainRecordEntity detail = fwDeviceMaintainRecordService.getOne(Condition.getQueryWrapper(fwDeviceMaintainRecord));
+ public R<FwDeviceMaintainRecordVO> detail(FwDeviceMaintainRecordDTO fwDeviceMaintainRecord) {
+ FwDeviceMaintainRecordEntity detail = fwDeviceMaintainRecordService.getOne(
+ Condition.getQueryWrapper(
+ FwDeviceMaintainRecordWrapper.build().entityDTO(fwDeviceMaintainRecord)));
return R.data(FwDeviceMaintainRecordWrapper.build().entityVO(detail));
- }
- /**
- * 设备维护记录表 分页
- */
- @GetMapping("/list")
- @ApiOperationSupport(order = 2)
- @ApiOperation(value = "分页", notes = "传入fwDeviceMaintainRecord")
- public R<IPage<FwDeviceMaintainRecordVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwDeviceMaintainRecord, Query query) {
- IPage<FwDeviceMaintainRecordEntity> pages = fwDeviceMaintainRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(fwDeviceMaintainRecord, FwDeviceMaintainRecordEntity.class));
- return R.data(FwDeviceMaintainRecordWrapper.build().pageVO(pages));
}
/**
* 设备维护记录表 自定义分页
*/
@GetMapping("/page")
- @ApiOperationSupport(order = 3)
+ @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入fwDeviceMaintainRecord")
- public R<IPage<FwDeviceMaintainRecordVO>> page(FwDeviceMaintainRecordVO fwDeviceMaintainRecord, Query query) {
+ public R<IPage<FwDeviceMaintainRecordVO>> page(FwDeviceMaintainRecordDTO fwDeviceMaintainRecord, Query query) {
IPage<FwDeviceMaintainRecordVO> pages = fwDeviceMaintainRecordService.selectFwDeviceMaintainRecordPage(Condition.getPage(query), fwDeviceMaintainRecord);
return R.data(pages);
- }
-
- /**
- * 设备维护记录表 新增
- */
- @PostMapping("/save")
- @ApiOperationSupport(order = 4)
- @ApiOperation(value = "新增", notes = "传入fwDeviceMaintainRecord")
- public R save(@Valid @RequestBody FwDeviceMaintainRecordEntity fwDeviceMaintainRecord) {
- return R.status(fwDeviceMaintainRecordService.save(fwDeviceMaintainRecord));
- }
-
- /**
- * 设备维护记录表 修改
- */
- @PostMapping("/update")
- @ApiOperationSupport(order = 5)
- @ApiOperation(value = "修改", notes = "传入fwDeviceMaintainRecord")
- public R update(@Valid @RequestBody FwDeviceMaintainRecordEntity fwDeviceMaintainRecord) {
- return R.status(fwDeviceMaintainRecordService.updateById(fwDeviceMaintainRecord));
}
/**
* 设备维护记录表 新增或修改
*/
@PostMapping("/submit")
- @ApiOperationSupport(order = 6)
+ @ApiOperationSupport(order = 3)
@ApiOperation(value = "新增或修改", notes = "传入fwDeviceMaintainRecord")
- public R submit(@Valid @RequestBody FwDeviceMaintainRecordEntity fwDeviceMaintainRecord) {
- return R.status(fwDeviceMaintainRecordService.saveOrUpdate(fwDeviceMaintainRecord));
+ public R submit(@Valid @RequestBody FwDeviceMaintainRecordDTO fwDeviceMaintainRecord) {
+
+ if (null == fwDeviceMaintainRecord.getDeviceId() || null == fwDeviceMaintainRecord.getPlanId()) {
+ return R.fail("设备和计划参数为空");
+ }
+
+ return R.status(fwDeviceMaintainRecordService.saveOrUpdate(
+ FwDeviceMaintainRecordWrapper.build().entityDTO(fwDeviceMaintainRecord)));
}
/**
* 设备维护记录表 删除
*/
@PostMapping("/remove")
- @ApiOperationSupport(order = 7)
+ @ApiOperationSupport(order = 4)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(fwDeviceMaintainRecordService.deleteLogic(Func.toLongList(ids)));
@@ -136,8 +115,9 @@
* 导出数据
*/
@GetMapping("/export-fwDeviceMaintainRecord")
- @ApiOperationSupport(order = 9)
+ @ApiOperationSupport(order = 5)
@ApiOperation(value = "导出数据", notes = "传入fwDeviceMaintainRecord")
+ @ApiIgnore
public void exportFwDeviceMaintainRecord(@ApiIgnore @RequestParam Map<String, Object> fwDeviceMaintainRecord, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<FwDeviceMaintainRecordEntity> queryWrapper = Condition.getQueryWrapper(fwDeviceMaintainRecord, FwDeviceMaintainRecordEntity.class);
//if (!AuthUtil.isAdministrator()) {
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainPlanDTO.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainPlanDTO.java
index 11a7e54..fb7354c 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainPlanDTO.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainPlanDTO.java
@@ -41,7 +41,6 @@
* 设备ID
*/
@ApiModelProperty(value = "设备ID")
- @NotNull
private Long deviceId;
/**
* 计划周期(每年、每月、每周)
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainRecordDTO.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainRecordDTO.java
index a5a9544..9e5bd51 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainRecordDTO.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceMaintainRecordDTO.java
@@ -16,9 +16,14 @@
*/
package org.sxkj.fw.device.dto;
+import io.swagger.annotations.ApiModelProperty;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
/**
* 设备维护记录表 数据传输对象实体类
@@ -27,8 +32,43 @@
* @since 2026-01-08
*/
@Data
-@EqualsAndHashCode(callSuper = true)
-public class FwDeviceMaintainRecordDTO extends FwDeviceMaintainRecordEntity {
+public class FwDeviceMaintainRecordDTO implements Serializable {
+
private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "主键")
+ private Long id;
+
+ /**
+ * 设备ID
+ */
+ @ApiModelProperty(value = "设备ID")
+ private Long deviceId;
+ /**
+ * 对应计划ID(空表示临时维护)
+ */
+ @ApiModelProperty(value = "对应计划ID")
+ private Long planId;
+ /**
+ * 实际维护时间
+ */
+ @ApiModelProperty(value = "实际维护时间")
+ private Date maintainTime;
+ /**
+ * 维护内容
+ */
+ @ApiModelProperty(value = "维护内容")
+ private String maintainContent;
+ /**
+ * 更换部件
+ */
+ @ApiModelProperty(value = "更换部件")
+ private String replacePart;
+
+ /**
+ * 备注
+ */
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
}
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceMaintainRecordEntity.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceMaintainRecordEntity.java
index a595cf7..09b1102 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceMaintainRecordEntity.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceMaintainRecordEntity.java
@@ -48,7 +48,7 @@
* 对应计划ID(空表示临时维护)
*/
@TableField("plan_id")
- @ApiModelProperty(value = "对应计划ID(空表示临时维护)")
+ @ApiModelProperty(value = "对应计划ID")
private Long planId;
/**
* 实际维护时间
@@ -68,12 +68,7 @@
@TableField("replace_part")
@ApiModelProperty(value = "更换部件")
private String replacePart;
- /**
- * 维护结果(已维护/已保养/故障未修复等)
- */
- @TableField("maintain_result")
- @ApiModelProperty(value = "维护结果(已维护/已保养/故障未修复等)")
- private String maintainResult;
+
/**
* 备注
*/
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceMaintainRecordExcel.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceMaintainRecordExcel.java
index 7a0435d..62292c1 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceMaintainRecordExcel.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceMaintainRecordExcel.java
@@ -71,12 +71,7 @@
@ColumnWidth(20)
@ExcelProperty("更换部件")
private String replacePart;
- /**
- * 维护结果(已维护/已保养/故障未修复等)
- */
- @ColumnWidth(20)
- @ExcelProperty("维护结果(已维护/已保养/故障未修复等)")
- private String maintainResult;
+
/**
* 备注
*/
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.java
index 4284bd4..8907e98 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.java
@@ -16,6 +16,7 @@
*/
package org.sxkj.fw.device.mapper;
+import org.sxkj.fw.device.dto.FwDeviceMaintainRecordDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
import org.sxkj.fw.device.excel.FwDeviceMaintainRecordExcel;
@@ -40,7 +41,7 @@
* @param fwDeviceMaintainRecord
* @return
*/
- List<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage page, FwDeviceMaintainRecordVO fwDeviceMaintainRecord);
+ List<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage page, FwDeviceMaintainRecordDTO fwDeviceMaintainRecord);
/**
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.xml b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.xml
index ca6e444..424fad2 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.xml
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMaintainRecordMapper.xml
@@ -10,7 +10,6 @@
<result column="maintain_time" property="maintainTime"/>
<result column="maintain_content" property="maintainContent"/>
<result column="replace_part" property="replacePart"/>
- <result column="maintain_result" property="maintainResult"/>
<result column="remark" property="remark"/>
<result column="area_code" property="areaCode"/>
<result column="create_user" property="createUser"/>
@@ -41,39 +40,6 @@
</if>
<if test="param2.maintainContent != null and param2.maintainContent != ''">
and maintain_content = #{param2.maintainContent}
- </if>
- <if test="param2.replacePart != null and param2.replacePart != ''">
- and replace_part = #{param2.replacePart}
- </if>
- <if test="param2.maintainResult != null and param2.maintainResult != ''">
- and maintain_result = #{param2.maintainResult}
- </if>
- <if test="param2.remark != null and param2.remark != ''">
- and remark = #{param2.remark}
- </if>
- <if test="param2.areaCode != null and param2.areaCode != ''">
- and area_code = #{param2.areaCode}
- </if>
- <if test="param2.createUser != null and param2.createUser != ''">
- and create_user = #{param2.createUser}
- </if>
- <if test="param2.createDept != null and param2.createDept != ''">
- and create_dept = #{param2.createDept}
- </if>
- <if test="param2.createTime != null and param2.createTime != ''">
- and create_time = #{param2.createTime}
- </if>
- <if test="param2.updateUser != null and param2.updateUser != ''">
- and update_user = #{param2.updateUser}
- </if>
- <if test="param2.updateTime != null and param2.updateTime != ''">
- and update_time = #{param2.updateTime}
- </if>
- <if test="param2.status != null and param2.status != ''">
- and status = #{param2.status}
- </if>
- <if test="param2.isDeleted != null and param2.isDeleted != ''">
- and is_deleted = #{param2.isDeleted}
</if>
</where>
</select>
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceMaintainRecordService.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceMaintainRecordService.java
index 8704f11..6da6af0 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceMaintainRecordService.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceMaintainRecordService.java
@@ -17,6 +17,7 @@
package org.sxkj.fw.device.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import org.sxkj.fw.device.dto.FwDeviceMaintainRecordDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
import org.sxkj.fw.device.excel.FwDeviceMaintainRecordExcel;
@@ -38,7 +39,7 @@
* @param fwDeviceMaintainRecord
* @return
*/
- IPage<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage<FwDeviceMaintainRecordVO> page, FwDeviceMaintainRecordVO fwDeviceMaintainRecord);
+ IPage<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage<FwDeviceMaintainRecordVO> page, FwDeviceMaintainRecordDTO fwDeviceMaintainRecord);
/**
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainRecordServiceImpl.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainRecordServiceImpl.java
index 76e627d..7d69355 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainRecordServiceImpl.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainRecordServiceImpl.java
@@ -16,6 +16,7 @@
*/
package org.sxkj.fw.device.service.impl;
+import org.sxkj.fw.device.dto.FwDeviceMaintainRecordDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
import org.sxkj.fw.device.excel.FwDeviceMaintainRecordExcel;
@@ -37,7 +38,7 @@
public class FwDeviceMaintainRecordServiceImpl extends BaseServiceImpl<FwDeviceMaintainRecordMapper, FwDeviceMaintainRecordEntity> implements IFwDeviceMaintainRecordService {
@Override
- public IPage<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage<FwDeviceMaintainRecordVO> page, FwDeviceMaintainRecordVO fwDeviceMaintainRecord) {
+ public IPage<FwDeviceMaintainRecordVO> selectFwDeviceMaintainRecordPage(IPage<FwDeviceMaintainRecordVO> page, FwDeviceMaintainRecordDTO fwDeviceMaintainRecord) {
return page.setRecords(baseMapper.selectFwDeviceMaintainRecordPage(page, fwDeviceMaintainRecord));
}
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainRecordVO.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainRecordVO.java
index d43ed59..5d81eda 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainRecordVO.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainRecordVO.java
@@ -16,10 +16,15 @@
*/
package org.sxkj.fw.device.vo;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
/**
* 设备维护记录表 视图实体类
@@ -28,8 +33,43 @@
* @since 2026-01-08
*/
@Data
-@EqualsAndHashCode(callSuper = true)
-public class FwDeviceMaintainRecordVO extends FwDeviceMaintainRecordEntity {
+public class FwDeviceMaintainRecordVO implements Serializable {
+
private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "主键")
+ private Long id;
+
+ /**
+ * 设备ID
+ */
+ @ApiModelProperty(value = "设备ID")
+ private Long deviceId;
+ /**
+ * 对应计划ID(空表示临时维护)
+ */
+ @ApiModelProperty(value = "对应计划ID")
+ private Long planId;
+ /**
+ * 实际维护时间
+ */
+ @ApiModelProperty(value = "实际维护时间")
+ private Date maintainTime;
+ /**
+ * 维护内容
+ */
+ @ApiModelProperty(value = "维护内容")
+ private String maintainContent;
+ /**
+ * 更换部件
+ */
+ @ApiModelProperty(value = "更换部件")
+ private String replacePart;
+
+ /**
+ * 备注
+ */
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
}
diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceMaintainRecordWrapper.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceMaintainRecordWrapper.java
index 00b9939..75ebbfd 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceMaintainRecordWrapper.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceMaintainRecordWrapper.java
@@ -18,6 +18,7 @@
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
+import org.sxkj.fw.device.dto.FwDeviceMaintainRecordDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainRecordEntity;
import org.sxkj.fw.device.vo.FwDeviceMaintainRecordVO;
import java.util.Objects;
@@ -36,14 +37,11 @@
@Override
public FwDeviceMaintainRecordVO entityVO(FwDeviceMaintainRecordEntity fwDeviceMaintainRecord) {
- FwDeviceMaintainRecordVO fwDeviceMaintainRecordVO = Objects.requireNonNull(BeanUtil.copy(fwDeviceMaintainRecord, FwDeviceMaintainRecordVO.class));
+ return Objects.requireNonNull(BeanUtil.copy(fwDeviceMaintainRecord, FwDeviceMaintainRecordVO.class));
+ }
- //User createUser = UserCache.getUser(fwDeviceMaintainRecord.getCreateUser());
- //User updateUser = UserCache.getUser(fwDeviceMaintainRecord.getUpdateUser());
- //fwDeviceMaintainRecordVO.setCreateUserName(createUser.getName());
- //fwDeviceMaintainRecordVO.setUpdateUserName(updateUser.getName());
-
- return fwDeviceMaintainRecordVO;
+ public FwDeviceMaintainRecordEntity entityDTO(FwDeviceMaintainRecordDTO fwDeviceMaintainRecord) {
+ return Objects.requireNonNull(BeanUtil.copy(fwDeviceMaintainRecord, FwDeviceMaintainRecordEntity.class));
}
--
Gitblit v1.9.3