Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
71854525
Commit
71854525
authored
Feb 19, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new plugin for JopShop instance. Reads wip from the corresponding spreadsheet
parent
1545f30b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
dream/plugins/ReadJSWIP.py
dream/plugins/ReadJSWIP.py
+42
-0
No files found.
dream/plugins/ReadJSWIP.py
0 → 100644
View file @
71854525
from
copy
import
copy
import
json
import
time
import
random
import
operator
from
datetime
import
datetime
import
copy
import
routeQuery
from
dream.plugins
import
plugin
class
ReadJSWIP
(
plugin
.
InputPreparationPlugin
):
""" Input preparation
reads the wip from the spreadsheet and inserts it to the BOM
"""
def
preprocess
(
self
,
data
):
""" inserts the wip as introduced in the GUI to the BOM
"""
WIPdata
=
data
[
"input"
][
"wip_spreadsheet"
]
wip
=
data
[
"input"
][
"BOM"
][
"WIP"
]
if
WIPdata
:
WIPdata
.
pop
(
0
)
# pop the column names
for
WIPitem
in
WIPdata
:
partID
=
WIPitem
[
0
]
if
not
partID
:
continue
stationID
=
WIPitem
[
1
]
operatorID
=
WIPitem
[
2
]
sequence
=
WIPitem
[
3
]
WP_id
=
WIPitem
[
4
]
start
=
WIPitem
[
5
]
end
=
WIPitem
[
6
]
wip
[
partID
]
=
{
"task_id"
:
WP_id
,
"operator"
:
operatorID
,
"station"
:
stationID
,
"entry"
:
start
,
"exit"
:
end
,
"sequence"
:
sequence
}
return
data
\ No newline at end of file
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