yangys
2024-03-28 23a939ed820ee32f9a4309f9c81b7bab5a566f30
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
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.qianwen.smartman.modules.cps.convert;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.smartman.modules.cps.entity.WorkstationWorkbench;
import com.qianwen.smartman.modules.cps.vo.WorkstationWorkbenchVO;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/convert/WorkstationWorkbenchConvertImpl.class */
public class WorkstationWorkbenchConvertImpl implements WorkstationWorkbenchConvert {
    @Override // org.springblade.modules.cps.convert.WorkstationWorkbenchConvert
    public WorkstationWorkbench convert(WorkstationWorkbenchVO workbenchVO) {
        if (workbenchVO == null) {
            return null;
        }
        WorkstationWorkbench workstationWorkbench = new WorkstationWorkbench();
        workstationWorkbench.setId(workbenchVO.getId());
        workstationWorkbench.setIsDeleted(workbenchVO.getIsDeleted());
        workstationWorkbench.setWorkstationId(workbenchVO.getWorkstationId());
        workstationWorkbench.setSort(workbenchVO.getSort());
        workstationWorkbench.setName(workbenchVO.getName());
        workstationWorkbench.setWorkbenchDefault(workbenchVO.getWorkbenchDefault());
        return workstationWorkbench;
    }
 
    @Override // org.springblade.modules.cps.convert.WorkstationWorkbenchConvert
    public List<WorkstationWorkbench> convert(List<WorkstationWorkbenchVO> workbenchVOList) {
        if (workbenchVOList == null) {
            return null;
        }
        List<WorkstationWorkbench> list = new ArrayList<>(workbenchVOList.size());
        for (WorkstationWorkbenchVO workstationWorkbenchVO : workbenchVOList) {
            list.add(convert(workstationWorkbenchVO));
        }
        return list;
    }
 
    @Override // org.springblade.modules.cps.convert.WorkstationWorkbenchConvert
    public WorkstationWorkbenchVO convertToVO(WorkstationWorkbench workbench) {
        if (workbench == null) {
            return null;
        }
        WorkstationWorkbenchVO workstationWorkbenchVO = new WorkstationWorkbenchVO();
        workstationWorkbenchVO.setId(workbench.getId());
        workstationWorkbenchVO.setWorkstationId(workbench.getWorkstationId());
        workstationWorkbenchVO.setSort(workbench.getSort());
        workstationWorkbenchVO.setName(workbench.getName());
        workstationWorkbenchVO.setWorkbenchDefault(workbench.getWorkbenchDefault());
        workstationWorkbenchVO.setIsDeleted(workbench.getIsDeleted());
        return workstationWorkbenchVO;
    }
 
    @Override // org.springblade.modules.cps.convert.WorkstationWorkbenchConvert
    public List<WorkstationWorkbenchVO> convertToVO(List<WorkstationWorkbench> workbenchList) {
        if (workbenchList == null) {
            return null;
        }
        List<WorkstationWorkbenchVO> list = new ArrayList<>(workbenchList.size());
        for (WorkstationWorkbench workstationWorkbench : workbenchList) {
            list.add(convertToVO(workstationWorkbench));
        }
        return list;
    }
}