| | |
| | | import com.kidgrow.oprationcenter.vo.DiagnosisRecord; |
| | | import com.kidgrow.oprationcenter.vo.GroupProductDetail; |
| | | import com.kidgrow.oprationcenter.vo.ProductOrderJoinDetail; |
| | | import com.kidgrow.oprationcenter.vo.UserProductDetail; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import com.kidgrow.usercenter.feign.SysHospitalService; |
| | | import com.kidgrow.usercenter.model.SysHospital; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | return ResultBody.failed("该用户的组织已经失效"); |
| | | } |
| | | } |
| | | /** |
| | | *获取医院的套餐数据 |
| | | * @param hospitalId |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public UserProductDetail getUserProductDetail(Long hospitalId, Long departmentId) |
| | | { |
| | | //查询当前医院正在使用的套餐 |
| | | Map<String, Object> selectMap = new HashMap<>(); |
| | | selectMap.put("hospitalId", hospitalId); |
| | | List<ProductOrderJoinDetail> productOrderDetailList = this.findAllList(selectMap); |
| | | if (productOrderDetailList.size() > 0) { |
| | | UserProductDetail userProductDetail=new UserProductDetail(); |
| | | //包含共享的数据 |
| | | userProductDetail.setProductOrderJoinDetailListShare(productOrderDetailList.stream().filter(f -> f.getIsShare()).collect(Collectors.toList())); |
| | | //科室私有的数据 |
| | | userProductDetail.setProductOrderJoinDetailsListDep(productOrderDetailList.stream().filter((f -> departmentId.equals(f.getDepartmentId()) && f.getIsShare() == false)).collect(Collectors.toList())); |
| | | return userProductDetail; |
| | | } |
| | | return null; |
| | | } |
| | | } |