Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rota
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘丙寅
rota
Commits
e458c34e
Commit
e458c34e
authored
May 08, 2021
by
刘丙寅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动分配用户
parent
84f3c3b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
32 deletions
+48
-32
workspace.xml
.idea/workspace.xml
+36
-27
rota_gm_new.py
rota_gm_new.py
+12
-5
No files found.
.idea/workspace.xml
View file @
e458c34e
...
...
@@ -3,8 +3,7 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"a188f8e8-7383-4735-a16a-e71d8f97fff3"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/peizhi.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/peizhi.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/rota_gm.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/rota_gm.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/rota_gm_new.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/rota_gm_new.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -14,7 +13,7 @@
</component>
<component
name=
"CoverageDataManager"
>
<SUITE
FILE_PATH=
"coverage/rota$demo.coverage"
NAME=
"demo Coverage Results"
MODIFIED=
"1620285725994"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
/>
<SUITE
FILE_PATH=
"coverage/rota$rota_gm_new.coverage"
NAME=
"rota_gm_new Coverage Results"
MODIFIED=
"1620
28212004
5"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
/>
<SUITE
FILE_PATH=
"coverage/rota$rota_gm_new.coverage"
NAME=
"rota_gm_new Coverage Results"
MODIFIED=
"1620
46195978
5"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
/>
<SUITE
FILE_PATH=
"coverage/rota$rota_gm.coverage"
NAME=
"rota_gm Coverage Results"
MODIFIED=
"1619690148319"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
/>
</component>
<component
name=
"FileEditorManager"
>
...
...
@@ -22,8 +21,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/rota_gm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"5
75
"
>
<caret
line=
"25"
column=
"40"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"40"
selection-end-line=
"25"
selection-end-column=
"40"
/>
<state
relative-caret-position=
"5
29
"
>
<caret
line=
"25"
column=
"40"
selection-start-line=
"25"
selection-start-column=
"40"
selection-end-line=
"25"
selection-end-column=
"40"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -34,8 +33,8 @@
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/rota_gm_new.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
253
"
>
<caret
line=
"
11"
column=
"39"
selection-start-line=
"11"
selection-start-column=
"39"
selection-end-line=
"11"
selection-end-column=
"39
"
/>
<state
relative-caret-position=
"
547
"
>
<caret
line=
"
82"
column=
"40"
lean-forward=
"true"
selection-start-line=
"82"
selection-start-column=
"40"
selection-end-line=
"82"
selection-end-column=
"40
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -47,7 +46,7 @@
<entry
file=
"file://$PROJECT_DIR$/peizhi.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"368"
>
<caret
line=
"16"
column=
"19"
lean-forward=
"true"
selection-start-line=
"16"
selection-start-column=
"19"
selection-end-line=
"16"
selection-end-column=
"19"
/>
<caret
line=
"16"
column=
"19"
selection-start-line=
"16"
selection-start-column=
"19"
selection-end-line=
"16"
selection-end-column=
"19"
/>
</state>
</provider>
</entry>
...
...
@@ -70,6 +69,7 @@
<find>
element.xpath('//div[@class=
"
wnrl_riqi
"
]')
</find>
<find>
ran
</find>
<find>
range
</find>
<find>
18646292152
</find>
</findStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -97,7 +97,6 @@
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
...
...
@@ -109,6 +108,7 @@
<select
/>
</subPane>
</pane>
<pane
id=
"Scope"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
...
...
@@ -129,7 +129,7 @@
</list>
</option>
</component>
<component
name=
"RunManager"
selected=
"Python.
demo
"
>
<component
name=
"RunManager"
selected=
"Python.
rota_gm_new
"
>
<configuration
name=
"demo"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
>
<module
name=
"rota"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
...
...
@@ -198,8 +198,8 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python.rota_gm_new"
/>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python.rota_gm"
/>
</list>
</recent_temporary>
...
...
@@ -216,7 +216,8 @@
<updated>
1619664045043
</updated>
<workItem
from=
"1619664053864"
duration=
"11284000"
/>
<workItem
from=
"1619763908943"
duration=
"12423000"
/>
<workItem
from=
"1620269647785"
duration=
"9774000"
/>
<workItem
from=
"1620269647785"
duration=
"10899000"
/>
<workItem
from=
"1620460883656"
duration=
"1048000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"修改文案和时间"
>
<created>
1619687262591
</created>
...
...
@@ -239,11 +240,18 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619690050131
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"4"
/>
<task
id=
"LOCAL-00004"
summary=
"自动分配用户"
>
<created>
1620287097928
</created>
<option
name=
"number"
value=
"00004"
/>
<option
name=
"presentableId"
value=
"LOCAL-00004"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1620287097928
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"5"
/>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"3
3481
000"
/>
<option
name=
"totallyTimeSpent"
value=
"3
5654
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -258,7 +266,7 @@
<frame
x=
"1440"
y=
"-180"
width=
"1920"
height=
"1080"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.13
41853
"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.13
525027
"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Favorites"
order=
"2"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
...
...
@@ -288,7 +296,8 @@
<MESSAGE
value=
"修改文案和时间"
/>
<MESSAGE
value=
"修改代码逻辑"
/>
<MESSAGE
value=
"完善代码逻辑"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"完善代码逻辑"
/>
<MESSAGE
value=
"自动分配用户"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"自动分配用户"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/venv/lib/python3.7/site-packages/requests/adapters.py"
>
...
...
@@ -495,27 +504,27 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/peizhi.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"368"
>
<caret
line=
"16"
column=
"19"
lean-forward=
"true"
selection-start-line=
"16"
selection-start-column=
"19"
selection-end-line=
"16"
selection-end-column=
"19"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/rota_gm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"5
75
"
>
<caret
line=
"25"
column=
"40"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"40"
selection-end-line=
"25"
selection-end-column=
"40"
/>
<state
relative-caret-position=
"5
29
"
>
<caret
line=
"25"
column=
"40"
selection-start-line=
"25"
selection-start-column=
"40"
selection-end-line=
"25"
selection-end-column=
"40"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/peizhi.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"368"
>
<caret
line=
"16"
column=
"19"
selection-start-line=
"16"
selection-start-column=
"19"
selection-end-line=
"16"
selection-end-column=
"19"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/rota_gm_new.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
253
"
>
<caret
line=
"
11"
column=
"39"
selection-start-line=
"11"
selection-start-column=
"39"
selection-end-line=
"11"
selection-end-column=
"39
"
/>
<state
relative-caret-position=
"
547
"
>
<caret
line=
"
82"
column=
"40"
lean-forward=
"true"
selection-start-line=
"82"
selection-start-column=
"40"
selection-end-line=
"82"
selection-end-column=
"40
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
rota_gm_new.py
View file @
e458c34e
...
...
@@ -35,12 +35,17 @@ def test():
if
int
(
format_tomorrow
)
in
days
and
int
(
format_today
)
not
in
days
:
# 循环判断接下来的时间,看这个假期有多长
for
i
in
range
(
1
,
10
):
print
(
"*"
*
100
)
print
(
i
)
print
(
"*"
*
100
)
dayday
=
today
+
timedelta
(
days
=
i
)
dayday
=
int
(
dayday
.
strftime
(
"
%
Y
%
m
%
d"
))
# 下一个是工作日 则跳出循环,以获得一共多长假期
if
dayday
not
in
days
:
break
print
(
"休息天数:"
)
number
=
i
-
1
print
(
number
)
# redis 存储数据
redis_list
=
r
.
lrange
(
"zhiban"
,
0
,
-
1
)
...
...
@@ -55,21 +60,23 @@ def test():
else
:
new_list
=
redis_list
+
peizhi
.
Personnel_list_new
# 取出来名字
for
o
in
range
(
0
,
i
):
print
(
i
)
for
o
in
range
(
0
,
number
):
print
(
number
)
www
.
append
(
new_list
[
o
])
new_list
.
remove
(
new_list
[
o
])
r
.
delete
(
"zhiban"
)
r
.
rpush
(
"zhiban"
,
*
new_list
)
phone_list
=
[]
for
i
in
new_list
:
for
i
in
www
:
phone
=
peizhi
.
Personnel_list_1
.
get
(
i
)
phone_list
.
append
(
phone
)
new_www
=
' '
.
join
(
www
)
print
(
new_www
)
r
.
rpush
(
"zhiban"
,
*
new_list
)
print
(
phone_list
)
dd_url
=
"https://oapi.dingtalk.com/robot/send?access_token=062ab7f98f47c85e6c200efd21ae5d532e4f1bbfd6782ae1268b9a1f4d3dc7b9"
text
=
"明日开始休假:休息
%
s 天 值班人员为:
%
s 值班人员记得带 电脑,手机,调通vpn环境"
%
(
i
,
new_www
)
text
=
"明日开始休假:休息
%
s 天 值班人员为:
%
s 值班人员记得带 电脑,手机,调通vpn环境"
%
(
number
,
new_www
)
json_text
=
{
"msgtype"
:
"text"
,
"at"
:
{
...
...
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