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
bea2ea5c
Commit
bea2ea5c
authored
Jan 23, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 上推员工数据修改
parent
6b6faf72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
sdddl_project/controllers/inherit_picking.py
+3
-2
sdddl_project/wizard/inherit_roke_bom_create_picking_wizard.py
+2
-2
No files found.
sdddl_project/controllers/inherit_picking.py
View file @
bea2ea5c
...
@@ -106,6 +106,7 @@ class InheritRokeWorkstationPicking(RokeWorkstationPicking):
...
@@ -106,6 +106,7 @@ class InheritRokeWorkstationPicking(RokeWorkstationPicking):
task_id_list
.
append
({
task_id_list
.
append
({
"material_code"
:
product
.
code
or
""
,
"material_code"
:
product
.
code
or
""
,
"code"
:
task_id
.
code
or
""
,
"code"
:
task_id
.
code
or
""
,
"task_type"
:
task_id
.
task_type
or
""
,
"qty"
:
v
.
get
(
"qty"
,
0
),
"qty"
:
v
.
get
(
"qty"
,
0
),
"demand_qty"
:
v
.
get
(
"demand_qty"
,
0
)
"demand_qty"
:
v
.
get
(
"demand_qty"
,
0
)
})
})
...
@@ -170,13 +171,13 @@ class InheritRokeWorkstationPicking(RokeWorkstationPicking):
...
@@ -170,13 +171,13 @@ class InheritRokeWorkstationPicking(RokeWorkstationPicking):
except
Exception
as
e
:
except
Exception
as
e
:
return
{
"code"
:
1
,
"message"
:
"数据库链接失败,请检查数据库链接参数"
,
"data"
:
None
}
return
{
"code"
:
1
,
"message"
:
"数据库链接失败,请检查数据库链接参数"
,
"data"
:
None
}
sql
=
"""
sql
=
"""
INSERT INTO WBLLD (WBLLD_RWBH, WBLLD_CPBH, WBLLD_XQSL, WBLLD_LLSL, WBLLD_datetime, WBLLD_YGBH, WBLLD_YGMC)
INSERT INTO WBLLD (WBLLD_RWBH, WBLL
LD_RWLX, WBLL
D_CPBH, WBLLD_XQSL, WBLLD_LLSL, WBLLD_datetime, WBLLD_YGBH, WBLLD_YGMC)
VALUES
VALUES
"""
"""
sql_list
=
[]
sql_list
=
[]
for
v
in
task_id_list
:
for
v
in
task_id_list
:
sql_list
.
append
(
f
"""
sql_list
.
append
(
f
"""
('{v.get("code", "")}', '{v.get("material_code", "")}', {v.get("demand_qty", 0)}, {v.get("qty", 0)},
('{v.get("code", "")}', '{v.get("
task_type", "")}', '{v.get("
material_code", "")}', {v.get("demand_qty", 0)}, {v.get("qty", 0)},
'{datetime.datetime.now().strftime("
%
Y-
%
m-
%
d
%
H:
%
M:
%
S")}', '{emp.code or ""}', '{emp.name or ""}')
'{datetime.datetime.now().strftime("
%
Y-
%
m-
%
d
%
H:
%
M:
%
S")}', '{emp.code or ""}', '{emp.name or ""}')
"""
)
"""
)
if
not
sql_list
:
if
not
sql_list
:
...
...
sdddl_project/wizard/inherit_roke_bom_create_picking_wizard.py
View file @
bea2ea5c
...
@@ -26,13 +26,13 @@ class InheritRokeBomCreatePickingWizard(models.TransientModel):
...
@@ -26,13 +26,13 @@ class InheritRokeBomCreatePickingWizard(models.TransientModel):
raise
ValidationError
(
"数据库链接失败,请检查数据库链接参数"
)
raise
ValidationError
(
"数据库链接失败,请检查数据库链接参数"
)
em
=
self
.
env
[
"roke.employee"
]
.
search
([(
"user_id"
,
"="
,
self
.
env
.
uid
)],
limit
=
1
)
em
=
self
.
env
[
"roke.employee"
]
.
search
([(
"user_id"
,
"="
,
self
.
env
.
uid
)],
limit
=
1
)
sql
=
"""
sql
=
"""
INSERT INTO WBLLD (WBLLD_RWBH, WBLLD_CPBH, WBLLD_XQSL, WBLLD_LLSL, WBLLD_datetime, WBLLD_YGBH, WBLLD_YGMC)
INSERT INTO WBLLD (WBLLD_RWBH, WBLL
LD_RWLX, WBLL
D_CPBH, WBLLD_XQSL, WBLLD_LLSL, WBLLD_datetime, WBLLD_YGBH, WBLLD_YGMC)
VALUES
VALUES
"""
"""
sql_list
=
[]
sql_list
=
[]
for
v
in
self
.
line_ids
:
for
v
in
self
.
line_ids
:
sql_list
.
append
(
f
"""
sql_list
.
append
(
f
"""
('{task_id.code}', '{v.material_id.code}', {v.demand_qty or 0}, {v.qty or 0},
('{task_id.code}', '{
task_id.task_type}', '{
v.material_id.code}', {v.demand_qty or 0}, {v.qty or 0},
'{datetime.datetime.now().strftime("
%
Y-
%
m-
%
d
%
H:
%
M:
%
S")}', '{em.code or ""}', '{em.name or ""}')
'{datetime.datetime.now().strftime("
%
Y-
%
m-
%
d
%
H:
%
M:
%
S")}', '{em.code or ""}', '{em.name or ""}')
"""
)
"""
)
if
not
sql_list
:
if
not
sql_list
:
...
...
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