Commit 738d4efc by 吕明尚

房间增加保洁订单ID

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