lige
2023-10-24 690a1b6765451b65002544cffab232fd0748912a
登记时回显
3个文件已修改
265 ■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java 225 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -1486,7 +1486,8 @@
    //临时表添加单项
    public void saveRedisTransitionByProId(String cusId, List<Long> proIds) {
        for (Long proId : proIds) {
            if (null != transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)) && transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)).size() > 0) {
            if (null != transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)) &&
                    transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)).size() > 0) {
                continue;
            }
            transitionService.saveRedisTransitionByProId(cusId,proId);
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -500,7 +500,7 @@
                    order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                    order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                    order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                    if (tjCustomer.getCusIdcard()!=null){
                    if (tjCustomer.getCusIdcard() != null) {
                        order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    }
                }
@@ -564,8 +564,10 @@
                            order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                            order.setGrMoBanId(reportService.getGrMoBanIds());
                            order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                            if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                            if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                            if (null != tjCustomer.getCusPhone())
                                order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                            if (null != tjCustomer.getCusIdcard())
                                order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                        }
                        String firmId = order.getFirmId();
                        if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
@@ -615,8 +617,10 @@
                        order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                        order.setGrMoBanId(reportService.getGrMoBanIds());
                        order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                        if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                        if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                        if (null != tjCustomer.getCusPhone())
                            order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                        if (null != tjCustomer.getCusIdcard())
                            order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    }
                    String firmId = order.getFirmId();
                    if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
