超市包装单位添加口味
This commit is contained in:
1 parent
7aba505038
commit
ac52106f60
4 files changed
+19
-13
No files matched your search
+13
-13
@@ -209,8 +209,8 @@ public class MeetingRoomController {
|
||||
LocalTime slotStart = LocalTime.parse(slot.getStartTime(), DateTimeFormatter.ofPattern("HH:mm"));
|
||||
LocalTime slotEnd = LocalTime.parse(slot.getEndTime(), DateTimeFormatter.ofPattern("HH:mm"));
|
||||
|
||||
// 修改判断逻辑:只要时间段有重叠就标记为已预约
|
||||
if (!(slotEnd.isBefore(bookingStart) || slotStart.isAfter(bookingEnd))) {
|
||||
// 修改判断逻辑:只有当时间段完全在预约时间范围内时才标记为已预约
|
||||
if (!slotStart.isBefore(bookingStart) && !slotEnd.isAfter(bookingEnd)) {
|
||||
slot.setStatus("booked");
|
||||
TimeSlotVo.BookedByVo bookedBy = new TimeSlotVo.BookedByVo();
|
||||
bookedBy.setUserId(String.valueOf(booking.getApplicantId()));
|
||||
@@ -222,12 +222,12 @@ public class MeetingRoomController {
|
||||
}
|
||||
|
||||
// 标记不可用的时间段(12:00-13:00 午休时间)
|
||||
for (TimeSlotVo slot : timeSlots) {
|
||||
LocalTime slotStart = LocalTime.parse(slot.getStartTime(), DateTimeFormatter.ofPattern("HH:mm"));
|
||||
if (slotStart.isAfter(LocalTime.of(11, 59)) && slotStart.isBefore(LocalTime.of(13, 0))) {
|
||||
slot.setStatus("disabled");
|
||||
}
|
||||
}
|
||||
// for (TimeSlotVo slot : timeSlots) {
|
||||
// LocalTime slotStart = LocalTime.parse(slot.getStartTime(), DateTimeFormatter.ofPattern("HH:mm"));
|
||||
// if (slotStart.isAfter(LocalTime.of(11, 59)) && slotStart.isBefore(LocalTime.of(13, 0))) {
|
||||
// slot.setStatus("disabled");
|
||||
// }
|
||||
// }
|
||||
|
||||
return R.ok(timeSlots);
|
||||
}
|
||||
@@ -265,10 +265,10 @@ public class MeetingRoomController {
|
||||
}
|
||||
|
||||
// 6. 验证是否在午休时间
|
||||
if ((startTime.isAfter(LocalTime.of(11, 59)) && startTime.isBefore(LocalTime.of(13, 0))) ||
|
||||
(endTime.isAfter(LocalTime.of(11, 59)) && endTime.isBefore(LocalTime.of(13, 0)))) {
|
||||
return R.failed("不能预约午休时间(12:00-13:00)");
|
||||
}
|
||||
// if ((startTime.isAfter(LocalTime.of(11, 59)) && startTime.isBefore(LocalTime.of(13, 0))) ||
|
||||
// (endTime.isAfter(LocalTime.of(11, 59)) && endTime.isBefore(LocalTime.of(13, 0)))) {
|
||||
// return R.failed("不能预约午休时间(12:00-13:00)");
|
||||
// }
|
||||
|
||||
// 7. 检查时间段是否已被预约
|
||||
List<MeetingBookingEntity> existingBookings = meetingBookingService.list(
|
||||
@@ -282,7 +282,7 @@ public class MeetingRoomController {
|
||||
LocalTime bookingStart = booking.getStartTime();
|
||||
LocalTime bookingEnd = booking.getEndTime();
|
||||
|
||||
// 修改判断逻辑:只要时间段有重叠就表示冲突
|
||||
// 修改判断逻辑:只要有任何重叠就表示冲突
|
||||
if (!(endTime.isBefore(bookingStart) || startTime.isAfter(bookingEnd))) {
|
||||
return R.failed("该时间段已被预约");
|
||||
}
|
||||
|
||||
+1
@@ -335,4 +335,5 @@ public class SmErpSpuEntity extends Model<SmErpSpuEntity> {
|
||||
@TableField(exist = false)
|
||||
private Integer inventoryLowerLimit;
|
||||
|
||||
|
||||
}
|
||||
+4
@@ -146,4 +146,8 @@ public class SmErpUnitEntity extends Model<SmErpUnitEntity> {
|
||||
|
||||
@Schema(description = "是否是基础库存,默认0否,1是")
|
||||
private Boolean isBase;
|
||||
|
||||
@Schema(description = "口味")
|
||||
private String taste;
|
||||
|
||||
}
|
||||
+1
@@ -22,6 +22,7 @@
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="isBase" column="is_base"/>
|
||||
<result property="taste" column="taste"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SupermarketUnitWithSpuVoMap" type="com.bsd.pjcloud.supermarket.vo.erp.SmErpUnitWithSpuVo">
|
||||
|
||||
Reference in new issue
Block a user