package org.jeecg.modules.system.model;
|
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
import lombok.experimental.Accessors;
|
import org.jeecg.modules.system.entity.MdcProduction;
|
|
import java.io.Serializable;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* 产线表 封装树结构的产线的名称的实体类
|
*
|
* @author: LiuS
|
* @create: 2023-03-23 15:15
|
*/
|
@Data
|
@EqualsAndHashCode(callSuper = false)
|
@Accessors(chain = true)
|
public class ProductionIdModel implements Serializable {
|
|
private static final long serialVersionUID = 6403075134223338239L;
|
|
/**
|
* 主键ID
|
*/
|
private String key;
|
|
/**
|
* 主键ID
|
*/
|
private String value;
|
|
/**
|
* 产线名称
|
*/
|
private String title;
|
|
List<ProductionIdModel> children = new ArrayList<>();
|
|
/**
|
* 将MdcProductionTreeModel的部分数据放在该对象当中
|
*
|
* @param treeModel
|
* @return
|
*/
|
public ProductionIdModel convert(MdcProductionTreeModel treeModel) {
|
this.key = treeModel.getId();
|
this.value = treeModel.getId();
|
this.title = treeModel.getProductionName();
|
return this;
|
}
|
|
/**
|
* 该方法为用户产线的实现类所使用
|
*
|
* @return
|
*/
|
public ProductionIdModel convertByUserProduction(MdcProduction mdcProduction) {
|
this.key = mdcProduction.getId();
|
this.value = mdcProduction.getId();
|
this.title = mdcProduction.getProductionName();
|
return this;
|
}
|
}
|