From 92a36252bf8e4e484cf17abf6d12b4e86497f6e9 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期三, 10 十二月 2025 09:22:22 +0800
Subject: [PATCH] #

---
 zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Area.java |  259 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 259 insertions(+), 0 deletions(-)

diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Area.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Area.java
new file mode 100644
index 0000000..ce32e04
--- /dev/null
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Area.java
@@ -0,0 +1,259 @@
+package com.zy.acs.manager.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zy.acs.framework.common.Cools;
+import com.zy.acs.framework.common.SpringUtils;
+import com.zy.acs.manager.manager.service.ZoneService;
+import com.zy.acs.manager.system.entity.User;
+import com.zy.acs.manager.system.service.UserService;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Data
+@TableName("man_area")
+public class Area implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 缂栧彿
+     */
+    @ApiModelProperty(value= "缂栧彿")
+    private String uuid;
+
+    /**
+     * 鍚嶇О
+     */
+    @ApiModelProperty(value= "鍚嶇О")
+    private String name;
+
+    /**
+     * 缂栫爜
+     */
+    @ApiModelProperty(value= "缂栫爜")
+    private String code;
+
+    /**
+     * 搴撳尯
+     */
+    @ApiModelProperty(value= "搴撳尯")
+    private Long zoneId;
+
+    /**
+     * 鍖哄煙绫诲瀷
+     */
+    @ApiModelProperty(value= "鍖哄煙绫诲瀷")
+    private String type;
+
+    /**
+     * 鏈�澶ф暟閲�
+     */
+    @ApiModelProperty(value= "鏈�澶ф暟閲�")
+    private Integer maxCount;
+
+    /**
+     * 閫熷害闄愬埗
+     */
+    @ApiModelProperty(value= "閫熷害闄愬埗")
+    private String speedLimit;
+
+    /**
+     * 褰㈢姸绫诲瀷
+     */
+    @ApiModelProperty(value= "褰㈢姸绫诲瀷")
+    private String shapeType;
+
+    /**
+     * 褰㈢姸鏁版嵁
+     */
+    @ApiModelProperty(value= "褰㈢姸鏁版嵁")
+    private String shapeData;
+
+    /**
+     * 棰滆壊
+     */
+    @ApiModelProperty(value= "棰滆壊")
+    private String color;
+
+    /**
+     * 浼樺厛绾�
+     */
+    @ApiModelProperty(value= "浼樺厛绾�")
+    private Integer priority;
+
+    /**
+     * 鍖哄煙鐗堟湰
+     */
+    @ApiModelProperty(value= "鍖哄煙鐗堟湰")
+    private String version;
+
+    /**
+     * 鐘舵�� 1: 姝e父  0: 鍐荤粨  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 鍐荤粨  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 绉熸埛
+     */
+    @ApiModelProperty(value= "绉熸埛")
+    private Integer tenantId;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    public Area() {}
+
+    public Area(String uuid,String name,String code,Long zoneId,String type,Integer maxCount,String speedLimit,String shapeType,String shapeData,String color,Integer priority,String version,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+        this.uuid = uuid;
+        this.name = name;
+        this.code = code;
+        this.zoneId = zoneId;
+        this.type = type;
+        this.maxCount = maxCount;
+        this.speedLimit = speedLimit;
+        this.shapeType = shapeType;
+        this.shapeData = shapeData;
+        this.color = color;
+        this.priority = priority;
+        this.version = version;
+        this.status = status;
+        this.deleted = deleted;
+        this.tenantId = tenantId;
+        this.createBy = createBy;
+        this.createTime = createTime;
+        this.updateBy = updateBy;
+        this.updateTime = updateTime;
+        this.memo = memo;
+    }
+
+//    Area area = new Area(
+//            null,    // 缂栧彿
+//            null,    // 鍚嶇О[闈炵┖]
+//            null,    // 缂栫爜
+//            null,    // 搴撳尯
+//            null,    // 鍖哄煙绫诲瀷
+//            null,    // 鏈�澶ф暟閲�
+//            null,    // 閫熷害闄愬埗
+//            null,    // 褰㈢姸绫诲瀷
+//            null,    // 褰㈢姸鏁版嵁[闈炵┖]
+//            null,    // 棰滆壊
+//            null,    // 浼樺厛绾�
+//            null,    // 鍖哄煙鐗堟湰
+//            null,    // 鐘舵�乕闈炵┖]
+//            null,    // 鏄惁鍒犻櫎[闈炵┖]
+//            null,    // 绉熸埛
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 娣诲姞鏃堕棿[闈炵┖]
+//            null,    // 淇敼浜哄憳
+//            null,    // 淇敼鏃堕棿
+//            null    // 澶囨敞
+//    );
+
+    public String getZoneId$(){
+        ZoneService service = SpringUtils.getBean(ZoneService.class);
+        Zone zone = service.getById(this.zoneId);
+        if (!Cools.isEmpty(zone)){
+            return String.valueOf(zone.getName());
+        }
+        return null;
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+
+
+    public Boolean getStatusBool(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return true;
+            case 0:
+                return false;
+            default:
+                return null;
+        }
+    }
+
+}

--
Gitblit v1.9.1