demo.py
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- coding: utf-8 -*-
# @Time : 2021/9/9 14:41
# @Author : Ljq
# @File : demo.py
# @Software: PyCharm
"""
"""
import json,time,random,re
from commons.scripts import dealContentType as dct
from commons.scripts import jsonToUrlCode
from commons.scripts import replaceJsonData as rJD
import urllib.parse
from commons.MySession import sessionHg
def save_red(session=None,host=None,**kwargs):
"""
登记单状态变更
:param batchCode:等级单号
:param state:变更状态,1继续,2停止
"""
url = "http://test.card.diligrp.com:8386/contract/save.action"
headers = dct.jsonCode()
data = {
"notes": "123备注",
"customerId": 141963,
"consignorCustomerName": "杭果客户长歌一",
"cardNo": "888800010592",
"consignorCustomerIDCode": "110101202108265741",
"consignorCustomerMobile": "18080018009",
"consignorCustomerCode": "00131684",
"consignorAccountId": 107667,
"startTime": "2021-09-09",
"endTime": "2021-09-13",
"consignors": [{
"consigneeName": "张三",
"consigneeIdCode": "513922198704216819",
"consigneeIdMobile": "asda",
"signatureImagePath": "5f68851207864520924e41b7f73c208c"
}],
"consigneeNames": "唐川",
"node": "signatureImagePathConsignor",
"signatureImagePath": "bbdcbcca70a74adfb10b7fb86de5d04c"
}
data = dict(data,**kwargs)
res = session.useHeadersRequests(method="post",url=url,data=json.dumps(data),headers=headers)
return res
res = save_red(session=sessionHg,host="")
print(res.json())