Crunchy
2024-07-17 ee22e4cdf5656272443365aa54bf08863f7fae52
Merge remote-tracking branch 'origin/master'

# Conflicts:
# inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
# performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
已修改11个文件
890 ■■■■ 文件已修改
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java 636 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsOrderMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -309,14 +309,40 @@
        //先查出这个样品下有哪些管色标,光纤带,光纤色标
        //先查出套管
        List<InsBushing> insBushings = insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery().eq(InsBushing::getInsSampleId, sampleId));
        for (InsBushing insBushing : insBushings) {
            //再查询出所有的光纤带
            List<InsFibers> insFibers = insFibersMapper.selectList(Wrappers.<InsFibers>lambdaQuery().eq(InsFibers::getInsBushingId, insBushing.getId()));
            if (CollectionUtils.isNotEmpty(insFibers)) {
                for (InsFibers insFiber : insFibers) {
                    //查出光纤带下所有的光纤
                    List<InsFiber> fiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsFibersId, insFiber.getId()));
                    for (InsFiber fiber : fiberList) {
        if (insBushings.size()>0) {
            //通信--温度循环
            for (InsBushing insBushing : insBushings) {
                //再查询出所有的光纤带
                List<InsFibers> insFibers = insFibersMapper.selectList(Wrappers.<InsFibers>lambdaQuery().eq(InsFibers::getInsBushingId, insBushing.getId()));
                if (CollectionUtils.isNotEmpty(insFibers)) {
                    for (InsFibers insFiber : insFibers) {
                        //查出光纤带下所有的光纤
                        List<InsFiber> fiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsFibersId, insFiber.getId()));
                        for (InsFiber fiber : fiberList) {
                            //再根据关联的光纤配置的id和循环次数和温度和样品id进行查询检验项目
                            List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                                    .eq(InsProduct::getInsSampleId, sampleId)
                                    .eq(InsProduct::getInspectionItem, inspectionItem)
                                    .eq(InsProduct::getInspectionItemSubclass, inspectionItemSubclass)
                                    .eq(InsProduct::getInsFiberId, fiber.getId()));
                            for (InsProduct insProduct : insProducts) {
                                InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                                ProductVo productVo = new ProductVo();
                                productVo.setCode(insFiber.getCode());
                                productVo.setColor(fiber.getColor());
                                productVo.setBushColor(fiber.getBushColor());
                                if (ObjectUtils.isNotEmpty(insProductResult)) {
                                    insProduct.setInsProductResult(insProductResult);
                                }
                                productVo.setInsProduct(insProduct);
                                productVos.add(productVo);
                            }
                        }
                    }
                } else {
                    //如果套管下没有光纤带就只有光纤了
                    List<InsFiber> insFiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsBushingId, insBushing.getId()));
                    for (InsFiber fiber : insFiberList) {
                        //再根据关联的光纤配置的id和循环次数和温度和样品id进行查询检验项目
                        List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                                .eq(InsProduct::getInsSampleId, sampleId)
@@ -326,38 +352,30 @@
                        for (InsProduct insProduct : insProducts) {
                            InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                            ProductVo productVo = new ProductVo();
                            productVo.setCode(insFiber.getCode());
                            productVo.setCode("/");
                            productVo.setColor(fiber.getColor());
                            productVo.setBushColor(fiber.getBushColor());
                            if (ObjectUtils.isNotEmpty(insProductResult)) {
                                insProduct.setInsProductResult(insProductResult);
                            }
                            insProduct.setInsProductResult(insProductResult);
                            productVo.setInsProduct(insProduct);
                            productVos.add(productVo);
                        }
                    }
                }
            } else {
                //如果套管下没有光纤带就只有光纤了
                List<InsFiber> insFiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsBushingId, insBushing.getId()));
                for (InsFiber fiber : insFiberList) {
                    //再根据关联的光纤配置的id和循环次数和温度和样品id进行查询检验项目
                    List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                            .eq(InsProduct::getInsSampleId, sampleId)
                            .eq(InsProduct::getInspectionItem, inspectionItem)
                            .eq(InsProduct::getInspectionItemSubclass, inspectionItemSubclass)
                            .eq(InsProduct::getInsFiberId, fiber.getId()));
                    for (InsProduct insProduct : insProducts) {
                        InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                        ProductVo productVo = new ProductVo();
                        productVo.setCode("/");
                        productVo.setColor(fiber.getColor());
                        productVo.setBushColor(fiber.getBushColor());
                        insProduct.setInsProductResult(insProductResult);
                        productVo.setInsProduct(insProduct);
                        productVos.add(productVo);
                    }
            }
        }
        else {
            //电力--热循环
            List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                    .eq(InsProduct::getInsSampleId, sampleId)
                    .eq(InsProduct::getInspectionItem, inspectionItem));
            for (InsProduct insProduct : insProducts) {
                InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                ProductVo productVo = new ProductVo();
                if (ObjectUtils.isNotEmpty(insProductResult)) {
                    insProduct.setInsProductResult(insProductResult);
                }
                productVo.setInsProduct(insProduct);
                productVos.add(productVo);
            }
        }
        map.put("productVos", productVos);
@@ -1584,6 +1602,9 @@
            try {
                signatureUrl = userMapper.selectById(userId).getSignatureUrl();
            } catch (Exception e) {
                throw new ErrorException("找不到检验人的签名");
            }
            if (signatureUrl.equals("")) {
                throw new ErrorException("找不到检验人的签名");
            }
            //Custom custom = customMapper.selectById(user.get("company"));
