13 lines
391 B
Python
13 lines
391 B
Python
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) |