weightBizBill_listPage.py 1.99 KB
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import urllib3
from commons import common as com
from commons.MySession import my,sy1
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


class weightBizBill_listPage():
    "称重服务单列表-查询"
    url = "http://test.jmsf.diligrp.com:8385/weightBizBill/listPage.action"
    header = {
          "Connection": "keep-alive",
          "Accept": "application/json, text/javascript, */*; q=0.01",
          "X-Requested-With": "XMLHttpRequest",
          "User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36",
          "Content-Type": "application/x-www-form-urlencoded",
          "Accept-Language": "zh-CN,zh;q=0.9",
          "Host": "test.jmsf.diligrp.com:8385",
          "Accept-Encoding": "gzip, deflate"}
    body = '''rows=10&page=1&sort=id&order=desc&metadata[fee]={"provider":"moneyProvider","index":10,"field":
        "fee"}&metadata[created]={"provider":"datetimeProvider","index":20,"field":
        "created"}&metadata[payTime]={"provider":"datetimeProvider","index":30,"field":"payTime"}
        &metadata[status]={"provider":"weightPayStateProvider","index":40,"field":"status"}
        &metadata[refundTime]={"provider":"datetimeProvider","index":50,"field":"refundTime"}
        &metadata[payType]={"provider":"weightPayTypeProvider","index":60,"field":"payType"}
        &attr=number&attrValue=202108030900001&carTypeId=53&depId=139&status=2
        &startCreateDate=2020-08-03 00:00:00&endCreateDate=2029-08-03 23:59:59
        &startPayTime=2020-08-03 00:00:00&endPayTime=2029-08-03 23:59:59'''

    def __init__(self):
        self.url = weightBizBill_listPage.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
        self.header = weightBizBill_listPage.header
        self.body = weightBizBill_listPage.body.replace('\n', '')


# tt=weightBizBill_listPage()
# re=sy1.post(url=tt.url,headers=tt.header,data=tt.body)
# print(re.json())