Commit c70f70a0 by 吕明尚

订单换房,生成保洁,当前房间正在使用中,不生成保洁

parent 15ebf20c
...@@ -154,7 +154,7 @@ public class SOrderVo ...@@ -154,7 +154,7 @@ public class SOrderVo
* 创建时间 * 创建时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
@Excel(name = "备注") @Excel(name = "备注")
......
...@@ -599,9 +599,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -599,9 +599,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
} }
// 判断原房间是否生成保洁 // 判断原房间是否生成保洁
if (dto.getIsClean().equals(YesNoEnum.yes.getIndex())) { if (dto.getIsClean().equals(YesNoEnum.yes.getIndex())) {
//判断当前房间是否使用中
//判断订单是否已经添加保洁记录 //判断订单是否已经添加保洁记录
SCleanRecords cleanRecords = isCleanRecordsService.lastCleanByRoomId(sOrder.getRoomId()); SCleanRecords cleanRecords = isCleanRecordsService.lastCleanByRoomId(sOrder.getRoomId());
if (ObjectUtil.isEmpty(cleanRecords) || cleanRecords.getStatus().equals(CleaningStatusEnum.CLEANED.getCode())) { if (ObjectUtil.isEmpty(getOne(new LambdaQueryWrapper<SOrder>().eq(SOrder::getRoomId, sOrder.getRoomId()).eq(SOrder::getStatus, OrderStatusEnum.INUSE.getCode()))) &&
(ObjectUtil.isEmpty(cleanRecords) || cleanRecords.getStatus().equals(CleaningStatusEnum.CLEANED.getCode()))) {
//房间添加保洁记录 //房间添加保洁记录
isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId()); isCleanRecordsService.addSCleanRecords(sOrder.getStoreId(), sOrder.getRoomId());
} }
......
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