@@ -3330,7 +3351,26 @@
                        product.setInsResult(1);
                    }
                    insProductMapper.updateById(product);
                } else {
                }
                //如果是热循环或者是温升试验
                else if (product.getInspectionItem().equals("热循环") || product.getInspectionItem().equals("温升试验")){
                    //查询这些项目下的其他检验项目是否全部检验
                    List<InsProduct> insProductList = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                            .eq(InsProduct::getInsSampleId, product.getInsSampleId())
                            .like(InsProduct::getInspectionItemSubclass, "温度"));
                    List<Integer> collect = insProductList.stream().filter(insProduct -> insProduct.getInsResult() != null).map(InsProduct::getInsResult).collect(Collectors.toList());
                    List<Integer> tt = new ArrayList<>();
                    tt.add(1);
                    if (collect.contains(0)) {
                        product.setLastValue("不合格");
                        product.setInsResult(0);
                    } else if (collect.size() == insProductList.size() && collect.stream().distinct().collect(Collectors.toList()).containsAll(tt)) {
                        product.setLastValue("合格");
                        product.setInsResult(1);
                    }
                    insProductMapper.updateById(product);
                }
                else {
                    count++;
                    str += "<br/>" + count + ":" + product.getInspectionItem() + " " + product.getInspectionItemSubclass() + "<br/>";
                }
@@ -3391,7 +3431,7 @@
            calendar.setTime(date);
            int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
            int day = calendar.get(Calendar.DAY_OF_MONTH);
            return day + " " + getWeekDay(dayOfWeek);
            return getWeekDay(dayOfWeek);
        } catch (Exception e) {
            e.printStackTrace();
        }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
