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
4c0653bc
Commit
4c0653bc
authored
Feb 23, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
completed entry used to identify the whereabouts of the entities through their routes
parent
6f210ee3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
dream/plugins/ReadJSShifts.py
dream/plugins/ReadJSShifts.py
+4
-4
dream/plugins/ReadJSWorkPlan.py
dream/plugins/ReadJSWorkPlan.py
+6
-7
No files found.
dream/plugins/ReadJSShifts.py
View file @
4c0653bc
...
...
@@ -20,11 +20,11 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
strptime
=
datetime
.
datetime
.
strptime
# read the current date and define dateFormat from it
try
:
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d %H:%M'
)
data
[
'general'
][
'dateFormat'
]
=
'%Y/%m/%d %H:%M'
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d %H:%M'
)
data
[
'general'
][
'dateFormat'
]
=
'%Y/%m/%d %H:%M'
except
ValueError
:
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
data
[
'general'
][
'dateFormat'
]
=
'%Y/%m/%d'
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
data
[
'general'
][
'dateFormat'
]
=
'%Y/%m/%d'
self
.
initializeTimeSupport
(
data
)
shiftData
=
data
[
"input"
].
get
(
"shift_spreadsheet"
,[])
...
...
dream/plugins/ReadJSWorkPlan.py
View file @
4c0653bc
...
...
@@ -31,7 +31,6 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
"""
self
.
data
=
data
WPdata
=
data
[
"input"
].
get
(
"workplan_spreadsheet"
,[])
orders
=
data
[
"input"
][
"BOM"
].
get
(
"orders"
,{})
if
WPdata
:
WPdata
.
pop
(
0
)
# pop the column names
for
line
in
WPdata
:
...
...
@@ -55,11 +54,11 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
order
[
"componentsList"
]
=
components
# update the route of the component
route
=
part
.
get
(
"route"
,
[])
task_id
=
line
[
-
1
]
task_id
=
line
[
-
2
]
sequence
=
line
[
4
]
processingTime
=
line
[
-
4
]
processingTime
=
line
[
-
5
]
operator
=
line
[
5
]
partsneeded
=
line
[
-
3
]
partsneeded
=
line
[
-
4
]
# if there are requested parts then split them
if
partsneeded
:
partsneeded
=
partsneeded
.
replace
(
" "
,
""
).
split
(
','
)
...
...
@@ -67,6 +66,7 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
partsneeded
=
[
""
]
technology
=
line
[
3
]
quantity
=
line
[
6
]
completed
=
line
[
-
1
]
# append the current step to the route of the part
route
.
append
({
"task_id"
:
task_id
,
...
...
@@ -75,9 +75,8 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
"operator"
:
operator
,
"partsneeded"
:
partsneeded
,
"technology"
:
technology
,
"quantity"
:
quantity
"quantity"
:
quantity
,
"completed"
:
completed
})
part
[
"route"
]
=
route
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