fix: wmaterial 返回count_working2
This commit is contained in:
parent
8f0e512654
commit
2d79796ccb
|
@ -109,7 +109,7 @@ class WMaterial(CommonBDModel):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def count_working(self):
|
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 int(Mlogb.objects.filter(wm_in=self, mlog__work_end_time__isnull=True).aggregate(count=Sum('count_use'))['count']) or 0
|
||||||
|
|
||||||
class Fmlog(CommonADModel):
|
class Fmlog(CommonADModel):
|
||||||
route = models.ForeignKey(Route, verbose_name='生产路线', on_delete=models.SET_NULL, null=True, blank=True)
|
route = models.ForeignKey(Route, verbose_name='生产路线', on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
|
|
Loading…
Reference in New Issue