From ee22e4cdf5656272443365aa54bf08863f7fae52 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 17 七月 2024 13:47:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java      |    2 
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java             |  636 ++++++++++++++++-------------------------
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java    |    2 
 inspect-server/src/main/resources/mapper/InsOrderMapper.xml                                               |    3 
 performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml                           |    2 
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java                    |  108 ++++--
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java                        |   64 ++++
 performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java                       |   62 ++--
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java |    3 
 performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml                             |    4 
 performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml                        |    4 
 11 files changed, 425 insertions(+), 465 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index acfb168..3904f84 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/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) {
+                            //鍐嶆牴鎹叧鑱旂殑鍏夌氦閰嶇疆鐨刬d鍜屽惊鐜鏁板拰娓╁害鍜屾牱鍝乮d杩涜鏌ヨ妫�楠岄」鐩�
+                            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) {
                         //鍐嶆牴鎹叧鑱旂殑鍏夌氦閰嶇疆鐨刬d鍜屽惊鐜鏁板拰娓╁害鍜屾牱鍝乮d杩涜鏌ヨ妫�楠岄」鐩�
                         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) {
-                    //鍐嶆牴鎹叧鑱旂殑鍏夌氦閰嶇疆鐨刬d鍜屽惊鐜鏁板拰娓╁害鍜屾牱鍝乮d杩涜鏌ヨ妫�楠岄」鐩�
-                    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();
         }
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
index 952e942..a67a306 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
+++ b/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;
     }
 
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 0a79c13..451eaeb 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
@@ -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;
     }
+}
 
 
 
diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
index 658c793..853eb28 100644
--- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
+++ b/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
diff --git a/performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java b/performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java
index 3ce937b..9d59780 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/pojo/AuxiliaryCorrectionHours.java
+++ b/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;
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
index 3331665..6b54651 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
+++ b/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, "鎬诲伐鏃�"));
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
index 753a514..577f0f3 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
+++ b/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()));
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
index 6af972b..c5814b9 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
+++ b/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);
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
index 110813c..1b83759 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOriginalHoursMapper.xml
+++ b/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
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
index aca6fec..de3994d 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
+++ b/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
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
index 48b7a4a..11e513f 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
+++ b/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

--
Gitblit v1.9.3