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
64
65
66
67
68
69
70
71
72
73
74
75
package com.qianwen.smartman.modules.cps.convert;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.smartman.modules.cps.entity.MalfunctionType;
import com.qianwen.smartman.modules.cps.excel.MalfunctionTypeExcel;
import com.qianwen.smartman.modules.cps.excel.MalfunctionTypeImport;
import com.qianwen.smartman.modules.cps.vo.MalfunctionTypeVO;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/convert/MalfunctionTypeConvertImpl.class */
public class MalfunctionTypeConvertImpl implements MalfunctionTypeConvert {
    @Override // org.springblade.modules.cps.convert.MalfunctionTypeConvert
    public MalfunctionType convert(MalfunctionTypeVO malfunctionTypeVO) {
        if (malfunctionTypeVO == null) {
            return null;
        }
        MalfunctionType malfunctionType = new MalfunctionType();
        malfunctionType.setId(malfunctionTypeVO.getId());
        malfunctionType.setStatus(malfunctionTypeVO.getStatus());
        malfunctionType.setCode(malfunctionTypeVO.getCode());
        malfunctionType.setName(malfunctionTypeVO.getName());
        malfunctionType.setRemark(malfunctionTypeVO.getRemark());
        return malfunctionType;
    }
 
    @Override // org.springblade.modules.cps.convert.MalfunctionTypeConvert
    public MalfunctionTypeVO convert(MalfunctionType malfunctionType) {
        if (malfunctionType == null) {
            return null;
        }
        MalfunctionTypeVO malfunctionTypeVO = new MalfunctionTypeVO();
        malfunctionTypeVO.setId(malfunctionType.getId());
        malfunctionTypeVO.setCode(malfunctionType.getCode());
        malfunctionTypeVO.setName(malfunctionType.getName());
        malfunctionTypeVO.setRemark(malfunctionType.getRemark());
        malfunctionTypeVO.setStatus(malfunctionType.getStatus());
        return malfunctionTypeVO;
    }
 
    @Override // org.springblade.modules.cps.convert.MalfunctionTypeConvert
    public MalfunctionType convert(MalfunctionTypeImport x) {
        if (x == null) {
            return null;
        }
        MalfunctionType malfunctionType = new MalfunctionType();
        malfunctionType.setCode(x.getCode());
        malfunctionType.setName(x.getName());
        malfunctionType.setRemark(x.getRemark());
        return malfunctionType;
    }
 
    @Override // org.springblade.modules.cps.convert.MalfunctionTypeConvert
    public List<MalfunctionTypeVO> convert(List<MalfunctionType> malfunctionTypeList) {
        if (malfunctionTypeList == null) {
            return null;
        }
        List<MalfunctionTypeVO> list = new ArrayList<>(malfunctionTypeList.size());
        for (MalfunctionType malfunctionType : malfunctionTypeList) {
            list.add(convert(malfunctionType));
        }
        return list;
    }
 
    @Override // org.springblade.modules.cps.convert.MalfunctionTypeConvert
    public MalfunctionTypeExcel convertToExcel(MalfunctionTypeVO malfunctionTypeVO) {
        if (malfunctionTypeVO == null) {
            return null;
        }
        MalfunctionTypeExcel malfunctionTypeExcel = new MalfunctionTypeExcel();
        malfunctionTypeExcel.setCode(malfunctionTypeVO.getCode());
        malfunctionTypeExcel.setName(malfunctionTypeVO.getName());
        malfunctionTypeExcel.setRemark(malfunctionTypeVO.getRemark());
        return malfunctionTypeExcel;
    }
}