From c0cda8576f9c13be4c0267170035c807eb76f47b Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期五, 26 四月 2024 10:31:50 +0800 Subject: [PATCH] 合同积分新增、查询、修改、审核、删除、导出 --- ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java | 159 +++++++++++++++++++++-------------------------------- 1 files changed, 63 insertions(+), 96 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 3439154..b6af342 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,9 +1,19 @@ package com.ycl.platform.domain.entity; -import annotation.Excel; +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 com.ycl.system.domain.TreeEntity; -import org.apache.commons.lang.builder.ToStringBuilder; -import org.apache.commons.lang.builder.ToStringStyle; +import com.ycl.system.domain.TreeNode; +import enumeration.converter.RuleDeductCategoryConverter; +import enumeration.general.RuleDeductCategoryEnum; +import lombok.Data; + +import java.util.Date; /** * 鍒嗘暟鏍哥畻瑙勫垯瀵硅薄 t_default_rule @@ -11,112 +21,69 @@ * @author ruoyi * @date 2024-04-01 */ -public class CalculateRule extends TreeEntity -{ +@Data +@ExcelIgnoreUnannotated +@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER) +@TableName("t_calculate_rule") +public class CalculateRule extends TreeNode { private static final long serialVersionUID = 1L; - /** 涓婚敭 */ + /** + * 涓婚敭 + */ + @ExcelProperty("搴忓彿") private Long id; - /** 瑙勫垯鍚嶇О */ - @Excel(name = "瑙勫垯鍚嶇О") + /** + * 鍚堝悓id + */ + private Integer contractId; + + /** + * 瑙勫垯鍚嶇О + */ + @ExcelProperty("鑰冩牳鍐呭") private String ruleName; - /** 鎵e噺鏂瑰紡 */ - @Excel(name = "鎵e噺鏂瑰紡") - private Long deductCategory; + /** + * 鍏宠仈涓婄骇id + */ + private Long parentId; - /** 浜哄伐鎵撳垎/绯荤粺鎵撳垎 */ - private Long deductWay; - - /** 瑙勫垯鎻忚堪 */ - @Excel(name = "瑙勫垯鎻忚堪") + /** + * 瑙勫垯鎻忚堪 + */ + @ExcelProperty("璇勫垽鏍囧噯") private String ruleDesc; - /** 瑙勫垯鐘舵�� */ - @Excel(name = "瑙勫垯鐘舵��") - private String ruleStatus; + /** + * 瑙勫垯鏉′欢 + */ + @ExcelProperty("鑰冩牳瑕佹眰") + private String ruleCondition; - /** 閫昏緫鍒犻櫎 */ - private String deleted; + /** + * 鎵e噺鏂瑰紡 鎵f寚瀹氬垎鏁�/鍒嗘暟涔樹互鏁伴噺/闄や互鏁伴噺鍚庝箻浠ュ垎鏁� + */ + @ExcelProperty(value = "鎵e垎鏂瑰紡", converter = RuleDeductCategoryConverter.class) + private RuleDeductCategoryEnum deductCategory; - public void setId(Long id) - { - this.id = id; - } + /** + * 鎵i櫎鍒嗘暟 + */ + @ExcelProperty("鎵e垎鏁板��") + private Double calcFraction; - public Long getId() - { - return id; - } - public void setRuleName(String ruleName) - { - this.ruleName = ruleName; - } + /** + * 褰撴柟寮忎负闄や互鏃讹紝闄や互褰撳墠瀛楁鏁伴噺 + */ + @ExcelProperty("闄や互鏁伴噺") + private Integer calcUnit; - public String getRuleName() - { - return ruleName; - } - public void setDeductCategory(Long deductCategory) - { - this.deductCategory = deductCategory; - } + private Date createTime; + private Date updateTime; - public Long getDeductCategory() - { - return deductCategory; - } - public void setDeductWay(Long deductWay) - { - this.deductWay = deductWay; - } + @TableLogic + private Integer deleted; - public Long getDeductWay() - { - return deductWay; - } - public void setRuleDesc(String ruleDesc) - { - this.ruleDesc = ruleDesc; - } - - public String getRuleDesc() - { - return ruleDesc; - } - public void setRuleStatus(String ruleStatus) - { - this.ruleStatus = ruleStatus; - } - - public String getRuleStatus() - { - return ruleStatus; - } - public void setDeleted(String deleted) - { - this.deleted = deleted; - } - - public String getDeleted() - { - return deleted; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("ruleName", getRuleName()) - .append("parentId", getParentId()) - .append("deductCategory", getDeductCategory()) - .append("deductWay", getDeductWay()) - .append("ruleDesc", getRuleDesc()) - .append("ruleStatus", getRuleStatus()) - .append("createTime", getCreateTime()) - .append("updateTime", getUpdateTime()) - .append("deleted", getDeleted()) - .toString(); - } } -- Gitblit v1.8.0