@@ -659,16 +663,16 @@
        List<TjOrder> list = Optional.ofNullable(tjOrderService.list(wq)).get();
        if (list.size() > 0) {
            asyncService.getPrintOrderList(list);
            if(redisCache.hasKey("getPrintOrderList")){
                if(null !=type && type==0){
            if (redisCache.hasKey("getPrintOrderList")) {
                if (null != type && type == 0) {
                    List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList", "0");
                    collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                }
                if(null !=type && type==1){
                    List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList","1");
                if (null != type && type == 1) {
                    List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList", "1");
                    collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                }
            }else {
            } else {
                List<TjOrder> list1 = new ArrayList<>();
                extracted(type, list, list1);
                collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
@@ -691,8 +695,10 @@
                order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                order.setGrMoBanId(reportService.getGrMoBanIds());
                order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                if (null != tjCustomer.getCusPhone())
                    order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                if (null != tjCustomer.getCusIdcard())
                    order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
            }
            String firmId = order.getFirmId();
            if (firmId != null && null != iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) {
@@ -747,21 +753,17 @@
    }
    @GetMapping("/getIsRequired")
    @ApiOperation(value = "根据参数配置获取是否必填项(身份证、性别、电话、照片、是否直接下单)")
    public AjaxResult getIsRequired() {
        Map<String,String> res=new HashMap<>();
        res.put("has_idcard",configService.selectConfigByKey("has_idcard"));
        res.put("has_sex",configService.selectConfigByKey("has_sex"));
        res.put("is_phone",configService.selectConfigByKey("is_phone"));
        res.put("mall_hasPhoto",configService.selectConfigByKey("mall_hasPhoto"));
        res.put("has_charge",configService.selectConfigByKey("has_charge"));
        Map<String, String> res = new HashMap<>();
        res.put("has_idcard", configService.selectConfigByKey("has_idcard"));
        res.put("has_sex", configService.selectConfigByKey("has_sex"));
        res.put("is_phone", configService.selectConfigByKey("is_phone"));
        res.put("mall_hasPhoto", configService.selectConfigByKey("mall_hasPhoto"));
        res.put("has_charge", configService.selectConfigByKey("has_charge"));
        return AjaxResult.success(res);
    }
    /**
@@ -855,7 +857,7 @@
            tjFlowingWater.setOrderId(tjOrder.getOrderId());
            Date date1 = new Date(System.currentTimeMillis());
            String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(date1);
            tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),"")+s1);
            tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(tjCustomer.getCusName(), "") + s1);
            if (null != mallOrder) {
                if (mallOrder.getOrderStatus().equals(201L)) {
                    tjFlowingWater.setCopeWith(mallOrder.getActualPrice());
@@ -989,7 +991,7 @@
                if (null != ppList && ppList.size() > 0) {
                    //异步保存数据库
//                    asyncService.addRedisTransitionPac(cusId, pacId, ppList);
                    asyncService.saveRedisTransitionByPacId(cusId, pacId,proIds);
                    asyncService.saveRedisTransitionByPacId(cusId, pacId, proIds);
                    for (TjPackageProject tjPackageProject : ppList) {
                        TjProject project = projectService.getTjProjectById(String.valueOf(tjPackageProject.getProId()));
                        if (null != project) {
@@ -1029,41 +1031,46 @@
        if (null != proIds && proIds.size() > 0) {
            //异步保存数据库表
//            asyncService.addRedisTransitionPro(cusId, proIds);
            asyncService.saveRedisTransitionByPacId(cusId,null,proIds);
            asyncService.saveRedisTransitionByPacId(cusId, null, proIds);
            for (Long proId : proIds) {
                List<TbTransition> transitions = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId));
                if (null != transitions && transitions.size() > 0) {
                    continue;
                }
                TjProject project = projectService.getTjProjectById(String.valueOf(proId));
                if (null != project) {
                    List<TjProject> tjProSonList = projectService.getTjProjectListBySoneId(String.valueOf(project.getProId()));
                    if (null != tjProSonList && tjProSonList.size() > 0) {
                        for (TjProject tjProject : tjProSonList) {
                            List<TbTransition> transitionss = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(tjProject.getProId()));
                            if (null != transitionss && transitionss.size() > 0) {
                                continue;
                            }
                            TbTransition tbTransition = new TbTransition();
                            tbTransition.setCusId(cusId);
                            tbTransition.setPacId(null);
                            if (null != tjProject.getProPrice()) {
                                tbTransition.setOrdPrice(tjProject.getProPrice());
                                tbTransition.setNowPrice(tjProject.getProPrice());
                            } else {
                                tbTransition.setOrdPrice(BigDecimal.valueOf(0.00));
                                tbTransition.setNowPrice(BigDecimal.valueOf(0.00));
                            }
                            tbTransition.setParentProId(proId);
                            tbTransition.setParentProName(project.getProName());
                            tbTransition.setProId(tjProject.getProId());
                            tbTransition.setProName(tjProject.getProName());
                            tbTransition.setProType(tjProject.getProType());
                            tbTransition.setProCheckMethod(tjProject.getProCheckMethod());
                            tbTransitionList.add(tbTransition);
                        }
                TjProject tjProject = projectService.getTjProjectById(String.valueOf(proId));
                if (null != tjProject) {
//                    List<TjProject> tjProSonList = projectService.getTjProjectListBySoneId(String.valueOf(project.getProId()));
//                    if (null != tjProSonList && tjProSonList.size() > 0) {
//                        for (TjProject tjProject : tjProSonList) {
//                    List<TbTransition> transitionss = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(tjProject.getProId()));
//                    if (null != transitionss && transitionss.size() > 0) {
//                        continue;
//                    }
                    TbTransition tbTransition = new TbTransition();
                    tbTransition.setCusId(cusId);
                    tbTransition.setPacId(null);
                    if (null != tjProject.getProPrice()) {
                        tbTransition.setOrdPrice(tjProject.getProPrice());
                        tbTransition.setNowPrice(tjProject.getProPrice());
                    } else {
                        tbTransition.setOrdPrice(BigDecimal.valueOf(0.00));
                        tbTransition.setNowPrice(BigDecimal.valueOf(0.00));
                    }
                    tbTransition.setParentProId(tjProject.getProParentId());
                    if (tjProject.getProParentId() != null) {
                        final TjProject byId = projectService.getById(tjProject.getProParentId());
                        tbTransition.setParentProName(byId.getProName());
                    }
                    tbTransition.setParentProName("");
                    tbTransition.setProId(tjProject.getProId());
                    tbTransition.setProName(tjProject.getProName());
                    tbTransition.setProType(tjProject.getProType());
                    tbTransition.setProCheckMethod(tjProject.getProCheckMethod());
                    tbTransitionList.add(tbTransition);
//                        }
//                    }
                }
            }
        }
@@ -1429,19 +1436,19 @@
            for (TjReservation tjReservation : list) {
                final TjDwGrouping byId = dwGroupingService.getById(tjReservation.getGroupingId());
                if (byId!=null){
                if (byId != null) {
                    tjReservation.setGroupingName(byId.getGroupingName());
                }
                if (tjReservation.getIsExpire()==1){
                    LambdaQueryWrapper<TjCustomer> wq1=new LambdaQueryWrapper<>();
                    wq1.eq(TjCustomer::getCusIdcard,tjReservation.getIdCard());
                if (tjReservation.getIsExpire() == 1) {
                    LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>();
                    wq1.eq(TjCustomer::getCusIdcard, tjReservation.getIdCard());
                    final TjCustomer one1 = tjCustomerService.getOne(wq1);
                    LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
                    wq2.eq(TjOrder::getUserId,one1.getCusId());
                    wq2.eq(TjOrder::getTeamNo,tjReservation.getTeamNo());
                    LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
                    wq2.eq(TjOrder::getUserId, one1.getCusId());
                    wq2.eq(TjOrder::getTeamNo, tjReservation.getTeamNo());
                    final TjOrder one = tjOrderService.getOne(wq2);
                    if (one!=null){
                    if (one != null) {
                        tjReservation.setTjNumber(one.getTjNumber());
                        tjReservation.setTjStatus(one.getStatus());
                        if (one.getStatus() == 201) {
@@ -1450,17 +1457,17 @@
                            c += 1;
                        }
                    }
                }else if (tjReservation.getIsExpire()==2){
                } else if (tjReservation.getIsExpire() == 2) {
                    tjReservation.setTjStatus(0);
                    tjReservation.setTjNumber("无");
                    a+=1;
                    a += 1;
                }
            }
            map.put("list",list);
            map.put("all",list.size());
            map.put("weijian",a);
            map.put("jianzhong",b);
            map.put("yijian",c);
            map.put("list", list);
            map.put("all", list.size());
            map.put("weijian", a);
            map.put("jianzhong", b);
            map.put("yijian", c);
            return AjaxResult.success(map);
        }
@@ -1477,24 +1484,24 @@
    public AjaxResult tuanTiBingById(@ApiParam(value = "单位") @RequestParam String firmId,
                                     @ApiParam(value = "部门") @RequestParam String firmDeptId,
                                     @ApiParam(value = "病种") @RequestParam(required = false) String bingZhong) {
        List<TjOrderDetailRules> res1=new ArrayList<>();
        List<BingZhongVO> res=new ArrayList<>();
        List<TjOrderDetailRules> res1 = new ArrayList<>();
        List<BingZhongVO> res = new ArrayList<>();
        LambdaQueryWrapper<TjDwGrouping> wqqq=new LambdaQueryWrapper<>();
        wqqq.eq(TjDwGrouping::getDwDeptId,firmDeptId);
        LambdaQueryWrapper<TjDwGrouping> wqqq = new LambdaQueryWrapper<>();
        wqqq.eq(TjDwGrouping::getDwDeptId, firmDeptId);
        final List<TjDwGrouping> list2 = dwGroupingService.list(wqqq);
        for (TjDwGrouping tjDwGrouping : list2) {
            LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
            wq2.eq(TjOrder::getFirmId,firmId);
            wq2.eq(TjOrder::getGroupId,tjDwGrouping.getId());
            LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
            wq2.eq(TjOrder::getFirmId, firmId);
            wq2.eq(TjOrder::getGroupId, tjDwGrouping.getId());
            final List<TjOrder> list = tjOrderService.list(wq2);
            for (TjOrder tjOrder : list) {
                LambdaQueryWrapper<TjOrderDetailRules> wq1=new LambdaQueryWrapper<>();
                wq1.eq(TjOrderDetailRules::getTjNumber,tjOrder.getTjNumber());
                if (bingZhong!=null){
                    wq1.like(TjOrderDetailRules::getBingzhong,bingZhong);
                LambdaQueryWrapper<TjOrderDetailRules> wq1 = new LambdaQueryWrapper<>();
                wq1.eq(TjOrderDetailRules::getTjNumber, tjOrder.getTjNumber());
                if (bingZhong != null) {
                    wq1.like(TjOrderDetailRules::getBingzhong, bingZhong);
                }
                final List<TjOrderDetailRules> list1 = orderDetailRulesService.list(wq1);
                //放进集合
@@ -1507,21 +1514,21 @@
//        List<String> distinctIds = idStream.collect(Collectors.toList());
        Map<String, Long> columnCountMap = res1.stream().collect(Collectors.groupingBy(TjOrderDetailRules::getAid, Collectors.counting()));
        for(Map.Entry<String, Long> entry:columnCountMap.entrySet()){
        for (Map.Entry<String, Long> entry : columnCountMap.entrySet()) {
            BingZhongVO bingZhongVO=new BingZhongVO();
            BingZhongVO bingZhongVO = new BingZhongVO();
            bingZhongVO.setRules(rulesService.getById(entry.getKey()));
            bingZhongVO.setNum(entry.getValue());
            List<TjOrderDetailRules> aa=new ArrayList<>();
            List<TjOrderDetailRules> aa = new ArrayList<>();
            for (TjOrderDetailRules orderDetailRules : res1) {
                if (orderDetailRules.getAid().equals(entry.getKey())){
                if (orderDetailRules.getAid().equals(entry.getKey())) {
                    orderDetailRules.setDwName(dwDeptService.getById(firmDeptId).getDwName());
                    orderDetailRules.setDwDeptName(dwDeptService.getById(firmDeptId).getDwDeptName());
                    LambdaQueryWrapper<TjOrder> wq22=new LambdaQueryWrapper<>();
                    wq22.eq(TjOrder::getFirmId,firmId);
                    wq22.eq(TjOrder::getTjNumber,orderDetailRules.getTjNumber());
                    LambdaQueryWrapper<TjOrder> wq22 = new LambdaQueryWrapper<>();
                    wq22.eq(TjOrder::getFirmId, firmId);
                    wq22.eq(TjOrder::getTjNumber, orderDetailRules.getTjNumber());
                    final TjOrder one = tjOrderService.getOne(wq22);
                    orderDetailRules.setGroupName(dwGroupingService.getById(one.getGroupId()).getGroupingName());
                    aa.add(orderDetailRules);
@@ -1538,33 +1545,33 @@
    @PostMapping("/tuanTiBingChart")
    @ApiOperation(value = "查询团体体检病种统计图")
    public AjaxResult tuanTiBingChart(@RequestBody BingZhongVO bingZhongVO) {
        List<TjOrderDetailRules> res1=new ArrayList<>();
        List<TjOrderDetailRules> res1 = new ArrayList<>();
        LambdaQueryWrapper<TjDwGrouping> wqqq=new LambdaQueryWrapper<>();
        wqqq.eq(TjDwGrouping::getDwDeptId,bingZhongVO.getFirmDeptId());
        LambdaQueryWrapper<TjDwGrouping> wqqq = new LambdaQueryWrapper<>();
        wqqq.eq(TjDwGrouping::getDwDeptId, bingZhongVO.getFirmDeptId());
        final List<TjDwGrouping> list2 = dwGroupingService.list(wqqq);
        for (TjDwGrouping tjDwGrouping : list2) {
            LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
            wq2.eq(TjOrder::getFirmId,bingZhongVO.getFirmId());
            wq2.eq(TjOrder::getGroupId,tjDwGrouping.getId());
            LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
            wq2.eq(TjOrder::getFirmId, bingZhongVO.getFirmId());
            wq2.eq(TjOrder::getGroupId, tjDwGrouping.getId());
            final List<TjOrder> list = tjOrderService.list(wq2);
            for (TjOrder tjOrder : list) {
                LambdaQueryWrapper<TjOrderDetailRules> wq1=new LambdaQueryWrapper<>();
                wq1.eq(TjOrderDetailRules::getTjNumber,tjOrder.getTjNumber());
                wq1.in(TjOrderDetailRules::getAid,bingZhongVO.getAidList());
                LambdaQueryWrapper<TjOrderDetailRules> wq1 = new LambdaQueryWrapper<>();
                wq1.eq(TjOrderDetailRules::getTjNumber, tjOrder.getTjNumber());
                wq1.in(TjOrderDetailRules::getAid, bingZhongVO.getAidList());
                final List<TjOrderDetailRules> list1 = orderDetailRulesService.list(wq1);
                //放进集合
                res1.addAll(list1);
            }
        }
        Map<String, Long> columnCountMap = res1.stream().collect(Collectors.groupingBy(TjOrderDetailRules::getAid, Collectors.counting()));
        List<Map<String, String>> aaa=new ArrayList<>();
        if (columnCountMap!=null){
            for(Map.Entry<String, Long> entry:columnCountMap.entrySet()){
                Map<String, String> resMap=new HashMap<>();
        List<Map<String, String>> aaa = new ArrayList<>();
        if (columnCountMap != null) {
            for (Map.Entry<String, Long> entry : columnCountMap.entrySet()) {
                Map<String, String> resMap = new HashMap<>();
                final TjRules byId = rulesService.getById(entry.getKey());
                if (byId!=null){
                if (byId != null) {
                    resMap.put("name", byId.getBingzhong());
                    resMap.put("value", String.valueOf(entry.getValue()));
                    aaa.add(resMap);
@@ -1578,32 +1585,32 @@
    @PostMapping("/deletedTbTransitionByCusId")
    @ApiOperation(value = "根据身份证号删除临时表数据")
    public AjaxResult deletedTbTransitionByCusId(@RequestParam @ApiParam(value = "身份证号") String cusId) {
        LambdaQueryWrapper<TbTransition> wq=new LambdaQueryWrapper<>();
        wq.between(TbTransition::getCreateTime,transitionService.getTbTransitionCreateTimeByCusId(cusId),new Date());
        wq.eq(TbTransition::getCusId,cusId);
        LambdaQueryWrapper<TbTransition> wq = new LambdaQueryWrapper<>();
        wq.between(TbTransition::getCreateTime, transitionService.getTbTransitionCreateTimeByCusId(cusId), new Date());
        wq.eq(TbTransition::getCusId, cusId);
        return AjaxResult.success(transitionService.remove(wq));
    }
    public void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) {
        long l = System.currentTimeMillis();
        tjAskMedicalHistoryService.updateTjAskMedicalHistoryByCusId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjCustomer.getCusId()));
        tjOrderDetailService.saveTjOrderDetailsByCusId(tjCustomer.getCusIdcard(),String.valueOf(tjOrder.getOrderId()),sysUser.getNickName(),String.valueOf(sysUser.getUserId()));
        tjAskMedicalHistoryService.updateTjAskMedicalHistoryByCusId(tjOrder.getTjNumber(), sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjCustomer.getCusId()));
        tjOrderDetailService.saveTjOrderDetailsByCusId(tjCustomer.getCusIdcard(), String.valueOf(tjOrder.getOrderId()), sysUser.getNickName(), String.valueOf(sysUser.getUserId()));
        //修改每项的原价现价
        transitionService.updateTbTransitionPriceByCusId(tjCustomer.getCusIdcard(),discount);
        transitionService.updateTbTransitionPriceByCusId(tjCustomer.getCusIdcard(), discount);
        //添加remark表数据
        remarkService.saveTjOrderRemarkByOrderId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjOrder.getOrderId()));
        remarkService.saveTjOrderRemarkByOrderId(tjOrder.getTjNumber(), sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjOrder.getOrderId()));
        //判断是否交钱
        if ("1".equals(tjOrder.getTjType())) {
            if (null != tjReservation && tjReservation.getPayType() == 1) {
                tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()),
                        sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber()));
                        sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjFlowingWater.getTjSerialNumber()));
            }
        }
        if (tjFlowingWater.getPayStasus() == 1) {
            tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()),
                    sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber()));
                    sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjFlowingWater.getTjSerialNumber()));
        }
        System.out.println("这段代码时间"+(System.currentTimeMillis()-l));
        System.out.println("这段代码时间" + (System.currentTimeMillis() - l));
    }
}
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java
@@ -79,7 +79,7 @@
    public boolean deletedTbTransitionListByCusIdAndPac(String cusId);
    //根据身份证号和套餐id查询和项目id
    @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} AND ISNULL(pac_id) AND pro_id =#{proId}")
    @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId}  AND pro_id =#{proId}")
    public List<TbTransition> getTbTransitionListByCusIdAndPacIdAndProId(@Param("cusId") String cusId,@Param("proId") String proId);
    @Select("SELECT DISTINCT pac_id FROM tb_transition WHERE cus_id=#{cusId} AND !ISNULL(pac_id)")
@@ -132,38 +132,23 @@
            "\tLEFT JOIN tj_project c ON b.pro_id = c.pro_parent_id\n" +
            "\tLEFT JOIN tj_package d ON a.pac_id=d.pac_id\n" +
            "\t\n" +
            "\tWHERE a.pac_id=#{pacId}")
            "\tWHERE a.pac_id=#{pacId} and c.deleted=0")
    void saveRedisTransitionByPacId(@Param("cusId") String cusId,@Param("pacId") Long pacId);
    @Insert("INSERT INTO tb_transition(\n" +
            "   cus_id,\n" +
            "   pro_id,\n" +
            "   pro_name,\n" +
            "   parent_pro_id,\n" +
            "   parent_pro_name,\n" +
            "   ord_price,\n" +
            "   now_price,\n" +
            "   create_time,\n" +
            "   pro_check_method,\n" +
            "   pro_type\n" +
            ")\n" +
    @Insert("INSERT INTO tb_transition \n" +
            "(cus_id, pro_id, pro_name, parent_pro_id, parent_pro_name, ord_price, now_price, create_time, pro_check_method, pro_type ) \n" +
            "SELECT\n" +
            "\t#{cusId},\n" +
            "\tb.pro_id,\n" +
            "\tb.pro_name,\n" +
            "\ta.pro_id,\n" +
            "\ta.pro_name,\n" +
            "\tb.pro_price,\n" +
            "\tb.pro_price,\n" +
            "\tSYSDATE(),\n" +
            "\tb.pro_check_method,\n" +
            "\tIFNULL(b.pro_type,'')\n" +
            "#{cusId},\n" +
            "a.pro_id,a.pro_name,b.pro_id,b.pro_name,a.pro_price,a.pro_price,SYSDATE(),a.pro_check_method,\n" +
            "IFNULL ( a.pro_type, '' ) \n" +
            "FROM\n" +
            "\ttj_project a\n" +
            "\tLEFT JOIN tj_project b ON b.pro_parent_id = a.pro_id \n" +
            "\tLEFT JOIN \n" +
            "\ttj_project b \n" +
            "\tON a.pro_parent_id = b.pro_id \n" +
            "WHERE\n" +
            "\ta.pro_id = #{proId} ")
            "\ta.pro_id = #{proId}")
    void saveRedisTransitionByProId(@Param("cusId")String cusId,@Param("proId") Long proId);