|
Нам необходимо интегрировать систему ОрионПро в нашу систему кадрового учета. Мои попытки работать с wsdl- сервисам потерпели фиаско. Из описания функций сервиса не совсем понятно за что отвечают функции и что ждут от меня при вызове от меня, и как следствие я в лучшем случае получаю пустой ответ, в худшем сообщение об ошибки. from zeep import Client
if __name__ == '__main__': client = Client('http://10.77.190.10:8090/wsdl/IOrionPro?wsdl') persons = client.service.GetPersons( WithoutPhoto=True, Offset=0, Count=0, Filter='?', IsEmployees=False, IsVisitors=False, Token='?') for person in persons['OperationResult']: if person['Company'] is None: person['Company'] = '' person['CompanyId'] = 0 if person['Department'] is None: person['Department'] = '' person['DepartmentId'] = 0 if person['Position'] is None: person['Position'] = '' person['PositionId'] = 0 if person['Phone'] is None: person['Phone'] = '' if person['HomePhone'] is None: person['HomePhone'] = '' if person['Address'] is None: person['Address'] = '' if person['Photo'] is None: person['Photo'] = '' if person['ExternalId'] is None: person['ExternalId'] = '' if person['DocumentSerials'] is None: person['DocumentSerials'] = '' person['DocumentNumber'] = '' person['DocumentIsser'] = '' person['DocumentIsserCode'] = '' if person['Birthplace'] is None: person['Birthplace'] = '' if person['EmailList'] is None: person['EmailList'] = '' if person['BlackListComment'] is None: person['BlackListComment'] = '' if person['Itn'] is None: person['Itn'] = '' if person['DismissedComment'] is None: person['DismissedComment'] = '' if person['FirstName'] is None: person['FirstName'] = '' if person['FirstName'] is None: person['FirstName'] = '' if person['MiddleName'] is None: person['MiddleName'] = '' if person['TabNum'] is None: person['TabNum'] = '' events = client.service.GetEventTypes(Token='?') for event in events['OperationResult']: if event['CharId'] is None: event['CharId'] = '' if event['Comments'] is None: event['Comments'] = '' points = client.service.GetEntryPoints( Offset=0, Count=0, Token='?' ) sections = client.service.GetSections( IsIncludeItems = False, Offset=0, Count=0, Token='?' ) sections_group = client.service.GetSectionsGroups( IsIncludeItems=False, Offset=0, Count=0, Token='?' ) report = client.service.GetEvents( BeginTime='2024-11-01T08:00:00', EndTime='2024-12-03T12:00:00', EventTypes=events['OperationResult'], # EventTypes=[], Offset=0, Count=0, Persons=persons['OperationResult'], # EntryPoints=points['OperationResult'], EntryPoints=[], # Sections=sections['OperationResult'], Sections=[], # SectionsGroups=sections_group['OperationResult'], SectionsGroups=[], Token='?' ) print(report) 8 дней 7 часов назад Плессер Олег 1Для добавления сообщений на форуме вам необходимо зарегистрироваться и указать мобильный телефон в своем профиле (зачем?) |
137 раз
8 дней 7 часов назад
По каждому вопросу/ответу можно добавлять комментарии. Комментарии предназначены для уточнения вопроса/ответа.
добавить комментарий