|  |  | 
 |  |  | package com.vincent.rsf.server.system.entity; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
 |  |  | import com.baomidou.mybatisplus.annotation.*; | 
 |  |  |  | 
 |  |  | 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; | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | 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 io.swagger.annotations.ApiModel; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @Accessors(chain = true) | 
 |  |  | @TableName("sys_serial_rule") | 
 |  |  | public class SerialRule implements Serializable { | 
 |  |  |  | 
 |  |  | 
 |  |  |      * 当前值 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value= "当前值") | 
 |  |  |     private String currValue; | 
 |  |  |     private Integer currValue; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 最近生成编码 | 
 |  |  | 
 |  |  |     @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
 |  |  |     private Integer status; | 
 |  |  |  | 
 |  |  |     @ApiModelProperty(value = "流水号最大长度") | 
 |  |  |     private Integer maxLen; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 是否删除 1: 是  0: 否   | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
 |  |  |     @TableLogic | 
 |  |  |     private Integer deleted; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value= "添加时间") | 
 |  |  |     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
 |  |  |     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 
 |  |  |     private Date createTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value= "修改时间") | 
 |  |  |     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
 |  |  |     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 
 |  |  |     private Date updateTime; | 
 |  |  |  | 
 |  |  |     @Version | 
 |  |  |     private Integer sVersion; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 备注 | 
 |  |  | 
 |  |  |  | 
 |  |  |     public SerialRule() {} | 
 |  |  |  | 
 |  |  |     public SerialRule(String code,String name,String delimit,String reset,String resetDep,String currValue,String lastCode,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
 |  |  |     public SerialRule(String code,String name,String delimit,String reset,String resetDep,Integer currValue,String lastCode,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
 |  |  |         this.code = code; | 
 |  |  |         this.name = name; | 
 |  |  |         this.delimit = delimit; | 
 |  |  | 
 |  |  |         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$(){ |