|
@@ -0,0 +1,168 @@
|
|
|
+package com.warewms.hailiang.domain;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import java.io.Serializable;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+
|
|
|
+ * 生产追溯表
|
|
|
+ * @TableName retroactive_now
|
|
|
+ */
|
|
|
+@TableName(value ="retroactive_now")
|
|
|
+@Data
|
|
|
+@NoArgsConstructor
|
|
|
+public class RetroactiveNow implements Serializable {
|
|
|
+
|
|
|
+ * 追溯id
|
|
|
+ */
|
|
|
+ @TableId
|
|
|
+ private String retroactiveId;
|
|
|
+
|
|
|
+
|
|
|
+ * 产线
|
|
|
+ */
|
|
|
+ private String productionLine;
|
|
|
+
|
|
|
+
|
|
|
+ * 批次号
|
|
|
+ */
|
|
|
+ private String batchNo;
|
|
|
+
|
|
|
+
|
|
|
+ * 托盘号
|
|
|
+ */
|
|
|
+ private String lotNo;
|
|
|
+
|
|
|
+
|
|
|
+ * 重量
|
|
|
+ */
|
|
|
+ private Double weight;
|
|
|
+
|
|
|
+
|
|
|
+ * 生产状态
|
|
|
+ */
|
|
|
+ private String status;
|
|
|
+
|
|
|
+
|
|
|
+ * 设备编号
|
|
|
+ */
|
|
|
+ private String deviceId;
|
|
|
+
|
|
|
+
|
|
|
+ * 创建者
|
|
|
+ */
|
|
|
+ private String createBy;
|
|
|
+
|
|
|
+
|
|
|
+ * 创建时间
|
|
|
+ */
|
|
|
+ private LocalDateTime createTime;
|
|
|
+
|
|
|
+
|
|
|
+ * 更新者
|
|
|
+ */
|
|
|
+ private String updateBy;
|
|
|
+
|
|
|
+
|
|
|
+ * 更新时间
|
|
|
+ */
|
|
|
+ private LocalDateTime updateTime;
|
|
|
+
|
|
|
+
|
|
|
+ * 备注
|
|
|
+ */
|
|
|
+ private String remark;
|
|
|
+
|
|
|
+ @TableField(exist = false)
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (this == that) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (that == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (getClass() != that.getClass()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ RetroactiveHistory other = (RetroactiveHistory) that;
|
|
|
+ return (this.getRetroactiveId() == null ? other.getRetroactiveId() == null : this.getRetroactiveId().equals(other.getRetroactiveId()))
|
|
|
+ && (this.getProductionLine() == null ? other.getProductionLine() == null : this.getProductionLine().equals(other.getProductionLine()))
|
|
|
+ && (this.getBatchNo() == null ? other.getBatchNo() == null : this.getBatchNo().equals(other.getBatchNo()))
|
|
|
+ && (this.getLotNo() == null ? other.getLotNo() == null : this.getLotNo().equals(other.getLotNo()))
|
|
|
+ && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
|
|
|
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
|
|
+ && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
|
|
|
+ && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
|
|
|
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
|
|
+ && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
|
|
|
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
|
|
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getRetroactiveId() == null) ? 0 : getRetroactiveId().hashCode());
|
|
|
+ result = prime * result + ((getProductionLine() == null) ? 0 : getProductionLine().hashCode());
|
|
|
+ result = prime * result + ((getBatchNo() == null) ? 0 : getBatchNo().hashCode());
|
|
|
+ result = prime * result + ((getLotNo() == null) ? 0 : getLotNo().hashCode());
|
|
|
+ result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
|
|
|
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
|
|
+ result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
|
|
|
+ result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
|
|
|
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
|
|
+ result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
|
|
|
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
|
|
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append(getClass().getSimpleName());
|
|
|
+ sb.append(" [");
|
|
|
+ sb.append("Hash = ").append(hashCode());
|
|
|
+ sb.append(", retroactiveId=").append(retroactiveId);
|
|
|
+ sb.append(", productionLine=").append(productionLine);
|
|
|
+ sb.append(", batchNo=").append(batchNo);
|
|
|
+ sb.append(", lotNo=").append(lotNo);
|
|
|
+ sb.append(", weight=").append(weight);
|
|
|
+ sb.append(", status=").append(status);
|
|
|
+ sb.append(", deviceId=").append(deviceId);
|
|
|
+ sb.append(", createBy=").append(createBy);
|
|
|
+ sb.append(", createTime=").append(createTime);
|
|
|
+ sb.append(", updateBy=").append(updateBy);
|
|
|
+ sb.append(", updateTime=").append(updateTime);
|
|
|
+ sb.append(", remark=").append(remark);
|
|
|
+ sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ *
|
|
|
+ * @param weight 重量
|
|
|
+ * @param batchNo 批次号
|
|
|
+ * @param productionLine 产线
|
|
|
+ */
|
|
|
+ public RetroactiveNow(Double weight,String batchNo,String productionLine) {
|
|
|
+ this.weight = weight;
|
|
|
+ this.batchNo = batchNo;
|
|
|
+ this.productionLine = productionLine;
|
|
|
+ this.retroactiveId = new StringBuilder()
|
|
|
+ .append(productionLine).append("_")
|
|
|
+ .append(batchNo)
|
|
|
+ .append("_")
|
|
|
+ .append(String.valueOf(weight).split("\\.")[0]).toString();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|