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
package com.qianwen.smartman.modules.cps.convert;
 
import java.util.ArrayList;
import java.util.List;
import com.qianwen.smartman.modules.cps.entity.ProductionCalendar;
import com.qianwen.smartman.modules.cps.vo.CalendarSaveVO;
import com.qianwen.smartman.modules.cps.vo.CalendarSimpleVO;
import com.qianwen.smartman.modules.cps.vo.ProductionCalendarVO;
 
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/convert/ProductionCalendarConvertImpl.class */
public class ProductionCalendarConvertImpl implements ProductionCalendarConvert {
    @Override // org.springblade.modules.cps.convert.ProductionCalendarConvert
    public ProductionCalendarVO convert(ProductionCalendar db) {
        if (db == null) {
            return null;
        }
        ProductionCalendarVO productionCalendarVO = new ProductionCalendarVO();
        productionCalendarVO.setId(db.getId());
        productionCalendarVO.setCreateUser(db.getCreateUser());
        productionCalendarVO.setCreateDept(db.getCreateDept());
        productionCalendarVO.setCreateTime(db.getCreateTime());
        productionCalendarVO.setUpdateUser(db.getUpdateUser());
        productionCalendarVO.setUpdateTime(db.getUpdateTime());
        productionCalendarVO.setIsDeleted(db.getIsDeleted());
        productionCalendarVO.setCode(db.getCode());
        productionCalendarVO.setName(db.getName());
        productionCalendarVO.setYear(db.getYear());
        productionCalendarVO.setStatus(db.getStatus());
        productionCalendarVO.setTenantId(db.getTenantId());
        return productionCalendarVO;
    }
 
    @Override // org.springblade.modules.cps.convert.ProductionCalendarConvert
    public List<CalendarSimpleVO> convert(List<ProductionCalendar> db) {
        if (db == null) {
            return null;
        }
        List<CalendarSimpleVO> list = new ArrayList<>(db.size());
        for (ProductionCalendar productionCalendar : db) {
            list.add(productionCalendarToCalendarSimpleVO(productionCalendar));
        }
        return list;
    }
 
    @Override // org.springblade.modules.cps.convert.ProductionCalendarConvert
    public ProductionCalendar conver(CalendarSaveVO calendarSaveVO) {
        if (calendarSaveVO == null) {
            return null;
        }
        ProductionCalendar productionCalendar = new ProductionCalendar();
        productionCalendar.setCode(calendarSaveVO.getCode());
        productionCalendar.setName(calendarSaveVO.getName());
        productionCalendar.setYear(calendarSaveVO.getYear());
        productionCalendar.setStatus(calendarSaveVO.getStatus());
        return productionCalendar;
    }
 
    protected CalendarSimpleVO productionCalendarToCalendarSimpleVO(ProductionCalendar productionCalendar) {
        if (productionCalendar == null) {
            return null;
        }
        CalendarSimpleVO calendarSimpleVO = new CalendarSimpleVO();
        calendarSimpleVO.setId(productionCalendar.getId());
        calendarSimpleVO.setCode(productionCalendar.getCode());
        calendarSimpleVO.setName(productionCalendar.getName());
        calendarSimpleVO.setYear(productionCalendar.getYear());
        calendarSimpleVO.setStatus(productionCalendar.getStatus());
        return calendarSimpleVO;
    }
}