package com.qianwen.smartman.modules.cps.convert;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
import com.qianwen.smartman.modules.cps.dto.WorkstationWcsDTO;
|
import com.qianwen.smartman.modules.cps.entity.WorkstationWcs;
|
import com.qianwen.smartman.modules.cps.vo.WorkstationWcsSaveVO;
|
import com.qianwen.smartman.modules.cps.vo.WorkstationWcsVO;
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/convert/WorkstationWcsConvertImpl.class */
|
public class WorkstationWcsConvertImpl implements WorkstationWcsConvert {
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public WorkstationWcs convert(WorkstationWcsSaveVO workstationWcsSaveVO) {
|
if (workstationWcsSaveVO == null) {
|
return null;
|
}
|
WorkstationWcs workstationWcs = new WorkstationWcs();
|
workstationWcs.setId(workstationWcsSaveVO.getId());
|
workstationWcs.setWorkstationId(workstationWcsSaveVO.getWorkstationId());
|
workstationWcs.setDataItem(workstationWcsSaveVO.getDataItem());
|
workstationWcs.setDataType(workstationWcsSaveVO.getDataType());
|
workstationWcs.setDmpVariablesId(workstationWcsSaveVO.getDmpVariablesId());
|
workstationWcs.setCollectSettingItem(workstationWcsSaveVO.getCollectSettingItem());
|
workstationWcs.setBigScreen(workstationWcsSaveVO.getBigScreen());
|
workstationWcs.setRealTimeData(workstationWcsSaveVO.getRealTimeData());
|
workstationWcs.setProcessParameter(workstationWcsSaveVO.getProcessParameter());
|
workstationWcs.setUsageId(workstationWcsSaveVO.getUsageId());
|
return workstationWcs;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public WorkstationWcsVO convertVO(WorkstationWcsSaveVO workstationWcsSaveVO) {
|
if (workstationWcsSaveVO == null) {
|
return null;
|
}
|
WorkstationWcsVO workstationWcsVO = new WorkstationWcsVO();
|
workstationWcsVO.setId(workstationWcsSaveVO.getId());
|
workstationWcsVO.setWorkstationId(workstationWcsSaveVO.getWorkstationId());
|
workstationWcsVO.setDataItem(workstationWcsSaveVO.getDataItem());
|
workstationWcsVO.setDataType(workstationWcsSaveVO.getDataType());
|
workstationWcsVO.setDmpVariablesId(workstationWcsSaveVO.getDmpVariablesId());
|
workstationWcsVO.setCollectSettingItem(workstationWcsSaveVO.getCollectSettingItem());
|
workstationWcsVO.setBigScreen(workstationWcsSaveVO.getBigScreen());
|
workstationWcsVO.setRealTimeData(workstationWcsSaveVO.getRealTimeData());
|
workstationWcsVO.setProcessParameter(workstationWcsSaveVO.getProcessParameter());
|
workstationWcsVO.setUsageId(workstationWcsSaveVO.getUsageId());
|
return workstationWcsVO;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public WorkstationWcsVO convertVO(WorkstationWcs workstationWcs) {
|
if (workstationWcs == null) {
|
return null;
|
}
|
WorkstationWcsVO workstationWcsVO = new WorkstationWcsVO();
|
workstationWcsVO.setId(workstationWcs.getId());
|
workstationWcsVO.setWorkstationId(workstationWcs.getWorkstationId());
|
workstationWcsVO.setDataItem(workstationWcs.getDataItem());
|
workstationWcsVO.setDataType(workstationWcs.getDataType());
|
workstationWcsVO.setDmpVariablesId(workstationWcs.getDmpVariablesId());
|
workstationWcsVO.setCollectSettingItem(workstationWcs.getCollectSettingItem());
|
workstationWcsVO.setBigScreen(workstationWcs.getBigScreen());
|
workstationWcsVO.setRealTimeData(workstationWcs.getRealTimeData());
|
workstationWcsVO.setProcessParameter(workstationWcs.getProcessParameter());
|
workstationWcsVO.setUsageId(workstationWcs.getUsageId());
|
return workstationWcsVO;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public WorkstationWcsSaveVO convert(WorkstationWcs workstationWcs) {
|
if (workstationWcs == null) {
|
return null;
|
}
|
WorkstationWcsSaveVO workstationWcsSaveVO = new WorkstationWcsSaveVO();
|
workstationWcsSaveVO.setId(workstationWcs.getId());
|
workstationWcsSaveVO.setWorkstationId(workstationWcs.getWorkstationId());
|
workstationWcsSaveVO.setDataItem(workstationWcs.getDataItem());
|
workstationWcsSaveVO.setDataType(workstationWcs.getDataType());
|
workstationWcsSaveVO.setDmpVariablesId(workstationWcs.getDmpVariablesId());
|
workstationWcsSaveVO.setCollectSettingItem(workstationWcs.getCollectSettingItem());
|
workstationWcsSaveVO.setBigScreen(workstationWcs.getBigScreen());
|
workstationWcsSaveVO.setRealTimeData(workstationWcs.getRealTimeData());
|
workstationWcsSaveVO.setProcessParameter(workstationWcs.getProcessParameter());
|
workstationWcsSaveVO.setUsageId(workstationWcs.getUsageId());
|
return workstationWcsSaveVO;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public List<WorkstationWcsVO> convert(List<WorkstationWcs> workstationWcsList) {
|
if (workstationWcsList == null) {
|
return null;
|
}
|
List<WorkstationWcsVO> list = new ArrayList<>(workstationWcsList.size());
|
for (WorkstationWcs workstationWcs : workstationWcsList) {
|
list.add(convertVO(workstationWcs));
|
}
|
return list;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public List<WorkstationWcs> convertVOToEntity(List<WorkstationWcsSaveVO> workstationWcsSaveVOList) {
|
if (workstationWcsSaveVOList == null) {
|
return null;
|
}
|
List<WorkstationWcs> list = new ArrayList<>(workstationWcsSaveVOList.size());
|
for (WorkstationWcsSaveVO workstationWcsSaveVO : workstationWcsSaveVOList) {
|
list.add(convert(workstationWcsSaveVO));
|
}
|
return list;
|
}
|
|
@Override // org.springblade.modules.cps.convert.WorkstationWcsConvert
|
public List<WorkstationWcsDTO> convertToDTOList(List<WorkstationWcs> workstationWcsList) {
|
if (workstationWcsList == null) {
|
return null;
|
}
|
List<WorkstationWcsDTO> list = new ArrayList<>(workstationWcsList.size());
|
for (WorkstationWcs workstationWcs : workstationWcsList) {
|
list.add(workstationWcsToWorkstationWcsDTO(workstationWcs));
|
}
|
return list;
|
}
|
|
protected WorkstationWcsDTO workstationWcsToWorkstationWcsDTO(WorkstationWcs workstationWcs) {
|
if (workstationWcs == null) {
|
return null;
|
}
|
WorkstationWcsDTO workstationWcsDTO = new WorkstationWcsDTO();
|
workstationWcsDTO.setId(workstationWcs.getId());
|
workstationWcsDTO.setWorkstationId(workstationWcs.getWorkstationId());
|
workstationWcsDTO.setDataItem(workstationWcs.getDataItem());
|
workstationWcsDTO.setDataType(workstationWcs.getDataType());
|
workstationWcsDTO.setDmpVariablesId(workstationWcs.getDmpVariablesId());
|
return workstationWcsDTO;
|
}
|
}
|