1
0
forked from erp-dev/erp

feat: added wecom notify when printing_job production was completed(new status) and shipment was created

This commit is contained in:
2026-04-09 17:35:14 +08:00
parent 76ea445880
commit 646dbe7f18
27 changed files with 1122 additions and 13 deletions

24
shipment/tasks.py Normal file
View File

@@ -0,0 +1,24 @@
import logging
from celery import shared_task
from shipment.services import send_shipment_created_wecom
logger = logging.getLogger(__name__)
@shared_task(bind=True)
def notify_shipment_created_wecom(
self,
*,
shipment_id: int,
created_by_id: int | None = None,
) -> dict:
payload = send_shipment_created_wecom(
shipment_id=shipment_id,
created_by_id=created_by_id,
)
payload["task_id"] = self.request.id
logger.info("[shipment.tasks] 出货单创建企业微信通知发送完成: %s", payload)
return payload