From 4278bd577a300b924804fa51219ee20b4a6eddfd Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Mon, 1 Jul 2024 15:37:09 +0800 Subject: [PATCH] '123' --- .../com/ruoyi/common/annotation/DataName.java | 15 ++++ ruoyi-framework/pom.xml | 5 ++ .../ruoyi/system/domain/SysChangeRecord.java | 78 +++++++++++++++++++ .../system/mapper/SysChangeRecordMapper.java | 14 ++++ .../mapper/system/SysChangeRecordMapper.xml | 27 +++++++ ruoyi-ui/src/views/redBook/quots.vue | 69 ++++++++-------- 6 files changed, 176 insertions(+), 32 deletions(-) create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataName.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysChangeRecordMapper.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataName.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataName.java new file mode 100644 index 0000000..4b00d45 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataName.java @@ -0,0 +1,15 @@ +package com.ruoyi.common.annotation; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +@Documented +public @interface DataName { + String name() default ""; // 字段名称 + + /** + * 读取枚举内容转义表达式 (如: 0=男,1=女,2=未知) + */ + String readConverterExp() default ""; +} diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 233276a..a7d9c11 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -73,6 +73,11 @@ lombok 1.18.26 + + com.baomidou + mybatis-plus + 2.0.5 + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java new file mode 100644 index 0000000..5a2d373 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java @@ -0,0 +1,78 @@ +package com.ruoyi.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.Date; + +public class SysChangeRecord { + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date changeTime; + + private String createName; + + private String changeField; + + private String beforeChange; + + private String afterChange; + + private String typeId; + + private String remark; + + public Date getChangeTime() { + return changeTime; + } + + public void setChangeTime(Date changeTime) { + this.changeTime = changeTime; + } + + public String getCreateName() { + return createName; + } + + public void setCreateName(String createName) { + this.createName = createName; + } + + public String getChangeField() { + return changeField; + } + + public void setChangeField(String changeField) { + this.changeField = changeField; + } + + public String getBeforeChange() { + return beforeChange; + } + + public void setBeforeChange(String beforeChange) { + this.beforeChange = beforeChange; + } + + public String getAfterChange() { + return afterChange; + } + + public void setAfterChange(String afterChange) { + this.afterChange = afterChange; + } + + public String getTypeId() { + return typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysChangeRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysChangeRecordMapper.java new file mode 100644 index 0000000..81f7d3e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysChangeRecordMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.SysChangeRecord; + +/** + * 变更日志记录Mapper + */ +public interface SysChangeRecordMapper { + /** + * 插入 + * @param changeRecord + */ + public void insertChangeRecord(SysChangeRecord changeRecord); +} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml new file mode 100644 index 0000000..342588b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml @@ -0,0 +1,27 @@ + + + + + insert into sys_change_record + + changeTime, + createName, + changeField, + beforeChange, + afterChange, + typeId, + remark, + + + #{changeTime}, + #{createName}, + #{changeField}, + #{beforeChange}, + #{afterChange}, + #{typeId}, + #{remark}, + + + diff --git a/ruoyi-ui/src/views/redBook/quots.vue b/ruoyi-ui/src/views/redBook/quots.vue index 6373267..21cd4a3 100644 --- a/ruoyi-ui/src/views/redBook/quots.vue +++ b/ruoyi-ui/src/views/redBook/quots.vue @@ -20,16 +20,6 @@ clearable /> - 搜索 重置 @@ -38,7 +28,7 @@ - + @@ -49,11 +39,6 @@ {{scope.row.quotCode}} - @@ -105,7 +90,7 @@ - + 生成报价单 - 另存为 - 保存 + 另存为 + 保存 - 导出 - + + + + 删除 + + + 导出 + + + + @@ -148,9 +142,6 @@ -