From 2e71bdbcdf853bb35e68016b84f0254f7366bfeb Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期五, 24 四月 2026 11:14:28 +0800
Subject: [PATCH] 文件工具类变更
---
src/main/java/com/ruoyi/safe/pojo/SafeHazard.java | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/ruoyi/safe/pojo/SafeHazard.java b/src/main/java/com/ruoyi/safe/pojo/SafeHazard.java
index e900138..ca88032 100644
--- a/src/main/java/com/ruoyi/safe/pojo/SafeHazard.java
+++ b/src/main/java/com/ruoyi/safe/pojo/SafeHazard.java
@@ -8,10 +8,12 @@
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
/**
* <p>
@@ -24,7 +26,7 @@
@Getter
@Setter
@TableName("safe_hazard")
-@ApiModel(value = "SafeHazard瀵硅薄", description = "瀹夊叏鐢熶骇--鍗遍櫓婧愬彴璐�")
+@Schema(name = "SafeHazard瀵硅薄", description = "瀹夊叏鐢熶骇--鍗遍櫓婧愬彴璐�")
public class SafeHazard implements Serializable {
private static final long serialVersionUID = 1L;
@@ -32,50 +34,54 @@
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- @ApiModelProperty("鍗遍櫓婧愬悕绉�")
+ @Schema(description = "鍗遍櫓婧愬悕绉�")
private String name;
- @ApiModelProperty("鍗遍櫓婧愮紪鐮�")
+ @Schema(description = "鍗遍櫓婧愮紪鐮�")
private String code;
- @ApiModelProperty("鍗遍櫓婧愮被鍨�")
+ @Schema(description = "鍗遍櫓婧愮被鍨�")
private String type;
- @ApiModelProperty("椋庨櫓绛夌骇")
+ @Schema(description = "椋庨櫓绛夌骇")
private String riskLevel;
- @ApiModelProperty("鎵�鍦ㄤ綅缃�")
+ @Schema(description = "鎵�鍦ㄤ綅缃�")
private String location;
- @ApiModelProperty("瑙勬牸 / 椋庨櫓鎻忚堪")
+ @Schema(description = "瑙勬牸 / 椋庨櫓鎻忚堪")
private String specInfo;
- @ApiModelProperty("绠℃帶鎺柦")
+ @Schema(description = "绠℃帶鎺柦")
private String controlMeasures;
- @ApiModelProperty("绠℃帶璐d换浜� ID")
+ @Schema(description = "绠℃帶璐d换浜� ID")
private Integer principalUserId;
- @ApiModelProperty("绠℃帶璐d换浜�")
+ @Schema(description = "绠℃帶璐d换浜�")
@TableField(exist = false)
private String principalUser;
- @ApiModelProperty("璐d换浜鸿仈绯荤數璇�")
+ @Schema(description = "璐d换浜鸿仈绯荤數璇�")
private String principalMobile;
- @ApiModelProperty("搴撳瓨鏁伴噺")
+ @Schema(description = "搴撳瓨鏁伴噺")
private BigDecimal stockQty;
- @ApiModelProperty("澶囨敞")
+ @Schema(description = "澶囨敞")
private String remark;
@TableField(fill = FieldFill.INSERT)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@TableField(fill = FieldFill.INSERT)
private Integer createUser;
@TableField(fill = FieldFill.INSERT_UPDATE)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@TableField(fill = FieldFill.INSERT_UPDATE)
@@ -83,4 +89,7 @@
@TableField(fill = FieldFill.INSERT)
private Integer tenantId;
+
+ @TableField(fill = FieldFill.INSERT)
+ private Long deptId;
}
--
Gitblit v1.9.3