DataAssessmentItemIdModel.java
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.skua.modules.assessment.model;
import com.skua.modules.assessment.entity.DataAssessmentItem;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 评分项表 封装树结构的评分项的名称的实体类
* @author 11389
*/
@Data
public class DataAssessmentItemIdModel implements Serializable {
private static final long serialVersionUID = 1L;
// 主键ID
private String key;
// 主键ID
private String value;
// 部门名称
private String title;
List<DataAssessmentItemIdModel> children = new ArrayList<>();
/**
* 将SysDepartTreeModel的部分数据放在该对象当中
* @param treeModel
* @return
*/
public DataAssessmentItemIdModel convert(DataAssessmentItemTreeModel treeModel) {
this.key = treeModel.getId();
this.value = treeModel.getId();
this.title = treeModel.getFillName();
return this;
}
/**
* 该方法为用户评分项的实现类所使用
* @param dataAssessmentItem
* @return
*/
public DataAssessmentItemIdModel convertByUserDepart(DataAssessmentItem dataAssessmentItem) {
this.key = dataAssessmentItem.getId();
this.value = dataAssessmentItem.getId();
this.title = dataAssessmentItem.getFillName();
return this;
}
}