Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Automat
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冯佳佳
Automat
Commits
1332af34
Commit
1332af34
authored
Nov 25, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c7cc1039
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
myapps/sukang24h/api/rent_portal.py
+3
-4
No files found.
myapps/sukang24h/api/rent_portal.py
View file @
1332af34
...
@@ -44,7 +44,7 @@ def create_rent():
...
@@ -44,7 +44,7 @@ def create_rent():
return
jsonify
(
MACHINE_NOT_EXIST_ERROR
)
return
jsonify
(
MACHINE_NOT_EXIST_ERROR
)
total_fee
=
0
total_fee
=
0
open_hatchs
=
[]
open_hatchs
=
{}
for
id
,
count
in
productions
.
items
():
for
id
,
count
in
productions
.
items
():
count
=
int
(
count
)
count
=
int
(
count
)
id
=
int
(
id
)
id
=
int
(
id
)
...
@@ -58,12 +58,11 @@ def create_rent():
...
@@ -58,12 +58,11 @@ def create_rent():
left_count
=
count
left_count
=
count
for
i
in
hatch_list
:
for
i
in
hatch_list
:
if
i
.
left_count
<=
left_count
:
if
i
.
left_count
<=
left_count
:
hatch_no_dict
=
{
str
(
i
.
hatch_no
):
i
.
left_count
}
open_hatchs
[
str
(
i
.
hatch_no
)]
=
i
.
left_count
left_count
=
left_count
-
i
.
left_count
left_count
=
left_count
-
i
.
left_count
else
:
else
:
hatch_no_dict
=
{
str
(
i
.
hatch_no
):
left_count
}
open_hatchs
[
str
(
i
.
hatch_no
)]
=
left_count
left_count
=
0
left_count
=
0
open_hatchs
.
append
(
hatch_no_dict
)
if
left_count
<=
0
:
if
left_count
<=
0
:
break
break
if
left_count
>
0
:
if
left_count
>
0
:
...
...
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