| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | |
| | | List<String> resultChList = new ArrayList<>(); |
| | | List<String> resultEnList = new ArrayList<>(); |
| | | // 判断是否是只有一个样品 |
| | | boolean isOneSample = samples.size() == 1 ? true : false; |
| | | boolean isOneSample = samples.size() == 1; |
| | | /*基础报告(根据绘制的原始记录模版形成)*/ |
| | | samples.forEach(a -> { |
| | | models.add(a.getModel()); |
| | |
| | | // 检验项分类 检验项 检验子项 |
| | | Map<String, LinkedHashMap<String, List<String>>> errorClassItemMapCn = new LinkedHashMap<>(); |
| | | Map<String, LinkedHashMap<String, List<String>>> errorClassItemMapEn = new LinkedHashMap<>(); |
| | | |
| | | // 中间检测值添加 |
| | | for (int i = 0; i < sampleList.size(); i++) { |
| | | SampleProductExportDto sample = sampleList.get(i); |
| | |
| | | |
| | | // 判断是否有电缆标识map |
| | | if (CollectionUtils.isNotEmpty(sample.getCableTagValueMap())) { |
| | | sample.setLastValueList(new ArrayList<>(sample.getCableTagValueMap().values())); |
| | | TreeMap<String, String> cableTagValues = new TreeMap<>(Comparator.comparingInt(cableTags::indexOf)); |
| | | cableTagValues.putAll(sample.getCableTagValueMap()); |
| | | sample.setLastValueList(new ArrayList<>(cableTagValues.values())); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(sample.getCableTagResultMap())) { |
| | | sample.setInsResultList(new ArrayList<>(sample.getCableTagResultMap().values())); |