Commit 738d4efc by 吕明尚

房间增加保洁订单ID

parent c7165d9d
...@@ -101,6 +101,12 @@ public class SRoom extends BaseEntity ...@@ -101,6 +101,12 @@ public class SRoom extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private Integer recordsStatus; private Integer recordsStatus;
/**
* 保洁订单ID
*/
@TableField(exist = false)
private Long recordsId;
} }
...@@ -281,17 +281,21 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme ...@@ -281,17 +281,21 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
storeList.add(sStoreMapper.selectById(item)); storeList.add(sStoreMapper.selectById(item));
}); });
storeList.forEach(item -> { storeList.forEach(item -> {
item.setRoolList(sRoomService.selectSroomListByStroeId(item.getId())); List<SRoom> sRooms = sRoomService.selectSroomListByStroeId(item.getId());
item.getRoolList().forEach(room -> { if (CollectionUtils.isNotEmpty(sRooms)) {
LambdaQueryWrapper<SCleanRecords> queryWrapper = new LambdaQueryWrapper<>(); item.setRoolList(sRoomService.selectSroomListByStroeId(item.getId()));
queryWrapper.eq(SCleanRecords::getRoomId, room.getId()); item.getRoolList().forEach(room -> {
queryWrapper.eq(SCleanRecords::getStoreId, item.getId()); LambdaQueryWrapper<SCleanRecords> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ne(SCleanRecords::getStatus, 2); queryWrapper.eq(SCleanRecords::getRoomId, room.getId());
SCleanRecords sCleanRecords = sCleanRecordsMapper.selectOne(queryWrapper); queryWrapper.eq(SCleanRecords::getStoreId, item.getId());
if (ObjectUtils.isNotEmpty(sCleanRecords)) { queryWrapper.ne(SCleanRecords::getStatus, 2);
room.setRecordsStatus(sCleanRecords.getStatus()); SCleanRecords sCleanRecords = sCleanRecordsMapper.selectOne(queryWrapper);
} if (ObjectUtils.isNotEmpty(sCleanRecords)) {
}); room.setRecordsStatus(sCleanRecords.getStatus());
room.setRecordsId(sCleanRecords.getId());
}
});
}
}); });
return storeList; return storeList;
} }
......
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