From 3b0516a2959e25576e4f3fda697a3b025d06c8c9 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 24 六月 2025 14:09:07 +0800
Subject: [PATCH] 每日录像可用指标添加日志,修改大屏为查看当前月平均

---
 ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java |  152 +++++++++++++++++++++-----------------------------
 1 files changed, 65 insertions(+), 87 deletions(-)

diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java
index 98a8a31..2e2cb7e 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java
@@ -1,108 +1,86 @@
 package com.ycl.platform.domain.entity;
 
-import annotation.Excel;
-import com.ycl.system.entity.BaseEntity;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.apache.commons.lang.builder.ToStringStyle;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
+import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import enumeration.converter.RuleDeductCategoryConverter;
+import enumeration.general.RuleDeductCategoryEnum;
+import lombok.Data;
 
-import java.math.BigDecimal;
+import java.util.Date;
 
 /**
- * 鏍哥畻瑙勫垯瀵硅薄 t_calculate_rule
- * 
+ * 鍒嗘暟鏍哥畻瑙勫垯瀵硅薄 t_default_rule
+ *
  * @author ruoyi
  * @date 2024-04-01
  */
-public class CalculateRule extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
+@Data
+@ExcelIgnoreUnannotated
+@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
+@TableName("t_calculate_rule")
+public class CalculateRule {
 
-    /** $column.columnComment */
-    private Long id;
+    /**
+     * id
+     */
+    private Integer id;
 
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private String name;
+    /**
+     * 鍚堝悓id
+     */
+    private Integer contractId;
 
-    /** $column.columnComment */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long templateId;
+    /**
+     * 瑙勫垯鍚嶇О
+     */
+    @ExcelProperty("鑰冩牳鍐呭")
+    private String ruleName;
 
-    /** $column.columnComment */
-    private Long parentId;
+    /**
+     * 瑙勫垯鏉′欢
+     */
+    @ExcelProperty("鑰冩牳瑕佹眰")
+    private String ruleCondition;
 
-    /** 鍗曚綅id */
-    @Excel(name = "鍗曚綅id")
-    private Long unitId;
+    /**
+     * 杩濊鏈�灏忓��
+     */
+    @ExcelProperty("杩濊鏈�灏忓��")
+    private Double min;
 
-    /** 姣忓皯1%鎵e綋鏈堟�绘湇鍔¤垂鐨勫灏� */
-    @Excel(name = "姣忓皯1%鎵e綋鏈堟�绘湇鍔¤垂鐨勫灏�")
-    private BigDecimal value;
+    /**
+     * 杩濊鏈�澶у��
+     */
+    @ExcelProperty("杩濊鏈�澶у��")
+    private Double max;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
+    /**
+     * 鎵e噺鏂瑰紡 鎵f寚瀹氬垎鏁�/鍒嗘暟涔樹互鏁伴噺/闄や互鏁伴噺鍚庝箻浠ュ垎鏁�
+     */
+    @ExcelProperty(value = "鎵e垎鏂瑰紡", converter = RuleDeductCategoryConverter.class)
+    private RuleDeductCategoryEnum deductCategory;
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
+    /**
+     * 鎵i櫎鍒嗘暟
+     */
+    @ExcelProperty("鎵e垎鏁板��")
+    private Double calcFraction;
 
-    public String getName() 
-    {
-        return name;
-    }
-    public void setTemplateId(Long templateId) 
-    {
-        this.templateId = templateId;
-    }
+    /**
+     * 褰撴柟寮忎负闄や互鏃讹紝闄や互褰撳墠瀛楁鏁伴噺
+     */
+    @ExcelProperty("闄や互鏁伴噺")
+    private Integer calcUnit;
 
-    public Long getTemplateId() 
-    {
-        return templateId;
-    }
-    public void setParentId(Long parentId) 
-    {
-        this.parentId = parentId;
-    }
+    private Date createTime;
+    private Date updateTime;
 
-    public Long getParentId() 
-    {
-        return parentId;
-    }
-    public void setUnitId(Long unitId) 
-    {
-        this.unitId = unitId;
-    }
+    @TableLogic
+    private Integer deleted;
 
-    public Long getUnitId() 
-    {
-        return unitId;
-    }
-    public void setValue(BigDecimal value) 
-    {
-        this.value = value;
-    }
-
-    public BigDecimal getValue() 
-    {
-        return value;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("templateId", getTemplateId())
-            .append("parentId", getParentId())
-            .append("unitId", getUnitId())
-            .append("value", getValue())
-            .toString();
-    }
 }

--
Gitblit v1.8.0