| | |
| | | |
| | | // 添加设备记录 |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // 添加设备使用记录 |
| | | addDeviceRecord(insSample, userId); |
| | | }); |
| | | } |
| | | |
| | | private synchronized void addDeviceRecord(InsSample insSample, Integer userId) { |
| | | InsOrder order = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | User user = userMapper.selectById(userId); |
| | | // 查询设备使用记录查询该订单的使用记录 |
| | |
| | | .in(InsOrderDeviceRecord::getDeviceId, reportDeviceIds) |
| | | .eq(InsOrderDeviceRecord::getInsOrderId, insSample.getInsOrderId())); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private static Set<String> getDeviceDifference(Set<String> number1, Set<String> number2) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * todo: 清除没有使用的检验项 |
| | | * todo: 原始记录模板清除没有使用的检验项(暂时有bug无法使用) |
| | | * @param sheet |
| | | * @param itemNameList |
| | | */ |
| | |
| | | private void addAnalysis(List<InsProduct> productList, IfsInventoryQuantity ifsInventoryQuantity, InsOrder order) { |
| | | for (InsProduct insProduct : productList) { |
| | | // todo: 暂时判断是否是老化 |
| | | if (insProduct.getInspectionItem().contains("老化")) { |
| | | if (insProduct.getInspectionItem().contains("老化") && insProduct.getInsResult().equals(1)) { |
| | | List<InsProductDeviationWarningDetail> insProductAnalysisDtoList = insProductMapper.selectAnalysis(insProduct, ifsInventoryQuantity.getSupplierName()); |
| | | |
| | | if (insProductAnalysisDtoList.size() < 10) { |