| | |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.utils.AgeResult; |
| | | import com.ltkj.common.utils.DateUtils; |
| | | import com.ltkj.common.utils.IdUtils; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.hisDto.OutpintestapplyDetailsDto; |
| | | import com.ltkj.hosp.lisDto.LisSaveSqdxxDto; |
| | |
| | | private LtkjJfxmgljyxmzdService ltkjJfxmgljyxmzdService; |
| | | @Autowired |
| | | private LtkjJyxmzdService jyxmzdService; |
| | | @Autowired |
| | | private IdUtils idUtils; |
| | | |
| | | /** |
| | | * 保存检验单申请信息 |
| | |
| | | LisSaveSqdxxDto lisSaveSqdxxDto = new LisSaveSqdxxDto(); |
| | | LtkjJyxmzd jyxmzd = getGetYbDm(project); |
| | | BigDecimal allPrice = new BigDecimal("0"); |
| | | detailList.stream().filter(item -> Objects.equals(item.getParentProId(), project.getProId())) |
| | | .forEach(item -> allPrice.add(item.getNowPrice())); |
| | | for (TbTransition transition : detailList.stream().filter(item -> Objects.equals(item.getParentProId(), project.getProId())) |
| | | .collect(Collectors.toList())) { |
| | | allPrice = allPrice.add(transition.getNowPrice()); |
| | | } |
| | | if (jyxmzd != null) { |
| | | ArrayList<LisSaveSqdxxJyxmlistDto> dtos = new ArrayList<>(); |
| | | AtomicInteger xh = new AtomicInteger(); |
| | |
| | | .forEach(item -> { |
| | | LisSaveSqdxxJyxmlistDto dto = new LisSaveSqdxxJyxmlistDto(); |
| | | dto.setXh(String.valueOf(xh.getAndIncrement())); |
| | | dto.setJyxm(item.getProName()); |
| | | TjProject project1 = projectService.getById(item.getProId()); |
| | | LtkjJyxmzd jyxmzd1 = getGetYbDm(project1); |
| | | dto.setXmmc(jyxmzd1.getJyxmdm()); |
| | | if (jyxmzd1 == null) dto.setJyxm(project1.getHisXmbm()); |
| | | else dto.setJyxm(jyxmzd1.getJyxmdm()); |
| | | dto.setXmmc(project1.getProName()); |
| | | dtos.add(dto); |
| | | |
| | | OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); |
| | |
| | | }); |
| | | |
| | | String yyyyMMdd = DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyyMMdd"); |
| | | String sqdh = "3"+yyyyMMdd.substring(2)+ RandomUtil.randomString(String.valueOf(System.currentTimeMillis()), 3); |
| | | lisSaveSqdxxDto.setJyxh(sqdh); |
| | | // String sqdh = "3"+yyyyMMdd.substring(2)+ RandomUtil.randomString(String.valueOf(System.currentTimeMillis()), 3); |
| | | String jyxh = idUtils.generateID(); |
| | | lisSaveSqdxxDto.setJyxh(jyxh); |
| | | lisSaveSqdxxDto.setBah(tjOrder.getCardId()); |
| | | lisSaveSqdxxDto.setBrxm(tjCustomer.getCusName()); |
| | | lisSaveSqdxxDto.setBrdm(PinyinUtil.getPinyin(tjCustomer.getCusName())); |
| | |
| | | lisSaveSqdxxDto.setKsbm("0101"); |
| | | lisSaveSqdxxDto.setSqys("00029"); |
| | | lisSaveSqdxxDto.setJyxmlistDtoList(dtos); |
| | | System.out.println(JSONUtil.toJsonStr(lisSaveSqdxxDto)); |
| | | log.info("检验申请 ->{}",JSONUtil.toJsonStr(lisSaveSqdxxDto)); |
| | | // TODO 暂不发出请求 |
| | | if (!detailsDtos.isEmpty() && false) { |
| | | AjaxResult ajaxResult = lisApiMethodService.saveSqdxx(lisSaveSqdxxDto); |
| | |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(tjOrder.getCardId()); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | tree.setSqdh(sqdh); |
| | | tree.setSqdh(jyxh); |
| | | tree.setFyhj(allPrice.toString()); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | |
| | | LtkjJfxmgljyxmzd jfxmgljyxmzd = ltkjJfxmgljyxmzdService.getOne(wrapper1); |
| | | if (jfxmgljyxmzd != null) jyxmdm = jfxmgljyxmzd.getJyxmdm(); |
| | | } |
| | | if (StrUtil.isBlank(jyxmdm)) log.error("获取检验项目代码为空 ->{}", project); |
| | | // if (StrUtil.isBlank(jyxmdm)) log.error("获取检验项目代码为空 ->{}", project); |
| | | LambdaQueryWrapper<LtkjJyxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjJyxmzd::getJyxmdm,jyxmdm); |
| | | LtkjJyxmzd jyxmzd = jyxmzdService.getOne(wrapper2); |