| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.constant.CommonConstant; |
| | | import com.kidgrow.common.model.*; |
| | |
| | | { |
| | | //查询当前医院正在使用的套餐 |
| | | Map<String, Object> selectMap = new HashMap<>(); |
| | | selectMap.put("hospitalId", hospitalId); |
| | | List<ProductOrderJoinDetail> productOrderDetailList = this.findAllList(selectMap); |
| | | selectMap.put("hospital_id", hospitalId); |
| | | selectMap.put("is_del",0); |
| | | selectMap.put("enabled",1); |
| | | List<ProductOrder> productOrders = iProductOrderService.listByMap(selectMap); |
| | | if(productOrders!=null&&productOrders.size()>0){ |
| | | // List<ProductOrderJoinDetail> productOrderDetailList = this.findAllList(selectMap); |
| | | QueryWrapper queryWrapper=new QueryWrapper(); |
| | | queryWrapper.eq("is_del",0); |
| | | queryWrapper.eq("enabled",1); |
| | | queryWrapper.in("order_id",productOrders.stream().map(ProductOrder::getId).collect(Collectors.toList())); |
| | | List<ProductOrderJoinDetail> productOrderDetailList = this.baseMapper.selectList(queryWrapper); |
| | | if (productOrderDetailList.size() > 0) { |
| | | UserProductDetail userProductDetail=new UserProductDetail(); |
| | | //包含共享的数据 |
| | |
| | | userProductDetail.setProductOrderJoinDetailsListDep(productOrderDetailList.stream().filter((f -> departmentId.equals(f.getDepartmentId()) && !f.getIsShare())).collect(Collectors.toList())); |
| | | return userProductDetail; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | /** |