设备修改定位字段名称,添加设备摘要

This commit is contained in:
kerwincui
2022-06-06 13:11:06 +08:00
parent c9a036043e
commit 24f2e65f2b
8 changed files with 85 additions and 40 deletions

View File

@@ -97,17 +97,28 @@ public class Device extends BaseEntity
private String imgUrl;
/** 是否自定义位置 **/
private Integer isCustomLocation;
private Integer locationWay;
/** 设备摘要 **/
private String summary;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
public Integer getIsCustomLocation() {
return isCustomLocation;
public String getSummary() {
return summary;
}
public void setIsCustomLocation(Integer isCustomLocation) {
this.isCustomLocation = isCustomLocation;
public void setSummary(String summary) {
this.summary = summary;
}
public Integer getlocationWay() {
return locationWay;
}
public void setlocationWay(Integer locationWay) {
this.locationWay = locationWay;
}
public String getImgUrl() {

View File

@@ -47,7 +47,7 @@ public class DeviceAllShortOutput
private Date activeTime;
/** 是否自定义位置 **/
private Integer isCustomLocation;
private Integer locationWay;
/** 设备地址 */
private String networkAddress;
@@ -82,12 +82,12 @@ public class DeviceAllShortOutput
this.latitude = latitude;
}
public Integer getIsCustomLocation() {
return isCustomLocation;
public Integer getlocationWay() {
return locationWay;
}
public void setIsCustomLocation(Integer isCustomLocation) {
this.isCustomLocation = isCustomLocation;
public void setlocationWay(Integer locationWay) {
this.locationWay = locationWay;
}
public Integer getIsShadow() {

View File

@@ -88,7 +88,7 @@ public class DeviceShortOutput
private Date activeTime;
/** 是否自定义位置 **/
private Integer isCustomLocation;
private Integer locationWay;
/** 图片地址 */
private String imgUrl;
@@ -101,12 +101,12 @@ public class DeviceShortOutput
private List<BoolModelOutput> boolList;
private List<ReadOnlyModelOutput> readOnlyList;
public Integer getIsCustomLocation() {
return isCustomLocation;
public Integer getlocationWay() {
return locationWay;
}
public void setIsCustomLocation(Integer isCustomLocation) {
this.isCustomLocation = isCustomLocation;
public void setlocationWay(Integer locationWay) {
this.locationWay = locationWay;
}
public String getImgUrl() {

View File

@@ -133,7 +133,7 @@ public class EmqxService {
device.setProductId(productId);
device.setSerialNumber(deviceNum);
// 未采用设备定位则清空定位,定位方式(1=ip自动定位2=设备定位3=自定义)
if(device.getIsCustomLocation()!=2){
if(device.getlocationWay()!=2){
device.setLatitude(null);
device.setLongitude(null);
}

View File

@@ -472,7 +472,7 @@ public class DeviceServiceImpl implements IDeviceService {
device.setActiveTime(DateUtils.getNowDate());
device.setIsShadow(0);
device.setRssi(0);
device.setIsCustomLocation(1); // 1-自动定位2-设备定位3-自定义位置
device.setlocationWay(1); // 1-自动定位2-设备定位3-自定义位置
device.setCreateTime(DateUtils.getNowDate());
device.setThingsModelValue(JSONObject.toJSONString(getThingsModelDefaultValue(device.getProductId())));
// 随机位置
@@ -609,7 +609,7 @@ public class DeviceServiceImpl implements IDeviceService {
device.setActiveTime(DateUtils.getNowDate());
}
// 定位方式(1=ip自动定位2=设备定位3=自定义)
if (device.getIsCustomLocation() == 1) {
if (device.getlocationWay() == 1) {
device.setNetworkIp(ipAddress);
setLocation(ipAddress, device);
}