| | |
| | | private HisApiGetMethodService hisApiGetMethodService; |
| | | @Resource |
| | | private ISysConfigService configService; |
| | | |
| | | @Autowired |
| | | private LtkjJfzhglmxjfxmzdService ltkjJfzhglmxjfxmzdService; |
| | | @Autowired |
| | | private LtkjMxjfxmzdService ltkjMxjfxmzdService; |
| | | @Autowired |
| | | private LtkjEjjfxmzdService ltkjEjjfxmzdService; |
| | | @Autowired |
| | | private LtkjJianchajianyanTreeService ltkjJianchajianyanTreeService; |
| | | @Autowired |
| | | private TjProBlService blService; |
| | | @Override |
| | | public void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { |
| | | long l = System.currentTimeMillis(); |
| | |
| | | public void iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser) { |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | String jxbz = DateUtil.format(dates, "yyyyMMddHHmmss")+order.getOrderId(); |
| | | |
| | | TjProBl proBl=new TjProBl(); |
| | | proBl.setTjh(order.getTjNumber()); |
| | | proBl.setBldh(jxbz); |
| | | proBl.setBlsj(date); |
| | | proBl.setBlrdm(sysUser.getUserName()); |
| | | proBl.setBlrmc(sysUser.getNickName()); |
| | | proBl.setBlje(String.valueOf(tjFlowingWater.getPaidIn())); |
| | | blService.save(proBl); |
| | | |
| | | List<TjConsumables> list2 = new ArrayList<>(); |
| | | String[] tjProIds = tjFlowingWater.getTjProIds(); |
| | | |
| | |
| | | for (String tjProId : tjProIds) { |
| | | LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TbTransition::getCusId, customer.getCusIdcard()); |
| | | TjProject project = projectService.selectTjProjectByProId(Long.valueOf(tjProId)); |
| | | TjProject project = projectService.getById(Long.valueOf(tjProId)); |
| | | if (null != project && project.getProParentId() == 0) { |
| | | TjOrderRemark tjOrderRemark = new TjOrderRemark(); |
| | | tjOrderRemark.setProId(Long.valueOf(tjProId)); |
| | |
| | | tjOrderRemark.setUpdateTime(dates); |
| | | tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setJxbz(jxbz); |
| | | orderRemarkService.save(tjOrderRemark); |
| | | |
| | | List<Long> proIds = projectService.getTjProjectListBySoneId(tjProId).stream().map(TjProject::getProId).collect(Collectors.toList()); |
| | |
| | | detail.setUpdateTime(dates); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setJxbz(jxbz); |
| | | tjOrderDetailService.save(detail); |
| | | for (Long proId : proIds) { |
| | | TjOrderDetail detail1 = new TjOrderDetail(); |
| | |
| | | // detail1.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | detail1.setProId(proId); |
| | | detail1.setIsAddition("Y"); |
| | | detail.setCreateBy(sysUser.getNickName()); |
| | | detail.setCreateTime(dates); |
| | | detail.setUpdateBy(sysUser.getNickName()); |
| | | detail.setUpdateTime(dates); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | detail1.setCreateBy(sysUser.getNickName()); |
| | | detail1.setCreateTime(dates); |
| | | detail1.setUpdateBy(sysUser.getNickName()); |
| | | detail1.setUpdateTime(dates); |
| | | detail1.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail1.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | detail1.setJxbz(jxbz); |
| | | tjOrderDetailService.save(detail1); |
| | | } |
| | | wqq.in(TbTransition::getProId, proIds); |
| | |
| | | wqq.in(TbTransition::getProId, Arrays.asList(tjProIds)); |
| | | TjProject projects = projectService.selectTjProjectByProId(Long.valueOf(tjProId)); |
| | | if (null != projects) { |
| | | TjProject projectss = projectService.selectTjProjectByProId(projects.getProParentId()); |
| | | TjProject projectss = projectService.getById(projects.getProParentId()); |
| | | if (null != projectss && projectss.getProParentId()==0L) { |
| | | projectList.add(projectss); |
| | | } |
| | | |
| | | |
| | | } |
| | | // List<Long> proIds = projectService.getTjProjectListBySoneId(tjProId).stream().map(TjProject::getProId).collect(Collectors.toList()); |
| | | TjOrderDetail detail = new TjOrderDetail(); |
| | |
| | | detail.setUpdateTime(dates); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setJxbz(jxbz); |
| | | tjOrderDetailService.save(detail); |
| | | |
| | | } |
| | |
| | | List<TbTransition> tbTransitionList = transitionService.list(wqq); |
| | | if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | for (TbTransition transition : tbTransitionList) { |
| | | transition.setJxbz(jxbz); |
| | | transition.setTjNum(order.getTjNumber()); |
| | | transition.setCardId(order.getCardId()); |
| | | transition.setNowPrice(transition.getOrdPrice().multiply(BigDecimal.valueOf(Double.parseDouble(tjFlowingWater.getDiscount())).divide(BigDecimal.valueOf(10)))); |
| | | transitionService.updateById(transition); |
| | | TjProject tjProject = projectService.selectTjProjectByProId(transition.getProId()); |
| | | // TjProject tjProject = projectService.selectTjProjectByProId(transition.getProId()); |
| | | //子项 |
| | | if (null != tjProject) { |
| | | TjChargingStandard tjChargingStandard = new TjChargingStandard(); |
| | | tjChargingStandard.setTjNum(order.getTjNumber()); |
| | | tjChargingStandard.setProId(transition.getProId()); |
| | | tjChargingStandard.setPrice(transition.getNowPrice()); |
| | | tjChargingStandard.setProName(tjProject.getProName()); |
| | | tjChargingStandard.setCreateBy(sysUser.getNickName()); |
| | | tjChargingStandard.setCreateTime(dates); |
| | | tjChargingStandard.setUpdateBy(sysUser.getNickName()); |
| | | tjChargingStandard.setUpdateTime(dates); |
| | | tjChargingStandard.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjChargingStandard.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | chargingStandardService.save(tjChargingStandard); |
| | | } |
| | | // if (null != tjProject) { |
| | | // TjChargingStandard tjChargingStandard = new TjChargingStandard(); |
| | | // tjChargingStandard.setTjNum(order.getTjNumber()); |
| | | // tjChargingStandard.setProId(transition.getProId()); |
| | | // tjChargingStandard.setPrice(transition.getNowPrice()); |
| | | // tjChargingStandard.setProName(tjProject.getProName()); |
| | | // tjChargingStandard.setCreateBy(sysUser.getNickName()); |
| | | // tjChargingStandard.setCreateTime(dates); |
| | | // tjChargingStandard.setUpdateBy(sysUser.getNickName()); |
| | | // tjChargingStandard.setUpdateTime(dates); |
| | | // tjChargingStandard.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | // tjChargingStandard.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | // chargingStandardService.save(tjChargingStandard); |
| | | // } |
| | | } |
| | | //父项 |
| | | |
| | | TjProject parentProject = projectService.selectTjProjectByProId(Long.valueOf(tjProId)); |
| | | if (null != parentProject && parentProject.getProParentId() == 0) { |
| | | LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>(); |
| | | wqqq.eq(TjProConsumables::getProId, parentProject.getProId()); |
| | | List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq); |
| | | if (null != proConsumables && proConsumables.size() > 0) { |
| | | for (TjProConsumables tjProConsumables : proConsumables) { |
| | | TjConsumables tjConsumables = consumablesService.selectTjConsumablesById(tjProConsumables.getConsumablesId()); |
| | | list2.add(tjConsumables); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | TjProject parentProjects = projectService.getById(tjProId); |
| | | if (null != parentProjects) { |
| | | LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>(); |
| | | wqqq.eq(TjProConsumables::getProId, parentProjects.getProId()); |
| | | List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq); |
| | | if (null != proConsumables && proConsumables.size() > 0) { |
| | | for (TjProConsumables tjProConsumables : proConsumables) { |
| | | TjConsumables tjConsumables = consumablesService.selectTjConsumablesById(tjProConsumables.getConsumablesId()); |
| | | list2.add(tjConsumables); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // |
| | | // TjProject parentProject = projectService.selectTjProjectByProId(Long.valueOf(tjProId)); |
| | | // if (null != parentProject && parentProject.getProParentId() == 0) { |
| | | // LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>(); |
| | | // wqqq.eq(TjProConsumables::getProId, parentProject.getProId()); |
| | | // List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq); |
| | | // if (null != proConsumables && proConsumables.size() > 0) { |
| | | // for (TjProConsumables tjProConsumables : proConsumables) { |
| | | // TjConsumables tjConsumables = consumablesService.selectTjConsumablesById(tjProConsumables.getConsumablesId()); |
| | | // list2.add(tjConsumables); |
| | | // } |
| | | // } |
| | | // |
| | | // } else { |
| | | // TjProject parentProjects = projectService.getById(tjProId); |
| | | // if (null != parentProjects) { |
| | | // LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>(); |
| | | // wqqq.eq(TjProConsumables::getProId, parentProjects.getProId()); |
| | | // List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq); |
| | | // if (null != proConsumables && proConsumables.size() > 0) { |
| | | // for (TjProConsumables tjProConsumables : proConsumables) { |
| | | // TjConsumables tjConsumables = consumablesService.selectTjConsumablesById(tjProConsumables.getConsumablesId()); |
| | | // list2.add(tjConsumables); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | } |
| | | |
| | | if(projectList.size()>0){ |
| | |
| | | tjOrderRemark.setUpdateTime(dates); |
| | | tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setJxbz(jxbz); |
| | | orderRemarkService.save(tjOrderRemark); |
| | | |
| | | TjOrderDetail detail1 = new TjOrderDetail(); |
| | |
| | | detail1.setUpdateTime(dates); |
| | | detail1.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail1.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | detail1.setJxbz(jxbz); |
| | | tjOrderDetailService.save(detail1); |
| | | if(null !=config && config.equals("Y")){ |
| | | //检验 |
| | |
| | | } else { |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(1); |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDtos.add(detailsDto); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(1); |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDtoss.add(detailsDto); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(1); |
| | | detailsDto.setSl(project.getSl()); |
| | | detailDtos.add(detailsDto); |
| | | } |
| | | } |
| | |
| | | JSONObject object3 = getJSONObject(result5); |
| | | String code3 = object3.getStr("ResultCode"); |
| | | if (code3.equals("0")) { |
| | | Map<String, Object> datas = object3.getJSONObject("ResultData"); |
| | | datas.put("cardId", order.getCardId()); |
| | | JSONObject object4 = JSONUtil.parseObj(datas); |
| | | LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpintestapply"); |
| | | HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); |
| | | hisApiGetMethodService.save(object4, "Outpintestapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(dto))); |
| | | List<OutpintestapplyDetailsDto> details = dto.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setSfjx("Y"); |
| | | tree.setJxbz(jxbz); |
| | | tree.setCardId(dto.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | JSONObject resultData = object3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jysqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | 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<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | JSONObject object5 = getJSONObject(result6); |
| | | String code4 = object5.getStr("ResultCode"); |
| | | if (code4.equals("0")) { |
| | | Map<String, Object> map = object5.getJSONObject("ResultData"); |
| | | map.put("cardId", order.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))); |
| | | |
| | | List<OutpintestapplyDetailsDto> details = outpinexamapplyDto.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setSfjx("Y"); |
| | | tree.setJxbz(jxbz); |
| | | tree.setCardId(outpinexamapplyDto.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | JSONObject resultData = object5.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jcsqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | 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<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | JSONObject mzylyzsq3 = getJSONObject(mzylyzsq2); |
| | | String code5 = mzylyzsq3.getStr("ResultCode"); |
| | | if (code5.equals("0")) { |
| | | Map<String, Object> map = mzylyzsq3.getJSONObject("ResultData"); |
| | | map.put("cardId", order.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))); |
| | | List<OutpintestapplyDetailsDto> details1 = dao.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details1) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setSfjx("Y"); |
| | | tree.setJxbz(jxbz); |
| | | tree.setCardId(dao.getHisRegistrationId()); |
| | | LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); |
| | | wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper4); |
| | | tree.setPationid(tjCustomer.getPationId()); |
| | | JSONObject resultData = mzylyzsq3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("zlczh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | 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<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //父项耗材 |
| | | ArrayList<TjConsumables> collect = list2.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TjConsumables::getId))), ArrayList::new)); |
| | | for (TjConsumables tjConsumables : collect) { |
| | | TjChargingStandard tjChargingStandard = new TjChargingStandard(); |
| | | tjChargingStandard.setTjNum(order.getTjNumber()); |
| | | tjChargingStandard.setConsumablesId(tjConsumables.getId()); |
| | | tjChargingStandard.setPrice(tjConsumables.getPrice()); |
| | | tjChargingStandard.setProName(tjConsumables.getMakings()); |
| | | tjChargingStandard.setConsumablesName(tjConsumables.getMakings()); |
| | | tjChargingStandard.setCompany(tjConsumables.getSpecifications()); |
| | | tjChargingStandard.setCreateBy(sysUser.getNickName()); |
| | | tjChargingStandard.setCreateTime(dates); |
| | | tjChargingStandard.setUpdateBy(sysUser.getNickName()); |
| | | tjChargingStandard.setUpdateTime(dates); |
| | | tjChargingStandard.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjChargingStandard.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | chargingStandardService.save(tjChargingStandard); |
| | | } |
| | | // ArrayList<TjConsumables> collect = list2.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TjConsumables::getId))), ArrayList::new)); |
| | | // for (TjConsumables tjConsumables : collect) { |
| | | // TjChargingStandard tjChargingStandard = new TjChargingStandard(); |
| | | // tjChargingStandard.setTjNum(order.getTjNumber()); |
| | | // tjChargingStandard.setConsumablesId(tjConsumables.getId()); |
| | | // tjChargingStandard.setPrice(tjConsumables.getPrice()); |
| | | // tjChargingStandard.setProName(tjConsumables.getMakings()); |
| | | // tjChargingStandard.setConsumablesName(tjConsumables.getMakings()); |
| | | // tjChargingStandard.setCompany(tjConsumables.getSpecifications()); |
| | | // tjChargingStandard.setCreateBy(sysUser.getNickName()); |
| | | // tjChargingStandard.setCreateTime(dates); |
| | | // tjChargingStandard.setUpdateBy(sysUser.getNickName()); |
| | | // tjChargingStandard.setUpdateTime(dates); |
| | | // tjChargingStandard.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | // tjChargingStandard.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | // chargingStandardService.save(tjChargingStandard); |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | |
| | | //临时表添加单项 |
| | | public void saveRedisTransitionByProId(String cusId,String cardId, List<Long> proIds) { |
| | | for (Long proId : proIds) { |
| | | List<TbTransition> transitionList = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)); |
| | | if (null != transitionList && transitionList.size() > 0) { |
| | | continue; |
| | | TjProject project = projectService.selectTjProjectByProId(proId); |
| | | if(null !=project){ //&& (!project.getProName().contains("静脉采血")|| !project.getProName().contains("费")) |
| | | List<TbTransition> transitionList = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)); |
| | | if (null == transitionList || transitionList.size() == 0) { |
| | | transitionService.saveRedisTransitionByProId(cusId,cardId, proId); |
| | | } |
| | | } |
| | | transitionService.saveRedisTransitionByProId(cusId,cardId, proId); |
| | | // if(null !=project) transitionService.saveRedisTransitionByProId(cusId,cardId, proId); |
| | | } |
| | | } |
| | | |