AddPositionsAsync.robot 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. *** Settings ***
  2. Resource ../../../Utils/HttpClient.robot
  3. Library String
  4. Resource ../../../CommonConfig/Config.robot
  5. Library CustomLibrary
  6. *** Variables ***
  7. ${addPositionsAsyncUrl} IPositionService
  8. *** Keywords ***
  9. AddPositionsAsyncPost
  10. [Arguments] ${token} ${positionName} ${organizationCode} ${underUserCode} ${fitDepartmentCode} ${extendsData}
  11. ${param} Create Dictionary
  12. Set To Dictionary ${param} Token ${token}
  13. ${positions} Create List
  14. ${position} Create Dictionary
  15. Set To Dictionary ${position} PositionName ${positionName}
  16. Set To Dictionary ${position} OrganizationCode ${organizationCode}
  17. ${underUserCodes} Split String ${underUserCode}
  18. Set To Dictionary ${position} UnderUserCodes ${underUserCodes}
  19. Set To Dictionary ${position} FitDepartmentCode ${fitDepartmentCode}
  20. Set To Dictionary ${position} ExtendsData ${extendsData}
  21. Append To List ${positions} ${position}
  22. Set To Dictionary ${param} Positions ${positions}
  23. ${body} Generate Params AddPositionsAsync ${param}
  24. Log ${body}
  25. Log ---开始断言验证---
  26. ${response} PostRequest ${host} ${addPositionsAsyncUrl} ${body}
  27. ${res} Response Analysis ${response}
  28. Log ${res}
  29. [Return] ${res}