|
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -64,7 +65,12 @@ public class MqttHearbeatService {
|
|
|
if(!DeviceStatusEnum.OFFLINE.getValue().equals(careDevice.getStatus())){
|
|
|
log.info("设备在线离线轮训:id={},code={},设置为离线",careDevice.getId(),careDevice.getDevCode());
|
|
|
UpdateWrapper<CareDevice> deviceUpdateWrapper = new UpdateWrapper<>();
|
|
|
- deviceUpdateWrapper.lambda().set(CareDevice::getStatus,DeviceStatusEnum.OFFLINE.getValue()).eq(CareDevice::getId,careDevice.getId());
|
|
|
+ deviceUpdateWrapper.lambda().set(CareDevice::getStatus,DeviceStatusEnum.OFFLINE.getValue())
|
|
|
+ .set(CareDevice::getMoveStatus,DeviceMoveStateEnum.NONE.getValue())
|
|
|
+ .set(CareDevice::getInbedStatus,DeviceInbedStateEnum.OUTBED.getValue())
|
|
|
+ .set(CareDevice::getModifyTime,new Date())
|
|
|
+ .eq(CareDevice::getId,careDevice.getId())
|
|
|
+ ;
|
|
|
this.careDeviceService.update(deviceUpdateWrapper);
|
|
|
}
|
|
|
}
|