function isWithinTimeRange(startTime, endTime) {
	// 获取当前时间
	const now = new Date();
	const currentMinutes = now.getHours() * 60 + now.getMinutes();

	// 将传入的时间转换为分钟
	const [startHour, startMinute] = startTime.split(':').map(Number);
	const [endHour, endMinute] = endTime.split(':').map(Number);

	const startMinutes = startHour * 60 + startMinute;
	const endMinutes = endHour * 60 + endMinute;

	// 判断当前时间是否在指定范围内
	return currentMinutes >= startMinutes && currentMinutes <= endMinutes;
}

function getBoxReservation(boxList, reservationList) {
	var reservationSet = new Set(reservationList.map(item => item.box_sn));
	boxList = boxList.map(item => {
		var isReservation = reservationSet.has(item.box_sn);
		return {
			...item,
			isReservation
		};
	});
	console.log("仓体boxList",boxList)
	return boxList
}

module.exports = {
	isWithinTimeRange: isWithinTimeRange,
	getBoxReservation: getBoxReservation
};