diff --git a/doc/设计文档/数据库设计/mes-dv.sql b/doc/设计文档/数据库设计/mes-dv.sql
index ea4b659..c9aa8d1 100644
--- a/doc/设计文档/数据库设计/mes-dv.sql
+++ b/doc/设计文档/数据库设计/mes-dv.sql
@@ -175,6 +175,9 @@ create table dv_check_record (
machinery_brand varchar(255) comment '品牌',
machinery_spec varchar(255) comment '规格型号',
check_time datetime not null comment '点检时间',
+ user_id bigint(20) comment '点检人',
+ user_name varchar(64) comment '点检人用户名',
+ nick_name varchar(255) comment '点检人名称',
status varchar(64) default 'PREPARE' comment '状态',
remark varchar(500) default '' comment '备注',
attr1 varchar(64) default null comment '预留字段1',
@@ -236,6 +239,9 @@ create table dv_mainten_record (
machinery_brand varchar(255) comment '品牌',
machinery_spec varchar(255) comment '规格型号',
mainten_time datetime not null comment '保养时间',
+ user_id bigint(20) comment '用户ID',
+ user_name varchar(64) comment '用户名',
+ nick_name varchar(128) comment '昵称',
status varchar(64) default 'PREPARE' comment '状态',
remark varchar(500) default '' comment '备注',
attr1 varchar(64) default null comment '预留字段1',
diff --git a/ktg-admin/src/main/resources/application.yml b/ktg-admin/src/main/resources/application.yml
index 55c8f44..50848e4 100644
--- a/ktg-admin/src/main/resources/application.yml
+++ b/ktg-admin/src/main/resources/application.yml
@@ -42,11 +42,19 @@ logging:
# Spring配置
spring:
+ rabbitmq:
+ host: 192.168.1.194 # RabbitMQ 服务的地址
+ port: 5672 # RabbitMQ 服务的端口
+ username: mes # RabbitMQ 服务的账号
+ password: mes # RabbitMQ 服务的密码
+ virtual-host: / # 默认虚拟主机
+ consumer:
+ batchSize: 100 # 消费者每次拉取消息的数量
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
- profiles:
+ profiles:
active: druid
# 文件上传
servlet:
@@ -63,13 +71,13 @@ spring:
# redis 配置
redis:
# 地址
- host: localhost
+ host: 192.168.1.254
# 端口,默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
- password:
+ password:
# 连接超时时间
timeout: 10s
lettuce:
@@ -91,7 +99,7 @@ token:
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
-
+
# MyBatis配置
mybatis:
# 搜索指定包别名
@@ -102,10 +110,10 @@ mybatis:
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
-pagehelper:
+pagehelper:
helperDialect: mysql
supportMethodsArguments: true
- params: count=countSql
+ params: count=countSql
# Swagger配置
swagger:
@@ -116,7 +124,7 @@ swagger:
pathMapping: /dev-api
# 防止XSS攻击
-xss:
+xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
@@ -126,7 +134,7 @@ xss:
#Mino配置
minio:
- url: http://127.0.0.1:9000
- accessKey: your_key
- secretKey: your_secret
- bucketName: ktg-mes
\ No newline at end of file
+ url: http://192.168.1.254:9000
+ accessKey: minioadmin
+ secretKey: minioadmin
+ bucketName: lx-mes
diff --git a/ktg-mes/pom.xml b/ktg-mes/pom.xml
index 4f1392d..bf4c791 100644
--- a/ktg-mes/pom.xml
+++ b/ktg-mes/pom.xml
@@ -60,6 +60,16 @@
commons-collections
commons-collections
+
+ org.springframework.boot
+ spring-boot-starter-amqp
+
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+ 2.2.13.RELEASE
+
-
\ No newline at end of file
+
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordController.java b/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordController.java
new file mode 100644
index 0000000..d3dba5e
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordController.java
@@ -0,0 +1,104 @@
+package com.ktg.mes.dv.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ktg.common.annotation.Log;
+import com.ktg.common.core.controller.BaseController;
+import com.ktg.common.core.domain.AjaxResult;
+import com.ktg.common.enums.BusinessType;
+import com.ktg.mes.dv.domain.DvMaintenRecord;
+import com.ktg.mes.dv.service.IDvMaintenRecordService;
+import com.ktg.common.utils.poi.ExcelUtil;
+import com.ktg.common.core.page.TableDataInfo;
+
+/**
+ * 设备保养记录Controller
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+@RestController
+@RequestMapping("/mes/dv/maintenrecord")
+public class DvMaintenRecordController extends BaseController
+{
+ @Autowired
+ private IDvMaintenRecordService dvMaintenRecordService;
+
+ /**
+ * 查询设备保养记录列表
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(DvMaintenRecord dvMaintenRecord)
+ {
+ startPage();
+ List list = dvMaintenRecordService.selectDvMaintenRecordList(dvMaintenRecord);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出设备保养记录列表
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:export')")
+ @Log(title = "设备保养记录", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DvMaintenRecord dvMaintenRecord)
+ {
+ List list = dvMaintenRecordService.selectDvMaintenRecordList(dvMaintenRecord);
+ ExcelUtil util = new ExcelUtil(DvMaintenRecord.class);
+ util.exportExcel(response, list, "设备保养记录数据");
+ }
+
+ /**
+ * 获取设备保养记录详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:query')")
+ @GetMapping(value = "/{recordId}")
+ public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
+ {
+ return AjaxResult.success(dvMaintenRecordService.selectDvMaintenRecordByRecordId(recordId));
+ }
+
+ /**
+ * 新增设备保养记录
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:add')")
+ @Log(title = "设备保养记录", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody DvMaintenRecord dvMaintenRecord)
+ {
+ return toAjax(dvMaintenRecordService.insertDvMaintenRecord(dvMaintenRecord));
+ }
+
+ /**
+ * 修改设备保养记录
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:edit')")
+ @Log(title = "设备保养记录", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody DvMaintenRecord dvMaintenRecord)
+ {
+ return toAjax(dvMaintenRecordService.updateDvMaintenRecord(dvMaintenRecord));
+ }
+
+ /**
+ * 删除设备保养记录
+ */
+ @PreAuthorize("@ss.hasPermi('mes:dv:maintenrecord:remove')")
+ @Log(title = "设备保养记录", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{recordIds}")
+ public AjaxResult remove(@PathVariable Long[] recordIds)
+ {
+ return toAjax(dvMaintenRecordService.deleteDvMaintenRecordByRecordIds(recordIds));
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordLineController.java b/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordLineController.java
new file mode 100644
index 0000000..b314840
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/controller/DvMaintenRecordLineController.java
@@ -0,0 +1,104 @@
+package com.ktg.mes.dv.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ktg.common.annotation.Log;
+import com.ktg.common.core.controller.BaseController;
+import com.ktg.common.core.domain.AjaxResult;
+import com.ktg.common.enums.BusinessType;
+import com.ktg.mes.dv.domain.DvMaintenRecordLine;
+import com.ktg.mes.dv.service.IDvMaintenRecordLineService;
+import com.ktg.common.utils.poi.ExcelUtil;
+import com.ktg.common.core.page.TableDataInfo;
+
+/**
+ * 设备保养记录行Controller
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+@RestController
+@RequestMapping("/mes/dv/maintenrecordline")
+public class DvMaintenRecordLineController extends BaseController
+{
+ @Autowired
+ private IDvMaintenRecordLineService dvMaintenRecordLineService;
+
+ /**
+ * 查询设备保养记录行列表
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ startPage();
+ List list = dvMaintenRecordLineService.selectDvMaintenRecordLineList(dvMaintenRecordLine);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出设备保养记录行列表
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:export')")
+ @Log(title = "设备保养记录行", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ List list = dvMaintenRecordLineService.selectDvMaintenRecordLineList(dvMaintenRecordLine);
+ ExcelUtil util = new ExcelUtil(DvMaintenRecordLine.class);
+ util.exportExcel(response, list, "设备保养记录行数据");
+ }
+
+ /**
+ * 获取设备保养记录行详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:query')")
+ @GetMapping(value = "/{lineId}")
+ public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
+ {
+ return AjaxResult.success(dvMaintenRecordLineService.selectDvMaintenRecordLineByLineId(lineId));
+ }
+
+ /**
+ * 新增设备保养记录行
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:add')")
+ @Log(title = "设备保养记录行", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ return toAjax(dvMaintenRecordLineService.insertDvMaintenRecordLine(dvMaintenRecordLine));
+ }
+
+ /**
+ * 修改设备保养记录行
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:edit')")
+ @Log(title = "设备保养记录行", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ return toAjax(dvMaintenRecordLineService.updateDvMaintenRecordLine(dvMaintenRecordLine));
+ }
+
+ /**
+ * 删除设备保养记录行
+ */
+ @PreAuthorize("@ss.hasPermi('dv:maintenrecordline:remove')")
+ @Log(title = "设备保养记录行", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{lineIds}")
+ public AjaxResult remove(@PathVariable Long[] lineIds)
+ {
+ return toAjax(dvMaintenRecordLineService.deleteDvMaintenRecordLineByLineIds(lineIds));
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecord.java b/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecord.java
new file mode 100644
index 0000000..db67a6e
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecord.java
@@ -0,0 +1,293 @@
+package com.ktg.mes.dv.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ktg.common.annotation.Excel;
+import com.ktg.common.core.domain.BaseEntity;
+
+/**
+ * 设备保养记录对象 dv_mainten_record
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public class DvMaintenRecord extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 计划ID */
+ private Long recordId;
+
+ /** 计划ID */
+ @Excel(name = "计划ID")
+ private Long planId;
+
+ /** 计划编码 */
+ @Excel(name = "计划编码")
+ private String planCode;
+
+ /** 计划名称 */
+ @Excel(name = "计划名称")
+ private String planName;
+
+ /** 计划类型 */
+ @Excel(name = "计划类型")
+ private String planType;
+
+ /** 设备ID */
+ @Excel(name = "设备ID")
+ private Long machineryId;
+
+ /** 设备编码 */
+ @Excel(name = "设备编码")
+ private String machineryCode;
+
+ /** 设备名称 */
+ @Excel(name = "设备名称")
+ private String machineryName;
+
+ /** 品牌 */
+ @Excel(name = "品牌")
+ private String machineryBrand;
+
+ /** 规格型号 */
+ @Excel(name = "规格型号")
+ private String machinerySpec;
+
+ /** 保养时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "保养时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date maintenTime;
+
+ /** 用户ID */
+ @Excel(name = "用户ID")
+ private Long userId;
+
+ /** 用户名 */
+ @Excel(name = "用户名")
+ private String userName;
+
+ /** 昵称 */
+ @Excel(name = "昵称")
+ private String nickName;
+
+ /** 状态 */
+ @Excel(name = "状态")
+ private String status;
+
+ /** 预留字段1 */
+ private String attr1;
+
+ /** 预留字段2 */
+ private String attr2;
+
+ /** 预留字段3 */
+ private Long attr3;
+
+ /** 预留字段4 */
+ private Long attr4;
+
+ public void setRecordId(Long recordId)
+ {
+ this.recordId = recordId;
+ }
+
+ public Long getRecordId()
+ {
+ return recordId;
+ }
+ public void setPlanId(Long planId)
+ {
+ this.planId = planId;
+ }
+
+ public Long getPlanId()
+ {
+ return planId;
+ }
+ public void setPlanCode(String planCode)
+ {
+ this.planCode = planCode;
+ }
+
+ public String getPlanCode()
+ {
+ return planCode;
+ }
+ public void setPlanName(String planName)
+ {
+ this.planName = planName;
+ }
+
+ public String getPlanName()
+ {
+ return planName;
+ }
+ public void setPlanType(String planType)
+ {
+ this.planType = planType;
+ }
+
+ public String getPlanType()
+ {
+ return planType;
+ }
+ public void setMachineryId(Long machineryId)
+ {
+ this.machineryId = machineryId;
+ }
+
+ public Long getMachineryId()
+ {
+ return machineryId;
+ }
+ public void setMachineryCode(String machineryCode)
+ {
+ this.machineryCode = machineryCode;
+ }
+
+ public String getMachineryCode()
+ {
+ return machineryCode;
+ }
+ public void setMachineryName(String machineryName)
+ {
+ this.machineryName = machineryName;
+ }
+
+ public String getMachineryName()
+ {
+ return machineryName;
+ }
+ public void setMachineryBrand(String machineryBrand)
+ {
+ this.machineryBrand = machineryBrand;
+ }
+
+ public String getMachineryBrand()
+ {
+ return machineryBrand;
+ }
+ public void setMachinerySpec(String machinerySpec)
+ {
+ this.machinerySpec = machinerySpec;
+ }
+
+ public String getMachinerySpec()
+ {
+ return machinerySpec;
+ }
+ public void setMaintenTime(Date maintenTime)
+ {
+ this.maintenTime = maintenTime;
+ }
+
+ public Date getMaintenTime()
+ {
+ return maintenTime;
+ }
+ public void setUserId(Long userId)
+ {
+ this.userId = userId;
+ }
+
+ public Long getUserId()
+ {
+ return userId;
+ }
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+ public void setNickName(String nickName)
+ {
+ this.nickName = nickName;
+ }
+
+ public String getNickName()
+ {
+ return nickName;
+ }
+ public void setStatus(String status)
+ {
+ this.status = status;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+ public void setAttr1(String attr1)
+ {
+ this.attr1 = attr1;
+ }
+
+ public String getAttr1()
+ {
+ return attr1;
+ }
+ public void setAttr2(String attr2)
+ {
+ this.attr2 = attr2;
+ }
+
+ public String getAttr2()
+ {
+ return attr2;
+ }
+ public void setAttr3(Long attr3)
+ {
+ this.attr3 = attr3;
+ }
+
+ public Long getAttr3()
+ {
+ return attr3;
+ }
+ public void setAttr4(Long attr4)
+ {
+ this.attr4 = attr4;
+ }
+
+ public Long getAttr4()
+ {
+ return attr4;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("recordId", getRecordId())
+ .append("planId", getPlanId())
+ .append("planCode", getPlanCode())
+ .append("planName", getPlanName())
+ .append("planType", getPlanType())
+ .append("machineryId", getMachineryId())
+ .append("machineryCode", getMachineryCode())
+ .append("machineryName", getMachineryName())
+ .append("machineryBrand", getMachineryBrand())
+ .append("machinerySpec", getMachinerySpec())
+ .append("maintenTime", getMaintenTime())
+ .append("userId", getUserId())
+ .append("userName", getUserName())
+ .append("nickName", getNickName())
+ .append("status", getStatus())
+ .append("remark", getRemark())
+ .append("attr1", getAttr1())
+ .append("attr2", getAttr2())
+ .append("attr3", getAttr3())
+ .append("attr4", getAttr4())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecordLine.java b/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecordLine.java
new file mode 100644
index 0000000..b888a3a
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvMaintenRecordLine.java
@@ -0,0 +1,219 @@
+package com.ktg.mes.dv.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ktg.common.annotation.Excel;
+import com.ktg.common.core.domain.BaseEntity;
+
+/**
+ * 设备保养记录行对象 dv_mainten_record_line
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public class DvMaintenRecordLine extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 计划ID */
+ private Long lineId;
+
+ /** 计划ID */
+ @Excel(name = "计划ID")
+ private Long recordId;
+
+ /** 项目ID */
+ @Excel(name = "项目ID")
+ private Long subjectId;
+
+ /** 项目编码 */
+ @Excel(name = "项目编码")
+ private String subjectCode;
+
+ /** 项目名称 */
+ @Excel(name = "项目名称")
+ private String subjectName;
+
+ /** 项目类型 */
+ @Excel(name = "项目类型")
+ private String subjectType;
+
+ /** 项目内容 */
+ @Excel(name = "项目内容")
+ private String subjectContent;
+
+ /** 标准 */
+ @Excel(name = "标准")
+ private String subjectStandard;
+
+ /** 保养结果 */
+ @Excel(name = "保养结果")
+ private String maintenStatus;
+
+ /** 异常描述 */
+ @Excel(name = "异常描述")
+ private String maintenResult;
+
+ /** 预留字段1 */
+ private String attr1;
+
+ /** 预留字段2 */
+ private String attr2;
+
+ /** 预留字段3 */
+ private Long attr3;
+
+ /** 预留字段4 */
+ private Long attr4;
+
+ public void setLineId(Long lineId)
+ {
+ this.lineId = lineId;
+ }
+
+ public Long getLineId()
+ {
+ return lineId;
+ }
+ public void setRecordId(Long recordId)
+ {
+ this.recordId = recordId;
+ }
+
+ public Long getRecordId()
+ {
+ return recordId;
+ }
+ public void setSubjectId(Long subjectId)
+ {
+ this.subjectId = subjectId;
+ }
+
+ public Long getSubjectId()
+ {
+ return subjectId;
+ }
+ public void setSubjectCode(String subjectCode)
+ {
+ this.subjectCode = subjectCode;
+ }
+
+ public String getSubjectCode()
+ {
+ return subjectCode;
+ }
+ public void setSubjectName(String subjectName)
+ {
+ this.subjectName = subjectName;
+ }
+
+ public String getSubjectName()
+ {
+ return subjectName;
+ }
+ public void setSubjectType(String subjectType)
+ {
+ this.subjectType = subjectType;
+ }
+
+ public String getSubjectType()
+ {
+ return subjectType;
+ }
+ public void setSubjectContent(String subjectContent)
+ {
+ this.subjectContent = subjectContent;
+ }
+
+ public String getSubjectContent()
+ {
+ return subjectContent;
+ }
+ public void setSubjectStandard(String subjectStandard)
+ {
+ this.subjectStandard = subjectStandard;
+ }
+
+ public String getSubjectStandard()
+ {
+ return subjectStandard;
+ }
+ public void setMaintenStatus(String maintenStatus)
+ {
+ this.maintenStatus = maintenStatus;
+ }
+
+ public String getMaintenStatus()
+ {
+ return maintenStatus;
+ }
+ public void setMaintenResult(String maintenResult)
+ {
+ this.maintenResult = maintenResult;
+ }
+
+ public String getMaintenResult()
+ {
+ return maintenResult;
+ }
+ public void setAttr1(String attr1)
+ {
+ this.attr1 = attr1;
+ }
+
+ public String getAttr1()
+ {
+ return attr1;
+ }
+ public void setAttr2(String attr2)
+ {
+ this.attr2 = attr2;
+ }
+
+ public String getAttr2()
+ {
+ return attr2;
+ }
+ public void setAttr3(Long attr3)
+ {
+ this.attr3 = attr3;
+ }
+
+ public Long getAttr3()
+ {
+ return attr3;
+ }
+ public void setAttr4(Long attr4)
+ {
+ this.attr4 = attr4;
+ }
+
+ public Long getAttr4()
+ {
+ return attr4;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("lineId", getLineId())
+ .append("recordId", getRecordId())
+ .append("subjectId", getSubjectId())
+ .append("subjectCode", getSubjectCode())
+ .append("subjectName", getSubjectName())
+ .append("subjectType", getSubjectType())
+ .append("subjectContent", getSubjectContent())
+ .append("subjectStandard", getSubjectStandard())
+ .append("maintenStatus", getMaintenStatus())
+ .append("maintenResult", getMaintenResult())
+ .append("attr1", getAttr1())
+ .append("attr2", getAttr2())
+ .append("attr3", getAttr3())
+ .append("attr4", getAttr4())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordLineMapper.java b/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordLineMapper.java
new file mode 100644
index 0000000..37e426f
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordLineMapper.java
@@ -0,0 +1,61 @@
+package com.ktg.mes.dv.mapper;
+
+import java.util.List;
+import com.ktg.mes.dv.domain.DvMaintenRecordLine;
+
+/**
+ * 设备保养记录行Mapper接口
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public interface DvMaintenRecordLineMapper
+{
+ /**
+ * 查询设备保养记录行
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 设备保养记录行
+ */
+ public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId);
+
+ /**
+ * 查询设备保养记录行列表
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 设备保养记录行集合
+ */
+ public List selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 新增设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 修改设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 删除设备保养记录行
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordLineByLineId(Long lineId);
+
+ /**
+ * 批量删除设备保养记录行
+ *
+ * @param lineIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds);
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordMapper.java b/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordMapper.java
new file mode 100644
index 0000000..8c00b55
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/mapper/DvMaintenRecordMapper.java
@@ -0,0 +1,61 @@
+package com.ktg.mes.dv.mapper;
+
+import java.util.List;
+import com.ktg.mes.dv.domain.DvMaintenRecord;
+
+/**
+ * 设备保养记录Mapper接口
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public interface DvMaintenRecordMapper
+{
+ /**
+ * 查询设备保养记录
+ *
+ * @param recordId 设备保养记录主键
+ * @return 设备保养记录
+ */
+ public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId);
+
+ /**
+ * 查询设备保养记录列表
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 设备保养记录集合
+ */
+ public List selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 新增设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 修改设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 删除设备保养记录
+ *
+ * @param recordId 设备保养记录主键
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordByRecordId(Long recordId);
+
+ /**
+ * 批量删除设备保养记录
+ *
+ * @param recordIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordByRecordIds(Long[] recordIds);
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordLineService.java b/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordLineService.java
new file mode 100644
index 0000000..19f606c
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordLineService.java
@@ -0,0 +1,61 @@
+package com.ktg.mes.dv.service;
+
+import java.util.List;
+import com.ktg.mes.dv.domain.DvMaintenRecordLine;
+
+/**
+ * 设备保养记录行Service接口
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public interface IDvMaintenRecordLineService
+{
+ /**
+ * 查询设备保养记录行
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 设备保养记录行
+ */
+ public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId);
+
+ /**
+ * 查询设备保养记录行列表
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 设备保养记录行集合
+ */
+ public List selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 新增设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 修改设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
+
+ /**
+ * 批量删除设备保养记录行
+ *
+ * @param lineIds 需要删除的设备保养记录行主键集合
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds);
+
+ /**
+ * 删除设备保养记录行信息
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordLineByLineId(Long lineId);
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordService.java b/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordService.java
new file mode 100644
index 0000000..5a8b00f
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/service/IDvMaintenRecordService.java
@@ -0,0 +1,61 @@
+package com.ktg.mes.dv.service;
+
+import java.util.List;
+import com.ktg.mes.dv.domain.DvMaintenRecord;
+
+/**
+ * 设备保养记录Service接口
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+public interface IDvMaintenRecordService
+{
+ /**
+ * 查询设备保养记录
+ *
+ * @param recordId 设备保养记录主键
+ * @return 设备保养记录
+ */
+ public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId);
+
+ /**
+ * 查询设备保养记录列表
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 设备保养记录集合
+ */
+ public List selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 新增设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 修改设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
+
+ /**
+ * 批量删除设备保养记录
+ *
+ * @param recordIds 需要删除的设备保养记录主键集合
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordByRecordIds(Long[] recordIds);
+
+ /**
+ * 删除设备保养记录信息
+ *
+ * @param recordId 设备保养记录主键
+ * @return 结果
+ */
+ public int deleteDvMaintenRecordByRecordId(Long recordId);
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordLineServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordLineServiceImpl.java
new file mode 100644
index 0000000..5105f7c
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordLineServiceImpl.java
@@ -0,0 +1,96 @@
+package com.ktg.mes.dv.service.impl;
+
+import java.util.List;
+import com.ktg.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ktg.mes.dv.mapper.DvMaintenRecordLineMapper;
+import com.ktg.mes.dv.domain.DvMaintenRecordLine;
+import com.ktg.mes.dv.service.IDvMaintenRecordLineService;
+
+/**
+ * 设备保养记录行Service业务层处理
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+@Service
+public class DvMaintenRecordLineServiceImpl implements IDvMaintenRecordLineService
+{
+ @Autowired
+ private DvMaintenRecordLineMapper dvMaintenRecordLineMapper;
+
+ /**
+ * 查询设备保养记录行
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 设备保养记录行
+ */
+ @Override
+ public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId)
+ {
+ return dvMaintenRecordLineMapper.selectDvMaintenRecordLineByLineId(lineId);
+ }
+
+ /**
+ * 查询设备保养记录行列表
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 设备保养记录行
+ */
+ @Override
+ public List selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ return dvMaintenRecordLineMapper.selectDvMaintenRecordLineList(dvMaintenRecordLine);
+ }
+
+ /**
+ * 新增设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ @Override
+ public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ dvMaintenRecordLine.setCreateTime(DateUtils.getNowDate());
+ return dvMaintenRecordLineMapper.insertDvMaintenRecordLine(dvMaintenRecordLine);
+ }
+
+ /**
+ * 修改设备保养记录行
+ *
+ * @param dvMaintenRecordLine 设备保养记录行
+ * @return 结果
+ */
+ @Override
+ public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine)
+ {
+ dvMaintenRecordLine.setUpdateTime(DateUtils.getNowDate());
+ return dvMaintenRecordLineMapper.updateDvMaintenRecordLine(dvMaintenRecordLine);
+ }
+
+ /**
+ * 批量删除设备保养记录行
+ *
+ * @param lineIds 需要删除的设备保养记录行主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds)
+ {
+ return dvMaintenRecordLineMapper.deleteDvMaintenRecordLineByLineIds(lineIds);
+ }
+
+ /**
+ * 删除设备保养记录行信息
+ *
+ * @param lineId 设备保养记录行主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDvMaintenRecordLineByLineId(Long lineId)
+ {
+ return dvMaintenRecordLineMapper.deleteDvMaintenRecordLineByLineId(lineId);
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordServiceImpl.java
new file mode 100644
index 0000000..d014fc4
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/dv/service/impl/DvMaintenRecordServiceImpl.java
@@ -0,0 +1,96 @@
+package com.ktg.mes.dv.service.impl;
+
+import java.util.List;
+import com.ktg.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ktg.mes.dv.mapper.DvMaintenRecordMapper;
+import com.ktg.mes.dv.domain.DvMaintenRecord;
+import com.ktg.mes.dv.service.IDvMaintenRecordService;
+
+/**
+ * 设备保养记录Service业务层处理
+ *
+ * @author yinjinlu
+ * @date 2024-12-26
+ */
+@Service
+public class DvMaintenRecordServiceImpl implements IDvMaintenRecordService
+{
+ @Autowired
+ private DvMaintenRecordMapper dvMaintenRecordMapper;
+
+ /**
+ * 查询设备保养记录
+ *
+ * @param recordId 设备保养记录主键
+ * @return 设备保养记录
+ */
+ @Override
+ public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId)
+ {
+ return dvMaintenRecordMapper.selectDvMaintenRecordByRecordId(recordId);
+ }
+
+ /**
+ * 查询设备保养记录列表
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 设备保养记录
+ */
+ @Override
+ public List selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord)
+ {
+ return dvMaintenRecordMapper.selectDvMaintenRecordList(dvMaintenRecord);
+ }
+
+ /**
+ * 新增设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ @Override
+ public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord)
+ {
+ dvMaintenRecord.setCreateTime(DateUtils.getNowDate());
+ return dvMaintenRecordMapper.insertDvMaintenRecord(dvMaintenRecord);
+ }
+
+ /**
+ * 修改设备保养记录
+ *
+ * @param dvMaintenRecord 设备保养记录
+ * @return 结果
+ */
+ @Override
+ public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord)
+ {
+ dvMaintenRecord.setUpdateTime(DateUtils.getNowDate());
+ return dvMaintenRecordMapper.updateDvMaintenRecord(dvMaintenRecord);
+ }
+
+ /**
+ * 批量删除设备保养记录
+ *
+ * @param recordIds 需要删除的设备保养记录主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDvMaintenRecordByRecordIds(Long[] recordIds)
+ {
+ return dvMaintenRecordMapper.deleteDvMaintenRecordByRecordIds(recordIds);
+ }
+
+ /**
+ * 删除设备保养记录信息
+ *
+ * @param recordId 设备保养记录主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDvMaintenRecordByRecordId(Long recordId)
+ {
+ return dvMaintenRecordMapper.deleteDvMaintenRecordByRecordId(recordId);
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/DirectQueueHandler.java b/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/DirectQueueHandler.java
new file mode 100644
index 0000000..bdb6972
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/DirectQueueHandler.java
@@ -0,0 +1,26 @@
+package com.ktg.mes.rabbitmq;
+
+import com.ktg.mes.websocket.MesWebSocket;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.stereotype.Component;
+
+/**
+ * 直连队列 处理器
+ *
+ * @author raft
+ */
+@Slf4j
+@Component
+public class DirectQueueHandler {
+
+ @RabbitListener(queues = "iot.original.mes")
+ public void directHandlerRegister_origin(String message) {
+ try {
+// log.info("Mes:消息队列,拉取原始数据:{}", message);
+ MesWebSocket.pushData(message);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/RabbitMqConfig.java b/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/RabbitMqConfig.java
new file mode 100644
index 0000000..706ea87
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/rabbitmq/RabbitMqConfig.java
@@ -0,0 +1,46 @@
+package com.ktg.mes.rabbitmq;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.core.Binding;
+import org.springframework.amqp.core.BindingBuilder;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.core.TopicExchange;
+import org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory;
+import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Slf4j
+@Configuration
+public class RabbitMqConfig {
+
+ /**
+ * 设备事件上报队列
+ */
+ @Bean
+ public Queue deviceEventQueue() {
+ return new Queue("iot.original.mes");
+ }
+
+ /**
+ * RabbitMQ默认的topic交换机
+ * @return
+ */
+ @Bean
+ public TopicExchange topicExchange() {
+ return new TopicExchange("amq.topic");
+ }
+
+ /**
+ * 绑定队列和交换机
+ * @param topicExchange
+ * @param deviceEventQueue
+ * @return
+ */
+ @Bean
+ public Binding bindingDeviceEventQueue(TopicExchange topicExchange, Queue deviceEventQueue) {
+ return BindingBuilder.bind(deviceEventQueue).to(topicExchange).with("iot.origin"); // 替换为实际的路由键
+ }
+}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/websocket/MesWebSocket.java b/ktg-mes/src/main/java/com/ktg/mes/websocket/MesWebSocket.java
new file mode 100644
index 0000000..16d03a7
--- /dev/null
+++ b/ktg-mes/src/main/java/com/ktg/mes/websocket/MesWebSocket.java
@@ -0,0 +1,106 @@
+package com.ktg.mes.websocket;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.stereotype.Component;
+
+import javax.websocket.*;
+import javax.websocket.server.ServerEndpoint;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * mes websocket服务端 为组态、大屏、提供数据推送
+ */
+@ServerEndpoint("/websocket/mes")
+@Slf4j
+@Component
+public class MesWebSocket {
+ private static Map sessionMap = new ConcurrentHashMap<>();
+ public final static String WEBSOCKET_HEARTBEAT = "heartbeat-iot";
+ /**
+ * 客户端成功连接时调用
+ *
+ * @param session 存储的session
+ */
+ @OnOpen
+ public void openSession(Session session) {
+ log.warn("Mes WebSocket:{} 已连接", session.getId());
+ sessionMap.put(session.getId(),session);
+ }
+
+ /**
+ * 服务端接收到消息
+ *
+ * @param session 会话,每个访问对象都会有一个单独的会话
+ * @param message 服务端接收到的消息 格式: deviceCode:nodeCode:pointCode1,pointCode2,pointCode3
+ */
+ @OnMessage(maxMessageSize = 10485760)
+ public void onMessage(Session session, String message) {
+ log.warn("Mes WebSocket:接收到 {} 的消息 {}", session.getId(), message);
+ if(WEBSOCKET_HEARTBEAT.equals(message)){
+ sendMessage(session,"OK");
+ }
+ }
+
+ /**
+ * 客户端断开连接时调用
+ *
+ * @param session 存储的session
+ */
+ @OnClose
+ public void onClose(Session session) {
+ log.warn("Mes WebSocket:{} 断开连接", session.getId());
+ removeSessionData(session);
+ }
+
+ @OnError
+ public void onError(Session session, Throwable throwable) {
+ removeSessionData(session);
+ }
+
+ private void removeSessionData(Session session) {
+ String sessionId = session.getId();
+ sessionMap.remove(sessionId);
+ }
+
+ /**
+ * 向指定Session(用户)发送message
+ *
+ * @param session 用session进行判断
+ * @param message 发送的消息
+ */
+ private static void sendMessage(Session session, String message) {
+ try {
+ session.getBasicRemote().sendText(message);
+ log.warn("Mes sendData {}", message);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * 给对应的测点session客户端集合发送测点实时数据
+ *
+ * @param message 发送消息
+ * @param sessionMap 获取sessionIds发送实时数据
+ */
+ private static synchronized void sendMessageAll(String message, Map sessionMap) {
+ for (String key : sessionMap.keySet()) {
+ log.info("sessionId: {}", key);
+ sendMessage(sessionMap.get(key), message);
+ }
+ }
+
+ /**
+ * 检查是否有客户端监听此设备的实时数据
+ *
+ * @param message 发送消息内容
+ */
+ public static void pushData(String message) {
+ if (ObjectUtils.isNotEmpty(sessionMap)) {
+ sendMessageAll(message, sessionMap);
+ }
+ }
+}
diff --git a/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordLineMapper.xml b/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordLineMapper.xml
new file mode 100644
index 0000000..b2bf9c1
--- /dev/null
+++ b/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordLineMapper.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select line_id, record_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, mainten_status, mainten_result, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_mainten_record_line
+
+
+
+
+
+
+
+ insert into dv_mainten_record_line
+
+ record_id,
+ subject_id,
+ subject_code,
+ subject_name,
+ subject_type,
+ subject_content,
+ subject_standard,
+ mainten_status,
+ mainten_result,
+ attr1,
+ attr2,
+ attr3,
+ attr4,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+
+
+ #{recordId},
+ #{subjectId},
+ #{subjectCode},
+ #{subjectName},
+ #{subjectType},
+ #{subjectContent},
+ #{subjectStandard},
+ #{maintenStatus},
+ #{maintenResult},
+ #{attr1},
+ #{attr2},
+ #{attr3},
+ #{attr4},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+
+
+
+
+ update dv_mainten_record_line
+
+ record_id = #{recordId},
+ subject_id = #{subjectId},
+ subject_code = #{subjectCode},
+ subject_name = #{subjectName},
+ subject_type = #{subjectType},
+ subject_content = #{subjectContent},
+ subject_standard = #{subjectStandard},
+ mainten_status = #{maintenStatus},
+ mainten_result = #{maintenResult},
+ attr1 = #{attr1},
+ attr2 = #{attr2},
+ attr3 = #{attr3},
+ attr4 = #{attr4},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+
+ where line_id = #{lineId}
+
+
+
+ delete from dv_mainten_record_line where line_id = #{lineId}
+
+
+
+ delete from dv_mainten_record_line where line_id in
+
+ #{lineId}
+
+
+
\ No newline at end of file
diff --git a/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml b/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml
new file mode 100644
index 0000000..e4fa86a
--- /dev/null
+++ b/ktg-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select record_id, plan_id, plan_code, plan_name, plan_type, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, mainten_time, user_id, user_name, nick_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_mainten_record
+
+
+
+
+
+
+
+ insert into dv_mainten_record
+
+ plan_id,
+ plan_code,
+ plan_name,
+ plan_type,
+ machinery_id,
+ machinery_code,
+ machinery_name,
+ machinery_brand,
+ machinery_spec,
+ mainten_time,
+ user_id,
+ user_name,
+ nick_name,
+ status,
+ remark,
+ attr1,
+ attr2,
+ attr3,
+ attr4,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+
+
+ #{planId},
+ #{planCode},
+ #{planName},
+ #{planType},
+ #{machineryId},
+ #{machineryCode},
+ #{machineryName},
+ #{machineryBrand},
+ #{machinerySpec},
+ #{maintenTime},
+ #{userId},
+ #{userName},
+ #{nickName},
+ #{status},
+ #{remark},
+ #{attr1},
+ #{attr2},
+ #{attr3},
+ #{attr4},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+
+
+
+
+ update dv_mainten_record
+
+ plan_id = #{planId},
+ plan_code = #{planCode},
+ plan_name = #{planName},
+ plan_type = #{planType},
+ machinery_id = #{machineryId},
+ machinery_code = #{machineryCode},
+ machinery_name = #{machineryName},
+ machinery_brand = #{machineryBrand},
+ machinery_spec = #{machinerySpec},
+ mainten_time = #{maintenTime},
+ user_id = #{userId},
+ user_name = #{userName},
+ nick_name = #{nickName},
+ status = #{status},
+ remark = #{remark},
+ attr1 = #{attr1},
+ attr2 = #{attr2},
+ attr3 = #{attr3},
+ attr4 = #{attr4},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+
+ where record_id = #{recordId}
+
+
+
+ delete from dv_mainten_record where record_id = #{recordId}
+
+
+
+ delete from dv_mainten_record where record_id in
+
+ #{recordId}
+
+
+
\ No newline at end of file