feat: mlogbin create时处理qct
This commit is contained in:
parent
c5bcfb4e53
commit
31e8b92d29
|
@ -701,7 +701,7 @@ class MlogbOutUpdateSerializer(CustomModelSerializer):
|
|||
model = Mlogb
|
||||
fields = "__all__"
|
||||
read_only_fields = EXCLUDE_FIELDS_BASE + ['mlog', 'mtask', 'wm_in', 'material_in', 'material_out',
|
||||
'count_use', 'count_break', 'count_pn_jgqbl', 'mlogbdefect']
|
||||
'count_use', 'count_break', 'count_pn_jgqbl', 'mlogbdefect', "qct"]
|
||||
|
||||
def create(self, validated_data):
|
||||
material_out:Material = validated_data["material_out"]
|
||||
|
|
|
@ -595,7 +595,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
|||
if is_fix and mgroup.process.type == Process.PRO_PROD:
|
||||
# 如果是生产返修,则忽略质检
|
||||
pass
|
||||
elif mlogbout.qct:
|
||||
elif mlogbout.qct is None:
|
||||
try:
|
||||
qctmat = QctMat.objects.get(material=material_out, qct__is_deleted=False, qct__tags__contains="process").order_by("-create_time")
|
||||
except QctMat.DoesNotExist:
|
||||
|
|
Loading…
Reference in New Issue