feat: 追踪到个的才需要赋予质检表

This commit is contained in:
caoqianming 2025-01-10 10:34:59 +08:00
parent c03129ae81
commit b8fd5fd13b
1 changed files with 3 additions and 5 deletions

View File

@ -544,11 +544,9 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
d_count_real = xcount d_count_real = xcount
d_count_ok = xcount d_count_ok = xcount
# 找寻质检表 # 找寻质检表
qctmat = QctMat.objects.filter(material=material_out, qct__is_deleted=False).order_by("-create_time").first() if material_out.tracking == Material.MA_TRACKING_SINGLE:
qct = None qctmat = QctMat.objects.filter(material=material_out, qct__is_deleted=False).order_by("-create_time").first()
if qctmat: mlogbout.qct = qctmat.qct
qct = qctmat.qct
mlogbout.qct = qct
mlogbout.count_real = d_count_real mlogbout.count_real = d_count_real
mlogbout.count_ok = d_count_ok mlogbout.count_ok = d_count_ok
mlogbout.save() mlogbout.save()