Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
2a80221f
Commit
2a80221f
authored
Aug 14, 2020
by
李景熙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改任务显示顺序:时间晚的在前
parent
535f09f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Task.py
DAPlatform/dao/Task.py
+6
-6
No files found.
DAPlatform/dao/Task.py
View file @
2a80221f
...
...
@@ -55,7 +55,7 @@ def judge_completed(taskid, user_id):
def
find_task_by_name
(
task_name
,
start
,
num
):
try
:
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
.
where
(
Task
.
task_name
.
contains
(
task_name
))
Task
.
task_name
.
contains
(
task_name
))
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
@@ -79,7 +79,7 @@ def find_task_by_name(task_name, start, num):
# 查找所有任务(用于任务大厅界面)
def
find_task
(
start
,
num
):
try
:
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
@@ -104,7 +104,7 @@ def find_task(start, num):
def
find_task_by_creator
(
creator
,
start
,
num
):
try
:
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
,
Task
.
task_state
)
.
where
(
Task
.
publish_id
==
creator
,
Task
.
task_state
==
0
and
1
)
Task
.
publish_id
==
creator
,
Task
.
task_state
==
0
and
1
)
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
@@ -134,7 +134,7 @@ def find_task_by_creator(creator, start, num):
def
find_task_check
(
creator
,
start
,
num
):
try
:
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
.
where
(
Task
.
publish_id
==
creator
,
Task
.
task_state
==
2
)
Task
.
publish_id
==
creator
,
Task
.
task_state
==
2
)
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
@@ -161,7 +161,7 @@ def find_task_completed(executor, start, num):
slice_list
=
Relation
.
find_slice_by_completed
(
executor
)
task_list
=
Slice
.
find_task_by_slicelist
(
slice_list
)
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
.
where
(
Task
.
task_id
<<
task_list
)
Task
.
task_id
<<
task_list
)
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
@@ -189,7 +189,7 @@ def find_task_my_task(executor, start, num):
slice_list
=
Relation
.
find_slice_by_executor
(
executor
)
task_list
=
Slice
.
find_task_by_slicelist
(
slice_list
)
find
=
Task
.
select
(
Task
.
task_id
,
Task
.
task_name
,
Task
.
publish_id
,
Task
.
publish_time
)
.
where
(
Task
.
task_id
<<
task_list
)
Task
.
task_id
<<
task_list
)
.
order_by
(
Task
.
task_id
.
desc
())
index
=
0
list
=
[]
while
index
+
start
<
len
(
find
)
and
index
<
num
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment