feat: mlogbin create时处理qct

This commit is contained in:
caoqianming 2025-02-28 15:50:23 +08:00
parent c5bcfb4e53
commit 31e8b92d29
2 changed files with 2 additions and 2 deletions

View File

@ -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"]

View File

@ -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: