|
@@ -0,0 +1,142 @@
|
|
|
+package com.github.zuihou.business.record.entity;
|
|
|
+
|
|
|
+import cn.afterturn.easypoi.excel.annotation.Excel;
|
|
|
+import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import com.github.zuihou.base.entity.Entity;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import javax.validation.constraints.NotEmpty;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+import org.hibernate.validator.constraints.Length;
|
|
|
+import org.hibernate.validator.constraints.Range;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import lombok.Builder;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.EqualsAndHashCode;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+import lombok.ToString;
|
|
|
+import lombok.experimental.Accessors;
|
|
|
+import com.github.zuihou.common.constant.DictionaryType;
|
|
|
+import static com.github.zuihou.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
|
|
|
+
|
|
|
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 实体类
|
|
|
+ *
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author zuihou
|
|
|
+ * @since 2022-08-15
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@NoArgsConstructor
|
|
|
+@ToString(callSuper = true)
|
|
|
+@EqualsAndHashCode(callSuper = true)
|
|
|
+@Accessors(chain = true)
|
|
|
+@TableName("bt_equ_record")
|
|
|
+@ApiModel(value = "EquRecord", description = "")
|
|
|
+@AllArgsConstructor
|
|
|
+public class EquRecord extends Entity<Long> {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 料筒ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "料筒ID")
|
|
|
+ @TableField("equ_id")
|
|
|
+ @Excel(name = "料筒ID")
|
|
|
+ private Long equId;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "")
|
|
|
+ @TableField("material_id")
|
|
|
+ @Excel(name = "")
|
|
|
+ private Long materialId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 当前原料
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "当前原料")
|
|
|
+ @NotEmpty(message = "当前原料不能为空")
|
|
|
+ @Length(max = 255, message = "当前原料长度不能超过255")
|
|
|
+ @TableField(value = "current_material", condition = LIKE)
|
|
|
+ @Excel(name = "当前原料")
|
|
|
+ private String currentMaterial;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 被换原料
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "被换原料")
|
|
|
+ @Length(max = 255, message = "被换原料长度不能超过255")
|
|
|
+ @TableField(value = "replace_material", condition = LIKE)
|
|
|
+ @Excel(name = "被换原料")
|
|
|
+ private String replaceMaterial;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 余量
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "余量")
|
|
|
+ @TableField("surplus")
|
|
|
+ @Excel(name = "余量")
|
|
|
+ private BigDecimal surplus;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 规格
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "规格")
|
|
|
+ @Length(max = 10, message = "规格长度不能超过10")
|
|
|
+ @TableField(value = "specs", condition = LIKE)
|
|
|
+ @Excel(name = "规格")
|
|
|
+ private BigDecimal specs;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "原料名称")
|
|
|
+ @Length(max = 255, message = "原料名称不能超过255")
|
|
|
+ @TableField(exist = false)
|
|
|
+ @Excel(name = "原料名称")
|
|
|
+ private String mtName;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "")
|
|
|
+ @Length(max = 20, message = "长度不能超过20")
|
|
|
+ @TableField(value = "date", condition = LIKE)
|
|
|
+ @Excel(name = "")
|
|
|
+ private String date;
|
|
|
+
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "替换原料名称")
|
|
|
+ @Length(max = 255, message = "替换原料不能超过255")
|
|
|
+ @TableField(exist = false)
|
|
|
+ @Excel(name = "替换原料名称")
|
|
|
+ private String mtrName;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "料筒编号")
|
|
|
+ @Length(max = 255, message = "料筒编号不能超过255")
|
|
|
+ @TableField(exist = false)
|
|
|
+ @Excel(name = "料筒编号")
|
|
|
+ private String barrelCode;
|
|
|
+
|
|
|
+
|
|
|
+ @Builder
|
|
|
+ public EquRecord(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
|
|
|
+ Long equId, Long materialId, String currentMaterial, String replaceMaterial, BigDecimal surplus,
|
|
|
+ BigDecimal specs, String date) {
|
|
|
+ this.id = id;
|
|
|
+ this.createTime = createTime;
|
|
|
+ this.createUser = createUser;
|
|
|
+ this.updateTime = updateTime;
|
|
|
+ this.updateUser = updateUser;
|
|
|
+ this.equId = equId;
|
|
|
+ this.materialId = materialId;
|
|
|
+ this.currentMaterial = currentMaterial;
|
|
|
+ this.replaceMaterial = replaceMaterial;
|
|
|
+ this.surplus = surplus;
|
|
|
+ this.specs = specs;
|
|
|
+ this.date = date;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|