w
This commit is contained in:
commit
4716effcf7
309 files changed
+153369
No files matched your search
@@ -0,0 +1,9 @@
|
||||
from services.redis_key import *
|
||||
import asyncio
|
||||
class WorkBuildier:
|
||||
async def worklist(arr):
|
||||
wa = [REdSetter.updateKeyReturnChecker(REdSetterSettings('data:work',x["id"],'task_work')) for x in arr]
|
||||
|
||||
res = await asyncio.gather(*wa)
|
||||
|
||||
return res
|
||||
@@ -0,0 +1,24 @@
|
||||
from orm.models import *
|
||||
from orm.schema import *
|
||||
from services.wsservice import *
|
||||
|
||||
|
||||
|
||||
class Workquery:
|
||||
async def task_work(id) -> dict:
|
||||
|
||||
work= await Work.objects.select_related(["status","parent","responsible","work_assignment"]).order_by("work_assignment__dateend").fields(["responsible__id","responsible__username",
|
||||
"responsible__sn","responsible__givenName","id","parent","name","status", "datestart","dateend","comment","difficult","longname", 'description',
|
||||
"work_assignment__name", "work_assignment__id","work_assignment__dateend"]).get(id=id)
|
||||
|
||||
return querytoPydantic(Work4project, work)
|
||||
|
||||
async def getstatus(id):
|
||||
status = await TaskStatus.objects.get(id=id)
|
||||
return querytoPydantic(TaskStatus.get_pydantic(include={'id','name'}),status)
|
||||
|
||||
|
||||
async def work_status_update(user, id, status):
|
||||
work = await Work.objects.get(id=id)
|
||||
work.status = status
|
||||
return await work.update()
|
||||
Reference in new issue
Block a user