| | |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | List<TbTransition> detailList = transitionService.getBlTbTransitionListByCusId(customer.getCusIdcard(), cardId, jxbz); |
| | | // Boolean useLisAndPacsRegister = lisApiMethod.isUseLisAndPacsRegister(order); |
| | | List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos = new ArrayList<>(); |
| | | String isRequestLisAllzx = configService.selectConfigByKey("jcx_is_requestLisAllzx"); |
| | | |
| | | if (isTuanTiPiao) { |
| | | |
| | | // 检查申请 |
| | | pacsReg(order, customer, jianChaProjects); |
| | | LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>(); |
| | |
| | | wrapper.eq(TjSampling::getJxbz, jxbz); |
| | | List<TjSampling> list = tjSamplingService.list(wrapper); |
| | | log.info("采样数据 ->{}", JSONUtil.toJsonStr(list)); |
| | | |
| | | if (isRequestLisAllzx != null && isRequestLisAllzx.equalsIgnoreCase("Y")){ |
| | | log.info("补录项目进入团体根据小项标本合并发送方法"); |
| | | |
| | | if(null !=list && !list.isEmpty()){ |
| | | List<String> strings = list.stream().map(TjSampling::getProId).collect(Collectors.toList()); |
| | | LambdaQueryWrapper<TjProject> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.in(TjProject::getProParentId,strings); |
| | | wrapper1.eq(TjProject::getProStatus,0); |
| | | wrapper1.groupBy(TjProject::getProId); |
| | | List<TjProject> tjProjectList = projectService.list(wrapper1); |
| | | if(null != tjProjectList && !tjProjectList.isEmpty()){ |
| | | Map<String, List<TjProject>> listMap = tjProjectList.stream() |
| | | .collect(Collectors.groupingBy(p->p.getSpecimenType()+"_"+p.getYb())); |
| | | |
| | | log.info("分组后 ->{}",JSONUtil.toJsonStr(listMap)); |
| | | boolean save = lisApiMethod.save(listMap, order, customer); |
| | | if (!save) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("处理失败"); |
| | | } |
| | | for (TjSampling tjSampling : list) { |
| | | tjSampling.setIsSignFor("0"); |
| | | } |
| | | tjSamplingService.updateBatchById(list); |
| | | } |
| | | } |
| | | |
| | | |
| | | }else { |
| | | if (!list.isEmpty()) { |
| | | // Map<String, List<TjSampling>> listMap = list.stream().collect(Collectors.groupingBy(TjSampling::getSpecimenTypeCode)); |
| | | Map<String, List<TjSampling>> listMap = list.stream() |
| | |
| | | if (!confirmed) |
| | | return AjaxResult.error("处理失败"); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | List<TjOutpinmedicXm> outpinmedicXms = tjOutpinmedicXmService.list(); |
| | | //检验申请 |