diff --git a/apps/inm/tasks.py b/apps/inm/tasks.py new file mode 100644 index 00000000..cff8fbfa --- /dev/null +++ b/apps/inm/tasks.py @@ -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) \ No newline at end of file