zhaoxianglong
10 months ago
4 changed files with 94 additions and 9 deletions
@ -0,0 +1,44 @@ |
|||
package com.zc.business.entity; |
|||
|
|||
import com.zc.business.domain.DcDevice; |
|||
import com.zc.business.domain.DcStakeMark; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@Data |
|||
@ApiModel(value = "EntityDcDevice", description = "设备返回参数") |
|||
public class EntityDcDevice extends DcDevice { |
|||
|
|||
private String longitude; |
|||
private String latitude; |
|||
|
|||
public EntityDcDevice EstablishEntityDcDevice(DcDevice device, DcStakeMark dcStakeMark) { |
|||
EntityDcDevice entityDcDevice = new EntityDcDevice(); |
|||
|
|||
entityDcDevice.setId(device.getId()); |
|||
entityDcDevice.setIotDeviceId(device.getIotDeviceId()); |
|||
entityDcDevice.setGroupId(device.getGroupId()); |
|||
entityDcDevice.setProductId(device.getProductId()); |
|||
entityDcDevice.setStakeMarkId(device.getStakeMarkId()); |
|||
entityDcDevice.setDirection(device.getDirection()); |
|||
entityDcDevice.setDeviceCode(device.getDeviceCode()); |
|||
entityDcDevice.setDeviceName(device.getDeviceName()); |
|||
entityDcDevice.setDeviceType(device.getDeviceType()); |
|||
entityDcDevice.setInstallationDate(device.getInstallationDate()); |
|||
entityDcDevice.setProductionDate(device.getProductionDate()); |
|||
entityDcDevice.setDurableYears(device.getDurableYears()); |
|||
entityDcDevice.setInstallationSite(device.getInstallationSite()); |
|||
entityDcDevice.setUseState(device.getUseState()); |
|||
entityDcDevice.setOtherConfig(device.getOtherConfig()); |
|||
entityDcDevice.setRemark(device.getRemark()); |
|||
entityDcDevice.setCreateTime(device.getCreateTime()); |
|||
entityDcDevice.setUpdateTime(device.getUpdateTime()); |
|||
if (dcStakeMark != null) { |
|||
entityDcDevice.setLongitude(dcStakeMark.getLongitude()); |
|||
entityDcDevice.setLatitude(dcStakeMark.getLatitude()); |
|||
} |
|||
return entityDcDevice; |
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue