| | |
| | | |
| | | //体检对his申请单调用方法 |
| | | public AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) { |
| | | |
| | | |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | |
| | | //检验申请 |
| | | OutpintestapplyDto dto = new OutpintestapplyDto(); |
| | | dto.setHisRegistrationId(cardId); |
| | |
| | | dto.setCzybm("00029"); |
| | | dto.setCzyksbm("0101"); |
| | | dto.setSfjz("0"); |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | |
| | | List<OutpintestapplyDetailsDto> detailsDtos = new ArrayList<>(); |
| | | List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos =new ArrayList<>(); |
| | | if (null != detailList && detailList.size() > 0) { |
| | |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检验"); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // List<TjProject> list = projectService.list(wrapper); |
| | | // String tj_price = ""; |
| | | // for (TjProject project : list) { |
| | | // tj_price += project.getProPrice() + "、"; |
| | | // } |
| | | // tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | |
| | | outpinexamapplyDto.setCzybm("00029"); |
| | | outpinexamapplyDto.setCzyksbm("0101"); |
| | | outpinexamapplyDto.setSfjz("0"); |
| | | List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | // List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailsDtoss = new ArrayList<>(); |
| | | if (null != detailLists && detailLists.size() > 0) { |
| | | if (null != detailList && detailList.size() > 0) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailLists.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | // wq.groupBy(TjProject::getHisXmbm); |
| | | // wq.in(TjProject::getDeptId, "247", "248", "249", "250", "251", "252", "271", "273", "274", "275", "298"); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getJcDeptIds()); |
| | | List<TjProject> projects = projectService.list(wq); |
| | | if (null != projects && projects.size() > 0) { |
| | |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检查"); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // List<TjProject> list = projectService.list(wrapper); |
| | | // String tj_price = ""; |
| | | // for (TjProject project : list) { |
| | | // tj_price += project.getProPrice() + "、"; |
| | | // } |
| | | // tree.setTjPrice(tj_price.substring(0, tj_price.length() - 1)); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | // Map<String, Object> map = object5.getJSONObject("ResultData"); |
| | | // map.put("cardId", customer.getCardId()); |
| | | // JSONObject jsonObject = JSONUtil.parseObj(map); |
| | | // LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpinexamapply"); |
| | | // HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); |
| | | // hisApiGetMethodService.save(jsonObject, "Outpinexamapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(outpinexamapplyDto))); |
| | | |
| | | } |
| | | // else { |
| | | // return AjaxResult.error("检查申请失败!"); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | dao.setCzybm("00029"); |
| | | dao.setCzyksbm("0101"); |
| | | dao.setSfjz("0"); |
| | | List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | // List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); |
| | | if (null != details && details.size() > 0) { |
| | | if (null != detailList && detailList.size() > 0) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, details.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | // wq.groupBy(TjProject::getHisXmbm); |
| | | // wq.in(TjProject::getDeptId, "100", "240", "253", "254", "255", "257", "258", "259", "269", "270"); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getCzDeptIds()); |
| | | // wq.isNull(TjProject::getDeptId); |
| | | List<TjProject> projects = projectService.list(wq); |
| | | if (null != projects && projects.size() > 0) { |
| | | for (TjProject project : projects) { |
| | |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("处置"); |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getHisXmbm, mxfyxmbm); |
| | | // wrapper.eq(TjProject::getSl,1); |
| | | // wrapper.groupBy(TjProject::getHisXmbm); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if(null !=project){ |
| | | // BigDecimal decimal = project.getProPrice().multiply(BigDecimal.valueOf(detail.getSl())); |
| | | // tree.setTjPrice(String.valueOf(decimal)); |
| | | // } |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | // Map<String, Object> map = mzylyzsq3.getJSONObject("ResultData"); |
| | | // map.put("cardId", customer.getCardId()); |
| | | // JSONObject jsonObject = JSONUtil.parseObj(map); |
| | | // LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpintreatapply"); |
| | | // HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); |
| | | // hisApiGetMethodService.save(jsonObject, "Outpintreatapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(dao))); |
| | | } |
| | | // else { |
| | | // return AjaxResult.error("处置申请失败!"); |
| | | // } |
| | | } |
| | | |
| | | //药品申请 |
| | |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null !=code && code.equals("200")){ |
| | | JSONArray resultData = object.getJSONArray("ResultData"); |
| | | Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); |
| | | String cfh = resultDatasss.get("cfh").toString(); |
| | | |
| | | if(null !=code && code.equals("0")){ |
| | | JSONObject resultData = object.getJSONObject("ResultData"); |
| | | // Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); |
| | | String cfh = resultData.getStr("cfh"); |
| | | log.info("药品申请后的处方号是: "+cfh+" outpinmedicapplyDetilsDtos 里面的值为: "+outpinmedicapplyDetilsDtos.toString()); |
| | | for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { |
| | | TjCf cf=new TjCf(); |
| | | cf.setCardId(cardId); |
| | |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null !=code && code.equals("200")){ |
| | | if(null !=code && code.equals("0")){ |
| | | cfService.delCfByCardId(cfh); |
| | | } |
| | | } |
| | |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null !=code && code.equals("200")){ |
| | | if(null !=code && code.equals("0")){ |
| | | cfService.delCfByCardId(cfh); |
| | | } |
| | | } |
| | |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null !=code && code.equals("200")){ |
| | | if(null !=code && code.equals("0")){ |
| | | cfService.delCfByCardId(cfh); |
| | | } |
| | | } |