fix: count_working获取逻辑优化

This commit is contained in:
caoqianming 2025-04-22 09:34:34 +08:00
parent 8ac3ad3477
commit e329c8cbc8
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class WMaterial(CommonBDModel):
@property
def count_working(self):
return Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0
return Mlogb.objects.filter(wm_in=self, submit_time__isnull=True).aggregate(count=Sum('count_use'))['count'] or 0
@classmethod
def mat_in_qs(cls, mtask: Mtask, qs=None):