Commit 63567dc5 by YG8999

退款生成保洁判断是否存在未保洁任务

parent 6d26dbad
...@@ -394,8 +394,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -394,8 +394,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
} }
// 是否生成保洁 // 是否生成保洁
if (request.getIsClean().equals(YesNoEnum.yes.getIndex())) { if (request.getIsClean().equals(YesNoEnum.yes.getIndex())) {
//房间添加保洁记录 //判断订单是否已经添加保洁记录
boolean b = isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId()); SCleanRecords cleanRecords = isCleanRecordsService.lastCleanByRoomId(sOrder.getRoomId());
if(cleanRecords != null && cleanRecords.getStatus().equals(CleaningStatusEnum.CLEANED.getCode())) {
//房间添加保洁记录
boolean b = isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId());
}
} }
if (sOrder.getStatus().equals(OrderStatusEnum.INUSE.getCode())) { if (sOrder.getStatus().equals(OrderStatusEnum.INUSE.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