Showing
12 changed files
with
93 additions
and
6 deletions
| ... | @@ -16,4 +16,5 @@ public class BusinessConfig { | ... | @@ -16,4 +16,5 @@ public class BusinessConfig { |
| 16 | private String clientCustomerQueryUrl; | 16 | private String clientCustomerQueryUrl; |
| 17 | private String payUrl; | 17 | private String payUrl; |
| 18 | private String payClientId; | 18 | private String payClientId; |
| 19 | + private String cancelPayUrl; | ||
| 19 | } | 20 | } | ... | ... |
| ... | @@ -35,4 +35,11 @@ public class ClientOrderController { | ... | @@ -35,4 +35,11 @@ public class ClientOrderController { |
| 35 | return orderService.getOrdersByPagination(queryOrderDto); | 35 | return orderService.getOrdersByPagination(queryOrderDto); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | + @ApiOperation(value = "院区端已撤销订单") | ||
| 39 | + @PostMapping("/client/orders/canceled/pagination") | ||
| 40 | + @ResponseStatus(HttpStatus.OK) | ||
| 41 | + public OrderPageResult<OrderDto> getCanceledOrderByByPagination(@Valid @RequestBody OrderDbDTO.QueryCanceledOrderByPaginationDto queryOrderDto) { | ||
| 42 | + return orderService.getCanceledOrdersByPagination(queryOrderDto); | ||
| 43 | + } | ||
| 44 | + | ||
| 38 | } | 45 | } | ... | ... |
| ... | @@ -53,4 +53,11 @@ public class PayController { | ... | @@ -53,4 +53,11 @@ public class PayController { |
| 53 | return payServiceClient.callback(paymentCallbackDTO); | 53 | return payServiceClient.callback(paymentCallbackDTO); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | + @SaIgnore | ||
| 57 | + @ApiOperation(value = "支付撤销") | ||
| 58 | + @PostMapping(value = "/pay/cancel") | ||
| 59 | + @ResponseStatus(HttpStatus.OK) | ||
| 60 | + public boolean cancel(@Valid @RequestBody PayDTO.PayCancelRequestDto payCancelRequestDto) { | ||
| 61 | + return payServiceClient.cancelOrder(payCancelRequestDto); | ||
| 62 | + } | ||
| 56 | } | 63 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -64,6 +64,17 @@ public class OrderDbDTO { | ... | @@ -64,6 +64,17 @@ public class OrderDbDTO { |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | @Data | 66 | @Data |
| 67 | + @ApiModel(description = "查询已撤销订单Dto") | ||
| 68 | + public static class QueryCanceledOrderByPaginationDto { | ||
| 69 | + private Integer enterpriseId; | ||
| 70 | + private Integer clientId; | ||
| 71 | + private Integer pn; | ||
| 72 | + private Integer pz; | ||
| 73 | + private String keyword; | ||
| 74 | + private List<Integer> stallIds; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @Data | ||
| 67 | @Builder | 78 | @Builder |
| 68 | @ApiModel(description = "订单不同状态的数量Dto") | 79 | @ApiModel(description = "订单不同状态的数量Dto") |
| 69 | public static class OrderCountByStatusDto { | 80 | public static class OrderCountByStatusDto { |
| ... | @@ -455,12 +466,18 @@ public class OrderDbDTO { | ... | @@ -455,12 +466,18 @@ public class OrderDbDTO { |
| 455 | @ApiModelProperty(value = "是否已读") | 466 | @ApiModelProperty(value = "是否已读") |
| 456 | private Boolean isRead; | 467 | private Boolean isRead; |
| 457 | 468 | ||
| 469 | + @ApiModelProperty(value = "是否已撤销") | ||
| 470 | + private Boolean isCanceled; | ||
| 471 | + | ||
| 458 | @ApiModelProperty(value = "截单类型") | 472 | @ApiModelProperty(value = "截单类型") |
| 459 | private Integer closeTimeType; | 473 | private Integer closeTimeType; |
| 460 | 474 | ||
| 461 | @ApiModelProperty(value = "订单所属用户的信息") | 475 | @ApiModelProperty(value = "订单所属用户的信息") |
| 462 | private CustomerDetailDto customer; | 476 | private CustomerDetailDto customer; |
| 463 | 477 | ||
| 478 | + @ApiModelProperty(value = "该订单的忌口冲突、医嘱信息") | ||
| 479 | + private List<String> orderNotice; | ||
| 480 | + | ||
| 464 | // @ApiModelProperty(value = "订单菜品详情列表") | 481 | // @ApiModelProperty(value = "订单菜品详情列表") |
| 465 | // private List<OrderDetailDto> orderDetailDtos; | 482 | // private List<OrderDetailDto> orderDetailDtos; |
| 466 | } | 483 | } | ... | ... |
| ... | @@ -26,6 +26,17 @@ public class PayDTO { | ... | @@ -26,6 +26,17 @@ public class PayDTO { |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | @Data | 28 | @Data |
| 29 | + @ApiModel(description = "支付请求dto") | ||
| 30 | + @NoArgsConstructor | ||
| 31 | + @AllArgsConstructor | ||
| 32 | + public static class PayCancelRequestDto { | ||
| 33 | +// private String clientId; | ||
| 34 | + private Integer orderId; | ||
| 35 | + private String hospitalCode; | ||
| 36 | +// private String price; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + @Data | ||
| 29 | @ApiModel(description = "支付MiniPay结果") | 40 | @ApiModel(description = "支付MiniPay结果") |
| 30 | @NoArgsConstructor | 41 | @NoArgsConstructor |
| 31 | @AllArgsConstructor | 42 | @AllArgsConstructor |
| ... | @@ -76,6 +87,15 @@ public class PayDTO { | ... | @@ -76,6 +87,15 @@ public class PayDTO { |
| 76 | } | 87 | } |
| 77 | 88 | ||
| 78 | @Data | 89 | @Data |
| 90 | + @ApiModel(description = "取消支付响应") | ||
| 91 | + @NoArgsConstructor | ||
| 92 | + @AllArgsConstructor | ||
| 93 | + public static class CancelPayResponseDto { | ||
| 94 | + private Integer code; | ||
| 95 | + private String message; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + @Data | ||
| 79 | @Builder | 99 | @Builder |
| 80 | @ApiModel(description = "第三方支付平台通知请求dto") | 100 | @ApiModel(description = "第三方支付平台通知请求dto") |
| 81 | @NoArgsConstructor | 101 | @NoArgsConstructor | ... | ... |
| ... | @@ -9,6 +9,7 @@ import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; | ... | @@ -9,6 +9,7 @@ import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; |
| 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; | 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; |
| 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; | 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; |
| 12 | +import com.infoloop.tianting.model.dto.OrderDbDTO.QueryCanceledOrderByPaginationDto; | ||
| 12 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 13 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 13 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; | 14 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; |
| 14 | import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | 15 | import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; |
| ... | @@ -21,6 +22,8 @@ public interface OrderService { | ... | @@ -21,6 +22,8 @@ public interface OrderService { |
| 21 | OrderAndDetailsDto getOrdersByCustomerId(Integer customerId); | 22 | OrderAndDetailsDto getOrdersByCustomerId(Integer customerId); |
| 22 | OrderAndDetailsDto getOrdersByCondition(QueryOrderByConditionDto queryOrderDto); | 23 | OrderAndDetailsDto getOrdersByCondition(QueryOrderByConditionDto queryOrderDto); |
| 23 | OrderPageResult<OrderDto> getOrdersByPagination(QueryOrderByPaginationDto queryOrderDto); | 24 | OrderPageResult<OrderDto> getOrdersByPagination(QueryOrderByPaginationDto queryOrderDto); |
| 25 | + OrderPageResult<OrderDto> getCanceledOrdersByPagination( | ||
| 26 | + QueryCanceledOrderByPaginationDto queryOrderDto); | ||
| 24 | List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId); | 27 | List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId); |
| 25 | CreateOrderResponse createOrder(CreateOrderDto createOrderDto); | 28 | CreateOrderResponse createOrder(CreateOrderDto createOrderDto); |
| 26 | CreateOrderResponse orderCreation(OperatorCreateOrderDto createOrderDto); | 29 | CreateOrderResponse orderCreation(OperatorCreateOrderDto createOrderDto); | ... | ... |
| ... | @@ -64,6 +64,7 @@ import com.infoloop.tianting.model.dto.OrderDbDTO.MealDetailDto; | ... | @@ -64,6 +64,7 @@ import com.infoloop.tianting.model.dto.OrderDbDTO.MealDetailDto; |
| 64 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; | 64 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; |
| 65 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 65 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 66 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailOperationDto; | 66 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailOperationDto; |
| 67 | +import com.infoloop.tianting.model.dto.OrderDbDTO.QueryCanceledOrderByPaginationDto; | ||
| 67 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 68 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 68 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; | 69 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; |
| 69 | import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | 70 | import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; |
| ... | @@ -461,6 +462,8 @@ public class OrderServiceRpcClient { | ... | @@ -461,6 +462,8 @@ public class OrderServiceRpcClient { |
| 461 | .setKeyword(queryOrderDto.getKeyword() == null ? "" : queryOrderDto.getKeyword()) | 462 | .setKeyword(queryOrderDto.getKeyword() == null ? "" : queryOrderDto.getKeyword()) |
| 462 | .setPageNo(queryOrderDto.getPn()) | 463 | .setPageNo(queryOrderDto.getPn()) |
| 463 | .setPageSize(queryOrderDto.getPz()) | 464 | .setPageSize(queryOrderDto.getPz()) |
| 465 | + .setShouldFilterStatus(true) | ||
| 466 | + .setShouldFilterIsCanceled(false) | ||
| 464 | .setStatus(queryOrderDto.getStatus()) | 467 | .setStatus(queryOrderDto.getStatus()) |
| 465 | .setEnterpriseId(queryOrderDto.getEnterpriseId()) | 468 | .setEnterpriseId(queryOrderDto.getEnterpriseId()) |
| 466 | .setClientId(queryOrderDto.getClientId()) | 469 | .setClientId(queryOrderDto.getClientId()) |
| ... | @@ -469,6 +472,22 @@ public class OrderServiceRpcClient { | ... | @@ -469,6 +472,22 @@ public class OrderServiceRpcClient { |
| 469 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); | 472 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); |
| 470 | } | 473 | } |
| 471 | 474 | ||
| 475 | + public QueryClientCustomerOrdersByPaginationRpcResponse queryCanceledClientCustomerOrdersByPagination( | ||
| 476 | + QueryCanceledOrderByPaginationDto queryOrderDto) { | ||
| 477 | + final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() | ||
| 478 | + .setKeyword(queryOrderDto.getKeyword() == null ? "" : queryOrderDto.getKeyword()) | ||
| 479 | + .setPageNo(queryOrderDto.getPn()) | ||
| 480 | + .setPageSize(queryOrderDto.getPz()) | ||
| 481 | + .setShouldFilterStatus(false) | ||
| 482 | + .setShouldFilterIsCanceled(true) | ||
| 483 | + .setIsCanceled(true) | ||
| 484 | + .setEnterpriseId(queryOrderDto.getEnterpriseId()) | ||
| 485 | + .setClientId(queryOrderDto.getClientId()) | ||
| 486 | + .addAllStallIds(queryOrderDto.getStallIds()) | ||
| 487 | + .build(); | ||
| 488 | + return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); | ||
| 489 | + } | ||
| 490 | + | ||
| 472 | public List<SingleClientCustomerOrderDetailRpcResponse> getOrderDetailsByOrderId(Integer orderId) { | 491 | public List<SingleClientCustomerOrderDetailRpcResponse> getOrderDetailsByOrderId(Integer orderId) { |
| 473 | return orderServiceRpcBlockingStub.getClientCustomerOrderDetailsByOrderIds( | 492 | return orderServiceRpcBlockingStub.getClientCustomerOrderDetailsByOrderIds( |
| 474 | GetClientCustomerOrderDetailsByOrderIdsRpcRequest.newBuilder() | 493 | GetClientCustomerOrderDetailsByOrderIdsRpcRequest.newBuilder() | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
| ... | @@ -158,4 +158,8 @@ public final class DateUtil extends DateUtils { | ... | @@ -158,4 +158,8 @@ public final class DateUtil extends DateUtils { |
| 158 | return Instant.ofEpochMilli(timestamp).atZone(CHINA_ZONE).toLocalDate(); | 158 | return Instant.ofEpochMilli(timestamp).atZone(CHINA_ZONE).toLocalDate(); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | + public static LocalDateTime toLocalDateTime(long timestamp) { | ||
| 162 | + return Instant.ofEpochMilli(timestamp).atZone(CHINA_ZONE).toLocalDateTime(); | ||
| 163 | + } | ||
| 164 | + | ||
| 161 | } | 165 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -139,6 +139,7 @@ message SingleClientCustomerOrderRpcResponse { | ... | @@ -139,6 +139,7 @@ message SingleClientCustomerOrderRpcResponse { |
| 139 | bool isConfirm = 34; | 139 | bool isConfirm = 34; |
| 140 | bool isAllocation = 35; | 140 | bool isAllocation = 35; |
| 141 | string syncRoomNo = 36; | 141 | string syncRoomNo = 36; |
| 142 | + bool isCanceled = 37; | ||
| 142 | } | 143 | } |
| 143 | 144 | ||
| 144 | message GetClientCustomerOrderByIdRpcRequest { | 145 | message GetClientCustomerOrderByIdRpcRequest { |
| ... | @@ -173,12 +174,15 @@ message GetClientCustomerOrdersByCustomerIdRpcResponse { | ... | @@ -173,12 +174,15 @@ message GetClientCustomerOrdersByCustomerIdRpcResponse { |
| 173 | 174 | ||
| 174 | message QueryClientCustomerOrdersByPaginationRpcRequest { | 175 | message QueryClientCustomerOrdersByPaginationRpcRequest { |
| 175 | string keyword = 1; | 176 | string keyword = 1; |
| 176 | - OrderStatusEnum status = 2; | 177 | + bool shouldFilterStatus = 2; |
| 177 | - int32 clientId = 3; | 178 | + OrderStatusEnum status = 3; |
| 178 | - int32 enterpriseId = 4; | 179 | + int32 clientId = 4; |
| 179 | - int32 pageNo = 5; | 180 | + int32 enterpriseId = 5; |
| 180 | - int32 pageSize = 6; | 181 | + int32 pageNo = 6; |
| 181 | - repeated int32 stallIds = 7; | 182 | + int32 pageSize = 7; |
| 183 | + repeated int32 stallIds = 8; | ||
| 184 | + bool shouldFilterIsCanceled = 9; | ||
| 185 | + bool isCanceled = 10; | ||
| 182 | } | 186 | } |
| 183 | 187 | ||
| 184 | message OrderCountByStatus { | 188 | message OrderCountByStatus { |
| ... | @@ -246,6 +250,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { | ... | @@ -246,6 +250,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { |
| 246 | bool isAllocation = 47; | 250 | bool isAllocation = 47; |
| 247 | bool shouldFilterStatues = 48; | 251 | bool shouldFilterStatues = 48; |
| 248 | repeated OrderStatusEnum statues = 49; | 252 | repeated OrderStatusEnum statues = 49; |
| 253 | + bool shouldFilterIsCanceled = 50; | ||
| 254 | + bool isCanceled = 51; | ||
| 249 | } | 255 | } |
| 250 | 256 | ||
| 251 | message QueryClientCustomerOrdersByConditionRpcResponse { | 257 | message QueryClientCustomerOrdersByConditionRpcResponse { |
| ... | @@ -375,6 +381,8 @@ message ClientCustomerOrderModification { | ... | @@ -375,6 +381,8 @@ message ClientCustomerOrderModification { |
| 375 | bool isAllocation = 53; | 381 | bool isAllocation = 53; |
| 376 | bool shouldUpdateSyncRoomNo = 54; | 382 | bool shouldUpdateSyncRoomNo = 54; |
| 377 | string syncRoomNo = 55; | 383 | string syncRoomNo = 55; |
| 384 | + bool shouldUpdateIsCanceled = 56; | ||
| 385 | + bool isCanceled = 57; | ||
| 378 | } | 386 | } |
| 379 | 387 | ||
| 380 | message UpdateClientCustomerOrderRpcRequest { | 388 | message UpdateClientCustomerOrderRpcRequest { | ... | ... |
| ... | @@ -80,6 +80,7 @@ business-config.hisCustomerQueryUrl = https://nutri.amcare.com.cn/v3/hiscustomer | ... | @@ -80,6 +80,7 @@ business-config.hisCustomerQueryUrl = https://nutri.amcare.com.cn/v3/hiscustomer |
| 80 | business-config.clientCustomerQueryUrl = https://nutri.amcare.com.cn/v3/clientcustomers/current/query | 80 | business-config.clientCustomerQueryUrl = https://nutri.amcare.com.cn/v3/clientcustomers/current/query |
| 81 | business-config.payUrl = http://10.2.5.162:21051/API/Microapp/CreateOrder?appid={0} | 81 | business-config.payUrl = http://10.2.5.162:21051/API/Microapp/CreateOrder?appid={0} |
| 82 | business-config.payClientId = Order | 82 | business-config.payClientId = Order |
| 83 | +business-config.cancelPayUrl = http://10.2.5.162:21051/frame/requestbase64 | ||
| 83 | 84 | ||
| 84 | ##Actuator\u914D\u7F6E | 85 | ##Actuator\u914D\u7F6E |
| 85 | management.server.port=8088 | 86 | management.server.port=8088 | ... | ... |
-
Please register or login to post a comment