skyouc
7 天以前 830db9a372955f1c85ab020d2e12e273570dca87
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/SerialRule.java
@@ -4,6 +4,9 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vincent.rsf.server.system.service.DictDataService;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
@@ -92,7 +95,6 @@
     * 是否删除 1: 是  0: 否  
     */
    @ApiModelProperty(value= "是否删除 1: 是  0: 否  ")
    @TableLogic
    private Integer deleted;
    /**
@@ -112,6 +114,7 @@
     */
    @ApiModelProperty(value= "添加时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
@@ -125,6 +128,7 @@
     */
    @ApiModelProperty(value= "修改时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
@@ -153,36 +157,15 @@
        this.memo = memo;
    }
//    SerialRule serialRule = new SerialRule(
//            null,    // 编号
//            null,    // 名称
//            null,    // 分隔符
//            null,    // 序号重置规则[非空]
//            null,    // 重置依赖
//            null,    // 当前值
//            null,    // 最近生成编码
//            null,    // 状态[非空]
//            null,    // 是否删除[非空]
//            null,    // 租户
//            null,    // 添加人员
//            null,    // 添加时间[非空]
//            null,    // 修改人员
//            null,    // 修改时间[非空]
//            null    // 备注
//    );
    public String getReset$(){
        if (null == this.reset){ return null; }
        switch (this.reset){
            case "year":
                return " 年";
            case  "month":
                return " 月";
            case  "day":
                return " 天";
            default:
                return String.valueOf(this.reset);
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode,"sys_rule_type").eq(DictData::getValue, this.reset));
        if (null != dictData){
            return dictData.getLabel();
        }
        return String.valueOf(this.reset);
    }
    public String getStatus$(){