| | |
| | | |
| | | //物料表中不存在的(依据:物料编码+物料型号),则添加到物料表中去(包含product这个物料) |
| | | List<Material> materialExistList = mService.getListByCodeAndModelList2(bomList); |
| | | List<String> subCodeList = materialExistList.stream().map(Material::getSubCode).collect(Collectors.toList()); |
| | | //List<String> subCodeList = materialExistList.stream().map(Material::getSubCode).collect(Collectors.toList()); |
| | | List<String> subCodeList = materialExistList.stream().map(material -> material.getSubCode()+"/"+material.getSubModel()).collect(Collectors.toList()); |
| | | List<Material> materialList = new LinkedList<>(); |
| | | bomList.forEach(bom -> { |
| | | if (!subCodeList.contains(bom.getSubCode())) { |
| | | if (!subCodeList.contains(bom.getSubCode()+"/"+bom.getSubModel())) { |
| | | Material material = new Material(); |
| | | material.setCategory(bom.getCategory()); |
| | | material.setCreateDate(bom.getCreateDate()); |