提交 8267e085 authored 作者: zhoushaopan's avatar zhoushaopan

feat(装备模块,3D模块): 抽取接口以及修改vo

抽取接口以及修改vo
上级 7f688260
...@@ -1305,16 +1305,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -1305,16 +1305,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
DeviceLibraryPosition deviceLibraryPosition = positionMap.getOrDefault(deviceLibrary.getId(),null); DeviceLibraryPosition deviceLibraryPosition = positionMap.getOrDefault(deviceLibrary.getId(),null);
if (deviceLibraryPosition != null){ if (deviceLibraryPosition != null){
//转换数据 //转换数据
if (deviceLibraryPosition.getDeviceLibraryPositionMessage() != null){ // if (deviceLibraryPosition.getDeviceLibraryPositionMessage() != null){
deviceLibraryPosition.setDeviceLibraryPositionMessageVo( // deviceLibraryPosition.setDeviceLibraryPositionMessageVo(
JacksonUtil.readValue(deviceLibraryPosition.getDeviceLibraryPositionMessage(), // JacksonUtil.readValue(deviceLibraryPosition.getDeviceLibraryPositionMessage(),
new com.fasterxml.jackson.core.type.TypeReference<DeviceLibraryPositionMessageVo>() {})); // new com.fasterxml.jackson.core.type.TypeReference<DeviceLibraryPositionMessageVo>() {}));
} // }
if (deviceLibraryPosition.getRotation() !=null){ // if (deviceLibraryPosition.getRotation() !=null){
deviceLibraryPosition.setRotationVo( // deviceLibraryPosition.setRotationVo(
JacksonUtil.readValue(deviceLibraryPosition.getRotation(), // JacksonUtil.readValue(deviceLibraryPosition.getRotation(),
new com.fasterxml.jackson.core.type.TypeReference<RotationVo>() {})); // new com.fasterxml.jackson.core.type.TypeReference<RotationVo>() {}));
} // }
toJson(deviceLibraryPosition);
} }
allVO.setDeviceLibraryPosition(deviceLibraryPosition); allVO.setDeviceLibraryPosition(deviceLibraryPosition);
allVOS.add(allVO); allVOS.add(allVO);
...@@ -1548,6 +1549,19 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -1548,6 +1549,19 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return list; return list;
} }
private void toJson(DeviceLibraryPosition deviceLibraryPosition){
if (deviceLibraryPosition.getDeviceLibraryPositionMessage() != null){
deviceLibraryPosition.setDeviceLibraryPositionMessageVo(
JacksonUtil.readValue(deviceLibraryPosition.getDeviceLibraryPositionMessage(),
new com.fasterxml.jackson.core.type.TypeReference<DeviceLibraryPositionMessageVo>() {}));
}
if (deviceLibraryPosition.getRotation() !=null){
deviceLibraryPosition.setRotationVo(
JacksonUtil.readValue(deviceLibraryPosition.getRotation(),
new com.fasterxml.jackson.core.type.TypeReference<RotationVo>() {}));
}
}
public List<DeviceLibrary> filterFields(List<DeviceLibrary> list,DeviceLibrarySelectVo params) throws Exception { public List<DeviceLibrary> filterFields(List<DeviceLibrary> list,DeviceLibrarySelectVo params) throws Exception {
Method[] methods = params.getClass().getMethods(); Method[] methods = params.getClass().getMethods();
// getUserName getPassWord // getUserName getPassWord
......
...@@ -39,50 +39,12 @@ public class DeviceLibraryPosition implements Serializable { ...@@ -39,50 +39,12 @@ public class DeviceLibraryPosition implements Serializable {
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT") @Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id; private Integer id;
// /**
// * 型号
// */
// @ApiModelProperty(value = "型号")
// private String model;
/** /**
* 装备的id * 装备的id
*/ */
@ApiModelProperty(value = "装备的id") @ApiModelProperty(value = "装备的id")
private Integer deviceId; private Integer deviceId;
// /**
// * 密级
// */
// @ApiModelProperty(value = "密级")
// private Integer secretLevel;
// /**
// * 装备名称
// */
// @ApiModelProperty(value = "装备名称")
// private String name;
//
// /**
// * 装备序列号
// */
// @ApiModelProperty(value = "装备序列号")
// private String seqNumber;
// /**
// * 生产序列号
// */
// @ApiModelProperty(value = "生产序列号")
// private String prodNumber;
// /**
// * rfid表面号
// */
// @ApiModelProperty(value = "rfid表面号")
// private String rfidSurfaceId;
// /**
// * rfid卡号
// */
// @ApiModelProperty(value = "rfid卡号")
// private String rfidCardId;
/** /**
* 创建用户id * 创建用户id
*/ */
...@@ -113,12 +75,6 @@ public class DeviceLibraryPosition implements Serializable { ...@@ -113,12 +75,6 @@ public class DeviceLibraryPosition implements Serializable {
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)") @ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0; private Integer deleteTag = 0;
// @ApiModelProperty(value = "库房位置",notes = "默认是库房")
// private String storageLocation;
//
// @ApiModelProperty(value = "装备存放位置Id",notes = "默认是库房")
// private Integer storageLocationId;
@ApiModelProperty(value = "DeviceLibraryPosition名称",notes = "") @ApiModelProperty(value = "DeviceLibraryPosition名称",notes = "")
private String deviceLibraryPositionName; private String deviceLibraryPositionName;
...@@ -155,12 +111,5 @@ public class DeviceLibraryPosition implements Serializable { ...@@ -155,12 +111,5 @@ public class DeviceLibraryPosition implements Serializable {
@Transient @Transient
private String typeName; private String typeName;
// public DeviceLibraryPosition setConfigName(){
// StoreCache storeCache=SpringUtils.getBean("initStoreCache");
// if (storeCache!=null) {
// setStorageLocation(storeCache.idToName(this.storageLocationId));
// }
// return this;
// }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论