| | |
| | | }); |
| | | return map; |
| | | } |
| | | public static Map<String, Object> analysisList1(String data, Map<String, List<DataConfig>> dataConfig, |
| | | Device device, String entrustCode, String sampleCode) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | dataConfig.forEach((k, v) -> { |
| | | List<Object> list = new ArrayList<>(); |
| | | // 委托编号与样品编号不存在,定:1、Y定范围,X定横坐标;2、只存在Y;3、只存在X |
| | | if (ObjectUtils.isEmpty(device.getEntrustCode()) && ObjectUtils.isEmpty(device.getSampleCode())) { |
| | | list = analyzeData(data, v, k, splitIdentifier); |
| | | // 委托编号与样品编号存在 |
| | | } else if (ObjectUtils.isNotEmpty(device.getEntrustCode()) && ObjectUtils.isNotEmpty(device.getSampleCode())) { |
| | | list = analyzeDataEntrustCodAndSampleCode(data, v, k, splitIdentifier, device, entrustCode, sampleCode); |
| | | } |
| | | // 进行公式计算 |
| | | Object resultValue = calculationFormula(list, v.get(0), k, device); |
| | | map.put(k, resultValue); |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | private static List<Object> analyzeDataEntrustCodAndSampleCode(String data, List<DataConfig> v, String k, String splitIdentifier, |
| | | Device device, String entrustCodeValue, String sampleCodeValue) { |
| | | entrustCodeValue = entrustCodeValue.replaceAll(" ", ""); |