| | |
| | | List<InsProduct> insProductes = new ArrayList<>(); |
| | | List<InsProduct> insProducts = new ArrayList<>(); |
| | | String[] strings = product.getAsk().split(";"); |
| | | |
| | | for (int i = 0; i < strings.length; i++) { |
| | | int count = Integer.parseInt(strings[strings.length - 1]); |
| | | if (i != strings.length - 1) { |
| | | InsProduct insProduct = new InsProduct(); |
| | | switch (type) { |
| | |
| | | break; |
| | | } |
| | | String[] split = strings[i].split(","); |
| | | if (split[0].equals("20℃")) { |
| | | insProduct.setInspectionItem(count + "");//检验项--循环次数 |
| | | } else { |
| | | insProduct.setInspectionItem("1");//检验项--循环次数 |
| | | } |
| | | insProduct.setInspectionItemSubclass(split[0]);//检验项--温度 |
| | | insProduct.setInspectionItemClass(split[1]);//检验项--光纤项目 |
| | | insProduct.setAsk(split[2]);//检验要求 |
| | |
| | | insProductes.add(insProduct); |
| | | } else { |
| | | //最后一个数据是说明会循环多少次 |
| | | int count = Integer.parseInt(strings[i]); |
| | | if (count > 1) { |
| | | //循环超过1次 |
| | | for (int j = 2; j <= count; j++) { |
| | | for (InsProduct insProduct : insProducts) { |
| | | if (!insProduct.getInspectionItemSubclass().equals("20℃")) { |
| | | if (!insProduct.getInspectionItemSubclass().equals("20℃") && !insProduct.getInspectionItemSubclass().equals("20℃(常温)")) { |
| | | InsProduct insProduct1 = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct,insProduct1); |
| | | insProduct1.setInspectionItem(j + ""); |