package com.dy.pmsGlobal.pojoPr;
|
|
import com.alibaba.excel.util.StringUtils;
|
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.dy.common.po.BaseEntity;
|
import jakarta.validation.constraints.AssertTrue;
|
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotNull;
|
import lombok.*;
|
|
/**
|
* 生产节点表
|
* @TableName pr_production_node
|
*/
|
@TableName(value="pr_production_node", autoResultMap = true)
|
@Data
|
@Builder
|
@ToString
|
@NoArgsConstructor
|
@AllArgsConstructor
|
public class PrProductionNode implements BaseEntity {
|
/**
|
*
|
*/
|
@JSONField(serializeUsing= ObjectWriterImplToString.class)
|
@TableId
|
public Long id;
|
|
/**
|
* 流程编号
|
*/
|
@JSONField(serializeUsing= ObjectWriterImplToString.class)
|
public Long processId;
|
|
/**
|
* 排序
|
*/
|
@NotNull(message = "节点顺序不能为空")
|
public Integer sort;
|
|
/**
|
* 节点作业内容
|
*/
|
@NotEmpty(message = "请输入节点作业内容")
|
public String content;
|
|
/**
|
* 排序
|
*/
|
@NotNull(message = "节点类型不能为空")
|
public Integer nodeType;
|
|
/**
|
* 是否开始节点,1是,0否
|
*/
|
@NotNull(message = "请选择是否生产开始")
|
public Boolean isStart;
|
|
/**
|
* 是否结束节点,1是,0否
|
*/
|
@NotNull(message = "请选择是否生产结束")
|
public Boolean isEnd;
|
|
/**
|
* 是否记录设备周期,1是,0否
|
*/
|
@NotNull(message = "请选择是否记录设备周期")
|
public Boolean isRecord;
|
|
/**
|
* 记录设备周期内容
|
*/
|
public String equipCycleContent;
|
|
@AssertTrue(message = "请输入记录设备周期内容")
|
public boolean isEquipCycleContentValid() {
|
return !isRecord || (isRecord && StringUtils.isNotBlank(equipCycleContent));
|
}
|
|
/**
|
* 是否删除,1是,0否
|
*/
|
public Boolean deleted;
|
|
/**
|
* 备注
|
*/
|
public String remark;
|
|
@TableField(exist = false)
|
public PrWorkingInstruction instruction;
|
|
}
|