Showing
4 changed files
with
20 additions
and
12 deletions
No preview for this file type
| ... | @@ -74,7 +74,7 @@ public class WebMvcConfig implements WebMvcConfigurer { | ... | @@ -74,7 +74,7 @@ public class WebMvcConfig implements WebMvcConfigurer { |
| 74 | 74 | ||
| 75 | @Override | 75 | @Override |
| 76 | public void configurePathMatch(PathMatchConfigurer configurer) { | 76 | public void configurePathMatch(PathMatchConfigurer configurer) { |
| 77 | - configurer.addPathPrefix("api", c -> c.getPackage().getName().contains("com.infoloop.tianting.controller")); | 77 | + configurer.addPathPrefix("api", c -> c.getPackage().getName().contains("com.infoloop.tianting.controller") || c.getPackage().getName().contains("com.infoloop.tianting.streamController")); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | @Bean | 80 | @Bean | ... | ... |
| ... | @@ -15,6 +15,7 @@ import com.infoloop.tianting.service.KdsService; | ... | @@ -15,6 +15,7 @@ import com.infoloop.tianting.service.KdsService; |
| 15 | import com.infoloop.tianting.service.client.EnterpriseResourceServiceRpcClient; | 15 | import com.infoloop.tianting.service.client.EnterpriseResourceServiceRpcClient; |
| 16 | import com.infoloop.tianting.service.client.MenuServiceRpcClient; | 16 | import com.infoloop.tianting.service.client.MenuServiceRpcClient; |
| 17 | import com.infoloop.tianting.service.client.OrderServiceRpcClient; | 17 | import com.infoloop.tianting.service.client.OrderServiceRpcClient; |
| 18 | +import com.infoloop.tianting.service.client.WOperatorServiceRpcClient; | ||
| 18 | import java.time.LocalDate; | 19 | import java.time.LocalDate; |
| 19 | import java.time.LocalDateTime; | 20 | import java.time.LocalDateTime; |
| 20 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
| ... | @@ -31,8 +32,8 @@ import org.springframework.stereotype.Service; | ... | @@ -31,8 +32,8 @@ import org.springframework.stereotype.Service; |
| 31 | public class KdsServiceImpl implements KdsService { | 32 | public class KdsServiceImpl implements KdsService { |
| 32 | 33 | ||
| 33 | private final OrderServiceRpcClient orderServiceRpcClient; | 34 | private final OrderServiceRpcClient orderServiceRpcClient; |
| 34 | - private final MenuServiceRpcClient menuServiceRpcClient; | ||
| 35 | private final EnterpriseResourceServiceRpcClient enterpriseResourceServiceRpcClient; | 35 | private final EnterpriseResourceServiceRpcClient enterpriseResourceServiceRpcClient; |
| 36 | + private final WOperatorServiceRpcClient wOperatorServiceRpcClient; | ||
| 36 | 37 | ||
| 37 | @Override | 38 | @Override |
| 38 | public List<KdsOrderSkuDto> getOrderDetailBySku(KdsOrderSkuQueryDto queryDto) { | 39 | public List<KdsOrderSkuDto> getOrderDetailBySku(KdsOrderSkuQueryDto queryDto) { |
| ... | @@ -44,16 +45,20 @@ public class KdsServiceImpl implements KdsService { | ... | @@ -44,16 +45,20 @@ public class KdsServiceImpl implements KdsService { |
| 44 | LocalDateTime tomorrowZero = tomorrow.atStartOfDay(); | 45 | LocalDateTime tomorrowZero = tomorrow.atStartOfDay(); |
| 45 | 46 | ||
| 46 | final var operatorLoginInfo = LoginContextHolder.getLoginInfo(); | 47 | final var operatorLoginInfo = LoginContextHolder.getLoginInfo(); |
| 47 | - | 48 | + boolean shouldFilterStallIds = false; |
| 48 | - final var userResource = enterpriseResourceServiceRpcClient.getUserResources( | 49 | + List<Integer> stallIds = new ArrayList<>(); |
| 49 | - operatorLoginInfo.getEnterpriseId(), operatorLoginInfo.getId()); | 50 | + final var operator = wOperatorServiceRpcClient.getWOperatorById(operatorLoginInfo.getId()).getResponse(); |
| 51 | + if (!operator.getIsSuper()) { | ||
| 52 | + shouldFilterStallIds = true; | ||
| 53 | + final var userResource = enterpriseResourceServiceRpcClient.getUserResources( | ||
| 54 | + operatorLoginInfo.getEnterpriseId(), operatorLoginInfo.getId()); | ||
| 55 | + stallIds.addAll(userResource.getStallIdsList()); | ||
| 56 | + } | ||
| 50 | 57 | ||
| 51 | final var queryOrderDto = QueryOrderByConditionDto.builder() | 58 | final var queryOrderDto = QueryOrderByConditionDto.builder() |
| 52 | .enterpriseId(operatorLoginInfo.getEnterpriseId()) | 59 | .enterpriseId(operatorLoginInfo.getEnterpriseId()) |
| 53 | - .shouldFilterClientIds(true) | 60 | + .shouldFilterStallIds(shouldFilterStallIds) |
| 54 | - .clientIds(userResource.getClientIdsList()) | 61 | + .stallIds(stallIds) |
| 55 | - .shouldFilterStallIds(true) | ||
| 56 | - .stallIds(userResource.getStallIdsList()) | ||
| 57 | .shouldFilterCreatedAtTimeStart(true) | 62 | .shouldFilterCreatedAtTimeStart(true) |
| 58 | .createdAtTimeStart(todayZero) | 63 | .createdAtTimeStart(todayZero) |
| 59 | .shouldFilterCreatedAtTimeEnd(true) | 64 | .shouldFilterCreatedAtTimeEnd(true) | ... | ... |
| ... | @@ -46,6 +46,9 @@ message HospitalDepartment { | ... | @@ -46,6 +46,9 @@ message HospitalDepartment { |
| 46 | string departmentCode = 2; | 46 | string departmentCode = 2; |
| 47 | string departmentName = 3; | 47 | string departmentName = 3; |
| 48 | string departmentContent = 4; | 48 | string departmentContent = 4; |
| 49 | + string departmentAddress = 5; | ||
| 50 | + string hospitalId = 6; | ||
| 51 | + string hospitalCode = 7; | ||
| 49 | } | 52 | } |
| 50 | 53 | ||
| 51 | message GetCustomersByConditionRpcRequest { | 54 | message GetCustomersByConditionRpcRequest { |
| ... | @@ -110,8 +113,8 @@ message GetCustomerAllergiesByCustomerIdsRpcRequest { | ... | @@ -110,8 +113,8 @@ message GetCustomerAllergiesByCustomerIdsRpcRequest { |
| 110 | } | 113 | } |
| 111 | 114 | ||
| 112 | message CustomerAllergy { | 115 | message CustomerAllergy { |
| 113 | - string customerId = 1; | 116 | + string customerId = 1; |
| 114 | - repeated Allergy allergies = 2; | 117 | + repeated Allergy allergies = 2; |
| 115 | } | 118 | } |
| 116 | 119 | ||
| 117 | message Allergy { | 120 | message Allergy { |
| ... | @@ -164,7 +167,7 @@ message HospitalAllergy { | ... | @@ -164,7 +167,7 @@ message HospitalAllergy { |
| 164 | 167 | ||
| 165 | enum MedicalAdviceTypeEnum { | 168 | enum MedicalAdviceTypeEnum { |
| 166 | UNKNOWN_MEDICAL_ADVICE_TYPE = 0; | 169 | UNKNOWN_MEDICAL_ADVICE_TYPE = 0; |
| 167 | - MEAL = 1; //膳食医嘱 | 170 | + DIET = 1; //饮食医嘱 |
| 168 | CLINICAL = 2; //临床文字医嘱 | 171 | CLINICAL = 2; //临床文字医嘱 |
| 169 | } | 172 | } |
| 170 | 173 | ... | ... |
-
Please register or login to post a comment