zss
2024-07-24 7c331e84a7151c943d900b34fbd57475d69cdc27
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;
@@ -236,10 +235,15 @@
        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));
                    standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate()
                            .eq(StandardProductList::getStandardMethodListId, id)
                            .eq(StandardProductList::getTree, tree));
                } else {
                    standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree));
                    standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate()
                            .eq(StandardProductList::getStandardMethodListId, id)
                            .like(StandardProductList::getTree, tree));
                }
                standardProductListService2.saveBatch(list.stream().map(a -> {
                    a.setFactory(trees[0]);
@@ -250,6 +254,7 @@
                    a.setStandardMethodListId(id);
                    return a;
                }).collect(Collectors.toList()));
                System.out.println("结束结束结束结束@@@@@@@@@@@@");
                return null;
            }).thenAccept(res -> {
            }).exceptionally(e -> {