@xiaoyuanhao/yunzhi-cli 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/arguments.cjs +7 -4
- package/lib/attendance-clock-entry.cjs +31 -0
- package/lib/attendance-configuration-entry.cjs +35 -0
- package/lib/attendance-correction-applications.cjs +64 -0
- package/lib/attendance-correction-approval.cjs +135 -0
- package/lib/attendance-correction-start.cjs +47 -0
- package/lib/attendance-leave-enums.cjs +193 -0
- package/lib/attendance-leave-ids.cjs +15 -0
- package/lib/attendance-leave-list-filters.cjs +21 -0
- package/lib/attendance-leave-route.cjs +20 -0
- package/lib/attendance-operation-result.cjs +97 -0
- package/lib/attendance-report-inbox.cjs +42 -0
- package/lib/attendance-report-remarks.cjs +62 -0
- package/lib/attendance-statistics.cjs +49 -0
- package/lib/attendance.cjs +404 -0
- package/lib/auth.cjs +1 -1
- package/lib/business-schemas.cjs +3 -1
- package/lib/cli.cjs +294 -1
- package/lib/command-guidance.cjs +1162 -1
- package/lib/command-reference.cjs +54 -0
- package/lib/contact-help.cjs +43 -0
- package/lib/contact-mobile.cjs +14 -0
- package/lib/contact.cjs +85 -0
- package/lib/correction-help.cjs +57 -0
- package/lib/dormitory-replenishment.cjs +63 -0
- package/lib/dormitory-report-detail.cjs +76 -0
- package/lib/dormitory-report-id.cjs +8 -0
- package/lib/dormitory-report-summary.cjs +66 -0
- package/lib/dormitory-report-view.cjs +36 -0
- package/lib/dormitory-rooms.cjs +41 -0
- package/lib/dormitory-scope.cjs +18 -0
- package/lib/dormitory-statistics.cjs +30 -0
- package/lib/download.cjs +17 -8
- package/lib/gateway.cjs +9 -4
- package/lib/leave-approval-receipt.cjs +126 -0
- package/lib/leave-attachment-upload.cjs +110 -0
- package/lib/leave-form-users.cjs +48 -0
- package/lib/leave-start-receipt.cjs +64 -0
- package/lib/leave.cjs +457 -0
- package/lib/replenishment-records.cjs +39 -0
- package/lib/result.cjs +1 -0
- package/lib/saved-report-summary.cjs +16 -0
- package/lib/school-contacts.cjs +24 -0
- package/lib/school-help.cjs +53 -0
- package/lib/school-schema.cjs +38 -0
- package/lib/student-application-help.cjs +76 -0
- package/lib/student-leave-form.cjs +108 -0
- package/lib/student-leave-operations.cjs +24 -0
- package/lib/student-leave-query.cjs +74 -0
- package/lib/student-leave-resumption.cjs +2 -0
- package/lib/student-leave-start.cjs +34 -0
- package/lib/student-leave.cjs +51 -0
- package/lib/student-query-help.cjs +57 -0
- package/lib/student-replenishment.cjs +64 -0
- package/lib/student-report-detail.cjs +39 -0
- package/lib/student-report-summary.cjs +30 -0
- package/lib/teacher-approval-help.cjs +132 -0
- package/lib/teacher-leave-files.cjs +112 -0
- package/lib/teacher-leave-form-check.cjs +185 -0
- package/lib/teacher-leave-query.cjs +99 -0
- package/lib/teacher-own-leave-help.cjs +134 -0
- package/lib/workflow-entry.cjs +42 -0
- package/package.json +1 -1
package/lib/cli.cjs
CHANGED
|
@@ -4,6 +4,129 @@ const { Failure, invalid, success } = require('./result.cjs');
|
|
|
4
4
|
const guidance = require('./command-guidance.cjs');
|
|
5
5
|
const { unknownCommand, unknownOption } = require('./suggestions.cjs');
|
|
6
6
|
const usage = {
|
|
7
|
+
...require('./contact-help.cjs').usage,
|
|
8
|
+
...require('./school-help.cjs').usage,
|
|
9
|
+
'leave approval-entry': '--task-id <task_id>',
|
|
10
|
+
'leave resumption-approval-entry': '--task-id <task_id>',
|
|
11
|
+
'student-leave approval-entry': '--task-id <task_id>',
|
|
12
|
+
'student-leave resumption-approval-entry': '--task-id <task_id>',
|
|
13
|
+
'attendance correction-approval-entry': '--task-id <task_id>',
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
'leave approval-form-people-search': '--task-id <task_id> --field-key <field_key> --keyword <text>',
|
|
18
|
+
'leave resumption-approval-form-people-search': '--task-id <task_id> --field-key <field_key> --keyword <text>',
|
|
19
|
+
'student-leave approval-form-people-search': '--task-id <task_id> --field-key <field_key> --keyword <text>',
|
|
20
|
+
'student-leave resumption-approval-form-people-search': '--task-id <task_id> --field-key <field_key> --keyword <text>',
|
|
21
|
+
'leave form-people-search': '--workflow-code <program_code> --field-key <field_key> --keyword <text>',
|
|
22
|
+
'leave resumption-form-people-search': '--workflow-code <program_code> --field-key <field_key> --keyword <text> --leave-id <leave_id>',
|
|
23
|
+
'student-leave form-people-search': '--workflow-code <program_code> --field-key <field_key> --keyword <text> --class-id <class_id> --student-id <student_id>',
|
|
24
|
+
'student-leave resumption-form-people-search': '--workflow-code <program_code> --field-key <field_key> --keyword <text> --leave-id <leave_id> [--student-id <student_id>]',
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
'student-leave resumption-approvals': '--category pending|handled|copied [--page <page>] [--page-size 1..50] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--applicant-id <id>] [--applicant-name <name>] [--subject-id <id>] [--subject-name <name>]',
|
|
31
|
+
'student-leave resumption-approval': '--category pending|handled|copied --task-id <task_id> [--notice-id <notice_id>]',
|
|
32
|
+
'student-leave resumption-approve': '--task-id <task_id> [--opinion <text>] [--field-values <json-array|@path>]',
|
|
33
|
+
'student-leave resumption-reject': '--task-id <task_id> --return-to start|previous [--opinion <text>]',
|
|
34
|
+
'student-leave approvals': '--category pending|handled|copied [--page <page>] [--page-size 1..50] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--applicant-id <id>] [--applicant-name <name>] [--subject-id <id>] [--subject-name <name>]',
|
|
35
|
+
'student-leave approval': '--category pending|handled|copied --task-id <task_id> [--notice-id <notice_id>]',
|
|
36
|
+
'student-leave approve': '--task-id <task_id> [--opinion <text>] [--field-values <json-array|@path>]',
|
|
37
|
+
'student-leave reject': '--task-id <task_id> --return-to start|previous [--opinion <text>]',
|
|
38
|
+
|
|
39
|
+
'student-leave resumption-list': '--scope managed|mine [--class-id <class_id>] [--student-id <student_id>] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--status <status>] [--page <n>] [--page-size <1-50>]',
|
|
40
|
+
'student-leave resumption-show': '--id <id>',
|
|
41
|
+
'student-leave resumption-remind': '--id <id>',
|
|
42
|
+
'student-leave resumption-withdraw': '--id <id>',
|
|
43
|
+
'student-leave resumption-form': '--leave-id <leave_id> [--student-id <student_id>] [--workflow-code <program_code>] [--resumption-time <datetime>] [--reason <text>] [--field-values <json-array|@path>]',
|
|
44
|
+
'student-leave resumption-submit': '--leave-id <leave_id> [--student-id <student_id>] --workflow-code <program_code> --resumption-time <datetime> [--reason <text>] [--field-values <json-array|@path>]',
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
'student-leave submit': '--class-id <class_id> --student-id <student_id> --workflow-code <program_code> [--field-values <json-array|@path>]',
|
|
48
|
+
'student-leave form': '--class-id <class_id> --student-id <student_id> [--workflow-code <program_code>] [--field-values <json-array|@path>]',
|
|
49
|
+
'student-leave list': '--scope managed|mine [--class-id <class_id>] [--student-id <student_id>] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--status <status>] [--page <n>] [--page-size <1-50>]',
|
|
50
|
+
'student-leave show': '--id <id>',
|
|
51
|
+
'student-leave remind': '--id <id>',
|
|
52
|
+
'student-leave withdraw': '--id <id>',
|
|
53
|
+
'student-leave classes': '',
|
|
54
|
+
'student-leave students': '[--class-id <class_id>] [--name <text>] [--page <n>] [--page-size <1-50>]',
|
|
55
|
+
'dormitory-attendance applicable-rule': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
56
|
+
'student-attendance applicable-rule': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
57
|
+
'attendance applicable-rule': '--date YYYY-MM-DD [--scope mine|managed] [--target-user-id <user_id>]',
|
|
58
|
+
'attendance show': '--date YYYY-MM-DD [--scope mine|managed] [--target-user-id <user_id>]',
|
|
59
|
+
'attendance clock-entry': '',
|
|
60
|
+
'attendance configuration-entry': '[--target rules|devices|workflows|resumption-method]',
|
|
61
|
+
'student-attendance configuration-entry': '[--target rules|devices|workflows|resumption-method]',
|
|
62
|
+
'dormitory-attendance configuration-entry': '[--target rules|devices]',
|
|
63
|
+
'attendance statistics': '--month YYYY-MM',
|
|
64
|
+
'attendance report-summary': '--month YYYY-MM [--rule-id <rule_id>] [--keyword <text>] [--page <n>] [--page-size <1-100>]',
|
|
65
|
+
'attendance correction-show': '--id <id>',
|
|
66
|
+
'attendance correction-list': '[--status <draft|processing|completed|returned|withdrawn>] [--page <n>] [--page-size <1-50>] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD]',
|
|
67
|
+
'attendance correction-approval': '--category <pending|handled|copied> --task-id <task_id> [--notice-id <notice_id>]',
|
|
68
|
+
'attendance correction-approve': '--task-id <task_id> [--opinion <text>] [--field-values <json-array|@path>]',
|
|
69
|
+
'attendance correction-reject': '--task-id <task_id> --return-to <start|previous> [--opinion <text>]',
|
|
70
|
+
'attendance correction-approvals': '--category <pending|handled|copied> [--page <n>] [--page-size <1-50>] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--applicant-id <id>] [--applicant-name <name>]',
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
'attendance correction-submit': '--date <YYYY-MM-DD> --result-id <result_id> --correction-time <YYYY-MM-DD HH:mm:ss> [--field-values <json-array|@path>]',
|
|
74
|
+
'attendance correction-approval-form-people-search': '--task-id <task_id> --field-key <field_key> --keyword <text>',
|
|
75
|
+
'attendance correction-form-people-search': '--date YYYY-MM-DD --result-id <result_id> --field-key <field_key> --keyword <text>',
|
|
76
|
+
'attendance correction-form': '--date YYYY-MM-DD --result-id <result_id> [--correction-time <datetime>] [--field-values <json-array|@path>]',
|
|
77
|
+
'student-attendance remark': '--target-user-id <user_id> --date YYYY-MM-DD --result-id <result_id> (--remark <text> | --clear)',
|
|
78
|
+
'student-attendance manual-entries': '--date YYYY-MM-DD',
|
|
79
|
+
'student-attendance manual-entry-delete': '--id <id>',
|
|
80
|
+
'dormitory-attendance manual-entries': '--date YYYY-MM-DD',
|
|
81
|
+
'dormitory-attendance manual-entry-delete': '--id <id>',
|
|
82
|
+
'student-attendance manual-entry': '--target-user-id <user_id> --class-id <class_id> --date YYYY-MM-DD [--time-window <time_bucket> --direction <in|out>]',
|
|
83
|
+
'student-attendance report-remark': '--target-user-id <user_id> --date YYYY-MM-DD --time-window <time_bucket> (--remark <text> | --clear)',
|
|
84
|
+
'dormitory-attendance report-remark': '--target-user-id <user_id> --date YYYY-MM-DD --time-window <time_bucket> (--remark <text> | --clear)',
|
|
85
|
+
'student-attendance report-tag': '--report-id <report_id>',
|
|
86
|
+
'student-attendance report-class': '--report-id <report_id> --class-id <class_id>',
|
|
87
|
+
'student-attendance report-summary': '--report-id <report_id>',
|
|
88
|
+
'dormitory-attendance report-group': '--report-id <report_id>',
|
|
89
|
+
'dormitory-attendance manual-entry': '--target-user-id <user_id> --room-id <bedroom_id> --date YYYY-MM-DD [--group-id <manage_id>] [--report-id <report_id>] [--time-window <time_bucket>]',
|
|
90
|
+
'dormitory-attendance report-room': '--report-id <report_id> --room-id <bedroom_id>',
|
|
91
|
+
'dormitory-attendance report-summary': '--report-id <report_id>',
|
|
92
|
+
'student-attendance reports': '(--delivery-date YYYY-MM-DD | --start-date YYYY-MM-DD --end-date YYYY-MM-DD)',
|
|
93
|
+
'dormitory-attendance reports': '(--delivery-date YYYY-MM-DD | --start-date YYYY-MM-DD --end-date YYYY-MM-DD)',
|
|
94
|
+
'student-attendance report-remarks': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
95
|
+
'dormitory-attendance report-remarks': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
96
|
+
'dormitory-attendance remark': '--target-user-id <user_id> --date YYYY-MM-DD --result-id <result_id> (--remark <text> | --clear)',
|
|
97
|
+
'attendance remark': '[--scope mine|managed] [--target-user-id <user_id>] --date YYYY-MM-DD --result-id <result_id> (--remark <text> | --clear)',
|
|
98
|
+
'student-attendance show': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
99
|
+
'attendance list': '[--scope mine|managed] --start-date YYYY-MM-DD --end-date YYYY-MM-DD [--target-user-id <user_id>] [--name <text>] [--rule-id <rule_id>] [--abnormal | --status <status>] [--page <n>] [--page-size <1-50>]',
|
|
100
|
+
'dormitory-attendance show': '--target-user-id <user_id> --date YYYY-MM-DD',
|
|
101
|
+
'dormitory-attendance rooms': '[--name <text>] [--building-name <text> | --building-id <id>] [--page <n>] [--page-size 1..50]',
|
|
102
|
+
'dormitory-attendance statistics': '--start-date YYYY-MM-DD --end-date YYYY-MM-DD [--target-user-id <user_id>] [--name <text>] [--rule-id <rule_id>] [--period <n>] [--abnormal | --status <status>] [--class-id <class_id> | --group-id <manage_id>]',
|
|
103
|
+
'dormitory-attendance list': '--start-date YYYY-MM-DD --end-date YYYY-MM-DD [--target-user-id <user_id>] [--name <text>] [--rule-id <rule_id>] [--period <n>] [--abnormal | --status <status>] [--page <n>] [--page-size <1-50>] [--class-id <class_id> | --group-id <manage_id>]',
|
|
104
|
+
'student-attendance tags': '--name <text>',
|
|
105
|
+
'student-attendance list': '--start-date YYYY-MM-DD --end-date YYYY-MM-DD [--target-user-id <user_id>] [--name <text>] [--rule-id <rule_id>] [--abnormal | --status <status>] [--page <n>] [--page-size <1-50>] [--class-id <class_id>] [--tag-id <tag_id>]',
|
|
106
|
+
|
|
107
|
+
'leave resumption-form': '--leave-id <leave_id> [--workflow-code <program_code>] [--resumption-time <datetime>] [--reason <text>] [--field-values <json-array|@path>]',
|
|
108
|
+
'leave resumption-list': '[--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--leave-type <type>] [--status draft|processing|completed|returned|rejected|withdrawn|unknown] [--reason <text>] [--page <n>] [--page-size <1-100>]',
|
|
109
|
+
'leave resumption-remind': '--id <id>',
|
|
110
|
+
'leave resumption-withdraw': '--id <id>',
|
|
111
|
+
'leave resumption-show': '--id <id>',
|
|
112
|
+
'leave resumption-submit': '--leave-id <leave_id> --workflow-code <program_code> --resumption-time <datetime> [--reason <text>] [--field-values <json-array|@path>]',
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
'leave submit': '--workflow-code <program_code> [--field-values <json-array|@path>]',
|
|
116
|
+
'leave resumption-approve': '--task-id <task_id> [--opinion <text>] [--field-values <json-array|@path>]',
|
|
117
|
+
'leave approve': '--task-id <task_id> [--opinion <text>] [--field-values <json-array|@path>]',
|
|
118
|
+
'leave resumption-reject': '--task-id <task_id> --return-to start|previous [--opinion <text>]',
|
|
119
|
+
'leave reject': '--task-id <task_id> --return-to start|previous [--opinion <text>]',
|
|
120
|
+
'leave resumption-approval': '--category pending|handled|copied --task-id <task_id> [--notice-id <notice_id>]',
|
|
121
|
+
'leave approval': '--category pending|handled|copied --task-id <task_id> [--notice-id <notice_id>]',
|
|
122
|
+
'leave resumption-approvals': '--category pending|handled|copied [--page <page>] [--page-size 1..50] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--applicant-id <id>] [--applicant-name <name>] [--subject-id <id>] [--subject-name <name>]',
|
|
123
|
+
'leave approvals': '--category pending|handled|copied [--page <page>] [--page-size 1..50] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--submitted-start-date YYYY-MM-DD --submitted-end-date YYYY-MM-DD] [--applicant-id <id>] [--applicant-name <name>] [--subject-id <id>] [--subject-name <name>]',
|
|
124
|
+
'leave show': '--id <id>',
|
|
125
|
+
|
|
126
|
+
'leave form': '[--workflow-code <program_code>] [--field-values <json-array|@path>]',
|
|
127
|
+
'leave remind': '--id <id>',
|
|
128
|
+
'leave withdraw': '--id <id>',
|
|
129
|
+
'leave list': '[--scope mine|managed] [--start-date YYYY-MM-DD --end-date YYYY-MM-DD] [--leave-type <type>] [--status draft|processing|completed|returned|rejected|withdrawn|unknown] [--reason <text>] [--page <n>] [--page-size <1-100>]',
|
|
7
130
|
'auth login': '--scope <scope> [--scope <scope>...]\n 或 auth login --device-code <device_code>',
|
|
8
131
|
'auth connect': '--scope <scope> [--scope <scope>...]',
|
|
9
132
|
'auth status': '[--verify]', 'auth logout': '',
|
|
@@ -46,6 +169,120 @@ Object.assign(usage, {
|
|
|
46
169
|
});
|
|
47
170
|
|
|
48
171
|
const summaries = {
|
|
172
|
+
...require('./contact-help.cjs').summaries,
|
|
173
|
+
...require('./school-help.cjs').summaries,
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
'leave approval-entry': '获取本人当前待办的原客户端审批入口',
|
|
177
|
+
'leave resumption-approval-entry': '获取本人当前待办的原客户端审批入口',
|
|
178
|
+
'student-leave approval-entry': '获取本人当前待办的原客户端审批入口',
|
|
179
|
+
'student-leave resumption-approval-entry': '获取本人当前待办的原客户端审批入口',
|
|
180
|
+
'attendance correction-approval-entry': '获取本人当前待办的原客户端审批入口',
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
'leave approval-form-people-search': '填写审批表单中的人员字段时,按姓名找人',
|
|
184
|
+
'leave resumption-approval-form-people-search': '填写审批表单中的人员字段时,按姓名找人',
|
|
185
|
+
'student-leave approval-form-people-search': '填写审批表单中的人员字段时,按姓名找人',
|
|
186
|
+
'student-leave resumption-approval-form-people-search': '填写审批表单中的人员字段时,按姓名找人',
|
|
187
|
+
'leave form-people-search': '填写申请表单中的人员字段时,按姓名找人',
|
|
188
|
+
'leave resumption-form-people-search': '填写申请表单中的人员字段时,按姓名找人',
|
|
189
|
+
'student-leave form-people-search': '填写申请表单中的人员字段时,按姓名找人',
|
|
190
|
+
'student-leave resumption-form-people-search': '填写申请表单中的人员字段时,按姓名找人',
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
'student-leave resumption-approvals': '查询学生销假待办、已办或抄送',
|
|
197
|
+
'student-leave resumption-approval': '查询学生销假审批详情与当前允许动作',
|
|
198
|
+
'student-leave resumption-approve': '同意当前学生销假审批节点',
|
|
199
|
+
'student-leave resumption-reject': '退回当前学生销假审批节点',
|
|
200
|
+
'student-leave approvals': '查询学生请假待办、已办或抄送',
|
|
201
|
+
'student-leave approval': '查询学生请假审批详情与当前允许动作',
|
|
202
|
+
'student-leave approve': '同意当前学生请假审批节点',
|
|
203
|
+
'student-leave reject': '退回当前学生请假审批节点',
|
|
204
|
+
|
|
205
|
+
'student-leave resumption-list': '按职责内或本人代办范围查询学生销假',
|
|
206
|
+
'student-leave resumption-show': '读取学生销假详情与进度',
|
|
207
|
+
'student-leave remind': '催办本人代学生提交的处理中请假申请',
|
|
208
|
+
'student-leave withdraw': '撤回本人代学生提交的处理中请假申请',
|
|
209
|
+
'student-leave resumption-remind': '催办本人指定的处理中学生销假申请',
|
|
210
|
+
'student-leave resumption-withdraw': '撤回本人指定的处理中学生销假申请',
|
|
211
|
+
'student-leave resumption-form': '查看代学生销假要填什么,汇总缺项和错误',
|
|
212
|
+
'student-leave resumption-submit': '为职责内学生提交销假申请',
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
'student-leave submit': '按实际表单为明确选定的学生提交请假申请',
|
|
216
|
+
'student-leave form': '查看代学生请假要填什么,汇总缺项和错误',
|
|
217
|
+
'student-leave list': '按职责内或本人代办范围查询学生请假', 'student-leave show': '查询学生请假详情、进度及关联销假',
|
|
218
|
+
'student-leave': '学生请假', 'student-leave classes': '查询学生请假职责班级',
|
|
219
|
+
'student-leave students': '在职责班级内按姓名查找学生',
|
|
220
|
+
'attendance list': '按日期区间查询本人或管理范围内教师考勤时段', 'student-attendance': '学生校门考勤',
|
|
221
|
+
'student-attendance tags': '按名称查找可用于学生考勤筛选的标签',
|
|
222
|
+
'student-attendance list': '按日期、班级或标签查询学生校门考勤',
|
|
223
|
+
'dormitory-attendance': '宿舍考勤', 'dormitory-attendance show': '查询职责范围内指定学生某日宿舍考勤详情', 'dormitory-attendance list': '查询职责范围内学生宿舍考勤时段',
|
|
224
|
+
'dormitory-attendance rooms': '按名称查找职责范围内的宿舍房间',
|
|
225
|
+
'dormitory-attendance statistics': '统计一段时间的正常、晚归、未归等宿舍考勤时段条数',
|
|
226
|
+
'attendance statistics': '查询本人已保存的月度考勤统计及逐日计数',
|
|
227
|
+
'attendance report-summary': '查询管理员范围内的教师月报汇总和逐日明细',
|
|
228
|
+
'student-attendance show': '查询职责范围内指定学生某日校门考勤详情',
|
|
229
|
+
'attendance correction-show': '查看本人补卡申请详情及审批进度',
|
|
230
|
+
'attendance correction-list': '查询本人补卡申请列表',
|
|
231
|
+
'attendance correction-approval': '查看补卡审批字段、进度和当前允许动作。',
|
|
232
|
+
'attendance correction-approve': '按老师明确决定同意当前补卡审批任务。',
|
|
233
|
+
'attendance correction-reject': '按老师明确决定退回当前补卡审批任务。',
|
|
234
|
+
'attendance correction-approvals': '查询当前老师的补卡审批待办、已办或抄送。',
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
'attendance correction-submit': '提交本人补卡申请并返回实际执行阶段。',
|
|
238
|
+
'attendance correction-approval-form-people-search': '填写补卡审批表单中的人员字段时,按姓名找人',
|
|
239
|
+
'attendance correction-form-people-search': '填写补卡表单中的人员字段时,按姓名找人',
|
|
240
|
+
'attendance correction-form': '查看本人补卡设置,读取可用表单并检查填写内容',
|
|
241
|
+
'student-attendance remark': '修改职责范围内学生的校门考勤时段备注',
|
|
242
|
+
'student-attendance manual-entries': '查询本人办理的校门补签到原始记录',
|
|
243
|
+
'student-attendance manual-entry-delete': '删除本人当天办理的明确校门补签到记录',
|
|
244
|
+
'dormitory-attendance manual-entries': '查询本人办理的宿舍补签到原始记录',
|
|
245
|
+
'dormitory-attendance manual-entry-delete': '删除本人当天办理的明确宿舍补签到记录',
|
|
246
|
+
'student-attendance manual-entry': '补记学生今天的进校或出校记录,也可先查可补时段',
|
|
247
|
+
'student-attendance report-remark': '填写或清空学生的校门考勤报表备注',
|
|
248
|
+
'dormitory-attendance report-remark': '填写或清空学生的宿舍报表备注',
|
|
249
|
+
'student-attendance report-tag': '查看按标签分组的学生考勤明细',
|
|
250
|
+
'student-attendance report-class': '查看考勤报表中某个班的学生明细',
|
|
251
|
+
'student-attendance report-summary': '查看学校或年级报表中的各班考勤汇总',
|
|
252
|
+
'dormitory-attendance report-group': '查看宿舍管理组报表中的异常人员和房间统计',
|
|
253
|
+
'dormitory-attendance manual-entry': '办理当天宿舍补签到;省略时段时只查询可补选项',
|
|
254
|
+
'dormitory-attendance report-room': '查看宿舍管理组报表中指定房间的学生考勤明细',
|
|
255
|
+
'dormitory-attendance report-summary': '查看全校宿舍报表的已保存汇总和各房间统计',
|
|
256
|
+
'student-attendance reports': '按日期查找学生校门考勤报表',
|
|
257
|
+
'dormitory-attendance reports': '查找宿舍考勤报表',
|
|
258
|
+
'student-attendance report-remarks': '查看学生某天的校门考勤报表备注',
|
|
259
|
+
'dormitory-attendance report-remarks': '查看学生的宿舍报表备注',
|
|
260
|
+
'dormitory-attendance remark': '修改职责范围内学生的宿舍考勤时段备注',
|
|
261
|
+
'attendance remark': '填写或清空本人、职责内教师考勤备注',
|
|
262
|
+
'attendance clock-entry': '获取教师本人现场定位打卡的原手机客户端入口',
|
|
263
|
+
'attendance configuration-entry': '获取教师考勤规则、设备、审批流程或销假方式配置网页入口',
|
|
264
|
+
'student-attendance configuration-entry': '获取学生校门考勤规则、设备、审批流程或销假方式配置网页入口',
|
|
265
|
+
'dormitory-attendance configuration-entry': '获取宿舍考勤规则或设备管理网页入口',
|
|
266
|
+
attendance: '考勤', 'dormitory-attendance applicable-rule': '查看住宿学生今天或未来的宿舍考勤规则和打卡时段', 'student-attendance applicable-rule': '查看学生今天或未来的校门考勤规则和打卡时段', 'attendance applicable-rule': '查看本人或指定教师今天或未来的考勤规则和打卡时段', 'attendance show': '查询本人或职责内教师某日打卡、考勤结果与规则',
|
|
267
|
+
'leave resumption-approve': '同意当前教师销假审批节点',
|
|
268
|
+
'leave resumption-reject': '退回当前教师销假审批节点',
|
|
269
|
+
'leave resumption-approval': '查询教师销假审批详情与当前允许动作',
|
|
270
|
+
'leave resumption-approvals': '查询教师销假待办、已办或抄送',
|
|
271
|
+
|
|
272
|
+
'leave resumption-form': '查看本人销假要填什么,汇总缺项和错误',
|
|
273
|
+
'leave resumption-list': '统一查询本人的申请与业务记录',
|
|
274
|
+
'leave resumption-remind': '催办本人指定的处理中销假申请',
|
|
275
|
+
'leave resumption-withdraw': '撤回本人指定的处理中销假申请',
|
|
276
|
+
'leave resumption-show': '统一读取本人申请内容、进度、附件链接和业务事实',
|
|
277
|
+
'leave resumption-submit': '提交本人提前返岗销假申请',
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
'leave submit': '提交本人教师请假申请',
|
|
281
|
+
'leave approve': '同意当前教师请假审批节点', 'leave reject': '退回当前教师请假审批节点',
|
|
282
|
+
'leave approval': '查询教师请假审批详情与当前允许动作',
|
|
283
|
+
'leave approvals': '查询教师请假待办、已办或抄送',
|
|
284
|
+
'leave remind': '催办本人处理中请假', 'leave withdraw': '撤回本人处理中请假',
|
|
285
|
+
leave: '请假', 'leave show': '查询本人请假详情与进度', 'leave list': '查询本人请假或管理范围内教师有效请假', 'leave form': '查看本人请假要填什么,汇总缺项和错误',
|
|
49
286
|
auth: '登录与授权', config: '本地配置', 'lesson-prep': '备课空间', 'school-library': '校本库',
|
|
50
287
|
'learning-tool': '本地 HTML 学具制作成品与个人备课学具',
|
|
51
288
|
folder: '目录管理', textbook: '教材管理', report: '资源上报', review: '上报审批', reference: '资源引用',
|
|
@@ -79,7 +316,8 @@ const loginHelp = `登录与授权:创建授权会话,或在网页授权完
|
|
|
79
316
|
data.authorization_url 是完整授权地址;data.device_code 用于后续兑换。
|
|
80
317
|
data.expires_at 是会话过期时间;data.requested_scopes 是本次权限;data.message 提示下一步。
|
|
81
318
|
下一步:
|
|
82
|
-
|
|
319
|
+
将 authorization_url 展示为可点击的 Markdown 链接:[完整 URL](完整 URL),两处保留完整原始地址,不使用行内代码或代码块。
|
|
320
|
+
用用户的语言和业务名称说明所需权限,不直接展示权限代码。等待用户明确确认网页授权完成后再兑换,不轮询。
|
|
83
321
|
|
|
84
322
|
2. 兑换登录态
|
|
85
323
|
用法:yunzhi-cli auth login --device-code <device_code>
|
|
@@ -113,15 +351,58 @@ async function execute(args) {
|
|
|
113
351
|
const title = command || '校园号 CLI';
|
|
114
352
|
return { code: 0, text: `${title}\n\n可用命令:\n` + children.map(item =>
|
|
115
353
|
` ${item} ${summaries[item] || summaries[item.split(' ').slice(1).join(' ')]}\n`).join('')
|
|
354
|
+
+ (['student-leave', 'attendance'].includes(command) ? '\n通用约定:\n 参数不可重复传入;必填参数无默认值,可选参数的默认值见各命令 Help。\n 业务命令默认输出 JSON;失败时读取 error.message/error.hint。\n' : '')
|
|
116
355
|
+ '\n使用 yunzhi-cli <命令> --help 查看下一级或命令详情。\n' };
|
|
117
356
|
}
|
|
118
357
|
throw unknownCommand(command.split(' ').filter(Boolean), Object.keys(usage));
|
|
119
358
|
}
|
|
120
359
|
if (!Object.keys(usage).some(name => name.split(' ').every((word, index) => args[index] === word))) throw unknownCommand(args, Object.keys(usage));
|
|
360
|
+
if (args[0] === 'contact') return require('./contact.cjs').execute(args[1], args[2], args.slice(3));
|
|
361
|
+
if (args[0] === 'school' && args[1] === 'students' && args[2] === 'contacts') return require('./school-contacts.cjs').execute(args.slice(3));
|
|
362
|
+
if (args[0] === 'school') return require('./contact.cjs').execute(args[1], args[2], args.slice(3), 'school');
|
|
121
363
|
if (args[0] === 'version' && args.length > 1) throw unknownOption(args[1], []);
|
|
122
364
|
if (args[0] === 'version' && args.length === 1) {
|
|
123
365
|
return { code: 0, value: { ok: true, data: { version } } };
|
|
124
366
|
}
|
|
367
|
+
if ((['leave', 'student-leave'].includes(args[0]) && ['approval-entry', 'resumption-approval-entry'].includes(args[1])) || (args[0] === 'attendance' && args[1] === 'correction-approval-entry')) return require('./workflow-entry.cjs').execute(args[0], args[1], args.slice(2));
|
|
368
|
+
|
|
369
|
+
if (['leave', 'student-leave'].includes(args[0]) && ['form-people-search', 'resumption-form-people-search', 'approval-form-people-search', 'resumption-approval-form-people-search'].includes(args[1])) return require('./leave-form-users.cjs').execute(args[0], args[1], args.slice(2));
|
|
370
|
+
if (args[0] === 'student-leave') return require('./student-leave.cjs').execute(args[1], args.slice(2));
|
|
371
|
+
if (args[0] === 'student-attendance' && args[1] === 'tags') return require('./attendance.cjs').executeTags(args.slice(2));
|
|
372
|
+
if (['student-attendance', 'dormitory-attendance'].includes(args[0]) && args[1] === 'show') return require('./attendance.cjs').executeManagedDay(args.slice(2), args[0]);
|
|
373
|
+
if (['attendance', 'student-attendance', 'dormitory-attendance'].includes(args[0]) && args[1] === 'list') return require('./attendance.cjs').executeManaged(args.slice(2), args[0]);
|
|
374
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'rooms') return require('./dormitory-rooms.cjs').execute(args.slice(2));
|
|
375
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'statistics') return require('./dormitory-statistics.cjs').execute(args.slice(2));
|
|
376
|
+
if (args[0] === 'attendance' && args[1] === 'statistics') return require('./attendance-statistics.cjs').execute(args.slice(2));
|
|
377
|
+
if (args[0] === 'attendance' && args[1] === 'report-summary') return require('./attendance.cjs').executeReportSummary(args.slice(2));
|
|
378
|
+
if (args[0] === 'attendance' && ['correction-list', 'correction-show'].includes(args[1])) return require('./attendance-correction-applications.cjs').execute(args[1], args.slice(2));
|
|
379
|
+
if (args[0] === 'attendance' && ['correction-approvals', 'correction-approval', 'correction-approve', 'correction-reject'].includes(args[1])) return require('./attendance-correction-approval.cjs').execute(args[1], args.slice(2));
|
|
380
|
+
if (args[0] === 'attendance' && ['correction-submit'].includes(args[1])) return require('./attendance-correction-start.cjs').execute(args.slice(2), args[1]);
|
|
381
|
+
if (args[0] === 'attendance' && ['correction-form-people-search', 'correction-approval-form-people-search'].includes(args[1])) return require('./leave-form-users.cjs').execute(args[0], args[1], args.slice(2));
|
|
382
|
+
if (args[0] === 'attendance' && args[1] === 'correction-form') return require('./attendance.cjs').executeCorrectionForm(args.slice(2));
|
|
383
|
+
if (args[0] === 'student-attendance' && args[1] === 'remark') return require('./attendance.cjs').executeRemark(args.slice(2), 'student');
|
|
384
|
+
if (args[0] === 'student-attendance' && args[1] === 'report-tag') return require('./student-report-detail.cjs').execute(args.slice(2), true);
|
|
385
|
+
if (args[0] === 'student-attendance' && args[1] === 'report-class') return require('./student-report-detail.cjs').execute(args.slice(2));
|
|
386
|
+
if (args[0] === 'student-attendance' && args[1] === 'report-summary') return require('./student-report-summary.cjs').execute(args.slice(2));
|
|
387
|
+
if (args[0] === 'attendance' && args[1] === 'clock-entry') return require('./attendance-clock-entry.cjs').execute(args.slice(2));
|
|
388
|
+
if (['attendance', 'student-attendance', 'dormitory-attendance'].includes(args[0]) && args[1] === 'configuration-entry') return require('./attendance-configuration-entry.cjs').execute(args.slice(2), args[0]);
|
|
389
|
+
if (args[0] === 'dormitory-attendance' && ['report-group', 'report-room'].includes(args[1])) return require('./dormitory-report-detail.cjs').execute(args.slice(2), args[1] === 'report-room');
|
|
390
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'report-summary') return require('./dormitory-report-summary.cjs').execute(args.slice(2));
|
|
391
|
+
if (['student-attendance', 'dormitory-attendance'].includes(args[0]) && args[1] === 'reports') return require('./attendance-report-inbox.cjs').execute(args.slice(2), args[0]);
|
|
392
|
+
if (['student-attendance', 'dormitory-attendance'].includes(args[0]) && ['manual-entries', 'manual-entry-delete'].includes(args[1])) return require('./replenishment-records.cjs').execute(args.slice(2), args[0], args[1] === 'manual-entry-delete');
|
|
393
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'manual-entry') return require('./dormitory-replenishment.cjs').execute(args.slice(2));
|
|
394
|
+
if (args[0] === 'student-attendance' && args[1] === 'manual-entry') return require('./student-replenishment.cjs').execute(args.slice(2));
|
|
395
|
+
if (args[0] === 'student-attendance' && args[1] === 'report-remark') return require('./attendance-report-remarks.cjs').save(args.slice(2));
|
|
396
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'report-remark') return require('./attendance-report-remarks.cjs').save(args.slice(2), 'dormitory-attendance');
|
|
397
|
+
if (args[0] === 'student-attendance' && args[1] === 'report-remarks') return require('./attendance-report-remarks.cjs').read(args.slice(2));
|
|
398
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'report-remarks') return require('./attendance-report-remarks.cjs').read(args.slice(2), 'dormitory-attendance');
|
|
399
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'remark') return require('./attendance.cjs').executeRemark(args.slice(2), 'dormitory');
|
|
400
|
+
if (args[0] === 'attendance' && args[1] === 'remark') return require('./attendance.cjs').executeRemark(args.slice(2));
|
|
401
|
+
if (args[0] === 'dormitory-attendance' && args[1] === 'applicable-rule') return require('./attendance.cjs').executeApplicableRule(args.slice(2), 'dormitory');
|
|
402
|
+
if (args[0] === 'student-attendance' && args[1] === 'applicable-rule') return require('./attendance.cjs').executeApplicableRule(args.slice(2), 'student');
|
|
403
|
+
if (args[0] === 'attendance' && args[1] === 'applicable-rule') return require('./attendance.cjs').executeApplicableRule(args.slice(2));
|
|
404
|
+
if (args[0] === 'attendance') return require('./attendance.cjs').execute(args.slice(2));
|
|
405
|
+
if (args[0] === 'leave') return require('./leave.cjs').execute(args[1], args.slice(2));
|
|
125
406
|
if (args[0] === 'learning-tool' && ['ls', 'upload-options', 'upload', 'update', 'move', 'remove'].includes(args[1]))
|
|
126
407
|
return require('./learning-tool.cjs').execute(args[1], args.slice(2));
|
|
127
408
|
if (['lesson-prep', 'school-library'].includes(args[0]) && ['ls', 'glob', 'search', 'grep', 'fetch'].includes(args[1])) return require('./lesson-prep.cjs').read(args[1], args.slice(2), args[0]);
|
|
@@ -178,6 +459,18 @@ async function run(args) {
|
|
|
178
459
|
|| exchanging) error.hint = guidance.errorHint(command, error, exchanging);
|
|
179
460
|
}
|
|
180
461
|
}
|
|
462
|
+
if (command && result.value) {
|
|
463
|
+
const enums = require('./attendance-leave-enums.cjs');
|
|
464
|
+
try {
|
|
465
|
+
if (result.value.ok) enums.project(command, result.value.data);
|
|
466
|
+
else enums.projectError(command, result.value.error);
|
|
467
|
+
} catch (error) {
|
|
468
|
+
if (!(error instanceof Failure)) throw error;
|
|
469
|
+
if (result.value.request_id) error.result.value.request_id = result.value.request_id;
|
|
470
|
+
result = error.result;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (command && result.value) require('./attendance-operation-result.cjs').project(command, result.value);
|
|
181
474
|
return result;
|
|
182
475
|
}
|
|
183
476
|
|