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 convert(List malfunctionTypeList) { if (malfunctionTypeList == null) { return null; } List 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; } }