Commit 99488c83 by 吕明尚

自动增加保洁订单增加提示

parent b4be7beb
......@@ -209,6 +209,7 @@ public class RedisTask {
SOrder sOrder = sOrders.stream().filter(item -> item.getOrderNo().equals(jsonObject.getStr("orderNo"))).findFirst().orElse(null);
if (ObjectUtils.isEmpty(sOrder)) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在");
throw new BaseException("订单不存在!");
}
long expire = (expirationTime.getTime() - new Date().getTime()) / 1000;
......@@ -218,6 +219,7 @@ public class RedisTask {
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.RENEWAL_REMINDER1.getCode(),
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有15分钟");
//从门店集合中判断门店id相同的门店对象
// SStore sStore = sStoreList.stream().filter(item -> item.getId().equals(sOrder.getStoreId())).findFirst().orElse(null);
//从房间集合中判断房间id相同的房间对象
......@@ -237,6 +239,7 @@ public class RedisTask {
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.RENEWAL_REMINDER2.getCode(),
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有5分钟");
}
//判断是否过期
if (expirationTime.getTime() < new Date().getTime()) {
......@@ -267,7 +270,7 @@ public class RedisTask {
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
//延时3分钟断电
deviceOpService.openOrCloseDevice(sOrder.getRoomId(), sOrder.getConsumerPhone(), OpTypeEnum.CUT_ELECTRIC.getCode(), true, THREE_MINUTES);
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单已结束,更改订单状态为已使用");
}
});
......@@ -288,6 +291,7 @@ public class RedisTask {
//更改订单状态
sOrder.setStatus(OrderStatusEnum.USED.getCode());
isOrderService.updateById(sOrder);
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单已有续单,更改订单状态为已使用");
return true;
}
return false;
......
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