| | |
| | | * @param diagnosticId |
| | | * @return |
| | | */ |
| | | public ResultBody<UserProductData> UserProductDetailData(Long hospitalId,Long departmentId,String diagnosticId) |
| | | @Override |
| | | public ResultBody<UserProductData> userProductDetailData(Long hospitalId,Long departmentId,String diagnosticId) |
| | | { |
| | | UserProductData userProductData=new UserProductData(); |
| | | userProductData.setEnd(true); |
| | | userProductData.setIsEnd(true); |
| | | userProductData.setRecordCount(0); |
| | | userProductData.setAilightCount(0); |
| | | userProductData.setLimitDays(0); |
| | |
| | | userProductDetail.getProductOrderJoinDetailListShare().addAll(userProductDetail.getProductOrderJoinDetailsListDep()); |
| | | List<ProductOrderJoinDetail> productOrderJoinDetailList = userProductDetail.getProductOrderJoinDetailListShare(); |
| | | if (productOrderJoinDetailList.size() > 0) { |
| | | userProductData.setEnd(false); |
| | | userProductData.setIsEnd(false); |
| | | //合并后按id排序并筛除已用完的套餐 |
| | | List<ProductOrderJoinDetail> productOrderJoinDetailsNewList = productOrderJoinDetailList.stream().filter(f -> f.getAilightCount() >= 0).sorted(Comparator.comparing(ProductOrderJoinDetail::getProEndtime)).collect(Collectors.toList()); |
| | | for (int i = 0; i <productOrderJoinDetailsNewList.size(); i++) { |
| | |
| | | } |
| | | } |
| | | //是否已经结束 |
| | | if (userProductData.isEnd()&& StringUtils.isNotBlank(diagnosticId)) { |
| | | if (userProductData.getIsEnd()&& StringUtils.isNotBlank(diagnosticId)) { |
| | | //写入redis中,防止扣非后不能生成报告 |
| | | redisUtils.lSet(CommonConstant.SAAS_LAST_SERVER+diagnosticId,diagnosticId); |
| | | } |
| | |
| | | public List<OrderChartVo> proCountChart() { |
| | | return baseMapper.proCountChart(); |
| | | } |
| | | @Override |
| | | public int getUserdProduct(Long hospitalId, Long departmentId) { |
| | | return baseMapper.getUserdProduct(hospitalId,departmentId); |
| | | } |
| | | /** |
| | | *获取该科室下的所有的套餐信息 |
| | | * @param params |
| | |
| | | List<ProductOrderDetail> list = |
| | | baseMapper.departmentProductDetail(page, Long.parseLong(params.get("hospitalId").toString()),Long.parseLong(params.get("departmentId").toString())); |
| | | return PageResult.<ProductOrderDetail>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | @Override |
| | | public PageResult<ProductEndVo> productEndList(Map<String, Object> params) { |
| | | Page<ProductEndVo> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit")); |
| | | List<ProductEndVo> list = |
| | | baseMapper.productEndList(page,MapUtils.getIntValue(params,"monthPar"),MapUtils.getIntValue(params,"aiCountPar")); |
| | | return PageResult.<ProductEndVo>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | /** |
| | |
| | | List<GroupProductDetail> list = baseMapper.groupProductDetail(page,params); |
| | | return PageResult.<GroupProductDetail>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | /** |
| | | * 根据ProductOrderDetail对象当做查询条件进行查询 |
| | | * @param productOrderDetail |