zjh
2024-07-09 e37740bcaa6a0dfdef6e082e4d8136b81d453000
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -114,7 +114,16 @@
    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();
@@ -489,6 +498,18 @@
    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();
@@ -510,7 +531,7 @@
        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));
@@ -523,6 +544,7 @@
                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());
@@ -538,6 +560,7 @@
                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();
@@ -546,12 +569,13 @@
//                    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);
@@ -617,12 +641,10 @@
                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();
@@ -637,6 +659,7 @@
                detail.setUpdateTime(dates);
                detail.setCreateId(String.valueOf(sysUser.getUserId()));
                detail.setUpdateId(String.valueOf(sysUser.getUserId()));
                detail.setJxbz(jxbz);
                tjOrderDetailService.save(detail);
            }
@@ -644,54 +667,58 @@
            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){
@@ -708,6 +735,7 @@
                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();
@@ -722,6 +750,7 @@
                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")){
                    //检验
@@ -736,7 +765,7 @@
                            } else {
                                detailsDto.setSfzhfy("0");
                            }
                            detailsDto.setSl(1);
                            detailsDto.setSl(project.getSl());
                            detailsDtos.add(detailsDto);
                        }
                    }
@@ -755,7 +784,7 @@
                            } else {
                                detailsDto.setSfzhfy("0");
                            }
                            detailsDto.setSl(1);
                            detailsDto.setSl(project.getSl());
                            detailsDtoss.add(detailsDto);
                        }
                    }
@@ -774,7 +803,7 @@
                            } else {
                                detailsDto.setSfzhfy("0");
                            }
                            detailsDto.setSl(1);
                            detailsDto.setSl(project.getSl());
                            detailDtos.add(detailsDto);
                        }
                    }
@@ -802,13 +831,47 @@
                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);
                    }
                }
            }
@@ -829,14 +892,47 @@
                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);
                    }
                }
            }
@@ -858,38 +954,70 @@
                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
@@ -2293,11 +2421,14 @@
    //临时表添加单项
    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);
        }
    }