From dd43f10cba754d4a7b371b9bf39db262b94d3c10 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期二, 23 七月 2024 15:43:59 +0800 Subject: [PATCH] 数采报错修复 --- inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java index 9656584..d0c90bc 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java @@ -1,6 +1,5 @@ package com.yuanchu.mom.service.impl; -import cn.hutool.core.lang.Console; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -59,8 +58,6 @@ @Override public List<StandardProductList> selectStandardProductList(InsSample insSample) { String[] models = insSample.getModel().split("-(?=[^-]*$)");//鎷嗗垎鏈�鍚庝竴涓��-銆� -// String[] factorys = insSample.getFactory().split(" - "); - //List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0]).eq(StandardProductList::getSampleType, factorys[2])); List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]); if (list.size() == 0) { if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) { @@ -69,11 +66,10 @@ String[] split = insSample.getFactory().split(" - "); String tree = split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3] + " - null"; list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree); - /* list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() - .eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()) - .eq(StandardProductList::getState, 1) - .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]));*/ - + if (list.size()==0){ + String tree1 = split[0] + " - " + split[1] + " - " + split[2] + " - null - " + split[3] ; + list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree1); + } } list = list.stream().filter(a -> { try { @@ -239,6 +235,7 @@ if (page == 1) { Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); CompletableFuture.supplyAsync(() -> { + System.out.println("寮�濮嬪紑濮嬪紑濮嬪紑濮�!!!!!!!!!!"); if (trees.length == 5) { standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).eq(StandardProductList::getTree, tree)); } else { @@ -253,6 +250,7 @@ a.setStandardMethodListId(id); return a; }).collect(Collectors.toList())); + System.out.println("缁撴潫缁撴潫缁撴潫缁撴潫@@@@@@@@@@@@"); return null; }).thenAccept(res -> { }).exceptionally(e -> { -- Gitblit v1.9.3