demo.py 1.46 KB
# -*- 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())