|
|
|
@@ -28,7 +28,15 @@ open class QcCategoryService( |
|
|
|
"qcType" to type |
|
|
|
) |
|
|
|
val similarItemIds = itemsService.getItemsIdWithSameCategoryForQc(args); |
|
|
|
result = qcCategoryRepository.findQcCategoryInfoByItemIdAndType(similarItemIds[0].toLong(), type) |
|
|
|
|
|
|
|
// Comment the lines below to disable auto matching QC from similar items |
|
|
|
result = if (similarItemIds.isNotEmpty()) |
|
|
|
qcCategoryRepository.findQcCategoryInfoByItemIdAndType(similarItemIds[0].toLong(), type) |
|
|
|
else null |
|
|
|
// |
|
|
|
if (result == null) { // Use Default Template |
|
|
|
result = qcCategoryRepository.findQcCategoryInfoByIsDefault(true) |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |