Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
9225f4c2
Commit
9225f4c2
authored
Jan 11, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改收料接口
parent
aa9fb513
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
sdddl_project/controllers/roke_work_order.py
+6
-4
No files found.
sdddl_project/controllers/roke_work_order.py
View file @
9225f4c2
...
...
@@ -25,16 +25,18 @@ class InheritEntrustOrderMain(Main):
user_tz
=
pytz
.
timezone
(
http
.
request
.
env
.
context
.
get
(
'tz'
,
"Asia/Shanghai"
))
date_dt
=
pytz
.
utc
.
localize
(
i
.
plan_date
)
.
astimezone
(
user_tz
)
plan_date
=
date_dt
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
allow_qty
,
default_qty
=
i
.
_get_wo_allow_qty
()
_logger
.
info
(
f
"数据{allow_qty}, {i.finish_qty + i.unqualified_qty}"
)
if
allow_qty
<=
(
i
.
finish_qty
+
i
.
unqualified_qty
):
previous
=
i
.
_get_previous
()
previous
=
sorted
(
previous
,
key
=
lambda
x
:
x
[
'id'
],
reverse
=
True
)[
0
]
if
previous
else
previous
wait_qty
=
previous
.
finish_qty
*
i
.
_get_production_multiple
(
previous
)
\
if
previous
and
http
.
request
.
env
.
user
.
company_id
.
freedom_work
!=
"允许"
else
i
.
plan_qty
if
wait_qty
-
(
i
.
finish_qty
+
i
.
unqualified_qty
)
>
0
:
continue
info
.
append
({
'work_id'
:
i
.
id
,
'code'
:
i
.
code
,
'product_id'
:
i
.
product_id
.
id
,
'product'
:
i
.
product_id
.
name
,
'plan_qty'
:
allow
_qty
,
'plan_qty'
:
wait
_qty
,
'process'
:
i
.
process_id
.
name
,
'entrust_customer'
:
i
.
entrust_customer
.
name
,
'plan_date'
:
plan_date
,
...
...
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