@@ -318,7 +318,67 @@
                        }
                    }
                    insProductService.saveBatch(insProductes);
                } else {
                }
                //判断热循环项目的添加和温升试验项目的添加
                else if (product.getInspectionItem().equals("热循环") || product.getInspectionItem().equals("温升试验")) {
                    List<InsProduct> insProductess = new ArrayList<>();
                    insProductess.add(product);
                    List<InsProduct> insProductes = new ArrayList<>();
                    List<InsProduct> insProducts = new ArrayList<>();
                    String[] strings = product.getAsk().split(";");
                    //循环次数
                    int count = Integer.parseInt(strings[strings.length - 1]);
                    for (int i = 0; i < strings.length - 1; i++) {
                        String[] split = strings[i].split(",");
                        InsProduct insProduct = new InsProduct();
                        insProduct.setInspectionItem("1");//检验父项--循环次数
                        insProduct.setInspectionItemSubclass(split[0]);//检验子项--环境温度/导线温度/耐张温度/接续温度
                        insProduct.setInspectionItemSubclassEn(split[1]);//检验子项英文--环境温度/导线温度/耐张温度/接续温度
                        insProduct.setAsk(null);//检验要求
                        insProduct.setTell(null);//检验描述
                        insProduct.setInsSampleId(sampleId);
                        insProduct.setState(1);
                        insProduct.setFactory(product.getFactory());
                        insProduct.setLaboratory(product.getLaboratory());
                        insProduct.setSampleType(product.getSampleType());
                        insProduct.setSample(product.getSample());
                        insProduct.setModel(product.getModel());
                        insProduct.setSonLaboratory(product.getSonLaboratory());
                        insProduct.setUnit("℃");//单位
                        insProduct.setManHourGroup(product.getManHourGroup());
                        insProduct.setInspectionItemType("0");
                        insProduct.setInspectionValueType("1");
                        insProducts.add(insProduct);
                        insProductes.add(insProduct);
                        insProductess.add(insProduct);
                    }
                    //热循环才有多次循环次数
                    if (product.getInspectionItem().equals("热循环")) {
                        //热循环还要加上直流电阻
                        for (InsProduct insProduct : insProducts) {
                            InsProduct insProduct1 = new InsProduct();
                            BeanUtils.copyProperties(insProduct, insProduct1);
                            insProduct1.setInspectionItemClass("直流电阻");//检验子子项--直流电阻
                            insProduct1.setInspectionItemClassEn("DC resistance");//检验子子项英文--直流电阻
                            insProduct1.setUnit("Ω/km");//单位
                            insProductes.add(insProduct1);
                            insProductess.add(insProduct1);
                        }
                    }
                        if (count > 1) {
                            //循环超过1次
                            for (int j = 2; j <= count; j++) {
                                for (InsProduct insProduct : insProductes) {
                                    InsProduct insProduct1 = new InsProduct();
                                    BeanUtils.copyProperties(insProduct, insProduct1);
                                    insProduct1.setInspectionItem(j + "");//循环次数
                                    insProductess.add(insProduct1);
                                }
                            }
                        }
                    insProductService.saveBatch(insProductess);
                }
                else {
                    if (!is) {
                        switch (type) {
                            case 1:
@@ -414,7 +474,7 @@
                .filter(dto -> dto.getPrice() != null) // 过滤掉价格为 null 的对象
                .mapToDouble(value -> value.getPrice().doubleValue())
                .sum();
        map.put("total",totalPrice);
        map.put("total", totalPrice);
        return map;
    }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
@@ -11,7 +11,6 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.dto.ProductDto;
import com.yuanchu.mom.exception.ErrorException;
import com.yuanchu.mom.mapper.StandardProductListMapper;
import com.yuanchu.mom.mapper.StandardTreeMapper;
import com.yuanchu.mom.pojo.InsSample;
@@ -49,429 +48,288 @@
    @Override
    public int upStandardProductList(StandardProductList list) {
        String section = list.getSection();
        String a = section;
        if (a != null) {
            section = interval(section);
            list.setSection(section);
        } else {
            list.setSection(null);
        }
        return standardProductListMapper.updateById(list);
    }
    private  String interval(String section) {
        section = section.replace("\"", "");
        section = section.replace("[", "");
        section = section.replace("]", "");
        String[] split = section.split(",");
        int[] start1 = new int[20];
        int[] start2 = new int[20];
        int[] end1 = new int[20];
        int[] end2 = new int[20];
        int y = 0;
        for (String str : split) {
            String[] conditions = str.split("&");
            for (int i = 0; i < conditions.length; i++) {
                if (conditions[i].contains("<=")) {
                    end2[y] = Integer.parseInt(conditions[i].replace("<=", ""));
                    y++;
                } else if (conditions[i].contains("<")) {
                    end1[y] = Integer.parseInt(conditions[i].replace("<", ""));
                    y++;
                }
                if (conditions[i].contains(">=")) {
                    start2[y] = Integer.parseInt(conditions[i].replace(">=", ""));
                    y++;
                } else if (conditions[i].contains(">")) {
                    start1[y] = Integer.parseInt(conditions[i].replace(">", ""));
                    y++;
                }
            }
        }
        Set<Integer> start = new TreeSet<>();
        for (
                int value : start1) {
            start.add(value);
        }
        for (
                int value : start2) {
            start.add(value);
        }
        Set<Integer> end = new TreeSet<>();
        for (
                int value : end1) {
            end.add(value);
        }
        for (
                int value : end2) {
            end.add(value);
        }
        section = "";
        ArrayList<Integer> ab = new ArrayList<>();
        for (Integer integer : end) {
            if (integer != 0) {
                ab.add(integer);
            }
        }
        ArrayList<Integer> ac = new ArrayList<>();
        for (Integer integer : start) {
            if (integer != 0) {
                ac.add(integer);
            }
        }
        if (!ab.isEmpty() && !ac.isEmpty()) {
            int min = Collections.min(ab);
            int max = Collections.max(ac);
            if (min <= max) {
                throw new ErrorException("区间错误");
            }
            int minValue = 0;
            int maxValue = 0;
            for (int i = 1; i < end2.length; i++) {
                if (end2[i] < minValue) {
                    minValue = end2[i];
                }
            }
            for (int i = 1; i < start2.length; i++) {
                if (start2[i] > maxValue) {
                    maxValue = start2[i];
                }
            }
            if (min == minValue && max == maxValue) {
                section = ("[" + "\"" + ">" + "=" + max + "&" + "<" + "=" + min + "\"" + "]");
            }
            if (min != minValue && max == maxValue) {
                section = ("[" + "\"" + ">" + "=" + max + "&" + "<" + min + "\"" + "]");
            }
            if (min == minValue && max != maxValue) {
                section = ("[" + "\"" + ">" + max + "&" + "<" + "=" + min + "\"" + "]");
            }
            if (min != minValue && max != maxValue) {
                section = ("[" + "\"" + ">" + max + "&" + "<" + min + "\"" + "]");
            }
        }
        if (ab.isEmpty() && !ac.isEmpty()) {
            int max = Collections.max(ac);
            int maxValue = 0;
            for (int i = 1; i < start2.length; i++) {
                if (start2[i] > maxValue) {
                    maxValue = start2[i];
                }
            }
            if (max == maxValue) {
                section = ("[" + "\"" + ">" + "=" + max + "\"" + "]");
            }
            if (max != maxValue) {
                section = ("[" + "\"" + ">" + max + "\"" + "]");
            }
        }
        if (!ab.isEmpty() && ac.isEmpty()) {
            int min = Collections.min(ab);
            int minValue = 0;
            for (int i = 1; i < end2.length; i++) {
                if (end2[i] < minValue) {
                    minValue = end2[i];
                }
            }
            if (min == minValue) {
                section = ("[" + "\"" + "<" + "=" + min + "\"" + "]");
            }
            if (min != minValue) {
                section = ("[" + "\"" + "<" + min + "\"" + "]");
            }
        }
        return section;
    @Override
    public int delStandardProduct(JSONArray list) {
        return standardProductListMapper.deleteBatchIds(list);
    }
        @Override
        public int delStandardProduct (JSONArray list){
            return standardProductListMapper.deleteBatchIds(list);
    @Override
    public List<StandardProductList> selectStandardProductList(InsSample insSample) {
        String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】
        List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]);
        if (list.size() == 0) {
            if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) {
                return null;
            }
            String[] split = insSample.getFactory().split(" - ");
            String tree = split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3] + " - null";
            list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree);
            if (list.size()==0){
                String tree1 = split[0] + " - " + split[1] + " - " + split[2] + " - null - " + split[3] ;
                list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree1);
            }
        }
        @Override
        public List<StandardProductList> selectStandardProductList (InsSample insSample){
            String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】
            List<StandardProductList> list = new ArrayList<>();
            if (models.length==1) {
                list=standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]);
            }
            if (models.length==2) {
                list=standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]+"-"+models[1]);
            }
            if (list.size() == 0) {
                if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) {
                    return null;
                }
                String[] split = insSample.getFactory().split(" - ");
                String tree = split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3] + " - null";
                list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree);
                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 {
                    if (a.getSection() != null && !Objects.equals(a.getSection(), "")) {
                        List<String> sections = JSON.parseArray(a.getSection(), String.class);
                        List<String> asks = JSON.parseArray(a.getAsk(), String.class);
                        List<String> tells = JSON.parseArray(a.getTell(), String.class);
                        List<String> manHours = JSON.parseArray(a.getManHour(), String.class);
                        List<String> prices = JSON.parseArray(a.getPrice(), String.class);
                        boolean isIf;
                        for (int i = 0; i < sections.size(); i++) {
                            if (Objects.equals(a.getBsm(), "1")) {
                                return true;
        list = list.stream().filter(a -> {
            try {
                if (a.getSection() != null && !Objects.equals(a.getSection(), "")) {
                    List<String> sections = JSON.parseArray(a.getSection(), String.class);
                    List<String> asks = JSON.parseArray(a.getAsk(), String.class);
                    List<String> tells = JSON.parseArray(a.getTell(), String.class);
                    List<String> manHours = JSON.parseArray(a.getManHour(), String.class);
                    List<String> prices = JSON.parseArray(a.getPrice(), String.class);
                    boolean isIf;
                    for (int i = 0; i < sections.size(); i++) {
                        if (Objects.equals(a.getBsm(), "1")) {
                            return true;
                        } else {
                            if (sections.get(i).contains("&")) {
                                String[] split = sections.get(i).split("&");
                                isIf = getIsIf(split[0], models[1]) && getIsIf(split[1], models[1]);
                            } else {
                                if (sections.get(i).contains("@")) {
                                    String[] split = sections.get(i).split("@");
                                    isIf = getIsIf(split[0], models[1]) && getIsIf(split[1], models[1]);
                                } else {
                                    isIf = getIsIf(sections.get(i), models[1]);
                                }
                                if (isIf) {
                                    a.setSection(sections.get(i));
                                    a.setAsk(asks.get(i));
                                    a.setTell(tells.get(i));
                                    a.setPrice(prices.get(i));
                                    a.setManHour(manHours.get(i));
                                    return true;
                                }
                                isIf = getIsIf(sections.get(i), models[1]);
                            }
                            if (isIf) {
                                a.setSection(sections.get(i));
                                a.setAsk(asks.get(i));
                                a.setTell(tells.get(i));
                                a.setPrice(prices.get(i));
                                a.setManHour(manHours.get(i));
                                return true;
                            }
                        }
                        return false;
                    }
                } catch (Exception ignored) {
                    return false;
                }
                return true;
            }).collect(Collectors.toList());
            return list;
        }
        private boolean getIsIf (String str, String model){
            Matcher matcher = Pattern.compile("\\d+(\\.\\d+)?").matcher(model);
            String model2 = "";
            while (matcher.find()) {
                model2 += matcher.group();
            } catch (Exception ignored) {
                return false;
            }
            if (str.contains("≥") || str.contains(">=")) {
                String param = str.replace("≥", "").replace(">=", "");
                return new BigDecimal(model2).compareTo(new BigDecimal(param)) > -1;
            } else if (str.contains("≤") || str.contains("<=")) {
                String param = str.replace("≤", "").replace("<=", "");
                return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 1;
            } else if (str.contains(">") || str.contains(">")) {
                String param = str.replace(">", "").replace(">", "");
                return new BigDecimal(model2).compareTo(new BigDecimal(param)) > 0;
            } else if (str.contains("<") || str.contains("<")) {
                String param = str.replace("<", "").replace("<", "");
                return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 0;
            } else if (str.contains("=")) {
                String param = str.replace("=", "");
                return new BigDecimal(model2).compareTo(new BigDecimal(param)) == 0;
            }
            return false;
        }
            return true;
        }).collect(Collectors.toList());
        return list;
    }
        @Override
        public Map<String, Object> selectStandardProductListByMethodId (Integer id, String tree, Integer page){
            String[] trees = tree.split(" - ");
            List<StandardProductList> list = new ArrayList<>();
            if (trees.length == 3) {
                List<StandardTree> treeList = new ArrayList<>();
    private boolean getIsIf(String str, String model) {
        Matcher matcher = Pattern.compile("\\d+(\\.\\d+)?").matcher(model);
        String model2 = "";
        while (matcher.find()) {
            model2 += matcher.group();
        }
        if (str.contains("≥") || str.contains(">=")) {
            String param = str.replace("≥", "").replace(">=", "");
            return new BigDecimal(model2).compareTo(new BigDecimal(param)) > -1;
        } else if (str.contains("≤") || str.contains("<=")) {
            String param = str.replace("≤", "").replace("<=", "");
            return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 1;
        } else if (str.contains(">") || str.contains(">")) {
            String param = str.replace(">", "").replace(">", "");
            return new BigDecimal(model2).compareTo(new BigDecimal(param)) > 0;
        } else if (str.contains("<") || str.contains("<")) {
            String param = str.replace("<", "").replace("<", "");
            return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 0;
        } else if (str.contains("=")) {
            String param = str.replace("=", "");
            return new BigDecimal(model2).compareTo(new BigDecimal(param)) == 0;
        }
        return false;
    }
    @Override
    public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page) {
        String[] trees = tree.split(" - ");
        List<StandardProductList> list = new ArrayList<>();
        if (trees.length == 3) {
            List<StandardTree> treeList = new ArrayList<>();
            StandardTree standardTree = new StandardTree();
            standardTree.setFactory(trees[0]);
            standardTree.setLaboratory(trees[1]);
            standardTree.setSampleType(trees[2]);
            List<ProductDto> pList = standardTreeMapper.selectPList(trees[2]);
            if (pList.size() == 0 || pList.get(0) == null) {
                List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]));
                if (treeList1.size() == 0) {
                    treeList.add(standardTree);
                } else {
                    treeList.addAll(treeList1);
                }
            } else {
                for (ProductDto p : pList) {
                    standardTree.setSample(p.getName());
                    List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, p.getName()));
                    if (treeList1.size() == 0) {
                        treeList.add(JSON.parseObject(JSON.toJSONString(standardTree), StandardTree.class));
                    } else {
                        treeList.addAll(treeList1);
                    }
                }
            }
            for (StandardTree standardTree2 : treeList) {
                String tree2 = trees[0] + " - " + trees[1] + " - " + trees[2] + " - " + standardTree2.getSample() + " - " + standardTree2.getModel();
                list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1]));
                list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + standardTree2.getSample() + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1]));
            }
        } else if (trees.length == 4) {
            List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]));
            if (treeList.size() == 0) {
                StandardTree standardTree = new StandardTree();
                standardTree.setFactory(trees[0]);
                standardTree.setLaboratory(trees[1]);
                standardTree.setSampleType(trees[2]);
                List<ProductDto> pList = standardTreeMapper.selectPList(trees[2]);
                if (pList.size() == 0 || pList.get(0) == null) {
                    List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]));
                    if (treeList1.size() == 0) {
                        treeList.add(standardTree);
                    } else {
                        treeList.addAll(treeList1);
                    }
                } else {
                    for (ProductDto p : pList) {
                        standardTree.setSample(p.getName());
                        List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, p.getName()));
                        if (treeList1.size() == 0) {
                            treeList.add(JSON.parseObject(JSON.toJSONString(standardTree), StandardTree.class));
                        } else {
                            treeList.addAll(treeList1);
                        }
                    }
                }
                for (StandardTree standardTree2 : treeList) {
                    String tree2 = trees[0] + " - " + trees[1] + " - " + trees[2] + " - " + standardTree2.getSample() + " - " + standardTree2.getModel();
                    list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1]));
                    list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + standardTree2.getSample() + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1]));
                }
            } else if (trees.length == 4) {
                List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]));
                if (treeList.size() == 0) {
                    StandardTree standardTree = new StandardTree();
                    standardTree.setFactory(trees[0]);
                    standardTree.setLaboratory(trees[1]);
                    standardTree.setSampleType(trees[2]);
                    standardTree.setSample(trees[3]);
                    treeList.add(standardTree);
                }
                for (StandardTree standardTree : treeList) {
                    String str = tree + " - " + standardTree.getModel();
                    list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1]));
                    list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1]));
                }
            } else {
                list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1]));
                list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1]));
                standardTree.setSample(trees[3]);
                treeList.add(standardTree);
            }
            for (StandardProductList productList : list) {
                productList.setId(IdWorker.getId());
            for (StandardTree standardTree : treeList) {
                String str = tree + " - " + standardTree.getModel();
                list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1]));
                list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1]));
            }
            List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree));
            for (StandardProductList sp : standardProductLists) {
                for (StandardProductList pl : list) {
                    if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem())
                            && Objects.equals((sp.getInspectionItemSubclass() == null) ? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass())
        } else {
            list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1]));
            list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1]));
        }
        for (StandardProductList productList : list) {
            productList.setId(IdWorker.getId());
        }
        List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree));
        for (StandardProductList sp : standardProductLists) {
            for (StandardProductList pl : list) {
                if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem())
                        && Objects.equals((sp.getInspectionItemSubclass() == null) ? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass())
//                        && Objects.equals(sp.getSample(), pl.getSample())
                            && Objects.equals(sp.getModel(), pl.getModel())
                            && sp.getTree().indexOf(pl.getSample() == null ? "null" : pl.getSample()) > -1
                            && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) {
                        pl.setId(sp.getId());
                        if (sp.getState() != null && !sp.getState().equals("")) {
                            pl.setState(sp.getState());
                        } else {
                            pl.setState(id == 0 ? 1 : 0);
                        }
                        pl.setMethodS(sp.getMethodS());
                        if (sp.getAsk() != null && !sp.getAsk().equals("")) {
                            pl.setAsk(sp.getAsk());
                        }
                        if (sp.getTell() != null && !sp.getTell().equals("")) {
                            pl.setTell(sp.getTell());
                        }
                        if (sp.getPrice() != null && !sp.getPrice().equals("")) {
                            pl.setPrice(sp.getPrice());
                        }
                        if (sp.getManHour() != null && !sp.getManHour().equals("")) {
                            pl.setManHour(sp.getManHour());
                        }
                        if (sp.getSection() != null && !sp.getSection().equals("")) {
                            pl.setSection(sp.getSection());
                        }
                        if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) {
                            pl.setTemplateId(sp.getTemplateId());
                        }
                        if (sp.getTree() != null && !sp.getTree().equals("")) {
                            pl.setTree(sp.getTree());
                        }
                        break;
                    }
                }
            }
            if (page == 1) {
                Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
                CompletableFuture.supplyAsync(() -> {
                    if (trees.length == 5) {
                        standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).eq(StandardProductList::getTree, tree));
                        && Objects.equals(sp.getModel(), pl.getModel())
                        && sp.getTree().indexOf(pl.getSample() == null ? "null" : pl.getSample()) > -1
                        && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) {
                    pl.setId(sp.getId());
                    if (sp.getState() != null && !sp.getState().equals("")) {
                        pl.setState(sp.getState());
                    } else {
                        standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree));
                        pl.setState(id == 0 ? 1 : 0);
                    }
                    standardProductListService2.saveBatch(list.stream().map(a -> {
                        a.setFactory(trees[0]);
                        a.setLaboratory(trees[1]);
                        a.setSampleType(trees[2]);
                        a.setCreateUser(userId);
                        a.setUpdateUser(userId);
                        a.setStandardMethodListId(id);
                        return a;
                    }).collect(Collectors.toList()));
                    return null;
                }).thenAccept(res -> {
                }).exceptionally(e -> {
                    e.printStackTrace();
                    return null;
                });
            }
            Map<String, Object> map = new HashMap<>();
            Collections.sort(list, (o1, o2) -> {
                String field1 = o1.getManHourGroup();
                String field2 = o2.getManHourGroup();
                boolean isEmpty1 = field1 == null || field1.isEmpty();
                boolean isEmpty2 = field2 == null || field2.isEmpty();
                if (isEmpty1 && isEmpty2) {
                    return 0;
                } else if (isEmpty1) {
                    return 1;
                } else if (isEmpty2) {
                    return -1;
                } else {
                    int num1 = extractNumber(field1);
                    int num2 = extractNumber(field2);
                    return Integer.compare(num1, num2);
                    pl.setMethodS(sp.getMethodS());
                    if (sp.getAsk() != null && !sp.getAsk().equals("")) {
                        pl.setAsk(sp.getAsk());
                    }
                    if (sp.getTell() != null && !sp.getTell().equals("")) {
                        pl.setTell(sp.getTell());
                    }
                    if (sp.getPrice() != null && !sp.getPrice().equals("")) {
                        pl.setPrice(sp.getPrice());
                    }
                    if (sp.getManHour() != null && !sp.getManHour().equals("")) {
                        pl.setManHour(sp.getManHour());
                    }
                    if (sp.getSection() != null && !sp.getSection().equals("")) {
                        pl.setSection(sp.getSection());
                    }
                    if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) {
                        pl.setTemplateId(sp.getTemplateId());
                    }
                    if (sp.getTree() != null && !sp.getTree().equals("")) {
                        pl.setTree(sp.getTree());
                    }
                    break;
                }
            }
        }
        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 {
                    standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree));
                }
                standardProductListService2.saveBatch(list.stream().map(a -> {
                    a.setFactory(trees[0]);
                    a.setLaboratory(trees[1]);
                    a.setSampleType(trees[2]);
                    a.setCreateUser(userId);
                    a.setUpdateUser(userId);
                    a.setStandardMethodListId(id);
                    return a;
                }).collect(Collectors.toList()));
                System.out.println("结束结束结束结束@@@@@@@@@@@@");
                return null;
            }).thenAccept(res -> {
            }).exceptionally(e -> {
                e.printStackTrace();
                return null;
            });
            try {
                map.put("productList", list.subList((page - 1) * 50, page * 50));
            } catch (IndexOutOfBoundsException e) {
                map.put("productList", list.subList((page - 1) * 50, list.size()));
        }
        Map<String, Object> map = new HashMap<>();
        Collections.sort(list, (o1, o2) -> {
            String field1 = o1.getManHourGroup();
            String field2 = o2.getManHourGroup();
            boolean isEmpty1 = field1 == null || field1.isEmpty();
            boolean isEmpty2 = field2 == null || field2.isEmpty();
            if (isEmpty1 && isEmpty2) {
                return 0;
            } else if (isEmpty1) {
                return 1;
            } else if (isEmpty2) {
                return -1;
            } else {
                int num1 = extractNumber(field1);
                int num2 = extractNumber(field2);
                return Integer.compare(num1, num2);
            }
            map.put("total", list.size());
            return map;
        });
        try {
            map.put("productList", list.subList((page - 1) * 50, page * 50));
        } catch (IndexOutOfBoundsException e) {
            map.put("productList", list.subList((page - 1) * 50, list.size()));
        }
        map.put("total", list.size());
        return map;
    }
        private int extractNumber (String s){
            // 从字符串中提取数字的逻辑,这里假设字段的格式是 "text<number>"
            String number = s;
            if (!s.matches("\\d+")) {
                number = s.replaceAll("\\D", "");
            }
            return Integer.parseInt(number);
    private int extractNumber(String s) {
        // 从字符串中提取数字的逻辑,这里假设字段的格式是 "text<number>"
        String number = s;
        if (!s.matches("\\d+")) {
            number = s.replaceAll("\\D", "");
        }
        return Integer.parseInt(number);
    }
        @Override
        public IPage<StandardProductList> selectStandardProductByMethodId (Integer id, String tree, Integer page, String
        laboratory, String item, String items){
            IPage<StandardProductList> iPage = new Page<>();
            iPage.setSize(100);
            iPage.setCurrent(page);
            return standardProductListMapper.standardProductListIPage(id, tree, iPage, laboratory, item, items);
        }
    @Override
    public IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) {
        IPage<StandardProductList> iPage = new Page<>();
        iPage.setSize(100);
        iPage.setCurrent(page);
        return standardProductListMapper.standardProductListIPage(id, tree, iPage, laboratory, item, items);
    }
        @Override
        public Map<String, List<?>> selectStandardProductEnumByMethodId (Integer id, String tree, String item){
            HashMap<String, List<?>> map = new HashMap<>();
            map.put("item", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
    @Override
    public Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree, String item) {
        HashMap<String, List<?>> map = new HashMap<>();
        map.put("item", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                .eq(StandardProductList::getStandardMethodListId, id)
                .like(StandardProductList::getTree, tree)
                .select(StandardProductList::getInspectionItem)
                .groupBy(StandardProductList::getInspectionItem)));
        if (ObjectUtils.isNotEmpty(item)) {
            map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                    .eq(StandardProductList::getStandardMethodListId, id)
                    .eq(StandardProductList::getInspectionItem, item)
                    .like(StandardProductList::getTree, tree)
                    .select(StandardProductList::getInspectionItemSubclass)
                    .groupBy(StandardProductList::getInspectionItemSubclass)));
        } else {
            map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                    .eq(StandardProductList::getStandardMethodListId, id)
                    .like(StandardProductList::getTree, tree)
                    .select(StandardProductList::getInspectionItem)
                    .groupBy(StandardProductList::getInspectionItem)));
            if (ObjectUtils.isNotEmpty(item)) {
                map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                        .eq(StandardProductList::getStandardMethodListId, id)
                        .eq(StandardProductList::getInspectionItem, item)
                        .like(StandardProductList::getTree, tree)
                        .select(StandardProductList::getInspectionItemSubclass)
                        .groupBy(StandardProductList::getInspectionItemSubclass)));
            } else {
                map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                        .eq(StandardProductList::getStandardMethodListId, id)
                        .like(StandardProductList::getTree, tree)
                        .select(StandardProductList::getInspectionItemSubclass)
                        .groupBy(StandardProductList::getInspectionItemSubclass)));
            }
            return map;
                    .select(StandardProductList::getInspectionItemSubclass)
                    .groupBy(StandardProductList::getInspectionItemSubclass)));
        }
        return map;
    }
}
inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -151,7 +151,7 @@
        c.price,
        c.cost,
        c.inspection_item,
        u.company,
        cus.company,
        u.`name`,
        i.create_user,
        c.ins_sample_id
