| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #coding=utf-8
- import HttpUtils
- # 添加用户 https://{host}/user/addPersonalUser
- def addPerson(inputData):
- # 从输入数据中获取调用接口
- account = inputData["account"]
- name = inputData["name"]
- mobile = inputData["mobile"]
- idCard = inputData["idCard"]
- idCardType = inputData["idCardType"]
-
- appId = inputData["appId"]
- appKey = inputData["appKey"]
- apiUrl = inputData["apiUrl"]
- # 组装参数
- reqBodyData = {
- "account": account,
- "idCard": idCard,
- "idCardType": idCardType,
- "identifyMobile": mobile,
- "identifyType": 1,
- "mobile": mobile,
- "name": name,
- "isNotice": 1
- }
- #请求地址
- # url = "https://prev.asign.cn/user/addPersonalUser"
- Result = HttpUtils.HttpUtils.doPOST(apiUrl, reqBodyData, appId, appKey)
- return Result
- # 上传待签署文件 https://{host}/contract/createContract
- def createContract(inputData):
- # 从输入数据中获取调用接口
- contractNo = inputData["contractNo"]
- contractName = inputData["contractName"]
- signOrder = inputData["signOrder"]
- templates = inputData["templates"]
- notifyUrl = inputData["notifyUrl"]
-
- appId = inputData["appId"]
- appKey = inputData["appKey"]
- apiUrl = inputData["apiUrl"]
- # 组装参数
- reqBodyData = {
- "contractNo": contractNo,
- "contractName": contractName,
- "signOrder": signOrder,
- "templates": templates,
- "notifyUrl": notifyUrl
- }
- #请求地址
- Result = HttpUtils.HttpUtils.doPOST(apiUrl, reqBodyData, appId, appKey)
- return Result
|