| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #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
- # 添加签署方 https://{host}/contract/addSigner
- def addSigner(inputData):
- # 从输入数据中获取调用接口
- contractNo = inputData["contractNo"]
- account = inputData["account"]
- signStrategyList = inputData["signStrategyList"]
-
- appId = inputData["appId"]
- appKey = inputData["appKey"]
- apiUrl = inputData["apiUrl"]
- # 组装参数
- reqBodyData = [{
- "contractNo": contractNo,
- "account": account,
- "signStrategyList": signStrategyList
- }]
- #请求地址
- Result = HttpUtils.HttpUtils.doPOST(apiUrl, reqBodyData, appId, appKey)
- return Result
- # 下载合同 https://{host}/contract/downloadContract
- def downloadContract(inputData):
- # 从输入数据中获取调用接口
- contractNo = inputData["contractNo"]
- downloadFileType = inputData["downloadFileType"]
-
- appId = inputData["appId"]
- appKey = inputData["appKey"]
- apiUrl = inputData["apiUrl"]
- # 组装参数
- reqBodyData = {
- "contractNo": contractNo,
- "downloadFileType": downloadFileType
- }
- #请求地址
- Result = HttpUtils.HttpUtils.doPOST(apiUrl, reqBodyData, appId, appKey)
- return Result
|