zss
2024-11-22 d589bf94e8f1863336d23fdd951049622b64db68
csv文件调整
已修改3个文件
32 ■■■■ 文件已修改
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/utils/FuSheUtils.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -312,7 +312,7 @@
        String contentType = file.getContentType();
        InsOrderFile insOrderFile = new InsOrderFile();
        insOrderFile.setInsOrderId(orderId);
        insOrderFile.setFileName(filename);
        if (contentType != null && contentType.startsWith("image/")) {
            // 是图片
            path = imgUrl;
@@ -331,6 +331,7 @@
            urlString = realpath + "/" + pathName;
            file.transferTo(new File(urlString));
            insOrderFile.setFileUrl(pathName);
            insOrderFile.setFileName(pathName);
            if (ObjectUtils.isNotEmpty(sonLaboratory)) {
                insOrderFile.setSonLaboratory(sonLaboratory);
                //删除重复的数据
inspect-server/src/main/java/com/yuanchu/mom/utils/FuSheUtils.java
@@ -56,6 +56,7 @@
            Exceldata exceldata = new Exceldata();
            Map<Integer, Object> project = new HashMap<>();
            HashMap<String, Object> datas1 = new HashMap<>();
            Boolean exitLoop=false;
            for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
                String s = "";
                Sheet sheet = workbook.getSheetAt(i);
@@ -89,6 +90,10 @@
                            else {
                                switch (cell.getCellType()) {
                                    case STRING:
                                        if (cell.getColumnIndex()==1) {
                                            exitLoop=true;
                                            break;
                                        }
                                        if (StringUtils.isNotEmpty(s)) {
                                            datas.put(s, list);
                                        }
@@ -113,6 +118,10 @@
                                        System.out.print("NULL\t");
                                }
                            }
                            if (exitLoop){
                                exitLoop=false;
                                break;
                            }
                            if (map.isEmpty()) {
                                list.add(map);
                            }
@@ -135,15 +144,17 @@
                    for (Map<String, Object> number : hashMaps) {
                        number.put("端口", s1);
                        Double o = (Double) number.get("频率");
                        floatList.add(o);
                        if (o!=null) {
                            floatList.add(o);
                        }
                    }
                    Double maxValue = Collections.max(floatList);
                    Double minValue = Collections.min(floatList);
                    if (map.get(minValue + "-" + maxValue + "-" + s) == null) {
                        map.put(minValue + "-" + maxValue + "-" + s, s1);
                    if (map.get(minValue + "," + maxValue + "," + s) == null) {
                        map.put(minValue + "," + maxValue + "," + s, s1);
                    } else {
                        Object o = map.get(minValue + "-" + maxValue + "-" + s);
                        map.put(minValue + "-" + maxValue + "-" + s, s1 + "," + o);
                        Object o = map.get(minValue + "," + maxValue + "," + s);
                        map.put(minValue + "," + maxValue + "," + s, s1 + "," + o);
                    }
                }
            }
@@ -339,8 +350,8 @@
        runs.setText("辐射方向图参数");
        for (String s : map.keySet()) {
            Map<String, Object> dataRow = exceldata.getDataRow();
            String result = s.substring(s.lastIndexOf("-") + 1);
            String result1 = s.substring(0, s.lastIndexOf("-"));
            String result = s.substring(s.lastIndexOf(",") + 1);
            String result1 = s.substring(0, s.lastIndexOf(","));
            String o = map.get(s).toString();
            String[] split = o.split(",");
            Integer s1 = Integer.parseInt(split[split.length - 1]);
inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java
@@ -2118,7 +2118,9 @@
        List<Map<String, String>> finalDeviceList = deviceList;
        List<Map<String, String>> sampleList = insSampleMapper.selectSampleList(orderId);
        Integer userId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery()
                .eq(InsSampleUser::getInsSampleId, orderId).last("limit 1")).getUserId();
                .eq(InsSampleUser::getInsSampleId, orderId)
                .eq(InsSampleUser::getState,0)
                .last("limit 1")).getUserId();
        String signatureUrl;
        try {
            signatureUrl = userMapper.selectById(userId).getSignatureUrl();