Showing
33 changed files
with
867 additions
and
32 deletions
No preview for this file type
No preview for this file type
src/main/.DS_Store
0 → 100644
No preview for this file type
| ... | @@ -3,11 +3,14 @@ package com.infoloop.tianting.controller; | ... | @@ -3,11 +3,14 @@ package com.infoloop.tianting.controller; |
| 3 | import cn.dev33.satoken.annotation.SaIgnore; | 3 | import cn.dev33.satoken.annotation.SaIgnore; |
| 4 | import com.github.xiaoymin.knife4j.annotations.ApiSupport; | 4 | import com.github.xiaoymin.knife4j.annotations.ApiSupport; |
| 5 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; | 5 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; |
| 6 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientTableCodeDto; | ||
| 7 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.TableCodeQueryConditionDto; | ||
| 6 | import com.infoloop.tianting.model.dto.MenuDbDTO.MenuDto; | 8 | import com.infoloop.tianting.model.dto.MenuDbDTO.MenuDto; |
| 7 | import com.infoloop.tianting.service.InventoryService; | 9 | import com.infoloop.tianting.service.InventoryService; |
| 8 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
| 9 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
| 10 | import java.util.List; | 12 | import java.util.List; |
| 13 | +import javax.validation.Valid; | ||
| 11 | import lombok.RequiredArgsConstructor; | 14 | import lombok.RequiredArgsConstructor; |
| 12 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
| 13 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | @@ -15,6 +18,8 @@ import org.springframework.http.HttpStatus; | ... | @@ -15,6 +18,8 @@ import org.springframework.http.HttpStatus; |
| 15 | import org.springframework.validation.annotation.Validated; | 18 | import org.springframework.validation.annotation.Validated; |
| 16 | import org.springframework.web.bind.annotation.GetMapping; | 19 | import org.springframework.web.bind.annotation.GetMapping; |
| 17 | import org.springframework.web.bind.annotation.PathVariable; | 20 | import org.springframework.web.bind.annotation.PathVariable; |
| 21 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 22 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 18 | import org.springframework.web.bind.annotation.ResponseStatus; | 23 | import org.springframework.web.bind.annotation.ResponseStatus; |
| 19 | import org.springframework.web.bind.annotation.RestController; | 24 | import org.springframework.web.bind.annotation.RestController; |
| 20 | 25 | ||
| ... | @@ -44,4 +49,11 @@ public class InventoryController { | ... | @@ -44,4 +49,11 @@ public class InventoryController { |
| 44 | return inventoryService.getStallsByClientId(enterpriseId, clientId); | 49 | return inventoryService.getStallsByClientId(enterpriseId, clientId); |
| 45 | } | 50 | } |
| 46 | 51 | ||
| 52 | + @ApiOperation(value = "获取桌号") | ||
| 53 | + @PostMapping("/tableCodes") | ||
| 54 | + @ResponseStatus(HttpStatus.OK) | ||
| 55 | + public List<ClientTableCodeDto> getTableCodes(@Valid @RequestBody | ||
| 56 | + TableCodeQueryConditionDto tableCodeQueryConditionDto) { | ||
| 57 | + return inventoryService.queryClientTableCodesByCondition(tableCodeQueryConditionDto); | ||
| 58 | + } | ||
| 47 | } | 59 | } | ... | ... |
| ... | @@ -7,11 +7,14 @@ import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchCreateCustomerLabelRe | ... | @@ -7,11 +7,14 @@ import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchCreateCustomerLabelRe |
| 7 | import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto; | 7 | import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto; |
| 8 | import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefResponseDto; | 8 | import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefResponseDto; |
| 9 | import com.infoloop.tianting.model.dto.ClientLabelDTO.CustomerLabelRefDetailDto; | 9 | import com.infoloop.tianting.model.dto.ClientLabelDTO.CustomerLabelRefDetailDto; |
| 10 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisAllergy; | ||
| 11 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisMedicalAdviceDto; | ||
| 10 | import com.infoloop.tianting.model.dto.ClientLabelDTO.LabelDto; | 12 | import com.infoloop.tianting.model.dto.ClientLabelDTO.LabelDto; |
| 11 | import com.infoloop.tianting.model.dto.MealDbDTO; | 13 | import com.infoloop.tianting.model.dto.MealDbDTO; |
| 12 | import com.infoloop.tianting.model.dto.MealDbDTO.MealDto; | 14 | import com.infoloop.tianting.model.dto.MealDbDTO.MealDto; |
| 13 | import com.infoloop.tianting.service.ClientCustomerService; | 15 | import com.infoloop.tianting.service.ClientCustomerService; |
| 14 | import com.infoloop.tianting.service.DeliveryRuleService; | 16 | import com.infoloop.tianting.service.DeliveryRuleService; |
| 17 | +import com.infoloop.tianting.service.MeiZhongYiHeService; | ||
| 15 | import io.swagger.annotations.Api; | 18 | import io.swagger.annotations.Api; |
| 16 | import io.swagger.annotations.ApiOperation; | 19 | import io.swagger.annotations.ApiOperation; |
| 17 | import java.util.List; | 20 | import java.util.List; |
| ... | @@ -37,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -37,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController; |
| 37 | public class LabelController { | 40 | public class LabelController { |
| 38 | private final DeliveryRuleService deliveryRuleService; | 41 | private final DeliveryRuleService deliveryRuleService; |
| 39 | private final ClientCustomerService clientCustomerService; | 42 | private final ClientCustomerService clientCustomerService; |
| 43 | + private final MeiZhongYiHeService meiZhongYiHeService; | ||
| 40 | 44 | ||
| 41 | @ApiOperation(value = "按类型获取标签") | 45 | @ApiOperation(value = "按类型获取标签") |
| 42 | @PostMapping("/labels") | 46 | @PostMapping("/labels") |
| ... | @@ -69,4 +73,18 @@ public class LabelController { | ... | @@ -69,4 +73,18 @@ public class LabelController { |
| 69 | @Valid@RequestBody ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto request) { | 73 | @Valid@RequestBody ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto request) { |
| 70 | return clientCustomerService.deleteClientCustomerLabelRefsByIds(request); | 74 | return clientCustomerService.deleteClientCustomerLabelRefsByIds(request); |
| 71 | } | 75 | } |
| 76 | + | ||
| 77 | + @ApiOperation(value = "根据hisCustomerId查询用户绑定过敏源标签") | ||
| 78 | + @DeleteMapping("/allergy/hisCustomer/{hisCustomerId}") | ||
| 79 | + @ResponseStatus(HttpStatus.OK) | ||
| 80 | + public List<HisAllergy> getHisCustomerAllergiesByCustomerId(@PathVariable String hisCustomerId) { | ||
| 81 | + return meiZhongYiHeService.getHisCustomerAllergiesByCustomerId(hisCustomerId); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + @ApiOperation(value = "根据contractNo查询His用户医嘱") | ||
| 85 | + @DeleteMapping("/medicalAdvice/hisCustomer/{contractNo}") | ||
| 86 | + @ResponseStatus(HttpStatus.OK) | ||
| 87 | + public List<HisMedicalAdviceDto> getHisCustomerMedicalAdviceByContractNo(@PathVariable String contractNo) { | ||
| 88 | + return meiZhongYiHeService.getHisCustomerMedicalAdvicesByContractNo(contractNo); | ||
| 89 | + } | ||
| 72 | } | 90 | } | ... | ... |
| ... | @@ -13,6 +13,8 @@ import lombok.extern.slf4j.Slf4j; | ... | @@ -13,6 +13,8 @@ import lombok.extern.slf4j.Slf4j; |
| 13 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | import org.springframework.http.HttpStatus; | 14 | import org.springframework.http.HttpStatus; |
| 15 | import org.springframework.validation.annotation.Validated; | 15 | import org.springframework.validation.annotation.Validated; |
| 16 | +import org.springframework.web.bind.annotation.GetMapping; | ||
| 17 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 16 | import org.springframework.web.bind.annotation.PostMapping; | 18 | import org.springframework.web.bind.annotation.PostMapping; |
| 17 | import org.springframework.web.bind.annotation.RequestBody; | 19 | import org.springframework.web.bind.annotation.RequestBody; |
| 18 | import org.springframework.web.bind.annotation.ResponseStatus; | 20 | import org.springframework.web.bind.annotation.ResponseStatus; |
| ... | @@ -34,4 +36,11 @@ public class MealController { | ... | @@ -34,4 +36,11 @@ public class MealController { |
| 34 | return mealService.getMealsByIds(mealIdsDto.getEnterpriseId(), mealIdsDto.getIds()); | 36 | return mealService.getMealsByIds(mealIdsDto.getEnterpriseId(), mealIdsDto.getIds()); |
| 35 | } | 37 | } |
| 36 | 38 | ||
| 39 | + @ApiOperation(value = "获取enterprise所有餐别") | ||
| 40 | + @GetMapping("/enterprises/{enterpriseId}/meals") | ||
| 41 | + @ResponseStatus(HttpStatus.OK) | ||
| 42 | + public List<MealDto> getAllMeals(@PathVariable Integer enterpriseId) { | ||
| 43 | + return mealService.getAllMeals(enterpriseId); | ||
| 44 | + } | ||
| 45 | + | ||
| 37 | } | 46 | } | ... | ... |
| ... | @@ -41,6 +41,23 @@ public class MenuController { | ... | @@ -41,6 +41,23 @@ public class MenuController { |
| 41 | return menuService.queryMiniProgramPublishedMenusByStallId(enterpriseId, stallId); | 41 | return menuService.queryMiniProgramPublishedMenusByStallId(enterpriseId, stallId); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | + @ApiOperation(value = "根据stallIds获取所有已发布餐单") | ||
| 45 | + @GetMapping("/enterprises/{enterpriseId}/stalls/{stallId}/all/menus") | ||
| 46 | + @ResponseStatus(HttpStatus.OK) | ||
| 47 | + public List<MenuDto> queryPublishedMenusByStallIds( | ||
| 48 | + @PathVariable Integer enterpriseId, @PathVariable Integer stallId) { | ||
| 49 | + return menuService.queryPublishedMenusByStallId(enterpriseId, stallId); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @ApiOperation(value = "根据MenuId获取餐单") | ||
| 53 | + @GetMapping("/enterprises/{enterpriseId}/menus/{menuId}") | ||
| 54 | + @ResponseStatus(HttpStatus.OK) | ||
| 55 | + public MenuDto getMenuById( | ||
| 56 | + @PathVariable Integer enterpriseId, @PathVariable Integer menuId | ||
| 57 | + ) { | ||
| 58 | + return menuService.getMenuById(enterpriseId, menuId); | ||
| 59 | + } | ||
| 60 | + | ||
| 44 | @ApiOperation(value = "根据MenuId获取餐单详情") | 61 | @ApiOperation(value = "根据MenuId获取餐单详情") |
| 45 | @GetMapping("/enterprises/{enterpriseId}/menusDetails/{menuId}") | 62 | @GetMapping("/enterprises/{enterpriseId}/menusDetails/{menuId}") |
| 46 | @ResponseStatus(HttpStatus.OK) | 63 | @ResponseStatus(HttpStatus.OK) | ... | ... |
| 1 | package com.infoloop.tianting.controller; | 1 | package com.infoloop.tianting.controller; |
| 2 | 2 | ||
| 3 | import com.github.xiaoymin.knife4j.annotations.ApiSupport; | 3 | import com.github.xiaoymin.knife4j.annotations.ApiSupport; |
| 4 | +import com.infoloop.tianting.model.dto.OrderDbDTO; | ||
| 5 | +import com.infoloop.tianting.model.dto.OrderDbDTO.BatchUpdateOrderDetailResponse; | ||
| 4 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; | 6 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; |
| 5 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; | 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; |
| 6 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; | 8 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; |
| 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 8 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; | 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; |
| 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 12 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | ||
| 13 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderResponse; | ||
| 10 | import com.infoloop.tianting.service.OrderService; | 14 | import com.infoloop.tianting.service.OrderService; |
| 11 | import io.swagger.annotations.Api; | 15 | import io.swagger.annotations.Api; |
| 12 | import io.swagger.annotations.ApiOperation; | 16 | import io.swagger.annotations.ApiOperation; |
| ... | @@ -18,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ... | @@ -18,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 18 | import org.springframework.http.HttpStatus; | 22 | import org.springframework.http.HttpStatus; |
| 19 | import org.springframework.validation.annotation.Validated; | 23 | import org.springframework.validation.annotation.Validated; |
| 20 | import org.springframework.web.bind.annotation.GetMapping; | 24 | import org.springframework.web.bind.annotation.GetMapping; |
| 25 | +import org.springframework.web.bind.annotation.PatchMapping; | ||
| 21 | import org.springframework.web.bind.annotation.PathVariable; | 26 | import org.springframework.web.bind.annotation.PathVariable; |
| 22 | import org.springframework.web.bind.annotation.PostMapping; | 27 | import org.springframework.web.bind.annotation.PostMapping; |
| 23 | import org.springframework.web.bind.annotation.RequestBody; | 28 | import org.springframework.web.bind.annotation.RequestBody; |
| ... | @@ -65,4 +70,19 @@ public class OrderController { | ... | @@ -65,4 +70,19 @@ public class OrderController { |
| 65 | public CreateOrderResponse createOrder(@Valid @RequestBody CreateOrderDto createOrderDto) { | 70 | public CreateOrderResponse createOrder(@Valid @RequestBody CreateOrderDto createOrderDto) { |
| 66 | return orderService.createOrder(createOrderDto); | 71 | return orderService.createOrder(createOrderDto); |
| 67 | } | 72 | } |
| 73 | + | ||
| 74 | + @ApiOperation(value = "修改订单") | ||
| 75 | + @PatchMapping("/orders/modification") | ||
| 76 | + @ResponseStatus(HttpStatus.OK) | ||
| 77 | + public UpdateOrderResponse updateOrder(@Valid @RequestBody UpdateOrderDto updateOrderDto) { | ||
| 78 | + return orderService.updateOrder(updateOrderDto); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + @ApiOperation(value = "批量修改订单详情") | ||
| 82 | + @PatchMapping("/order_details/modification") | ||
| 83 | + @ResponseStatus(HttpStatus.OK) | ||
| 84 | + public BatchUpdateOrderDetailResponse batchUpdateOrderDetails( | ||
| 85 | + @Valid @RequestBody OrderDbDTO.OrderDetailBatchUpdateDto updateDto) { | ||
| 86 | + return orderService.batchUpdateOrderDetails(updateDto); | ||
| 87 | + } | ||
| 68 | } | 88 | } | ... | ... |
| 1 | package com.infoloop.tianting.model.dto; | 1 | package com.infoloop.tianting.model.dto; |
| 2 | 2 | ||
| 3 | +import com.infoloop.rpc.meizhongyiheservice.MedicalAdviceTypeEnum; | ||
| 3 | import com.infoloop.tianting.clientcustomerorderservice.OrderSourceEnum; | 4 | import com.infoloop.tianting.clientcustomerorderservice.OrderSourceEnum; |
| 4 | import com.infoloop.tianting.deliveryruleservice.ClientDishLabelStatusEnum; | 5 | import com.infoloop.tianting.deliveryruleservice.ClientDishLabelStatusEnum; |
| 5 | import com.infoloop.tianting.deliveryruleservice.ClientLabelTypeEnum; | 6 | import com.infoloop.tianting.deliveryruleservice.ClientLabelTypeEnum; |
| ... | @@ -99,4 +100,31 @@ public class ClientLabelDTO { | ... | @@ -99,4 +100,31 @@ public class ClientLabelDTO { |
| 99 | private boolean isDeleted; | 100 | private boolean isDeleted; |
| 100 | } | 101 | } |
| 101 | 102 | ||
| 103 | + @Data | ||
| 104 | + @Builder | ||
| 105 | + @ToString | ||
| 106 | + @ApiModel(description = "HIS过敏源标签 DTO") | ||
| 107 | + public static class HisAllergy { | ||
| 108 | + private String allergyId; | ||
| 109 | + private String allergyCode; | ||
| 110 | + private String allergyDescription; | ||
| 111 | + private String createdAt; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + | ||
| 115 | + @Data | ||
| 116 | + @Builder | ||
| 117 | + @ToString | ||
| 118 | + @ApiModel(description = "HIS 医嘱 DTO") | ||
| 119 | + public static class HisMedicalAdviceDto { | ||
| 120 | + private String medicalAdviceId; | ||
| 121 | + private String medicalAdviceCode; | ||
| 122 | + private String medicalAdvice; | ||
| 123 | + private String connotation; | ||
| 124 | + private String medicalTime; | ||
| 125 | + private String effectDate; | ||
| 126 | + MedicalAdviceTypeEnum medicalAdviceType; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + | ||
| 102 | } | 130 | } | ... | ... |
| ... | @@ -4,6 +4,7 @@ import com.infoloop.tianting.clientinventoryservice.ClientType; | ... | @@ -4,6 +4,7 @@ import com.infoloop.tianting.clientinventoryservice.ClientType; |
| 4 | import com.infoloop.tianting.clientinventoryservice.CustomerSource; | 4 | import com.infoloop.tianting.clientinventoryservice.CustomerSource; |
| 5 | import io.swagger.annotations.ApiModel; | 5 | import io.swagger.annotations.ApiModel; |
| 6 | import io.swagger.models.auth.In; | 6 | import io.swagger.models.auth.In; |
| 7 | +import java.util.List; | ||
| 7 | import lombok.Builder; | 8 | import lombok.Builder; |
| 8 | import lombok.Data; | 9 | import lombok.Data; |
| 9 | 10 | ||
| ... | @@ -33,4 +34,35 @@ public class InventoryDbDTO { | ... | @@ -33,4 +34,35 @@ public class InventoryDbDTO { |
| 33 | private boolean isDelivery; | 34 | private boolean isDelivery; |
| 34 | } | 35 | } |
| 35 | 36 | ||
| 37 | + @Data | ||
| 38 | + @Builder | ||
| 39 | + @ApiModel(description = "Table code query condition dto") | ||
| 40 | + public static class TableCodeQueryConditionDto{ | ||
| 41 | + private Integer enterpriseId; | ||
| 42 | + private Boolean shouldFilterClientIds; | ||
| 43 | + private List<Integer> clientIds; | ||
| 44 | + private Boolean shouldFilterStallIds; | ||
| 45 | + private List<Integer> stallIds; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @Data | ||
| 49 | + @Builder | ||
| 50 | + @ApiModel(description = "Table code dto") | ||
| 51 | + public static class ClientTableCodeDto { | ||
| 52 | + private Integer id; | ||
| 53 | + private Integer enterpriseId; | ||
| 54 | + private Integer clientId; | ||
| 55 | + private Integer stallId; | ||
| 56 | + private String code; | ||
| 57 | + private String name; | ||
| 58 | + private String url; | ||
| 59 | + private Integer createdBy; | ||
| 60 | + private String createdAt; | ||
| 61 | + private Integer creationSource; | ||
| 62 | + private Integer updatedBy; | ||
| 63 | + private String updatedAt; | ||
| 64 | + private Integer updateSource; | ||
| 65 | + private Boolean isDeleted; | ||
| 66 | + } | ||
| 67 | + | ||
| 36 | } | 68 | } | ... | ... |
| ... | @@ -48,7 +48,7 @@ public class MenuDbDTO { | ... | @@ -48,7 +48,7 @@ public class MenuDbDTO { |
| 48 | @Data | 48 | @Data |
| 49 | @Builder | 49 | @Builder |
| 50 | @ToString | 50 | @ToString |
| 51 | - @ApiModel(description = "订单菜品详情数据") | 51 | + @ApiModel(description = "餐单数据") |
| 52 | public static class MenuDto { | 52 | public static class MenuDto { |
| 53 | 53 | ||
| 54 | private Integer id; | 54 | private Integer id; | ... | ... |
| 1 | package com.infoloop.tianting.model.dto; | 1 | package com.infoloop.tianting.model.dto; |
| 2 | 2 | ||
| 3 | import com.infoloop.tianting.clientcustomerorderservice.CloseTimeType; | 3 | import com.infoloop.tianting.clientcustomerorderservice.CloseTimeType; |
| 4 | +import com.infoloop.tianting.clientcustomerorderservice.OrderSourceEnum; | ||
| 4 | import com.infoloop.tianting.clientcustomerorderservice.OrderStatusEnum; | 5 | import com.infoloop.tianting.clientcustomerorderservice.OrderStatusEnum; |
| 5 | import com.infoloop.tianting.menuservice.CloseTimeTypeEnum; | 6 | import com.infoloop.tianting.menuservice.CloseTimeTypeEnum; |
| 6 | import com.infoloop.tianting.model.common.PageInfo; | 7 | import com.infoloop.tianting.model.common.PageInfo; |
| ... | @@ -65,9 +66,10 @@ public class OrderDbDTO { | ... | @@ -65,9 +66,10 @@ public class OrderDbDTO { |
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | @Data | 68 | @Data |
| 69 | + @Builder | ||
| 68 | @ApiModel(description = "修改订单Dto") | 70 | @ApiModel(description = "修改订单Dto") |
| 69 | public static class UpdateOrderDto { | 71 | public static class UpdateOrderDto { |
| 70 | - private Integer id = 1; | 72 | + private Integer id; |
| 71 | private Integer enterpriseId; | 73 | private Integer enterpriseId; |
| 72 | private boolean shouldUpdateStatus; | 74 | private boolean shouldUpdateStatus; |
| 73 | private OrderStatusEnum status; | 75 | private OrderStatusEnum status; |
| ... | @@ -75,10 +77,21 @@ public class OrderDbDTO { | ... | @@ -75,10 +77,21 @@ public class OrderDbDTO { |
| 75 | private String roomNo; | 77 | private String roomNo; |
| 76 | private boolean shouldUpdateTableCode; | 78 | private boolean shouldUpdateTableCode; |
| 77 | private String tableCode; | 79 | private String tableCode; |
| 78 | - private boolean shouldUpdatePickupCode; | 80 | + private Integer updatedBy; |
| 79 | - private String pickupCode; | 81 | + private OrderSourceEnum updatedSource; |
| 82 | + } | ||
| 83 | + | ||
| 84 | + | ||
| 85 | + @Data | ||
| 86 | + @Builder | ||
| 87 | + @ApiModel(description = "修改订单响应") | ||
| 88 | + public static class UpdateOrderResponse { | ||
| 89 | + | ||
| 90 | + @ApiModelProperty(name = "isUpdated") | ||
| 91 | + private Boolean isUpdated; | ||
| 80 | } | 92 | } |
| 81 | 93 | ||
| 94 | + | ||
| 82 | @Data | 95 | @Data |
| 83 | @Builder | 96 | @Builder |
| 84 | @ToString | 97 | @ToString |
| ... | @@ -421,9 +434,6 @@ public class OrderDbDTO { | ... | @@ -421,9 +434,6 @@ public class OrderDbDTO { |
| 421 | 434 | ||
| 422 | @ApiModelProperty(value = "调整配料备注") | 435 | @ApiModelProperty(value = "调整配料备注") |
| 423 | private String adjustSkuRemark; | 436 | private String adjustSkuRemark; |
| 424 | - | ||
| 425 | - @ApiModelProperty(value = "订单详情") | ||
| 426 | - private List<OrderDetailDto> orderDetails; | ||
| 427 | } | 437 | } |
| 428 | 438 | ||
| 429 | @Data | 439 | @Data |
| ... | @@ -462,4 +472,80 @@ public class OrderDbDTO { | ... | @@ -462,4 +472,80 @@ public class OrderDbDTO { |
| 462 | private String adjustSkuRemark; | 472 | private String adjustSkuRemark; |
| 463 | } | 473 | } |
| 464 | 474 | ||
| 475 | + @Data | ||
| 476 | + @Builder | ||
| 477 | + @ToString | ||
| 478 | + @ApiModel(description = "批量修改菜品细节信息") | ||
| 479 | + public static class OrderDetailBatchUpdateDto { | ||
| 480 | + private Integer updatedBy; | ||
| 481 | + private OrderSourceEnum updateSource; | ||
| 482 | + private Integer enterpriseId; | ||
| 483 | + private List<OrderDetailUpdateDto> details; | ||
| 484 | + } | ||
| 485 | + | ||
| 486 | + @Data | ||
| 487 | + @Builder | ||
| 488 | + @ToString | ||
| 489 | + @ApiModel(description = "修改菜品细节信息") | ||
| 490 | + public static class OrderDetailUpdateDto { | ||
| 491 | + private Integer id; | ||
| 492 | + | ||
| 493 | + @ApiModelProperty(value = "需要修改菜品详情 id") | ||
| 494 | + private Boolean shouldUpdateMenuDetailId; | ||
| 495 | + | ||
| 496 | + @ApiModelProperty(value = "菜品详情 id") | ||
| 497 | + private Integer menuDetailId; | ||
| 498 | + | ||
| 499 | + @ApiModelProperty(value = "需要修改菜品数量") | ||
| 500 | + private Boolean shouldUpdateCount; | ||
| 501 | + | ||
| 502 | + @ApiModelProperty(value = "菜品所点份数") | ||
| 503 | + private Integer count; | ||
| 504 | + | ||
| 505 | + @ApiModelProperty(value = "需要修改菜品所属餐别 ID") | ||
| 506 | + private Boolean shouldUpdateMealId; | ||
| 507 | + | ||
| 508 | + @ApiModelProperty(value = "菜品所属餐别 ID") | ||
| 509 | + private Integer mealId; | ||
| 510 | + | ||
| 511 | + @ApiModelProperty(value = "需要修改菜品所属分类 ID") | ||
| 512 | + private Boolean shouldUpdateCategoryId; | ||
| 513 | + | ||
| 514 | + @ApiModelProperty(value = "菜品所属品类 ID") | ||
| 515 | + private Integer categoryId; | ||
| 516 | + | ||
| 517 | + @ApiModelProperty(value = "需要修改菜品sku ID") | ||
| 518 | + private Boolean shouldUpdateSkuId; | ||
| 519 | + | ||
| 520 | + @ApiModelProperty(value = "sku id") | ||
| 521 | + private Integer skuId; | ||
| 522 | + | ||
| 523 | + @ApiModelProperty(value = "需要修改菜品展示名称") | ||
| 524 | + private Boolean shouldUpdateShowName; | ||
| 525 | + | ||
| 526 | + @ApiModelProperty(value = "菜品展示名称") | ||
| 527 | + private String showName; | ||
| 528 | + | ||
| 529 | + @ApiModelProperty(value = "需要修改菜品详情") | ||
| 530 | + private Boolean shouldUpdateMealDetailJson; | ||
| 531 | + | ||
| 532 | + @ApiModelProperty(value = "菜品详情,菜品主料、口味、能量、脂肪、蛋白质、碳水化合物、忌口、医嘱等") | ||
| 533 | + private MealDetailDto mealDetailJson; | ||
| 534 | + | ||
| 535 | + @ApiModelProperty(value = "需要修改不出餐") | ||
| 536 | + private Boolean shouldUpdateNotServe; | ||
| 537 | + | ||
| 538 | + @ApiModelProperty(value = "是否不出餐: 默认出餐=0; 不出餐=1") | ||
| 539 | + private Boolean notServe; | ||
| 540 | + } | ||
| 541 | + | ||
| 542 | + @Data | ||
| 543 | + @Builder | ||
| 544 | + @ApiModel(description = "修改订单响应") | ||
| 545 | + public static class BatchUpdateOrderDetailResponse { | ||
| 546 | + | ||
| 547 | + @ApiModelProperty(name = "isUpdated") | ||
| 548 | + private Boolean isUpdated; | ||
| 549 | + } | ||
| 550 | + | ||
| 465 | } | 551 | } | ... | ... |
| ... | @@ -27,6 +27,18 @@ public class SkuDbDTO { | ... | @@ -27,6 +27,18 @@ public class SkuDbDTO { |
| 27 | private String name; | 27 | private String name; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | + @Data | ||
| 31 | + @Builder | ||
| 32 | + @ApiModel(description = "SkuDetailSingleResponseDto") | ||
| 33 | + public static class SkuSpecialDetailSingleResponseDto { | ||
| 34 | + | ||
| 35 | + private Integer id; | ||
| 36 | + | ||
| 37 | + private String code; | ||
| 38 | + | ||
| 39 | + private String name; | ||
| 40 | + } | ||
| 41 | + | ||
| 30 | 42 | ||
| 31 | @Data | 43 | @Data |
| 32 | @Builder | 44 | @Builder |
| ... | @@ -43,14 +55,14 @@ public class SkuDbDTO { | ... | @@ -43,14 +55,14 @@ public class SkuDbDTO { |
| 43 | private String imageUrl; // 图片 | 55 | private String imageUrl; // 图片 |
| 44 | private String alias; | 56 | private String alias; |
| 45 | private String basicMaterials; // 主料 | 57 | private String basicMaterials; // 主料 |
| 46 | - private Integer fat; | 58 | + private String fat; |
| 47 | private Integer protein; | 59 | private Integer protein; |
| 48 | - private Integer carbohydrate; | 60 | + private String carbohydrate; |
| 49 | - private Integer energy; | 61 | + private String energy; |
| 50 | - List<SkuDetailSingleResponseDto> allergyList; // 过敏源 | 62 | + List<SkuSpecialDetailSingleResponseDto> allergyList; // 过敏源 |
| 51 | List<SkuDetailSingleResponseDto> tasteList; // 口味 | 63 | List<SkuDetailSingleResponseDto> tasteList; // 口味 |
| 52 | List<SkuDetailSingleResponseDto> efficacyList; // 功效 | 64 | List<SkuDetailSingleResponseDto> efficacyList; // 功效 |
| 53 | - List<SkuDetailSingleResponseDto> doctorList; // 医嘱 | 65 | + List<SkuSpecialDetailSingleResponseDto> doctorList; // 医嘱 |
| 54 | List<SkuDetailSingleResponseDto> avoidList; // 忌口 | 66 | List<SkuDetailSingleResponseDto> avoidList; // 忌口 |
| 55 | List<SkuDetailSingleResponseDto> skuList; // 配料 | 67 | List<SkuDetailSingleResponseDto> skuList; // 配料 |
| 56 | } | 68 | } | ... | ... |
| 1 | package com.infoloop.tianting.service; | 1 | package com.infoloop.tianting.service; |
| 2 | 2 | ||
| 3 | +import com.infoloop.tianting.clientinventoryservice.QueryClientTableCodesByConditionRpcResponse; | ||
| 3 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; | 4 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; |
| 5 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientTableCodeDto; | ||
| 6 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.TableCodeQueryConditionDto; | ||
| 4 | import java.util.List; | 7 | import java.util.List; |
| 5 | 8 | ||
| 6 | public interface InventoryService { | 9 | public interface InventoryService { |
| ... | @@ -9,4 +12,7 @@ public interface InventoryService { | ... | @@ -9,4 +12,7 @@ public interface InventoryService { |
| 9 | 12 | ||
| 10 | List<ClientDto> getStallsByClientId(Integer enterpriseId, Integer clientId); | 13 | List<ClientDto> getStallsByClientId(Integer enterpriseId, Integer clientId); |
| 11 | 14 | ||
| 15 | + List<ClientTableCodeDto> queryClientTableCodesByCondition( | ||
| 16 | + TableCodeQueryConditionDto tableCodeQueryConditionDto); | ||
| 17 | + | ||
| 12 | } | 18 | } | ... | ... |
| ... | @@ -7,4 +7,5 @@ public interface MealService { | ... | @@ -7,4 +7,5 @@ public interface MealService { |
| 7 | 7 | ||
| 8 | List<MealDto> getMealsByIds(Integer enterpriseId, List<Integer> ids); | 8 | List<MealDto> getMealsByIds(Integer enterpriseId, List<Integer> ids); |
| 9 | 9 | ||
| 10 | + List<MealDto> getAllMeals(Integer enterpriseId); | ||
| 10 | } | 11 | } | ... | ... |
| 1 | +package com.infoloop.tianting.service; | ||
| 2 | + | ||
| 3 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisAllergy; | ||
| 4 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisMedicalAdviceDto; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +public interface MeiZhongYiHeService { | ||
| 8 | + List<HisAllergy> getHisCustomerAllergiesByCustomerId(String hisCustomerId); | ||
| 9 | + | ||
| 10 | + List<HisMedicalAdviceDto> getHisCustomerMedicalAdvicesByContractNo(String contractNo); | ||
| 11 | +} |
| ... | @@ -12,6 +12,10 @@ public interface MenuService { | ... | @@ -12,6 +12,10 @@ public interface MenuService { |
| 12 | 12 | ||
| 13 | List<MenuDto> queryMiniProgramPublishedMenusByStallId(Integer enterpriseId, Integer stallId); | 13 | List<MenuDto> queryMiniProgramPublishedMenusByStallId(Integer enterpriseId, Integer stallId); |
| 14 | 14 | ||
| 15 | + List<MenuDto> queryPublishedMenusByStallId(Integer enterpriseId, Integer stallId); | ||
| 16 | + | ||
| 17 | + MenuDto getMenuById(Integer enterpriseId, Integer id); | ||
| 18 | + | ||
| 15 | List<MenuDetailDto> queryMenuDetailsByMenuId(Integer enterpriseId, Integer menuId); | 19 | List<MenuDetailDto> queryMenuDetailsByMenuId(Integer enterpriseId, Integer menuId); |
| 16 | 20 | ||
| 17 | List<MenuRefDto> getClientCustomerMenuRefsByCustomerId(Integer enterpriseId, Integer customerId); | 21 | List<MenuRefDto> getClientCustomerMenuRefsByCustomerId(Integer enterpriseId, Integer customerId); | ... | ... |
| 1 | package com.infoloop.tianting.service; | 1 | package com.infoloop.tianting.service; |
| 2 | 2 | ||
| 3 | import com.infoloop.tianting.model.common.PageResult; | 3 | import com.infoloop.tianting.model.common.PageResult; |
| 4 | +import com.infoloop.tianting.model.dto.OrderDbDTO.BatchUpdateOrderDetailResponse; | ||
| 4 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; | 5 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; |
| 5 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; | 6 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; |
| 6 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; | 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; |
| 8 | +import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; | ||
| 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 8 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; | 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; |
| 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; | 12 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; |
| 13 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | ||
| 14 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderResponse; | ||
| 11 | import java.util.List; | 15 | import java.util.List; |
| 12 | 16 | ||
| 13 | public interface OrderService { | 17 | public interface OrderService { |
| ... | @@ -16,4 +20,6 @@ public interface OrderService { | ... | @@ -16,4 +20,6 @@ public interface OrderService { |
| 16 | PageResult<OrderDto> getOrdersByPagination(QueryOrderByPaginationDto queryOrderDto); | 20 | PageResult<OrderDto> getOrdersByPagination(QueryOrderByPaginationDto queryOrderDto); |
| 17 | List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId); | 21 | List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId); |
| 18 | CreateOrderResponse createOrder(CreateOrderDto createOrderDto); | 22 | CreateOrderResponse createOrder(CreateOrderDto createOrderDto); |
| 23 | + UpdateOrderResponse updateOrder(UpdateOrderDto updateOrderDto); | ||
| 24 | + BatchUpdateOrderDetailResponse batchUpdateOrderDetails(OrderDetailBatchUpdateDto batchUpdateDto); | ||
| 19 | } | 25 | } | ... | ... |
| ... | @@ -4,7 +4,10 @@ import com.infoloop.tianting.clientinventoryservice.GetClientByIdRpcRequest; | ... | @@ -4,7 +4,10 @@ import com.infoloop.tianting.clientinventoryservice.GetClientByIdRpcRequest; |
| 4 | import com.infoloop.tianting.clientinventoryservice.GetClientByIdRpcResponse; | 4 | import com.infoloop.tianting.clientinventoryservice.GetClientByIdRpcResponse; |
| 5 | import com.infoloop.tianting.clientinventoryservice.GetStallsByClientIdRpcRequest; | 5 | import com.infoloop.tianting.clientinventoryservice.GetStallsByClientIdRpcRequest; |
| 6 | import com.infoloop.tianting.clientinventoryservice.GetStallsByClientIdRpcResponse; | 6 | import com.infoloop.tianting.clientinventoryservice.GetStallsByClientIdRpcResponse; |
| 7 | +import com.infoloop.tianting.clientinventoryservice.QueryClientTableCodesByConditionRpcRequest; | ||
| 8 | +import com.infoloop.tianting.clientinventoryservice.QueryClientTableCodesByConditionRpcResponse; | ||
| 7 | import com.infoloop.tianting.clientinventoryservice.TiantingClientInventoryServiceRpcGrpc; | 9 | import com.infoloop.tianting.clientinventoryservice.TiantingClientInventoryServiceRpcGrpc; |
| 10 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.TableCodeQueryConditionDto; | ||
| 8 | import lombok.RequiredArgsConstructor; | 11 | import lombok.RequiredArgsConstructor; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
| ... | @@ -34,5 +37,18 @@ public class InventoryServiceRpcClient { | ... | @@ -34,5 +37,18 @@ public class InventoryServiceRpcClient { |
| 34 | return inventoryServiceRpcBlockingStub.getStallsByClientId(request); | 37 | return inventoryServiceRpcBlockingStub.getStallsByClientId(request); |
| 35 | } | 38 | } |
| 36 | 39 | ||
| 40 | + public QueryClientTableCodesByConditionRpcResponse queryClientTableCodesByCondition( | ||
| 41 | + TableCodeQueryConditionDto tableCodeQueryConditionDto) { | ||
| 42 | + final var request = QueryClientTableCodesByConditionRpcRequest | ||
| 43 | + .newBuilder() | ||
| 44 | + .setEnterpriseId(tableCodeQueryConditionDto.getEnterpriseId()) | ||
| 45 | + .setShouldFilterClientIds(tableCodeQueryConditionDto.getShouldFilterClientIds()) | ||
| 46 | + .addAllClientIds(tableCodeQueryConditionDto.getClientIds()) | ||
| 47 | + .setShouldFilterStallIds(tableCodeQueryConditionDto.getShouldFilterStallIds()) | ||
| 48 | + .addAllStallIds(tableCodeQueryConditionDto.getStallIds()) | ||
| 49 | + .build(); | ||
| 50 | + return inventoryServiceRpcBlockingStub.queryClientTableCodesByCondition(request); | ||
| 51 | + } | ||
| 52 | + | ||
| 37 | 53 | ||
| 38 | } | 54 | } | ... | ... |
| 1 | package com.infoloop.tianting.service.client; | 1 | package com.infoloop.tianting.service.client; |
| 2 | 2 | ||
| 3 | +import com.infoloop.tianting.setmealscheduleservice.GetAllMealsRpcRequest; | ||
| 4 | +import com.infoloop.tianting.setmealscheduleservice.GetAllMealsRpcResponse; | ||
| 3 | import com.infoloop.tianting.setmealscheduleservice.GetMealsByIdsRpcRequest; | 5 | import com.infoloop.tianting.setmealscheduleservice.GetMealsByIdsRpcRequest; |
| 4 | import com.infoloop.tianting.setmealscheduleservice.GetMealsByIdsRpcResponse; | 6 | import com.infoloop.tianting.setmealscheduleservice.GetMealsByIdsRpcResponse; |
| 5 | import com.infoloop.tianting.setmealscheduleservice.SetMealScheduleServiceRpcGrpc; | 7 | import com.infoloop.tianting.setmealscheduleservice.SetMealScheduleServiceRpcGrpc; |
| ... | @@ -24,4 +26,14 @@ public class MealServiceRpcClient { | ... | @@ -24,4 +26,14 @@ public class MealServiceRpcClient { |
| 24 | return setMealScheduleServiceRpcBlockingStub.getMealsByIds(request); | 26 | return setMealScheduleServiceRpcBlockingStub.getMealsByIds(request); |
| 25 | } | 27 | } |
| 26 | 28 | ||
| 29 | + public GetAllMealsRpcResponse getAllMeals(Integer enterpriseId) { | ||
| 30 | + final var request = GetAllMealsRpcRequest.newBuilder() | ||
| 31 | + .setEnterpriseId(enterpriseId) | ||
| 32 | + .setIncludeDeleted(false) | ||
| 33 | + .build(); | ||
| 34 | + return setMealScheduleServiceRpcBlockingStub.getAllMeals(request); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + | ||
| 27 | } | 39 | } | ... | ... |
| 1 | +package com.infoloop.tianting.service.client; | ||
| 2 | + | ||
| 3 | +import com.infoloop.rpc.meizhongyiheservice.GetCustomerAllergiesByCustomerIdsRpcRequest; | ||
| 4 | +import com.infoloop.rpc.meizhongyiheservice.GetCustomerAllergiesByCustomerIdsRpcResponse; | ||
| 5 | +import com.infoloop.rpc.meizhongyiheservice.GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest; | ||
| 6 | +import com.infoloop.rpc.meizhongyiheservice.GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse; | ||
| 7 | +import com.infoloop.rpc.meizhongyiheservice.MeiZhongYiHeServiceRpcGrpc; | ||
| 8 | +import java.util.List; | ||
| 9 | +import lombok.RequiredArgsConstructor; | ||
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | +import org.springframework.stereotype.Service; | ||
| 12 | + | ||
| 13 | +@Service | ||
| 14 | +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) | ||
| 15 | +public class MeiZhongYiHeServiceClient { | ||
| 16 | + | ||
| 17 | + private final MeiZhongYiHeServiceRpcGrpc.MeiZhongYiHeServiceRpcBlockingStub | ||
| 18 | + meiZhongYiHeServiceRpcBlockingStub; | ||
| 19 | + | ||
| 20 | + public GetCustomerAllergiesByCustomerIdsRpcResponse getHisCustomerAllergiesByCustomerId( | ||
| 21 | + String hisCustomerId ) { | ||
| 22 | + final var request = GetCustomerAllergiesByCustomerIdsRpcRequest.newBuilder() | ||
| 23 | + .addAllCustomerIds(List.of(hisCustomerId)) | ||
| 24 | + .build(); | ||
| 25 | + return meiZhongYiHeServiceRpcBlockingStub.getCustomerAllergiesByCustomerIds(request); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse | ||
| 29 | + getHisCustomerMedicalAdvicesByContractNo (String contractNo) { | ||
| 30 | + final var request = GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest.newBuilder() | ||
| 31 | + .addAllHospitalRecordIds(List.of(contractNo)) | ||
| 32 | + .build(); | ||
| 33 | + return meiZhongYiHeServiceRpcBlockingStub.getCustomerMedicalAdvicesByHospitalRecordIds(request); | ||
| 34 | + } | ||
| 35 | +} |
| ... | @@ -5,10 +5,14 @@ import com.infoloop.tianting.menuservice.BatchCreateClientCustomerMenuRefsRpcRes | ... | @@ -5,10 +5,14 @@ import com.infoloop.tianting.menuservice.BatchCreateClientCustomerMenuRefsRpcRes |
| 5 | import com.infoloop.tianting.menuservice.ClientCustomerMenuRefCreation; | 5 | import com.infoloop.tianting.menuservice.ClientCustomerMenuRefCreation; |
| 6 | import com.infoloop.tianting.menuservice.GetClientCustomerMenuRefsByCustomerIdRpcRequest; | 6 | import com.infoloop.tianting.menuservice.GetClientCustomerMenuRefsByCustomerIdRpcRequest; |
| 7 | import com.infoloop.tianting.menuservice.GetClientCustomerMenuRefsByCustomerIdRpcResponse; | 7 | import com.infoloop.tianting.menuservice.GetClientCustomerMenuRefsByCustomerIdRpcResponse; |
| 8 | +import com.infoloop.tianting.menuservice.GetMenuByIdRpcRequest; | ||
| 9 | +import com.infoloop.tianting.menuservice.GetMenuByIdRpcResponse; | ||
| 8 | import com.infoloop.tianting.menuservice.GetMenuDetailsByMenuIdsRpcRequest; | 10 | import com.infoloop.tianting.menuservice.GetMenuDetailsByMenuIdsRpcRequest; |
| 9 | import com.infoloop.tianting.menuservice.GetMenuDetailsByMenuIdsRpcResponse; | 11 | import com.infoloop.tianting.menuservice.GetMenuDetailsByMenuIdsRpcResponse; |
| 10 | import com.infoloop.tianting.menuservice.GetMicroPublishedMenusByStallIdsRpcRequest; | 12 | import com.infoloop.tianting.menuservice.GetMicroPublishedMenusByStallIdsRpcRequest; |
| 11 | import com.infoloop.tianting.menuservice.GetMicroPublishedMenusByStallIdsRpcResponse; | 13 | import com.infoloop.tianting.menuservice.GetMicroPublishedMenusByStallIdsRpcResponse; |
| 14 | +import com.infoloop.tianting.menuservice.GetPublishedMenusByStallIdsRpcRequest; | ||
| 15 | +import com.infoloop.tianting.menuservice.GetPublishedMenusByStallIdsRpcResponse; | ||
| 12 | import com.infoloop.tianting.menuservice.MenuServiceRpcGrpc; | 16 | import com.infoloop.tianting.menuservice.MenuServiceRpcGrpc; |
| 13 | import com.infoloop.tianting.model.dto.MenuDbDTO.BatchCreateMenuRefsDto; | 17 | import com.infoloop.tianting.model.dto.MenuDbDTO.BatchCreateMenuRefsDto; |
| 14 | import com.infoloop.tianting.utils.DateUtil; | 18 | import com.infoloop.tianting.utils.DateUtil; |
| ... | @@ -25,9 +29,8 @@ import org.springframework.stereotype.Service; | ... | @@ -25,9 +29,8 @@ import org.springframework.stereotype.Service; |
| 25 | public class MenuServiceRpcClient { | 29 | public class MenuServiceRpcClient { |
| 26 | private final MenuServiceRpcGrpc.MenuServiceRpcBlockingStub menuServiceRpcBlockingStub; | 30 | private final MenuServiceRpcGrpc.MenuServiceRpcBlockingStub menuServiceRpcBlockingStub; |
| 27 | 31 | ||
| 28 | - public GetMicroPublishedMenusByStallIdsRpcResponse queryMiniProgramPublishedMenusByStallIds( | 32 | + public GetMicroPublishedMenusByStallIdsRpcResponse queryMiniProgramPublishedMenusByStallId( |
| 29 | Integer enterpriseId, Integer stallId) { | 33 | Integer enterpriseId, Integer stallId) { |
| 30 | - List<Integer> stallIds; | ||
| 31 | final var request = GetMicroPublishedMenusByStallIdsRpcRequest.newBuilder() | 34 | final var request = GetMicroPublishedMenusByStallIdsRpcRequest.newBuilder() |
| 32 | .setEnterpriseId(enterpriseId) | 35 | .setEnterpriseId(enterpriseId) |
| 33 | .addAllStallIds(List.of(stallId)) | 36 | .addAllStallIds(List.of(stallId)) |
| ... | @@ -36,6 +39,24 @@ public class MenuServiceRpcClient { | ... | @@ -36,6 +39,24 @@ public class MenuServiceRpcClient { |
| 36 | return menuServiceRpcBlockingStub.getMicroPublishedMenusByStallIds(request); | 39 | return menuServiceRpcBlockingStub.getMicroPublishedMenusByStallIds(request); |
| 37 | } | 40 | } |
| 38 | 41 | ||
| 42 | + public GetPublishedMenusByStallIdsRpcResponse queryPublishedMenusByStallId( | ||
| 43 | + Integer enterpriseId, Integer stallId) { | ||
| 44 | + final var request = GetPublishedMenusByStallIdsRpcRequest.newBuilder() | ||
| 45 | + .setEnterpriseId(enterpriseId) | ||
| 46 | + .addAllStallIds(List.of(stallId)) | ||
| 47 | + .build(); | ||
| 48 | + return menuServiceRpcBlockingStub.getPublishedMenusByStallIds(request); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public GetMenuByIdRpcResponse getMenuById(Integer enterpriseId, Integer id) { | ||
| 52 | + final var request = GetMenuByIdRpcRequest.newBuilder() | ||
| 53 | + .setEnterpriseId(enterpriseId) | ||
| 54 | + .setId(id) | ||
| 55 | + .setIncludeDeleted(false) | ||
| 56 | + .build(); | ||
| 57 | + return menuServiceRpcBlockingStub.getMenuById(request); | ||
| 58 | + } | ||
| 59 | + | ||
| 39 | public GetMenuDetailsByMenuIdsRpcResponse queryMenuDetailsByMenuId( | 60 | public GetMenuDetailsByMenuIdsRpcResponse queryMenuDetailsByMenuId( |
| 40 | Integer enterpriseId, Integer menuId) { | 61 | Integer enterpriseId, Integer menuId) { |
| 41 | final var request = GetMenuDetailsByMenuIdsRpcRequest.newBuilder() | 62 | final var request = GetMenuDetailsByMenuIdsRpcRequest.newBuilder() | ... | ... |
| 1 | package com.infoloop.tianting.service.client; | 1 | package com.infoloop.tianting.service.client; |
| 2 | 2 | ||
| 3 | +import com.infoloop.tianting.clientcustomerorderservice.BatchUpdateClientCustomerOrderDetailsRpcRequest; | ||
| 4 | +import com.infoloop.tianting.clientcustomerorderservice.BatchUpdateClientCustomerOrderDetailsRpcResponse; | ||
| 3 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderCreation; | 5 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderCreation; |
| 4 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderDetailCreation; | 6 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderDetailCreation; |
| 7 | +import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderDetailModification; | ||
| 8 | +import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderModification; | ||
| 5 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderServiceRpcGrpc; | 9 | import com.infoloop.tianting.clientcustomerorderservice.ClientCustomerOrderServiceRpcGrpc; |
| 6 | import com.infoloop.tianting.clientcustomerorderservice.CloseTimeType; | 10 | import com.infoloop.tianting.clientcustomerorderservice.CloseTimeType; |
| 7 | import com.infoloop.tianting.clientcustomerorderservice.CreateClientCustomerOrderRpcRequest; | 11 | import com.infoloop.tianting.clientcustomerorderservice.CreateClientCustomerOrderRpcRequest; |
| ... | @@ -19,18 +23,24 @@ import com.infoloop.tianting.clientcustomerorderservice.QueryClientCustomerOrder | ... | @@ -19,18 +23,24 @@ import com.infoloop.tianting.clientcustomerorderservice.QueryClientCustomerOrder |
| 19 | import com.infoloop.tianting.clientcustomerorderservice.QueryClientCustomerOrdersByPaginationRpcResponse; | 23 | import com.infoloop.tianting.clientcustomerorderservice.QueryClientCustomerOrdersByPaginationRpcResponse; |
| 20 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderDetailRpcResponse; | 24 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderDetailRpcResponse; |
| 21 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderRpcResponse; | 25 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderRpcResponse; |
| 26 | +import com.infoloop.tianting.clientcustomerorderservice.UpdateClientCustomerOrderRpcRequest; | ||
| 27 | +import com.infoloop.tianting.clientcustomerorderservice.UpdateClientCustomerOrderRpcResponse; | ||
| 22 | import com.infoloop.tianting.enums.OrderTypeEnum; | 28 | import com.infoloop.tianting.enums.OrderTypeEnum; |
| 23 | import com.infoloop.tianting.model.common.PageResult; | 29 | import com.infoloop.tianting.model.common.PageResult; |
| 24 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDetailDto; | 30 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDetailDto; |
| 25 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; | 31 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; |
| 26 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; | 32 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; |
| 33 | +import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; | ||
| 27 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 34 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 28 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 35 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 29 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; | 36 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; |
| 37 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | ||
| 30 | import io.swagger.models.auth.In; | 38 | import io.swagger.models.auth.In; |
| 31 | import java.time.ZoneOffset; | 39 | import java.time.ZoneOffset; |
| 32 | import java.util.ArrayList; | 40 | import java.util.ArrayList; |
| 33 | import java.util.List; | 41 | import java.util.List; |
| 42 | +import java.util.stream.Collector; | ||
| 43 | +import java.util.stream.Collectors; | ||
| 34 | import lombok.RequiredArgsConstructor; | 44 | import lombok.RequiredArgsConstructor; |
| 35 | import org.springframework.beans.factory.annotation.Autowired; | 45 | import org.springframework.beans.factory.annotation.Autowired; |
| 36 | import org.springframework.stereotype.Service; | 46 | import org.springframework.stereotype.Service; |
| ... | @@ -55,6 +65,69 @@ public class OrderServiceRpcClient { | ... | @@ -55,6 +65,69 @@ public class OrderServiceRpcClient { |
| 55 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByCondition(request).getResponsesList(); | 65 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByCondition(request).getResponsesList(); |
| 56 | } | 66 | } |
| 57 | 67 | ||
| 68 | + public UpdateClientCustomerOrderRpcResponse updateClientCustomerOrder( | ||
| 69 | + UpdateOrderDto updateOrderDto) { | ||
| 70 | + final var modification = ClientCustomerOrderModification.newBuilder() | ||
| 71 | + .setId(updateOrderDto.getId()) | ||
| 72 | + .setShouldUpdateStatus(updateOrderDto.isShouldUpdateStatus()) | ||
| 73 | + .setStatus(updateOrderDto.getStatus()) | ||
| 74 | + .setShouldUpdateTableCode(updateOrderDto.isShouldUpdateTableCode()) | ||
| 75 | + .setTableCode(updateOrderDto.getTableCode()) | ||
| 76 | + .build(); | ||
| 77 | + final var request = UpdateClientCustomerOrderRpcRequest.newBuilder() | ||
| 78 | + .setEnterpriseId(updateOrderDto.getEnterpriseId()) | ||
| 79 | + .setUpdatedBy(updateOrderDto.getUpdatedBy()) | ||
| 80 | + .setUpdateSource(updateOrderDto.getUpdatedSource()) | ||
| 81 | + .setModification(modification) | ||
| 82 | + .build(); | ||
| 83 | + return orderServiceRpcBlockingStub.updateClientCustomerOrder(request); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + | ||
| 87 | + public BatchUpdateClientCustomerOrderDetailsRpcResponse batchUpdateClientCustomerOrderDetails( | ||
| 88 | + OrderDetailBatchUpdateDto orderDetailBatchUpdateDto) { | ||
| 89 | + final var modifications = orderDetailBatchUpdateDto.getDetails().stream().map( d-> | ||
| 90 | + ClientCustomerOrderDetailModification.newBuilder() | ||
| 91 | + .setId(d.getId()) | ||
| 92 | + .setShouldUpdateMenuDetailId(d.getShouldUpdateMenuDetailId()) | ||
| 93 | + .setMenuDetailId(d.getMenuDetailId()) | ||
| 94 | + .setShouldUpdateCount(d.getShouldUpdateCount()) | ||
| 95 | + .setCount(d.getCount()) | ||
| 96 | + .setShouldUpdateMealId(d.getShouldUpdateMealId()) | ||
| 97 | + .setMealId(d.getMealId()) | ||
| 98 | + .setShouldUpdateCategoryId(d.getShouldUpdateCategoryId()) | ||
| 99 | + .setCategoryId(d.getCategoryId()) | ||
| 100 | + .setShouldUpdateSkuId(d.getShouldUpdateSkuId()) | ||
| 101 | + .setSkuId(d.getSkuId()) | ||
| 102 | + .setShouldUpdateShowName(d.getShouldUpdateShowName()) | ||
| 103 | + .setShowName(d.getShowName()) | ||
| 104 | + .setShouldUpdateNotServe(d.getShouldUpdateNotServe()) | ||
| 105 | + .setNotServe(d.getNotServe()) | ||
| 106 | + .setShouldUpdateMealDetailJson(d.getShouldUpdateMealDetailJson()) | ||
| 107 | + .setMealDetailJson(MealDetail.newBuilder() | ||
| 108 | + .setBasicMaterials(d.getMealDetailJson().getBasicMaterials()) | ||
| 109 | + .addAllTastes(d.getMealDetailJson().getTastes()) | ||
| 110 | + .addAllEfficacies(d.getMealDetailJson().getEfficacies()) | ||
| 111 | + .addAllDockers(d.getMealDetailJson().getDockers()) | ||
| 112 | + .setEnergy(d.getMealDetailJson().getEnergy()) | ||
| 113 | + .setFat(d.getMealDetailJson().getFat()) | ||
| 114 | + .setProtein(d.getMealDetailJson().getProtein()) | ||
| 115 | + .setCarbohydrate(d.getMealDetailJson().getCarbohydrate()) | ||
| 116 | + .addAllAllergies(d.getMealDetailJson().getAllergies()) | ||
| 117 | + .addAllAvoids(d.getMealDetailJson().getAvoids()) | ||
| 118 | + .addAllSkus(d.getMealDetailJson().getSkus()) | ||
| 119 | + .build()) | ||
| 120 | + .build() | ||
| 121 | + ).collect(Collectors.toList()); | ||
| 122 | + final var request = BatchUpdateClientCustomerOrderDetailsRpcRequest.newBuilder() | ||
| 123 | + .setEnterpriseId(orderDetailBatchUpdateDto.getEnterpriseId()) | ||
| 124 | + .setUpdatedBy(orderDetailBatchUpdateDto.getUpdatedBy()) | ||
| 125 | + .setUpdateSourceValue(orderDetailBatchUpdateDto.getUpdateSource().getNumber()) | ||
| 126 | + .addAllModifications(modifications) | ||
| 127 | + .build(); | ||
| 128 | + return orderServiceRpcBlockingStub.batchUpdateClientCustomerOrderDetails(request); | ||
| 129 | + } | ||
| 130 | + | ||
| 58 | public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination( | 131 | public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination( |
| 59 | QueryOrderByPaginationDto queryOrderDto) { | 132 | QueryOrderByPaginationDto queryOrderDto) { |
| 60 | final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() | 133 | final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() |
| ... | @@ -152,6 +225,7 @@ public class OrderServiceRpcClient { | ... | @@ -152,6 +225,7 @@ public class OrderServiceRpcClient { |
| 152 | .setTableCode(createOrderDto.getTableCode()) | 225 | .setTableCode(createOrderDto.getTableCode()) |
| 153 | .setShouldCreatePickupCode(createOrderDto.getCloseTimeType().equals(CloseTimeType.IMMEDIATELY)) | 226 | .setShouldCreatePickupCode(createOrderDto.getCloseTimeType().equals(CloseTimeType.IMMEDIATELY)) |
| 154 | // .setPickupCode(createOrderDto.getPickupCode()) | 227 | // .setPickupCode(createOrderDto.getPickupCode()) |
| 228 | + .setShouldCreateRemark(true) | ||
| 155 | .setRemark(createOrderDto.getRemark()) | 229 | .setRemark(createOrderDto.getRemark()) |
| 156 | .setCustomerNoticeJson(customerNotice) | 230 | .setCustomerNoticeJson(customerNotice) |
| 157 | .setCloseTimeType(createOrderDto.getCloseTimeType()) | 231 | .setCloseTimeType(createOrderDto.getCloseTimeType()) | ... | ... |
| 1 | package com.infoloop.tianting.service.impl; | 1 | package com.infoloop.tianting.service.impl; |
| 2 | 2 | ||
| 3 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; | 3 | import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientDto; |
| 4 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.ClientTableCodeDto; | ||
| 5 | +import com.infoloop.tianting.model.dto.InventoryDbDTO.TableCodeQueryConditionDto; | ||
| 4 | import com.infoloop.tianting.model.dto.MenuDbDTO.MenuDetailDto; | 6 | import com.infoloop.tianting.model.dto.MenuDbDTO.MenuDetailDto; |
| 5 | import com.infoloop.tianting.service.InventoryService; | 7 | import com.infoloop.tianting.service.InventoryService; |
| 6 | import com.infoloop.tianting.service.client.InventoryServiceRpcClient; | 8 | import com.infoloop.tianting.service.client.InventoryServiceRpcClient; |
| ... | @@ -64,4 +66,27 @@ public class InventoryServiceImpl implements InventoryService { | ... | @@ -64,4 +66,27 @@ public class InventoryServiceImpl implements InventoryService { |
| 64 | .isDelivery(stall.getIsDelivery()) | 66 | .isDelivery(stall.getIsDelivery()) |
| 65 | .build()).collect(Collectors.toList()); | 67 | .build()).collect(Collectors.toList()); |
| 66 | } | 68 | } |
| 69 | + | ||
| 70 | + @Override | ||
| 71 | + public List<ClientTableCodeDto> queryClientTableCodesByCondition( | ||
| 72 | + TableCodeQueryConditionDto tableCodeQueryConditionDto) { | ||
| 73 | + final var response = inventoryServiceRpcClient.queryClientTableCodesByCondition( | ||
| 74 | + tableCodeQueryConditionDto); | ||
| 75 | + return response.getResponsesList().stream().map(tableCode -> | ||
| 76 | + ClientTableCodeDto.builder() | ||
| 77 | + .id(tableCode.getId()) | ||
| 78 | + .clientId(tableCode.getClientId()) | ||
| 79 | + .enterpriseId(tableCode.getEnterpriseId()) | ||
| 80 | + .stallId(tableCode.getStallId()) | ||
| 81 | + .code(tableCode.getCode()) | ||
| 82 | + .name(tableCode.getName()) | ||
| 83 | + .url(tableCode.getUrl()) | ||
| 84 | + .createdAt(DateUtil.formatDate(tableCode.getCreatedAt())) | ||
| 85 | + .createdBy(tableCode.getCreatedBy()) | ||
| 86 | + .creationSource(tableCode.getCreationSource()) | ||
| 87 | + .updatedAt(DateUtil.formatDate(tableCode.getUpdatedAt())) | ||
| 88 | + .updatedBy(tableCode.getUpdatedBy()) | ||
| 89 | + .updateSource(tableCode.getUpdateSource()) | ||
| 90 | + .build()).collect(Collectors.toList()); | ||
| 91 | + } | ||
| 67 | } | 92 | } | ... | ... |
| ... | @@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.SaLoginModel; | ... | @@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.SaLoginModel; |
| 4 | import cn.dev33.satoken.stp.SaTokenInfo; | 4 | import cn.dev33.satoken.stp.SaTokenInfo; |
| 5 | import cn.dev33.satoken.stp.StpUtil; | 5 | import cn.dev33.satoken.stp.StpUtil; |
| 6 | import com.infoloop.tianting.COperatorServiceProtoRpcGrpc; | 6 | import com.infoloop.tianting.COperatorServiceProtoRpcGrpc; |
| 7 | +import com.infoloop.tianting.clientcustomerservice.ClientCustomerHospitalRecordHospitalStatusEnum; | ||
| 7 | import com.infoloop.tianting.clientcustomerservice.GetClientCustomerByIdRpcRequest; | 8 | import com.infoloop.tianting.clientcustomerservice.GetClientCustomerByIdRpcRequest; |
| 8 | import com.infoloop.tianting.clientcustomerservice.SingleClientCustomerRpcResponse; | 9 | import com.infoloop.tianting.clientcustomerservice.SingleClientCustomerRpcResponse; |
| 9 | import com.infoloop.tianting.constant.CommonConstants; | 10 | import com.infoloop.tianting.constant.CommonConstants; |
| ... | @@ -44,10 +45,20 @@ public class LoginServiceImpl implements LoginService { | ... | @@ -44,10 +45,20 @@ public class LoginServiceImpl implements LoginService { |
| 44 | var customer = clientCustomerServiceRpcClient.getClientCustomerByHISCustomerId( | 45 | var customer = clientCustomerServiceRpcClient.getClientCustomerByHISCustomerId( |
| 45 | loginDto.getHisCustomerId()).getResponse(); | 46 | loginDto.getHisCustomerId()).getResponse(); |
| 46 | if (customer.getId() == 0) { | 47 | if (customer.getId() == 0) { |
| 48 | + // 根据hisCustomerId拿不到用户的话再去根据合同号去his查一次,即认为是月子中心客户 | ||
| 47 | customer = clientCustomerServiceRpcClient.getClientCustomerByContactNo(loginDto.getHisCustomerId()).getResponse(); | 49 | customer = clientCustomerServiceRpcClient.getClientCustomerByContactNo(loginDto.getHisCustomerId()).getResponse(); |
| 48 | if (customer.getId() == 0) { | 50 | if (customer.getId() == 0) { |
| 49 | throw ClientEndExceptions.AuthenticationFailure.build(ErrorCodeEnum.UNAUTHORIZED.name()); | 51 | throw ClientEndExceptions.AuthenticationFailure.build(ErrorCodeEnum.UNAUTHORIZED.name()); |
| 52 | + } else { | ||
| 53 | + var record = clientCustomerServiceRpcClient.getClientCustomerHospitalRecordsByCustomerId( | ||
| 54 | + customer.getEnterpriseId(), customer.getId()); | ||
| 55 | + if (!record.hasResponse() || record.getResponse().getHospitalStatus() != | ||
| 56 | + ClientCustomerHospitalRecordHospitalStatusEnum.CURRENT) { | ||
| 57 | + throw ClientEndExceptions.AuthenticationFailure.build(ErrorCodeEnum.UNAUTHORIZED.name()); | ||
| 58 | + } | ||
| 50 | } | 59 | } |
| 60 | + } else { | ||
| 61 | + | ||
| 51 | } | 62 | } |
| 52 | StpUtil.login(customer.getId(), SaLoginModel.create() | 63 | StpUtil.login(customer.getId(), SaLoginModel.create() |
| 53 | .setExtra(CommonConstants.ENTERPRISE_ID, customer.getEnterpriseId()) | 64 | .setExtra(CommonConstants.ENTERPRISE_ID, customer.getEnterpriseId()) | ... | ... |
| ... | @@ -39,4 +39,25 @@ public class MealServiceImpl implements MealService { | ... | @@ -39,4 +39,25 @@ public class MealServiceImpl implements MealService { |
| 39 | ).collect(Collectors.toList()); | 39 | ).collect(Collectors.toList()); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | + @Override | ||
| 43 | + public List<MealDto> getAllMeals(Integer enterpriseId) { | ||
| 44 | + final var response = mealServiceRpcClient.getAllMeals(enterpriseId); | ||
| 45 | + return response.getResponsesList().stream().map( | ||
| 46 | + meal -> MealDto.builder() | ||
| 47 | + .id(meal.getId()) | ||
| 48 | + .allowCreateOrder(meal.getAllowCreateOrder()) | ||
| 49 | + .enterpriseId(meal.getEnterpriseId()) | ||
| 50 | + .name(meal.getName()) | ||
| 51 | + .status(meal.getStatus()) | ||
| 52 | + .isDeleted(meal.getIsDeleted()) | ||
| 53 | + .createdAt(DateUtil.formatDate(meal.getCreatedAt())) | ||
| 54 | + .createdBy(meal.getCreatedBy()) | ||
| 55 | + .createdBy(meal.getCreationSource()) | ||
| 56 | + .updatedAt(DateUtil.formatDate(meal.getUpdatedAt())) | ||
| 57 | + .updatedBy(meal.getUpdatedBy()) | ||
| 58 | + .updateSource(meal.getUpdateSource()) | ||
| 59 | + .build() | ||
| 60 | + ).collect(Collectors.toList()); | ||
| 61 | + } | ||
| 62 | + | ||
| 42 | } | 63 | } | ... | ... |
| 1 | +package com.infoloop.tianting.service.impl; | ||
| 2 | + | ||
| 3 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisAllergy; | ||
| 4 | +import com.infoloop.tianting.model.dto.ClientLabelDTO.HisMedicalAdviceDto; | ||
| 5 | +import com.infoloop.tianting.service.MeiZhongYiHeService; | ||
| 6 | +import com.infoloop.tianting.service.client.MeiZhongYiHeServiceClient; | ||
| 7 | +import com.infoloop.tianting.utils.DateUtil; | ||
| 8 | +import java.util.ArrayList; | ||
| 9 | +import java.util.List; | ||
| 10 | +import java.util.stream.Collectors; | ||
| 11 | +import lombok.RequiredArgsConstructor; | ||
| 12 | +import lombok.extern.slf4j.Slf4j; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.stereotype.Service; | ||
| 15 | + | ||
| 16 | +@Slf4j | ||
| 17 | +@Service | ||
| 18 | +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) | ||
| 19 | +public class MeiZhongYiHeServiceImpl implements MeiZhongYiHeService { | ||
| 20 | + | ||
| 21 | + private final MeiZhongYiHeServiceClient meiZhongYiHeServiceClient; | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + public List<HisAllergy> getHisCustomerAllergiesByCustomerId(String hisCustomerId) { | ||
| 25 | + final var response = meiZhongYiHeServiceClient.getHisCustomerAllergiesByCustomerId(hisCustomerId); | ||
| 26 | + if (response.getCustomerAllergiesCount() == 0) { | ||
| 27 | + return new ArrayList<>(); | ||
| 28 | + } | ||
| 29 | + return response.getCustomerAllergies(0).getAllergiesList().stream().map(allergy -> | ||
| 30 | + HisAllergy.builder() | ||
| 31 | + .allergyCode(allergy.getAllergyCode()) | ||
| 32 | + .allergyDescription(allergy.getAllergyDescription()) | ||
| 33 | + .allergyId(allergy.getAllergyId()) | ||
| 34 | + .createdAt(DateUtil.formatDate(allergy.getCreatedAt())) | ||
| 35 | + .build()).collect(Collectors.toList()); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public List<HisMedicalAdviceDto> getHisCustomerMedicalAdvicesByContractNo(String contractNo){ | ||
| 40 | + final var response = meiZhongYiHeServiceClient.getHisCustomerMedicalAdvicesByContractNo( | ||
| 41 | + contractNo); | ||
| 42 | + if (response.getCustomerMedicalAdvicesCount() == 0){ | ||
| 43 | + return new ArrayList<>(); | ||
| 44 | + } | ||
| 45 | + return response.getCustomerMedicalAdvices(0).getMedicalAdvicesList().stream().map( | ||
| 46 | + advice -> | ||
| 47 | + HisMedicalAdviceDto.builder() | ||
| 48 | + .connotation(advice.getConnotation()) | ||
| 49 | + .effectDate(DateUtil.formatDate(advice.getEffectDate())) | ||
| 50 | + .medicalAdvice(advice.getMedicalAdvice()) | ||
| 51 | + .medicalAdviceCode(advice.getMedicalAdviceCode()) | ||
| 52 | + .medicalAdviceId(advice.getMedicalAdviceId()) | ||
| 53 | + .medicalAdviceType(advice.getMedicalAdviceType()) | ||
| 54 | + .medicalTime(DateUtil.formatDate(advice.getMedicalTime())) | ||
| 55 | + .build() | ||
| 56 | + ).collect(Collectors.toList()); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | +} |
| ... | @@ -28,7 +28,7 @@ public class MenuServiceImpl implements MenuService { | ... | @@ -28,7 +28,7 @@ public class MenuServiceImpl implements MenuService { |
| 28 | public List<MenuDto> queryMiniProgramPublishedMenusByStallId( | 28 | public List<MenuDto> queryMiniProgramPublishedMenusByStallId( |
| 29 | Integer enterpriseId, Integer stallId) { | 29 | Integer enterpriseId, Integer stallId) { |
| 30 | 30 | ||
| 31 | - final var response = menuServiceRpcClient.queryMiniProgramPublishedMenusByStallIds( | 31 | + final var response = menuServiceRpcClient.queryMiniProgramPublishedMenusByStallId( |
| 32 | enterpriseId, stallId); | 32 | enterpriseId, stallId); |
| 33 | return response.getResponsesList().stream().map(menu -> | 33 | return response.getResponsesList().stream().map(menu -> |
| 34 | MenuDto.builder() | 34 | MenuDto.builder() |
| ... | @@ -67,6 +67,87 @@ public class MenuServiceImpl implements MenuService { | ... | @@ -67,6 +67,87 @@ public class MenuServiceImpl implements MenuService { |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | @Override | 69 | @Override |
| 70 | + public List<MenuDto> queryPublishedMenusByStallId( | ||
| 71 | + Integer enterpriseId, Integer stallId) { | ||
| 72 | + | ||
| 73 | + final var response = menuServiceRpcClient.queryPublishedMenusByStallId( | ||
| 74 | + enterpriseId, stallId); | ||
| 75 | + return response.getResponsesList().stream().map(menu -> | ||
| 76 | + MenuDto.builder() | ||
| 77 | + .id(menu.getId()) | ||
| 78 | + .code(menu.getCode()) | ||
| 79 | + .enterpriseId(menu.getEnterpriseId()) | ||
| 80 | + .name(menu.getName()) | ||
| 81 | + .status(menu.getStatusValue()) | ||
| 82 | + .customerScope(menu.getCustomerScope()) | ||
| 83 | + .nutritionPromotion(menu.getNutritionPromotion()) | ||
| 84 | + .nutritionalStatistics(menu.getNutritionalStatistics()) | ||
| 85 | + .dishRuleJson(DishRuleJson.builder() | ||
| 86 | + .days(menu.getDishRuleJson().getDays()) | ||
| 87 | + .dishType(menu.getDishRuleJson().getDishType()) | ||
| 88 | + .mealIds(menu.getDishRuleJson().getMealIdsList()) | ||
| 89 | + .build()) | ||
| 90 | + .orderRuleJson(OrderRuleJson.builder() | ||
| 91 | + .allowMicroPlaceOrder(menu.getOrderRuleJson().getAllowMicroPlaceOrder()) | ||
| 92 | + .closeTimeType(menu.getOrderRuleJson().getCloseTimeType()) | ||
| 93 | + .dishSelectRule(menu.getOrderRuleJson().getDishSelectRule()) | ||
| 94 | + .earlyDays(menu.getOrderRuleJson().getEarlyDays()) | ||
| 95 | + .modeOfPayment(menu.getOrderRuleJson().getModeOfPayment()) | ||
| 96 | + .placeOrderCount(menu.getOrderRuleJson().getPlaceOrderCount()) | ||
| 97 | + .startTime(menu.getOrderRuleJson().getStartTime()) | ||
| 98 | + .endTime(menu.getOrderRuleJson().getEndTime()) | ||
| 99 | + .deadline(menu.getOrderRuleJson().getDeadline()) | ||
| 100 | + .build()) | ||
| 101 | + .createdBy(menu.getCreatedBy()) | ||
| 102 | + .creationSource(menu.getCreationSource()) | ||
| 103 | + .createdAt(DateUtil.formatDate(menu.getCreatedAt())) | ||
| 104 | + .updatedBy(menu.getUpdatedBy()) | ||
| 105 | + .updateSource(menu.getUpdateSource()) | ||
| 106 | + .updatedAt(DateUtil.formatDate(menu.getUpdatedAt())) | ||
| 107 | + .publishAt(DateUtil.formatDate(menu.getPublishAt())) | ||
| 108 | + .build()).collect(Collectors.toList()); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + @Override | ||
| 112 | + public MenuDto getMenuById(Integer enterpriseId, Integer id) { | ||
| 113 | + final var response = menuServiceRpcClient.getMenuById(enterpriseId, id); | ||
| 114 | + final var menu = response.getResponse(); | ||
| 115 | + return MenuDto.builder() | ||
| 116 | + .id(menu.getId()) | ||
| 117 | + .code(menu.getCode()) | ||
| 118 | + .enterpriseId(menu.getEnterpriseId()) | ||
| 119 | + .name(menu.getName()) | ||
| 120 | + .status(menu.getStatusValue()) | ||
| 121 | + .customerScope(menu.getCustomerScope()) | ||
| 122 | + .nutritionPromotion(menu.getNutritionPromotion()) | ||
| 123 | + .nutritionalStatistics(menu.getNutritionalStatistics()) | ||
| 124 | + .dishRuleJson(DishRuleJson.builder() | ||
| 125 | + .days(menu.getDishRuleJson().getDays()) | ||
| 126 | + .dishType(menu.getDishRuleJson().getDishType()) | ||
| 127 | + .mealIds(menu.getDishRuleJson().getMealIdsList()) | ||
| 128 | + .build()) | ||
| 129 | + .orderRuleJson(OrderRuleJson.builder() | ||
| 130 | + .allowMicroPlaceOrder(menu.getOrderRuleJson().getAllowMicroPlaceOrder()) | ||
| 131 | + .closeTimeType(menu.getOrderRuleJson().getCloseTimeType()) | ||
| 132 | + .dishSelectRule(menu.getOrderRuleJson().getDishSelectRule()) | ||
| 133 | + .earlyDays(menu.getOrderRuleJson().getEarlyDays()) | ||
| 134 | + .modeOfPayment(menu.getOrderRuleJson().getModeOfPayment()) | ||
| 135 | + .placeOrderCount(menu.getOrderRuleJson().getPlaceOrderCount()) | ||
| 136 | + .startTime(menu.getOrderRuleJson().getStartTime()) | ||
| 137 | + .endTime(menu.getOrderRuleJson().getEndTime()) | ||
| 138 | + .deadline(menu.getOrderRuleJson().getDeadline()) | ||
| 139 | + .build()) | ||
| 140 | + .createdBy(menu.getCreatedBy()) | ||
| 141 | + .creationSource(menu.getCreationSource()) | ||
| 142 | + .createdAt(DateUtil.formatDate(menu.getCreatedAt())) | ||
| 143 | + .updatedBy(menu.getUpdatedBy()) | ||
| 144 | + .updateSource(menu.getUpdateSource()) | ||
| 145 | + .updatedAt(DateUtil.formatDate(menu.getUpdatedAt())) | ||
| 146 | + .publishAt(DateUtil.formatDate(menu.getPublishAt())) | ||
| 147 | + .build(); | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + @Override | ||
| 70 | public List<MenuDetailDto> queryMenuDetailsByMenuId(Integer enterpriseId, Integer menuId) { | 151 | public List<MenuDetailDto> queryMenuDetailsByMenuId(Integer enterpriseId, Integer menuId) { |
| 71 | final var response = menuServiceRpcClient.queryMenuDetailsByMenuId(enterpriseId, menuId); | 152 | final var response = menuServiceRpcClient.queryMenuDetailsByMenuId(enterpriseId, menuId); |
| 72 | return response.getResponsesList().stream().map(menuDetail -> | 153 | return response.getResponsesList().stream().map(menuDetail -> | ... | ... |
| ... | @@ -3,16 +3,20 @@ package com.infoloop.tianting.service.impl; | ... | @@ -3,16 +3,20 @@ package com.infoloop.tianting.service.impl; |
| 3 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderRpcResponse; | 3 | import com.infoloop.tianting.clientcustomerorderservice.SingleClientCustomerOrderRpcResponse; |
| 4 | import com.infoloop.tianting.clientcustomerservice.SingleClientCustomerRpcResponse; | 4 | import com.infoloop.tianting.clientcustomerservice.SingleClientCustomerRpcResponse; |
| 5 | import com.infoloop.tianting.model.common.PageResult; | 5 | import com.infoloop.tianting.model.common.PageResult; |
| 6 | +import com.infoloop.tianting.model.dto.OrderDbDTO.BatchUpdateOrderDetailResponse; | ||
| 6 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; | 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderDto; |
| 7 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; | 8 | import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse; |
| 8 | import com.infoloop.tianting.model.dto.OrderDbDTO.CustomerDetailDto; | 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.CustomerDetailDto; |
| 9 | import com.infoloop.tianting.model.dto.OrderDbDTO.CustomerNotice; | 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.CustomerNotice; |
| 10 | import com.infoloop.tianting.model.dto.OrderDbDTO.MealDetailDto; | 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.MealDetailDto; |
| 11 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; | 12 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto; |
| 13 | +import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto; | ||
| 12 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; | 14 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailDto; |
| 13 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; | 15 | import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto; |
| 14 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; | 16 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByConditionDto; |
| 15 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; | 17 | import com.infoloop.tianting.model.dto.OrderDbDTO.QueryOrderByPaginationDto; |
| 18 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderDto; | ||
| 19 | +import com.infoloop.tianting.model.dto.OrderDbDTO.UpdateOrderResponse; | ||
| 16 | import com.infoloop.tianting.service.ClientCustomerService; | 20 | import com.infoloop.tianting.service.ClientCustomerService; |
| 17 | import com.infoloop.tianting.service.OrderService; | 21 | import com.infoloop.tianting.service.OrderService; |
| 18 | import com.infoloop.tianting.service.client.ClientCustomerServiceRpcClient; | 22 | import com.infoloop.tianting.service.client.ClientCustomerServiceRpcClient; |
| ... | @@ -40,6 +44,23 @@ public class OrderServiceImpl implements OrderService { | ... | @@ -40,6 +44,23 @@ public class OrderServiceImpl implements OrderService { |
| 40 | } | 44 | } |
| 41 | 45 | ||
| 42 | @Override | 46 | @Override |
| 47 | + public UpdateOrderResponse updateOrder(UpdateOrderDto updateOrderDto) { | ||
| 48 | + final var response = orderServiceRpcClient.updateClientCustomerOrder(updateOrderDto); | ||
| 49 | + return UpdateOrderResponse.builder() | ||
| 50 | + .isUpdated(response.getIsUpdated()) | ||
| 51 | + .build(); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public BatchUpdateOrderDetailResponse batchUpdateOrderDetails( | ||
| 56 | + OrderDetailBatchUpdateDto batchUpdateDto) { | ||
| 57 | + final var response = orderServiceRpcClient.batchUpdateClientCustomerOrderDetails(batchUpdateDto); | ||
| 58 | + return BatchUpdateOrderDetailResponse.builder() | ||
| 59 | + .isUpdated(response.getIsUpdated()) | ||
| 60 | + .build(); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + @Override | ||
| 43 | public List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId) { | 64 | public List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId) { |
| 44 | final var responseList = orderServiceRpcClient.getOrderDetailsByOrderId(orderId); | 65 | final var responseList = orderServiceRpcClient.getOrderDetailsByOrderId(orderId); |
| 45 | return responseList.stream().map(d -> | 66 | return responseList.stream().map(d -> | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.infoloop.tianting.service.impl; | ... | @@ -2,6 +2,7 @@ package com.infoloop.tianting.service.impl; |
| 2 | 2 | ||
| 3 | import com.infoloop.tianting.model.dto.SkuDbDTO.SkuDetailSingleResponseDto; | 3 | import com.infoloop.tianting.model.dto.SkuDbDTO.SkuDetailSingleResponseDto; |
| 4 | import com.infoloop.tianting.model.dto.SkuDbDTO.SkuDto; | 4 | import com.infoloop.tianting.model.dto.SkuDbDTO.SkuDto; |
| 5 | +import com.infoloop.tianting.model.dto.SkuDbDTO.SkuSpecialDetailSingleResponseDto; | ||
| 5 | import com.infoloop.tianting.service.SkuService; | 6 | import com.infoloop.tianting.service.SkuService; |
| 6 | import com.infoloop.tianting.service.client.SkuServiceRpcClient; | 7 | import com.infoloop.tianting.service.client.SkuServiceRpcClient; |
| 7 | import com.infoloop.tianting.utils.DateUtil; | 8 | import com.infoloop.tianting.utils.DateUtil; |
| ... | @@ -37,17 +38,18 @@ public class SkuServiceImpl implements SkuService { | ... | @@ -37,17 +38,18 @@ public class SkuServiceImpl implements SkuService { |
| 37 | .createdAt(DateUtil.formatDate(sku.getCreatedAt())) | 38 | .createdAt(DateUtil.formatDate(sku.getCreatedAt())) |
| 38 | .energy(sku.getEnergy()) | 39 | .energy(sku.getEnergy()) |
| 39 | .fat(sku.getFat()) | 40 | .fat(sku.getFat()) |
| 40 | - .skuList(sku.getSkuListList().stream().map(subSku -> SkuDetailSingleResponseDto.builder().id(subSku.getId()).name(subSku.getName()).build()).collect( | 41 | + .skuList(sku.getSkusList().stream().map(subSku -> SkuDetailSingleResponseDto.builder().id(subSku.getId()).name(subSku.getName()).build()).collect( |
| 41 | Collectors.toList())) | 42 | Collectors.toList())) |
| 42 | - .tasteList(sku.getTasteListList().stream().map(taste -> SkuDetailSingleResponseDto.builder().id(taste.getId()).name(taste.getName()).build()).collect( | 43 | + .tasteList(sku.getTastesList().stream().map(taste -> SkuDetailSingleResponseDto.builder().id(taste.getId()).name(taste.getName()).build()).collect( |
| 43 | Collectors.toList())) | 44 | Collectors.toList())) |
| 44 | - .efficacyList(sku.getEfficacyListList().stream().map(efficacy -> SkuDetailSingleResponseDto.builder().id(efficacy.getId()).name(efficacy.getName()).build()).collect( | 45 | + .efficacyList(sku.getEfficaciesList().stream().map(efficacy -> SkuDetailSingleResponseDto.builder().id(efficacy.getId()).name(efficacy.getName()).build()).collect( |
| 45 | Collectors.toList())) | 46 | Collectors.toList())) |
| 46 | - .doctorList(sku.getDoctorListList().stream().map(doctor -> SkuDetailSingleResponseDto.builder().id(doctor.getId()).name(doctor.getName()).build()).collect( | 47 | + .doctorList(sku.getDoctorsList().stream().map(doctor -> SkuSpecialDetailSingleResponseDto |
| 48 | + .builder().id(doctor.getId()).name(doctor.getName()).build()).collect( | ||
| 47 | Collectors.toList())) | 49 | Collectors.toList())) |
| 48 | - .avoidList(sku.getAvoidListList().stream().map(avoid -> SkuDetailSingleResponseDto.builder().id(avoid.getId()).name(avoid.getName()).build()).collect( | 50 | + .avoidList(sku.getAvoidsList().stream().map(avoid -> SkuDetailSingleResponseDto.builder().id(avoid.getId()).name(avoid.getName()).build()).collect( |
| 49 | Collectors.toList())) | 51 | Collectors.toList())) |
| 50 | - .allergyList(sku.getAllergyListList().stream().map(allergy -> SkuDetailSingleResponseDto.builder().id(allergy.getId()).name(allergy.getName()).build()).collect( | 52 | + .allergyList(sku.getAllergiesList().stream().map(allergy -> SkuSpecialDetailSingleResponseDto.builder().id(allergy.getId()).name(allergy.getName()).build()).collect( |
| 51 | Collectors.toList())) | 53 | Collectors.toList())) |
| 52 | .build() | 54 | .build() |
| 53 | ).collect(Collectors.toList()); | 55 | ).collect(Collectors.toList()); | ... | ... |
| ... | @@ -111,6 +111,7 @@ message SingleClientCustomerOrderRpcResponse { | ... | @@ -111,6 +111,7 @@ message SingleClientCustomerOrderRpcResponse { |
| 111 | OrderSourceEnum updateSource = 31; | 111 | OrderSourceEnum updateSource = 31; |
| 112 | bool isDeleted = 32; | 112 | bool isDeleted = 32; |
| 113 | bool isRead = 33; | 113 | bool isRead = 33; |
| 114 | + bool isConfirm = 34; | ||
| 114 | } | 115 | } |
| 115 | 116 | ||
| 116 | message GetClientCustomerOrderByIdRpcRequest { | 117 | message GetClientCustomerOrderByIdRpcRequest { |
| ... | @@ -202,6 +203,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { | ... | @@ -202,6 +203,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { |
| 202 | int64 createdAtEnd = 41; | 203 | int64 createdAtEnd = 41; |
| 203 | bool shouldFilterIsRead = 42; | 204 | bool shouldFilterIsRead = 42; |
| 204 | bool isRead = 43; | 205 | bool isRead = 43; |
| 206 | + bool shouldFilterIsConfirm = 44; | ||
| 207 | + bool isConfirm = 45; | ||
| 205 | } | 208 | } |
| 206 | 209 | ||
| 207 | message QueryClientCustomerOrdersByConditionRpcResponse { | 210 | message QueryClientCustomerOrdersByConditionRpcResponse { |
| ... | @@ -325,6 +328,8 @@ message ClientCustomerOrderModification { | ... | @@ -325,6 +328,8 @@ message ClientCustomerOrderModification { |
| 325 | CustomerNotice customerNoticeJson = 47; | 328 | CustomerNotice customerNoticeJson = 47; |
| 326 | bool shouldUpdateIsRead = 48; | 329 | bool shouldUpdateIsRead = 48; |
| 327 | bool isRead = 49; | 330 | bool isRead = 49; |
| 331 | + bool shouldUpdateIsConfirm = 50; | ||
| 332 | + bool isConfirm = 51; | ||
| 328 | } | 333 | } |
| 329 | 334 | ||
| 330 | message UpdateClientCustomerOrderRpcRequest { | 335 | message UpdateClientCustomerOrderRpcRequest { | ... | ... |
src/main/proto/MeiZhongYiHeService.proto
0 → 100644
| 1 | +syntax = "proto3"; | ||
| 2 | + | ||
| 3 | +option java_multiple_files = true; | ||
| 4 | +option java_package = "com.infoloop.rpc.meizhongyiheservice"; | ||
| 5 | +option java_outer_classname = "MeiZhongYiHeServiceProto"; | ||
| 6 | +option objc_class_prefix = "OP"; | ||
| 7 | + | ||
| 8 | +package com.infoloop.rpc.meizhongyiheservice; | ||
| 9 | + | ||
| 10 | +service MeiZhongYiHeServiceRpc { | ||
| 11 | + rpc GetAllHospitals (GetAllHospitalsRpcRequest) returns (GetAllHospitalsRpcResponse) {} | ||
| 12 | + rpc GetHospitalDepartmentsByHospitalCode (GetHospitalDepartmentsByHospitalCodeRpcRequest) returns (GetHospitalDepartmentsByHospitalCodeRpcResponse) {} | ||
| 13 | + rpc GetCustomersByCondition (GetCustomersByConditionRpcRequest) returns (GetCustomersByConditionRpcResponse) {} | ||
| 14 | + rpc GetCustomerDetailById (GetCustomerDetailByIdRpcRequest) returns (GetCustomerDetailByIdRpcResponse) {} | ||
| 15 | + rpc GetCustomerAllergiesByCustomerIds (GetCustomerAllergiesByCustomerIdsRpcRequest) returns (GetCustomerAllergiesByCustomerIdsRpcResponse) {} | ||
| 16 | + rpc GetCustomerMedicalAdvicesByHospitalRecordIds (GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest) returns (GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse) {} | ||
| 17 | + rpc GetAllHospitalAllergies (GetAllHospitalAllergiesRpcRequest) returns (GetAllHospitalAllergiesRpcResponse) {} | ||
| 18 | + rpc GetHospitalMedicalAdvicesByType (GetHospitalMedicalAdvicesByTypeRpcRequest) returns (GetHospitalMedicalAdvicesByTypeRpcResponse) {} | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +message GetAllHospitalsRpcRequest { | ||
| 22 | + | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +message GetAllHospitalsRpcResponse { | ||
| 26 | + repeated Hospital hospitals = 1; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +message Hospital { | ||
| 30 | + string hospitalId = 1; | ||
| 31 | + string hospitalCode = 2; | ||
| 32 | + string hospitalName = 3; | ||
| 33 | + string hospitalAddress = 4; | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +message GetHospitalDepartmentsByHospitalCodeRpcRequest { | ||
| 37 | + string hospitalCode = 1; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +message GetHospitalDepartmentsByHospitalCodeRpcResponse { | ||
| 41 | + repeated HospitalDepartment departments = 1; | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +message HospitalDepartment { | ||
| 45 | + string departmentId = 1; | ||
| 46 | + string departmentCode = 2; | ||
| 47 | + string departmentName = 3; | ||
| 48 | + string departmentContent = 4; | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +message GetCustomersByConditionRpcRequest { | ||
| 52 | + repeated string deptCode = 1; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +enum HospitalStatus { | ||
| 56 | + PRE_ADMISSION = 0; | ||
| 57 | + CURRENT = 1; | ||
| 58 | + CANCEL = 2; | ||
| 59 | + DISCHARGED = 3; | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +enum CustomerSex { | ||
| 63 | + UNKNOWN_SEX = 0; | ||
| 64 | + MALE = 1; | ||
| 65 | + FEMALE = 2; | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | +message Customer { | ||
| 69 | + string customerId = 1; | ||
| 70 | + string customerName = 2; | ||
| 71 | + CustomerSex customerSex = 3; | ||
| 72 | + string identityCardNo = 4; | ||
| 73 | + int32 age = 5; | ||
| 74 | + string height = 6; | ||
| 75 | + string weight = 7; | ||
| 76 | + string mobile = 8; | ||
| 77 | + int64 birthday = 9; | ||
| 78 | + CustomerHospitalRecord customerHospitalRecord = 10; | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +message GetCustomersByConditionRpcResponse { | ||
| 82 | + repeated Customer customers = 1; | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +message CustomerHospitalRecord { | ||
| 86 | + string hospitalRecordId = 1; | ||
| 87 | + string departmentCode = 2; | ||
| 88 | + string departmentName = 3; | ||
| 89 | + string roomNo = 4; | ||
| 90 | + int64 hospitalTime = 5; | ||
| 91 | + int64 expectDischargeTime = 6; | ||
| 92 | + int64 actualDischargeTime = 7; | ||
| 93 | + int64 dueDate = 8; | ||
| 94 | + int64 birthDate = 9; | ||
| 95 | + string hospitalCode = 10; | ||
| 96 | + HospitalStatus hospitalStatus = 11; | ||
| 97 | +} | ||
| 98 | + | ||
| 99 | +message GetCustomerDetailByIdRpcRequest { | ||
| 100 | + string customerId = 1; | ||
| 101 | + string hospitalRecordId = 2; | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | +message GetCustomerDetailByIdRpcResponse { | ||
| 105 | + Customer customer = 1; | ||
| 106 | +} | ||
| 107 | + | ||
| 108 | +message GetCustomerAllergiesByCustomerIdsRpcRequest { | ||
| 109 | + repeated string customerIds = 1; | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +message CustomerAllergy { | ||
| 113 | + string customerId = 1; | ||
| 114 | + repeated Allergy allergies = 2; | ||
| 115 | +} | ||
| 116 | + | ||
| 117 | +message Allergy { | ||
| 118 | + string allergyId = 1; | ||
| 119 | + string allergyCode = 2; | ||
| 120 | + string allergyDescription = 3; | ||
| 121 | + int64 createdAt = 4; | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +message GetCustomerAllergiesByCustomerIdsRpcResponse { | ||
| 125 | + repeated CustomerAllergy customerAllergies = 1; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +message GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest { | ||
| 129 | + repeated string hospitalRecordIds = 1; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +message CustomerMedicalAdvice { | ||
| 133 | + string customerId = 1; | ||
| 134 | + string hospitalRecordId = 2; | ||
| 135 | + repeated MedicalAdvice medicalAdvices = 3; | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +message MedicalAdvice { | ||
| 139 | + string medicalAdviceId = 1; | ||
| 140 | + string medicalAdviceCode = 2; | ||
| 141 | + string medicalAdvice = 3; | ||
| 142 | + string connotation = 4; | ||
| 143 | + int64 medicalTime = 5; | ||
| 144 | + int64 effectDate = 6; | ||
| 145 | + MedicalAdviceTypeEnum medicalAdviceType = 7; | ||
| 146 | +} | ||
| 147 | + | ||
| 148 | +message GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse { | ||
| 149 | + repeated CustomerMedicalAdvice customerMedicalAdvices = 1; | ||
| 150 | +} | ||
| 151 | + | ||
| 152 | +message GetAllHospitalAllergiesRpcRequest { | ||
| 153 | +} | ||
| 154 | + | ||
| 155 | +message GetAllHospitalAllergiesRpcResponse { | ||
| 156 | + repeated HospitalAllergy hospitalAllergies = 1; | ||
| 157 | +} | ||
| 158 | + | ||
| 159 | +message HospitalAllergy { | ||
| 160 | + string allergyId = 1; | ||
| 161 | + string allergyCode = 2; | ||
| 162 | + string allergyDescription = 3; | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | +enum MedicalAdviceTypeEnum { | ||
| 166 | + UNKNOWN_MEDICAL_ADVICE_TYPE = 0; | ||
| 167 | + MEAL = 1; //膳食医嘱 | ||
| 168 | + CLINICAL = 2; //临床文字医嘱 | ||
| 169 | +} | ||
| 170 | + | ||
| 171 | +message GetHospitalMedicalAdvicesByTypeRpcRequest { | ||
| 172 | + MedicalAdviceTypeEnum type = 1; | ||
| 173 | +} | ||
| 174 | + | ||
| 175 | +message GetHospitalMedicalAdvicesByTypeRpcResponse { | ||
| 176 | + repeated HospitalMedicalAdvice hospitalMedicalAdvices = 1; | ||
| 177 | +} | ||
| 178 | + | ||
| 179 | +message HospitalMedicalAdvice { | ||
| 180 | + string medicalAdviceId = 1; | ||
| 181 | + string medicalAdviceCode = 2; | ||
| 182 | + string medicalAdvice = 3; | ||
| 183 | + string connotation = 4; | ||
| 184 | + string unit = 5; | ||
| 185 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -81,6 +81,12 @@ message SingleResponse { | ... | @@ -81,6 +81,12 @@ message SingleResponse { |
| 81 | string name = 2; | 81 | string name = 2; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | +message SingleSpecialResponse { | ||
| 85 | + int32 id = 1; | ||
| 86 | + string code = 2; | ||
| 87 | + string name = 3; | ||
| 88 | +} | ||
| 89 | + | ||
| 84 | message SingleDishSkuByIdsRpcResponse { | 90 | message SingleDishSkuByIdsRpcResponse { |
| 85 | int32 enterpriseId = 1; | 91 | int32 enterpriseId = 1; |
| 86 | int32 id = 2; | 92 | int32 id = 2; |
| ... | @@ -92,17 +98,16 @@ message SingleDishSkuByIdsRpcResponse { | ... | @@ -92,17 +98,16 @@ message SingleDishSkuByIdsRpcResponse { |
| 92 | string imageUrl = 8; // 图片 | 98 | string imageUrl = 8; // 图片 |
| 93 | string alias = 9; | 99 | string alias = 9; |
| 94 | string basicMaterials =10; // 主料 | 100 | string basicMaterials =10; // 主料 |
| 95 | - int32 fat = 11; | 101 | + string fat = 11; |
| 96 | - int32 protein = 12; | 102 | + string protein = 12; |
| 97 | - int32 carbohydrate = 13; | 103 | + string carbohydrate = 13; |
| 98 | - int32 energy = 14; | 104 | + string energy = 14; |
| 99 | - repeated SingleResponse allergyList = 15; // 过敏源 | 105 | + repeated SingleSpecialResponse allergies = 15; // 过敏源 |
| 100 | - repeated SingleResponse tasteList = 16; // 口味 | 106 | + repeated SingleResponse tastes = 16; // 口味 |
| 101 | - repeated SingleResponse efficacyList = 17; // 功效 | 107 | + repeated SingleResponse efficacies = 17; // 功效 |
| 102 | - repeated SingleResponse doctorList = 18; // 医嘱 | 108 | + repeated SingleSpecialResponse doctors = 18; // 医嘱 |
| 103 | - repeated SingleResponse avoidList = 19; // 忌口 | 109 | + repeated SingleResponse avoids = 19; // 忌口 |
| 104 | - | 110 | + repeated SingleResponse skus = 20; // 配料 |
| 105 | - repeated SingleResponse skuList = 20; // 配料 | ||
| 106 | 111 | ||
| 107 | } | 112 | } |
| 108 | 113 | ... | ... |
-
Please register or login to post a comment