This commit is contained in:
csj
2026-09-13 15:20:40 +08:00
parent 8bc9ae8046
commit da6cb24249
8 changed files with 566 additions and 4 deletions
+2 -2
View File
@@ -86,12 +86,12 @@ def dispatch(request):
state = request['state']
if operation == 'refresh':
return enrich(state)
if not state['matches']:
if not (state.get('approvedRecords') if operation == 'approved-ppt' else state.get('matches')):
raise ValueError('至少完成一组核对后才能导出')
destination = Path(request['destination'])
temporary = destination.with_name('.' + str(uuid.uuid4()) + destination.suffix)
try:
if operation == 'ppt':
if operation in ('ppt', 'approved-ppt'):
export_ppt(state, temporary, request.get('classified', True))
elif operation == 'travel':
export_travel(state, temporary)