@@ -159,6 +159,7 @@
        ins_order i
        LEFT JOIN ins_sample isa ON isa.ins_order_id = i.id
        LEFT JOIN `user` u ON u.id = i.user_id
        left join custom cus on cus.id = u.company
        LEFT JOIN (select SUM(b.price) price, sum(b.man_hour) cost,b.ins_sample_id,GROUP_CONCAT(b.inspection_item2
        SEPARATOR ',')
        inspection_item from (select *,GROUP_CONCAT(inspection_item
performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java
@@ -41,157 +41,157 @@
    @ExcelProperty(value = "类型")
    private String type;
    @ApiModelProperty("1日工时")
    @ApiModelProperty("1日")
    @ValueTableShow(4)
    @ExcelProperty(value = "1日")
    private Double oneHours;
    @ApiModelProperty("2日工时")
    @ApiModelProperty("2日")
    @ValueTableShow(5)
    @ExcelProperty(value = "2日")
    private Double twoHours;
    @ApiModelProperty("3日工时")
    @ApiModelProperty("3日")
    @ValueTableShow(6)
    @ExcelProperty(value = "3日")
    private Double threeHours;
    @ApiModelProperty("4日工时")
    @ApiModelProperty("4日")
    @ValueTableShow(7)
    @ExcelProperty(value = "4日")
    private Double fourHours;
    @ApiModelProperty("5日工时")
    @ApiModelProperty("5日")
    @ValueTableShow(8)
    @ExcelProperty(value = "5日")
    private Double fiveHours;
    @ApiModelProperty("6日工时")
    @ApiModelProperty("6日")
    @ValueTableShow(9)
    @ExcelProperty(value = "6日")
    private Double sixHours;
    @ApiModelProperty("7日工时")
    @ApiModelProperty("7日")
    @ValueTableShow(10)
    @ExcelProperty(value = "7日")
    private Double sevenHours;
    @ApiModelProperty("8日工时")
    @ApiModelProperty("8日")
    @ValueTableShow(11)
    @ExcelProperty(value = "8日")
    private Double eightHours;
    @ApiModelProperty("9日工时")
    @ApiModelProperty("9日")
    @ValueTableShow(12)
    @ExcelProperty(value = "9日")
    private Double nineHours;
    @ApiModelProperty("10日工时")
    @ApiModelProperty("10日")
    @ValueTableShow(13)
    @ExcelProperty(value = "10日")
    private Double tenHours;
    @ApiModelProperty("11日工时")
    @ApiModelProperty("11日")
    @ValueTableShow(14)
    @ExcelProperty(value = "11日")
    private Double elevenHours;
    @ApiModelProperty("12日工时")
    @ApiModelProperty("12日")
    @ValueTableShow(15)
    @ExcelProperty(value = "12日")
    private Double twelveHours;
    @ApiModelProperty("13日工时")
    @ApiModelProperty("13日")
    @ValueTableShow(16)
    @ExcelProperty(value = "13日")
    private Double thirteenHours;
    @ApiModelProperty("14日工时")
    @ApiModelProperty("14日")
    @ValueTableShow(17)
    @ExcelProperty(value = "14日")
    private Double fourteenHours;
    @ApiModelProperty("15日工时")
    @ApiModelProperty("15日")
    @ValueTableShow(18)
    @ExcelProperty(value = "15日")
    private Double fifteenHours;
    @ApiModelProperty("16日工时")
    @ApiModelProperty("16日")
    @ValueTableShow(19)
    @ExcelProperty(value = "16日")
    private Double sixteenHours;
    @ApiModelProperty("17日工时")
    @ApiModelProperty("17日")
    @ValueTableShow(20)
    @ExcelProperty(value = "17日")
    private Double seventeenHours;
    @ApiModelProperty("18日工时")
    @ApiModelProperty("18日")
    @ValueTableShow(21)
    @ExcelProperty(value = "18日")
    private Double eighteenHours;
    @ApiModelProperty("19日工时")
    @ApiModelProperty("19日")
    @ValueTableShow(22)
    @ExcelProperty(value = "19日")
    private Double nineteenHours;
    @ApiModelProperty("20日工时")
    @ApiModelProperty("20日")
    @ValueTableShow(23)
    @ExcelProperty(value = "20日")
    private Double twentyHours;
    @ApiModelProperty("21日工时")
    @ApiModelProperty("21日")
    @ValueTableShow(24)
    @ExcelProperty(value = "21日")
    private Double twentyOneHours;
    @ApiModelProperty("22日工时")
    @ApiModelProperty("22日")
    @ValueTableShow(25)
    @ExcelProperty(value = "22日")
    private Double twentyTwoHours;
    @ApiModelProperty("23日工时")
    @ApiModelProperty("23日")
    @ValueTableShow(26)
    @ExcelProperty(value = "23日")
    private Double twentyThreeHours;
    @ApiModelProperty("24日工时")
    @ApiModelProperty("24日")
    @ValueTableShow(27)
    @ExcelProperty(value = "24日")
    private Double twentyFourHours;
    @ApiModelProperty("25日工时")
    @ApiModelProperty("25日")
    @ValueTableShow(28)
    @ExcelProperty(value = "25日")
    private Double twentyFiveHours;
    @ApiModelProperty("26日工时")
    @ApiModelProperty("26日")
    @ValueTableShow(29)
    @ExcelProperty(value = "26日")
    private Double twentySixHours;
    @ApiModelProperty("27日工时")
    @ApiModelProperty("27日")
    @ValueTableShow(30)
    @ExcelProperty(value = "27日")
    private Double twentySevenHours;
    @ApiModelProperty("28日工时")
    @ApiModelProperty("28日")
    @ValueTableShow(31)
    @ExcelProperty(value = "28日")
    private Double twentyEightHours;
    @ApiModelProperty("29日工时")
    @ApiModelProperty("29日")
    @ValueTableShow(32)
    @ExcelProperty(value = "29日")
    private Double twentyNineHours;
    @ApiModelProperty("30日工时")
    @ApiModelProperty("30日")
    @ValueTableShow(33)
    @ExcelProperty(value = "30日")
    private Double thirtyHours;
    @ApiModelProperty("31日工时")
    @ApiModelProperty("31日")
    @ValueTableShow(34)
    @ExcelProperty(value = "31日")
    private Double thirtyOneHours;
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
@@ -133,7 +133,7 @@
                auxiliaryOriginalHoursDtos.add(getData(objectMap, "总工时"));
            }
        }
        //如果产量工时为空
        //如果輔助工时不为空
        else if (ObjectUtils.isNotEmpty(maps1)) {
            for (Map<String, Object> objectMap : maps1) {
                auxiliaryOriginalHoursDtos.add(getData(objectMap, "总工时"));
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
@@ -82,7 +82,8 @@
            } else {
                //管理员(不添加限制条件所有人都可以看)
            }
        } else {
        }
        else {
            //是组长
            //查询组长下的组员
            List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery().like(User::getDepartLimsId, user.getDepartLimsId()));
performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
@@ -118,7 +118,7 @@
        //根据填写的编号查询辅助工时配置
        AuxiliaryWorkingHours auxiliaryWorkingHours = auxiliaryWorkingHoursMapper.selectOne(Wrappers.<AuxiliaryWorkingHours>lambdaQuery().eq(AuxiliaryWorkingHours::getNumber, number));
        if (ObjectUtils.isEmpty(auxiliaryWorkingHours)) {
            throw new ErrorException("不存在此辅助配置");
            throw new ErrorException("该编号没有对应的辅助工时配置");
        }
        AuxiliaryWorkingHoursDay auxiliaryWorkingHoursDay = new AuxiliaryWorkingHoursDay();
        BeanUtils.copyProperties(auxiliaryWorkingHours, auxiliaryWorkingHoursDay);
performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
@@ -6,7 +6,7 @@
        from (select C.name, C.month, C.manHours + D.manHours as total
        from (select A.name,
        A.month,
        sum(A.manHour) as manHours
        FORMAT(SUM(manHour), 2) as manHours
        from (
        select user.name,
        case
@@ -35,7 +35,7 @@
        from (
        select user.name,
        date_time as month,
        sum(output_work_time) as manHours
        FORMAT(SUM(output_work_time), 2) as manHours
        from auxiliary_output_working_hours aowh
        left join user on user.id = aowh.`check`
        left join department_lims dl on depart_lims_id = dl.id
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -35,7 +35,7 @@
        output_work_time,
        date_time,
        week,
        week_day,
        SUBSTRING(week_day, 2) AS week_day,
        name
        FROM auxiliary_output_working_hours aowh
        left join user on user.id=aowh.`check`
@@ -70,7 +70,7 @@
        from(
        select user.name,
        date_time as month,
        sum(output_work_time) as manHours
        FORMAT(SUM(output_work_time), 2) as manHours
        from auxiliary_output_working_hours aowh
        left join user on user.id=aowh.`check`
        left join department_lims dl on depart_lims_id=dl.id
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
@@ -69,7 +69,7 @@
    <select id="totalHours" resultType="java.util.Map">
        select A.name,
        A.month,
        sum(A.manHour)as manHours
        FORMAT(SUM(manHour), 2)as manHours
        from(
        select user.name,
        case when reviewer_nonproductive_time is null then nonproductive_time