feat: 增加矫正correct_material_count的task
This commit is contained in:
parent
8c798984f3
commit
9b2dbb8a01
|
@ -0,0 +1,13 @@
|
|||
from __future__ import absolute_import, unicode_literals
|
||||
from apps.utils.tasks import CustomTask
|
||||
from celery import shared_task
|
||||
from apps.mtm.models import Material
|
||||
|
||||
@shared_task(base=CustomTask)
|
||||
def correct_material_count():
|
||||
"""
|
||||
矫正现有物料总数量
|
||||
"""
|
||||
from apps.inm.services import InmService
|
||||
for m in Material.objects.all():
|
||||
InmService.cal_mat_count(m)
|
Loading…
Reference in New Issue