Commit 937c7882 by wuwenlong

订单完成,修改房间状态为脏房,生成保洁判断是否存在待保洁的保洁任务,如果不存在则生成保洁任务

parent bf6d268c
......@@ -24,10 +24,7 @@ import share.common.constant.MqttConstants;
import share.common.core.redis.RedisUtil;
import share.common.enums.*;
import share.common.exception.base.BaseException;
import share.system.domain.SConsumerCoupon;
import share.system.domain.SOrder;
import share.system.domain.SRoom;
import share.system.domain.SStore;
import share.system.domain.*;
import share.system.domain.vo.MqttxVo;
import share.system.service.*;
......@@ -274,11 +271,15 @@ public class RedisTask {
SRoom room = roomService.getById(sOrder.getRoomId());
if (ObjectUtil.isNotEmpty(room)) {
room.setStatus(RoomStatusEnum.FREE.getValue());
room.setIsDirtyRoom(YesNoEnum.yes.getIndex());
room.setUpdateTime(new Date());
roomService.updateById(room);
}
//判断订单是否已经添加保洁记录
boolean b = isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId());
SCleanRecords cleanRecords = isCleanRecordsService.lastCleanByRoomId(sOrder.getRoomId());
if(cleanRecords.getStatus().compareTo(CleaningStatusEnum.UNCLEAN.getCode())!=0) {
boolean b = isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId());
}
//删除redis中的值
redisUtil.delete(o);
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getCode(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment