|
@@ -14,7 +14,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
|
/**
|
|
|
* 路牌 设备消息处理
|
|
@@ -50,7 +49,7 @@ public class LpHandlers {
|
|
|
lpInfoStateService.save(remote);
|
|
|
return;
|
|
|
}
|
|
|
- setWakeAndThreshLp(openNum, dbDevice, device);
|
|
|
+ setWakeAndThreshLp(openNum, local, remote);
|
|
|
//更新数据库设备状态信息
|
|
|
lpInfoStateService.update(remote, new QueryWrapper<LpInfoState>().eq("open_num", openNum));
|
|
|
} catch (Exception e) {
|
|
@@ -64,6 +63,8 @@ public class LpHandlers {
|
|
|
public void deviceLocationHandler(String openNum, MqttDTO mqttDTO) {
|
|
|
try {
|
|
|
LpInfoState device = TransformEntity.tsf2LpInfoState(openNum, mqttDTO);
|
|
|
+ //收到定位信息,修改状态为0
|
|
|
+ device.setUpdateLocationFlag(0);
|
|
|
// 更新数据库设备状态信息
|
|
|
lpInfoStateService.update(device, new QueryWrapper<LpInfoState>().eq("open_num", openNum));
|
|
|
} catch (Exception e) {
|
|
@@ -94,7 +95,5 @@ public class LpHandlers {
|
|
|
//是否需要更新数据
|
|
|
dto.setSetf((dto.getWakeInt() != null || dto.getThresh() != null) ? Constant.STATUS.TRUE : Constant.STATUS.FALSE);
|
|
|
postMqttMsgService.setWakeAndThreshLp(dto);
|
|
|
- //不管有没有更新,都设置为不需要在更新位置信息了
|
|
|
- remote.setUpdateLocationFlag(0);
|
|
|
}
|
|
|
}
|