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
07cb738f
Commit
07cb738f
authored
Aug 24, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not create shift patterns in weekend
parent
584aa0f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
dream/plugins/JobShop/ReadJSShifts.py
dream/plugins/JobShop/ReadJSShifts.py
+7
-1
No files found.
dream/plugins/JobShop/ReadJSShifts.py
View file @
07cb738f
...
...
@@ -54,6 +54,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
if
shiftData
:
shiftData
.
pop
(
0
)
#iteration through the raw data to structure it into ManPy config
lastrec
=
None
for
line
in
shiftData
:
# if all the records of that line are none then continue
toContinue
=
False
...
...
@@ -105,7 +106,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
if
line
[
0
]:
entityID
=
line
[
0
].
split
(
"-"
)[
0
]
else
:
entityID
=
""
entityID
=
""
if
str
(
entityID
)
==
''
:
#take it as a continuation for the last entered resource
for
index
,
start
in
enumerate
(
timeStartList
):
...
...
@@ -145,7 +146,12 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
#create default pattern for all operators (10 days long)
timeStartList
=
[]
timeEndList
=
[]
for
dayNumber
in
range
(
0
,
20
):
# check the day, if it is weekend do not create shift entry
dayDate
=
now
+
datetime
.
timedelta
(
days
=
dayNumber
)
if
dayDate
.
weekday
()
in
[
5
,
6
]:
continue
startTime
=
"08:00"
endTime
=
"18:00"
upDate
=
now
.
date
()
+
datetime
.
timedelta
(
days
=
dayNumber
)
...
...
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