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
7cfdc6af
Commit
7cfdc6af
authored
Jan 21, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 领料单数据上传
parent
2e6716fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
sdddl_project/models/inherit_production_task.py
+27
-0
No files found.
sdddl_project/models/inherit_production_task.py
View file @
7cfdc6af
...
@@ -60,6 +60,33 @@ class InheritProductionTask(models.Model):
...
@@ -60,6 +60,33 @@ class InheritProductionTask(models.Model):
'folder_id'
:
2
})
'folder_id'
:
2
})
files
.
append
(
a
.
id
)
files
.
append
(
a
.
id
)
self
.
document_ids
=
[(
4
,
a
.
id
)]
self
.
document_ids
=
[(
4
,
a
.
id
)]
if
"finish_qty"
in
vals
.
keys
()
or
"state"
in
vals
.
keys
():
system_id
=
self
.
env
.
ref
(
"roke_workstation_sync_ps.roke_workstation_sync_ps_integrate_system"
)
sync_address
=
system_id
.
sync_address
sync_port
=
system_id
.
sync_port
sync_uname
=
system_id
.
sync_uname
sync_passwd
=
system_id
.
sync_passwd
db_name
=
system_id
.
db_name
try
:
conn
=
pymssql
.
connect
(
host
=
sync_address
,
user
=
sync_uname
,
password
=
sync_passwd
,
database
=
db_name
)
cur
=
conn
.
cursor
()
except
Exception
as
e
:
raise
ValidationError
(
"数据库链接失败,请检查数据库链接参数"
)
for
v
in
self
:
sql
=
f
"""
UPDATE JHMRP
SET JHMRP_CCSL = {vals.get('finish_qty', 0)}
WHERE JHMRP_JHBH = '{v.code}'
"""
try
:
cur
.
execute
(
sql
)
conn
.
commit
()
except
Exception
as
e
:
raise
ValidationError
(
"数据库查询失败"
)
finally
:
cur
.
close
()
conn
.
close
()
return
res
return
res
def
change_routing_id_work_order
(
self
,
routing
):
def
change_routing_id_work_order
(
self
,
routing
):
...
...
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