package com.qianwen.smartman.modules.tpm.convert; import java.util.ArrayList; import java.util.List; import com.qianwen.smartman.modules.cps.vo.MaintainPlanAddVO; import com.qianwen.smartman.modules.cps.vo.MaintainPlanUpdateVO; import com.qianwen.smartman.modules.tpm.entity.MaintainPlan; import com.qianwen.smartman.modules.tpm.vo.MaintainPlanVO; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/tpm/convert/MaintainPlanConvertImpl.class */ public class MaintainPlanConvertImpl implements MaintainPlanConvert { @Override // org.springblade.modules.tpm.convert.PageConvert public MaintainPlanVO convert(MaintainPlan Product) { if (Product == null) { return null; } MaintainPlanVO maintainPlanVO = new MaintainPlanVO(); maintainPlanVO.setId(Product.getId()); maintainPlanVO.setCode(Product.getCode()); maintainPlanVO.setDeviceId(Product.getDeviceId()); maintainPlanVO.setDeviceCode(Product.getDeviceCode()); maintainPlanVO.setDeviceName(Product.getDeviceName()); maintainPlanVO.setDeviceTypeId(Product.getDeviceTypeId()); maintainPlanVO.setDeviceTypeName(Product.getDeviceTypeName()); maintainPlanVO.setProjectId(Product.getProjectId()); maintainPlanVO.setProjectName(Product.getProjectName()); maintainPlanVO.setProjectCode(Product.getProjectCode()); maintainPlanVO.setMaintainDate(Product.getMaintainDate()); maintainPlanVO.setPreWarningDays(Product.getPreWarningDays()); maintainPlanVO.setPlanStatus(Product.getPlanStatus()); maintainPlanVO.setIsAuto(Product.getIsAuto()); maintainPlanVO.setIntervalTime(Product.getIntervalTime()); maintainPlanVO.setPreMaintainTime(Product.getPreMaintainTime()); maintainPlanVO.setMachineModel(Product.getMachineModel()); maintainPlanVO.setRemark(Product.getRemark()); maintainPlanVO.setMaintainNature(Product.getMaintainNature()); maintainPlanVO.setMaintainUserId(Product.getMaintainUserId()); maintainPlanVO.setMaintainUserName(Product.getMaintainUserName()); return maintainPlanVO; } @Override // org.springblade.modules.tpm.convert.PageConvert public List convert(List sources) { if (sources == null) { return null; } List list = new ArrayList<>(sources.size()); for (MaintainPlan maintainPlan : sources) { list.add(convert(maintainPlan)); } return list; } @Override // org.springblade.modules.tpm.convert.MaintainPlanConvert public MaintainPlan convert(MaintainPlanAddVO maintainPlanAddDTO) { if (maintainPlanAddDTO == null) { return null; } MaintainPlan maintainPlan = new MaintainPlan(); maintainPlan.setCode(maintainPlanAddDTO.getCode()); maintainPlan.setDeviceId(maintainPlanAddDTO.getDeviceId()); maintainPlan.setDeviceCode(maintainPlanAddDTO.getDeviceCode()); maintainPlan.setDeviceName(maintainPlanAddDTO.getDeviceName()); maintainPlan.setDeviceTypeId(maintainPlanAddDTO.getDeviceTypeId()); maintainPlan.setDeviceTypeName(maintainPlanAddDTO.getDeviceTypeName()); maintainPlan.setProjectName(maintainPlanAddDTO.getProjectName()); maintainPlan.setProjectCode(maintainPlanAddDTO.getProjectCode()); maintainPlan.setMaintainDate(maintainPlanAddDTO.getMaintainDate()); maintainPlan.setPreWarningDays(maintainPlanAddDTO.getPreWarningDays()); maintainPlan.setMachineModel(maintainPlanAddDTO.getMachineModel()); maintainPlan.setRemark(maintainPlanAddDTO.getRemark()); maintainPlan.setMaintainNature(maintainPlanAddDTO.getMaintainNature()); maintainPlan.setMaintainUserId(maintainPlanAddDTO.getMaintainUserId()); maintainPlan.setMaintainUserName(maintainPlanAddDTO.getMaintainUserName()); return maintainPlan; } @Override // org.springblade.modules.tpm.convert.MaintainPlanConvert public MaintainPlan convert(MaintainPlanUpdateVO maintainPlanUpdateDTO) { if (maintainPlanUpdateDTO == null) { return null; } MaintainPlan maintainPlan = new MaintainPlan(); maintainPlan.setId(maintainPlanUpdateDTO.getId()); maintainPlan.setCode(maintainPlanUpdateDTO.getCode()); maintainPlan.setDeviceId(maintainPlanUpdateDTO.getDeviceId()); maintainPlan.setDeviceCode(maintainPlanUpdateDTO.getDeviceCode()); maintainPlan.setDeviceName(maintainPlanUpdateDTO.getDeviceName()); maintainPlan.setDeviceTypeId(maintainPlanUpdateDTO.getDeviceTypeId()); maintainPlan.setDeviceTypeName(maintainPlanUpdateDTO.getDeviceTypeName()); maintainPlan.setProjectId(maintainPlanUpdateDTO.getProjectId()); maintainPlan.setProjectName(maintainPlanUpdateDTO.getProjectName()); maintainPlan.setProjectCode(maintainPlanUpdateDTO.getProjectCode()); maintainPlan.setMaintainDate(maintainPlanUpdateDTO.getMaintainDate()); maintainPlan.setPreWarningDays(maintainPlanUpdateDTO.getPreWarningDays()); maintainPlan.setPlanStatus(maintainPlanUpdateDTO.getPlanStatus()); maintainPlan.setIsAuto(maintainPlanUpdateDTO.getIsAuto()); maintainPlan.setIntervalTime(maintainPlanUpdateDTO.getIntervalTime()); maintainPlan.setPreMaintainTime(maintainPlanUpdateDTO.getPreMaintainTime()); maintainPlan.setMachineModel(maintainPlanUpdateDTO.getMachineModel()); maintainPlan.setRemark(maintainPlanUpdateDTO.getRemark()); maintainPlan.setMaintainNature(maintainPlanUpdateDTO.getMaintainNature()); maintainPlan.setMaintainUserId(maintainPlanUpdateDTO.getMaintainUserId()); maintainPlan.setMaintainUserName(maintainPlanUpdateDTO.getMaintainUserName()); return maintainPlan; } }