| | |
| | | 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()); |
| | |
| | | } |
| | | } |
| | | |
| | | // 使用 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) { |
| | |
| | | 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()); |