mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 17:05:55 +08:00
设备修改定位字段名称,添加设备摘要
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user