fix: wmaterial 返回count_working
This commit is contained in:
parent
7a8bee5e59
commit
de42dfc75f
|
@ -108,8 +108,8 @@ class WMaterial(CommonBDModel):
|
|||
count_xtest = models.PositiveIntegerField('已检数量', null=True, blank=True)
|
||||
|
||||
@property
|
||||
def count_working(self, obj):
|
||||
return Mlogb.objects.filter(wm_in=obj, mlog__work_end_time__isnull=True).aggregate(count=Sum('count'))['count'] or 0
|
||||
def count_working(self):
|
||||
return Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count'))['count'] or 0
|
||||
|
||||
class Fmlog(CommonADModel):
|
||||
route = models.ForeignKey(Route, verbose_name='生产路线', on_delete=models.SET_NULL, null=True, blank=True)
|
||||
|
|
Loading…
Reference in New Issue