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
4e532c1f
Commit
4e532c1f
authored
Feb 16, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OldStylePartJobShopWIP: use time unit mixin
parent
695fb631
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
dream/plugins/OldStylePartJobShopWIP.py
dream/plugins/OldStylePartJobShopWIP.py
+4
-6
No files found.
dream/plugins/OldStylePartJobShopWIP.py
View file @
4e532c1f
...
...
@@ -6,11 +6,12 @@ import operator
from
datetime
import
datetime
from
dream.plugins
import
plugin
from
dream.plugins.TimeSupport
import
TimeSupportMixin
# XXX could use getClassFromName & isinstance instead
MACHINE_TYPE_SET
=
set
([
"Dream.MachineManagedJob"
,
"Dream.MouldAssembly"
])
class
OldStylePartJobShopWIP
(
plugin
.
InputPreparationPlugin
):
class
OldStylePartJobShopWIP
(
plugin
.
InputPreparationPlugin
,
TimeSupportMixin
):
""" Input prepration
read wip-spreadsheet data and update the wip property of the stations.
"""
...
...
@@ -101,12 +102,9 @@ class OldStylePartJobShopWIP(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
""" Set the WIP in queue from spreadsheet data.
"""
self
.
initializeTimeSupport
(
data
)
self
.
data
=
copy
(
data
)
strptime
=
datetime
.
strptime
# XXX this format is incorrect we need to include hour too
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
input_id
=
self
.
configuration_dict
[
'input_id'
]
wip_list
=
[]
i
=
0
...
...
@@ -120,7 +118,7 @@ class OldStylePartJobShopWIP(plugin.InputPreparationPlugin):
wip_list
.
append
(
order_dict
)
order_id
,
due_date
,
priority
,
project_manager
,
part
,
part_type
,
\
sequence_list
,
processing_time_list
,
prerequisite_string
=
value_list
due_date
=
(
datetime
.
strptime
(
due_date
,
'%Y/%m/%d'
)
-
now
).
days
*
24
due_date
=
(
datetime
.
strptime
(
due_date
,
'%Y/%m/%d'
)
-
self
.
now
).
days
*
24
prerequisite_list
=
self
.
getListFromString
(
prerequisite_string
)
sequence_list
=
sequence_list
.
split
(
'-'
)
processing_time_list
=
processing_time_list
.
split
(
'-'
)
...
...
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