zhuyifan

feat(order): 新增忌口备注字段并支持更新

- 在 ClientCustomerOrderService.proto 中新增忌口备注字段 avoidRemark
- 在 KdsDTO 中增加 mealTime 字段用于指定查询日期- 修改 KdsServiceImpl 中获取订单逻辑,使用 mealTime 替代当前日期
- 在 OrderDbDTO 中添加 avoidRemark 字段以存储忌口信息
- 更新 OrderServiceImpl 映射逻辑,包含 avoidRemark 字段
- 在 OrderServiceRpcClient 中实现 avoidRemark 的更新逻辑
...@@ -97,6 +97,7 @@ public class KdsDTO { ...@@ -97,6 +97,7 @@ public class KdsDTO {
97 public static class KdsOrderSkuQueryDto { 97 public static class KdsOrderSkuQueryDto {
98 private ServeStatusEnum serveStatus; 98 private ServeStatusEnum serveStatus;
99 private Integer mealId; 99 private Integer mealId;
100 + private String mealTime;
100 } 101 }
101 102
102 @Data 103 @Data
...@@ -107,6 +108,7 @@ public class KdsDTO { ...@@ -107,6 +108,7 @@ public class KdsDTO {
107 public static class KdsOrderLocationQueryDto { 108 public static class KdsOrderLocationQueryDto {
108 private OrderStatusEnum orderStatus; 109 private OrderStatusEnum orderStatus;
109 private Integer mealId; 110 private Integer mealId;
111 + private String mealTime;
110 } 112 }
111 113
112 @Data 114 @Data
......
...@@ -155,6 +155,7 @@ public class OrderDbDTO { ...@@ -155,6 +155,7 @@ public class OrderDbDTO {
155 private String tableCode; 155 private String tableCode;
156 private Integer updatedBy; 156 private Integer updatedBy;
157 private OrderSourceEnum updatedSource; 157 private OrderSourceEnum updatedSource;
158 + private String avoidRemark;
158 } 159 }
159 160
160 161
...@@ -440,6 +441,9 @@ public class OrderDbDTO { ...@@ -440,6 +441,9 @@ public class OrderDbDTO {
440 @ApiModelProperty(value = "备注") 441 @ApiModelProperty(value = "备注")
441 private String remark; 442 private String remark;
442 443
444 + @ApiModelProperty(value = "忌口备注")
445 + private String avoidRemark;
446 +
443 @ApiModelProperty(value = "下单客户当时的忌口、医嘱") 447 @ApiModelProperty(value = "下单客户当时的忌口、医嘱")
444 private CustomerNotice customerNoticeJson; 448 private CustomerNotice customerNoticeJson;
445 449
......
...@@ -180,6 +180,8 @@ public class OrderServiceRpcClient { ...@@ -180,6 +180,8 @@ public class OrderServiceRpcClient {
180 .setTableCode(tableCode) 180 .setTableCode(tableCode)
181 .setShouldUpdateRoomNo(updateOrderDto.isShouldUpdateRoomNo()) 181 .setShouldUpdateRoomNo(updateOrderDto.isShouldUpdateRoomNo())
182 .setRoomNo(roomNo) 182 .setRoomNo(roomNo)
183 + .setShouldUpdateAvoidRemark(updateOrderDto.getAvoidRemark() != null)
184 + .setAvoidRemark(updateOrderDto.getAvoidRemark() == null ? "" : updateOrderDto.getAvoidRemark())
183 .build(); 185 .build();
184 final var request = UpdateClientCustomerOrderRpcRequest.newBuilder() 186 final var request = UpdateClientCustomerOrderRpcRequest.newBuilder()
185 .setEnterpriseId(updateOrderDto.getEnterpriseId()) 187 .setEnterpriseId(updateOrderDto.getEnterpriseId())
......
...@@ -53,7 +53,7 @@ public class KdsServiceImpl implements KdsService { ...@@ -53,7 +53,7 @@ public class KdsServiceImpl implements KdsService {
53 @Override 53 @Override
54 public List<KdsOrderSkuDto> getOrderDetailBySku(KdsOrderSkuQueryDto queryDto) { 54 public List<KdsOrderSkuDto> getOrderDetailBySku(KdsOrderSkuQueryDto queryDto) {
55 // 获取当日所有的订单 和 订单明细 55 // 获取当日所有的订单 和 订单明细
56 - LocalDate today = LocalDate.now(); 56 + LocalDate today = LocalDate.parse(queryDto.getMealTime(), DateUtil.YYYY_MM_DD);
57 LocalDateTime todayZero = today.atStartOfDay(); 57 LocalDateTime todayZero = today.atStartOfDay();
58 LocalDate tomorrow = today.plusDays(1); 58 LocalDate tomorrow = today.plusDays(1);
59 LocalDateTime tomorrowZero = tomorrow.atStartOfDay(); 59 LocalDateTime tomorrowZero = tomorrow.atStartOfDay();
...@@ -281,7 +281,7 @@ public class KdsServiceImpl implements KdsService { ...@@ -281,7 +281,7 @@ public class KdsServiceImpl implements KdsService {
281 @Override 281 @Override
282 public List<KdsOrderLocationDto> getOrderDetailByLocation(KdsOrderLocationQueryDto queryDto) { 282 public List<KdsOrderLocationDto> getOrderDetailByLocation(KdsOrderLocationQueryDto queryDto) {
283 // 获取当日用餐的所有的订单 和 订单明细 283 // 获取当日用餐的所有的订单 和 订单明细
284 - LocalDate today = LocalDate.now(); 284 + LocalDate today = LocalDate.parse(queryDto.getMealTime(), DateUtil.YYYY_MM_DD);
285 LocalDateTime todayZero = today.atStartOfDay(); 285 LocalDateTime todayZero = today.atStartOfDay();
286 LocalDate tomorrow = today.plusDays(1); 286 LocalDate tomorrow = today.plusDays(1);
287 LocalDateTime tomorrowZero = tomorrow.atStartOfDay().minusMinutes(1); 287 LocalDateTime tomorrowZero = tomorrow.atStartOfDay().minusMinutes(1);
......
...@@ -487,6 +487,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -487,6 +487,7 @@ public class OrderServiceImpl implements OrderService {
487 .mealTime(DateUtil.formatDate(r.getMealTime())) 487 .mealTime(DateUtil.formatDate(r.getMealTime()))
488 .orderType(r.getOrderTypeValue()) 488 .orderType(r.getOrderTypeValue())
489 .remark(r.getRemark()) 489 .remark(r.getRemark())
490 + .avoidRemark(r.getAvoidRemark())
490 .isDeleted(r.getIsDeleted()) 491 .isDeleted(r.getIsDeleted())
491 .isRead(r.getIsRead()) 492 .isRead(r.getIsRead())
492 .creationSource(r.getCreationSource().getNumber()) 493 .creationSource(r.getCreationSource().getNumber())
......
...@@ -89,6 +89,11 @@ enum OnlinePayEnum { ...@@ -89,6 +89,11 @@ enum OnlinePayEnum {
89 LEAVE_HOSPITAL = 3;//出院 89 LEAVE_HOSPITAL = 3;//出院
90 EMPLOYEE_CARD = 4; //员工卡 90 EMPLOYEE_CARD = 4; //员工卡
91 PAPER_VERIFICATION = 5; //纸质核销 91 PAPER_VERIFICATION = 5; //纸质核销
92 + CASH = 6;//现金
93 + MEAL_CARD = 7;//餐卡
94 + BAND_CARD = 8;//银行卡
95 + ALIPAY = 9;//支付宝
96 + WECHATPAY = 10;//微信支付
92 } 97 }
93 98
94 enum ServeStatusEnum { 99 enum ServeStatusEnum {
...@@ -141,6 +146,7 @@ message SingleClientCustomerOrderRpcResponse { ...@@ -141,6 +146,7 @@ message SingleClientCustomerOrderRpcResponse {
141 bool isAllocation = 35; 146 bool isAllocation = 35;
142 string syncRoomNo = 36; 147 string syncRoomNo = 36;
143 bool isCanceled = 37; 148 bool isCanceled = 37;
149 + string avoidRemark = 38;
144 } 150 }
145 151
146 message GetClientCustomerOrderByIdRpcRequest { 152 message GetClientCustomerOrderByIdRpcRequest {
...@@ -385,6 +391,8 @@ message ClientCustomerOrderModification { ...@@ -385,6 +391,8 @@ message ClientCustomerOrderModification {
385 string syncRoomNo = 55; 391 string syncRoomNo = 55;
386 bool shouldUpdateIsCanceled = 56; 392 bool shouldUpdateIsCanceled = 56;
387 bool isCanceled = 57; 393 bool isCanceled = 57;
394 + bool shouldUpdateAvoidRemark = 58;
395 + string avoidRemark = 59;
388 } 396 }
389 397
390 message UpdateClientCustomerOrderRpcRequest { 398 message UpdateClientCustomerOrderRpcRequest {
......