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
1b09c945
Commit
1b09c945
authored
Nov 26, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补货逻辑修改
parent
803caef7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
models/models.py
+1
-0
myapps/sukang24h/api/hatch_portal.py
+3
-2
myapps/sukang24h/api/tallyman_portal.py
+3
-0
No files found.
models/models.py
View file @
1b09c945
...
@@ -327,6 +327,7 @@ class TallyRecord(Base):
...
@@ -327,6 +327,7 @@ class TallyRecord(Base):
hatch_no
=
Column
(
TINYINT
(
3
),
nullable
=
False
,
comment
=
'机柜仓口号'
)
hatch_no
=
Column
(
TINYINT
(
3
),
nullable
=
False
,
comment
=
'机柜仓口号'
)
production_id
=
Column
(
INTEGER
(
10
),
nullable
=
False
,
comment
=
'商品id'
)
production_id
=
Column
(
INTEGER
(
10
),
nullable
=
False
,
comment
=
'商品id'
)
production_name
=
Column
(
String
(
100
,
'utf8mb4_unicode_ci'
),
nullable
=
False
,
comment
=
'商品名称'
)
production_name
=
Column
(
String
(
100
,
'utf8mb4_unicode_ci'
),
nullable
=
False
,
comment
=
'商品名称'
)
tally_count
=
Column
(
TINYINT
(
3
),
nullable
=
False
,
comment
=
'补货数量'
)
status
=
Column
(
TINYINT
(
3
),
nullable
=
False
,
server_default
=
text
(
"'1'"
),
comment
=
'1指令已下发(等待开仓) 2指令上报(补货完成)'
)
status
=
Column
(
TINYINT
(
3
),
nullable
=
False
,
server_default
=
text
(
"'1'"
),
comment
=
'1指令已下发(等待开仓) 2指令上报(补货完成)'
)
created_at
=
Column
(
TIMESTAMP
,
server_default
=
text
(
"CURRENT_TIMESTAMP"
))
created_at
=
Column
(
TIMESTAMP
,
server_default
=
text
(
"CURRENT_TIMESTAMP"
))
updated_at
=
Column
(
TIMESTAMP
,
server_default
=
text
(
"CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"
))
updated_at
=
Column
(
TIMESTAMP
,
server_default
=
text
(
"CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"
))
...
...
myapps/sukang24h/api/hatch_portal.py
View file @
1b09c945
...
@@ -52,10 +52,10 @@ def get_production_list():
...
@@ -52,10 +52,10 @@ def get_production_list():
"content"
:
i
.
content
,
"content"
:
i
.
content
,
"summary"
:
i
.
summary
,
"summary"
:
i
.
summary
,
"status"
:
i
.
status
,
"status"
:
i
.
status
,
"count"
:
1
"count"
:
i
.
left_count
}
}
else
:
else
:
tmp_dict
[
i
.
production_id
][
"count"
]
+=
1
tmp_dict
[
i
.
production_id
][
"count"
]
+=
i
.
left_count
tmp_dict
[
i
.
production_id
][
"hatch_no"
]
.
append
(
i
.
hatch_no
)
tmp_dict
[
i
.
production_id
][
"hatch_no"
]
.
append
(
i
.
hatch_no
)
hatch_data
=
list
(
tmp_dict
.
values
())
hatch_data
=
list
(
tmp_dict
.
values
())
return
BaseResponse
(
data
=
hatch_data
)
return
BaseResponse
(
data
=
hatch_data
)
...
@@ -92,6 +92,7 @@ def get_production_info():
...
@@ -92,6 +92,7 @@ def get_production_info():
"content"
:
hatch_info
.
content
,
"content"
:
hatch_info
.
content
,
"summary"
:
hatch_info
.
summary
,
"summary"
:
hatch_info
.
summary
,
"status"
:
hatch_info
.
status
,
"status"
:
hatch_info
.
status
,
"count"
:
hatch_info
.
left_count
}
}
return
BaseResponse
(
data
=
hatch_data
)
return
BaseResponse
(
data
=
hatch_data
)
...
...
myapps/sukang24h/api/tallyman_portal.py
View file @
1b09c945
...
@@ -238,6 +238,8 @@ def get_tallyman_hatch_list():
...
@@ -238,6 +238,8 @@ def get_tallyman_hatch_list():
"production_id"
:
i
.
production_id
,
"production_id"
:
i
.
production_id
,
"name"
:
i
.
name
,
"name"
:
i
.
name
,
"status"
:
i
.
status
,
"status"
:
i
.
status
,
"left_count"
:
i
.
left_count
,
"total_count"
:
i
.
total_count
}
for
i
in
hatch_list
]
}
for
i
in
hatch_list
]
return
BaseResponse
(
data
=
hatch_data
)
return
BaseResponse
(
data
=
hatch_data
)
...
@@ -278,6 +280,7 @@ def run_tally_start():
...
@@ -278,6 +280,7 @@ def run_tally_start():
tally_record
.
hatch_no
=
i
.
hatch_no
tally_record
.
hatch_no
=
i
.
hatch_no
tally_record
.
production_id
=
i
.
production_id
tally_record
.
production_id
=
i
.
production_id
tally_record
.
production_name
=
i
.
name
tally_record
.
production_name
=
i
.
name
tally_record
.
tally_count
=
i
.
total_count
-
i
.
left_count
if
i
.
left_count
>
0
else
i
.
total_count
tally_record
.
status
=
1
tally_record
.
status
=
1
db
.
session
.
add
(
tally_record
)
db
.
session
.
add
(
tally_record
)
...
...
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