3 changed files with 65 additions and 8 deletions
-
19src/main/java/com/iflytop/colortitration/app/controller/PositionController.java
-
39src/main/java/com/iflytop/colortitration/app/model/vo/DevicePositionVO.java
-
15src/main/java/com/iflytop/colortitration/common/service/PositionService.java
@ -0,0 +1,39 @@ |
|||||
|
package com.iflytop.colortitration.app.model.vo; |
||||
|
|
||||
|
import com.iflytop.colortitration.app.common.enums.DevicePositionCode; |
||||
|
import com.iflytop.colortitration.common.model.entity.Position; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 设备位置记录 的展示视图 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@Schema(description = "设备位置记录") |
||||
|
public class DevicePositionVO { |
||||
|
|
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "位置名称") |
||||
|
private String name; |
||||
|
|
||||
|
@Schema(description = "位置代码") |
||||
|
private DevicePositionCode code; |
||||
|
|
||||
|
@Schema(description = "位置类型") |
||||
|
private String type; |
||||
|
|
||||
|
@Schema(description = "位置数据") |
||||
|
private String position; |
||||
|
|
||||
|
public DevicePositionVO(Position position) { |
||||
|
this.id = position.getId(); |
||||
|
this.name = position.getName(); |
||||
|
this.code = DevicePositionCode.valueOf(position.getCode()); |
||||
|
this.type = position.getType(); |
||||
|
this.position = position.getPosition(); |
||||
|
} |
||||
|
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue