修改rpj_audit_end

This commit is contained in:
曹前明 2022-07-15 13:59:01 +08:00
parent c0b46a1fe1
commit 2a57b77425
5 changed files with 9 additions and 3 deletions

View File

@ -1,2 +1,4 @@
class AiService:
pass
algo_dict = {
"helmet": "apps.helmet.algo.helmet"
}

View File

@ -103,3 +103,4 @@ params_dict = {"id": "xxxxx001",
"DevChannel": "1000038$1$0$1",
"SnapType": 1,
"CmdSrc": 0}}
params_str = "{\"method\":\"dev.snap\",\"id\":123,\"params\":{\"DevID\":\"1000038\",\"DevChannel\":0,\"PicNum\":1,\"SnapType\":1,\"CmdSrc\":0}}"

View File

@ -49,6 +49,9 @@ class Employee(CommonBModel):
def __str__(self):
return self.name
def save(self, *args, **kwargs) -> None:
return super().save(*args, **kwargs)
# class Card(CommonAModel):
# """

View File

@ -41,7 +41,7 @@ def rpj_audit_end(ticket):
# 同步至大华人员库并下发人脸
HrmService.sync_dahua_employee(ep, '', rpj.come_time, rpj.leave_time)
# 更新入厂项目人员证书库
for i in Rpjcertificate.objects.filter(rpj=rpj):
for i in Rpjcertificate.objects.filter(rpj_member__rpj=rpj):
ct = Certificate.objects.filter(number=i.number).first()
if ct:
pass

View File

@ -442,7 +442,7 @@ class TicketViewSet(CreateUpdateCustomMixin, CreateModelMixin, ListModelMixin, R
if not ticket.script_run_last_result:
ticket.script_run_last_result = True
ticket.save()
run_task.delay(ticket.id)
run_task(ticket.id)
return Response()