zhaowenxuan
2025-03-26 17539021d35748ec5eb3fef1f677f221a95a34a8
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -452,6 +452,8 @@
        if (null != detailList && detailList1) {
            String format = DateUtil.format(new Date(), "yyMMddHHmmssSSS");
            for (TjOrderDetail detail : detailList) {
                int i = samplingService.isExistProId(order.getTjNumber(), String.valueOf(detail.getProId()));
                if(i>0) continue;
                TjSampling sampling = new TjSampling();
                if (null == projectService.getById(detail.getProId())) continue;
                TjProject project = projectService.getById(detail.getProId());
@@ -713,19 +715,27 @@
                        }
                }
                // 使用 stream 过滤出 proName 为 "舒张压" 或 "收缩压" 的元素
                List<TjOrderDetail> filteredList = tjOrderDetailList.stream()
                        .filter(a -> ("舒张压".equals(a.getProName()) || "收缩压".equals(a.getProName())) && a.getExceptionDesc()==1)
                        .collect(Collectors.toList());
                if(StrUtil.isNotBlank(ssyszys.toString())){
                    LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>();
                    wq.eq(TjOrderYcxm::getTjh, order.getTjNumber());
                    wq.like(TjOrderYcxm::getJcxm,"舒张压");
                    ycxmService.remove(wq);
                    TjOrderYcxm orderYcxm =new TjOrderYcxm();
                    orderYcxm.setTjh(order.getTjNumber());
                    orderYcxm.setParentName(tjProject.getProName());
                    orderYcxm.setJcxm(ssyszys.toString().replaceFirst("/$", ""));
                    orderYcxm.setJcjg(ssyszyjgs.toString().replaceFirst("/$", ""));
                    orderYcxm.setJynr(JSONUtil.toJsonStr(jianyilis));
                    orderYcxm.setJyjc("0");
                    ycxmService.save(orderYcxm);
                    if(!filteredList.isEmpty()){
                        TjOrderYcxm orderYcxm =new TjOrderYcxm();
                        orderYcxm.setTjh(order.getTjNumber());
                        orderYcxm.setParentName(tjProject.getProName());
                        orderYcxm.setJcxm(ssyszys.toString().replaceFirst("/$", ""));
                        orderYcxm.setJcjg(ssyszyjgs.toString().replaceFirst("/$", ""));
                        orderYcxm.setJynr(JSONUtil.toJsonStr(jianyilis));
                        orderYcxm.setJyjc("0");
                        ycxmService.save(orderYcxm);
                    }
                }
            }
        } catch (Exception e) {
@@ -932,6 +942,8 @@
            Date date = new Date();
            String format = DateUtil.format(date, "yyMMddHHmmssSSS");
            for (TjOrderDetail detail : detailList) {
                int i = samplingService.isExistProId(order.getTjNumber(), String.valueOf(detail.getProId()));
                if(i>0) continue;
                TjSampling sampling = new TjSampling();
                if (null == projectService.getById(detail.getProId())) continue;
                TjProject project = projectService.getById(detail.getProId());