| | |
| | | List<Cutter> cutterList = extractToolAfterM6(docInfo,list); |
| | | // 保存刀具 |
| | | if (!cutterList.isEmpty()) { |
| | | this.saveBatch(cutterList); |
| | | List<Cutter> newCutterList = new ArrayList<>(); |
| | | //验证刀具是否已经存在 |
| | | cutterList.forEach(item -> { |
| | | List<Cutter> otherCuttersWithSameNo = checkCutterNo(item); |
| | | if (otherCuttersWithSameNo == null || otherCuttersWithSameNo.isEmpty()) { |
| | | newCutterList.add(item); |
| | | } |
| | | }); |
| | | if (newCutterList.isEmpty()) { |
| | | return Result.error("未发现刀具的参数信息注释,无法提取刀具信息"); |
| | | } |
| | | this.saveBatch(newCutterList); |
| | | //TODO发送刀具管理数据 |
| | | return Result.OK("提取刀具信息成功"); |
| | | }else { |