feedbackOrderController_settlementlist.py 2.76 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/8/5 16:23
@Auth : wlm
@File :test_feedbackOrderController_settlementlist.py
@IDE :PyCharm
"""
# -*- coding: utf-8 -*-
"""
已结账明细——已结账笔数和已结账金额查询
"""
from commons import common as com
from commons.MySession import sy1,my

class feedbackOrderController_settlementlist():
    url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist.action"

    header = {
         "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "651",
         "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
         "X-Requested-With": "XMLHttpRequest",
         "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
         "Content-Type": "application/x-www-form-urlencoded", "Accept-Language": "zh-CN,zh;q=0.9",
         "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist",
         "Accept-Encoding": "gzip,deflate"
    }

    # body = '''rows=10
    #     &page=1
    #     &sort=efb.payment_time
    #     &order=desc
    #     &metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
    #     &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
    #     &metadata[settledAmount]={"provider":"moneyProvider","index":30,"field":"settledAmount"}
    #     &metadata[settleTime]={"provider":"datetimeProvider","index":40,"field":"settleTime"}
    #     &feedbackCustomerId=25
    #     &departmentId=56
    #     &tagId=yjsp
    #     &settleTimeStart=2021-08-04 00:00:00
    #     &settleTimeEnd=2021-08-05 23:59:59
    #     &queryType=1'''
    body = '''rows=10
    &page=1
    &sort=efb.payment_time
    &order=desc
    &metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
    &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
    &metadata[settledAmount]={"provider":"moneyProvider","index":30,"field":"settledAmount"}
    &metadata[settleTime]={"provider":"datetimeProvider","index":40,"field":"settleTime"}
    &feedbackCustomerId=25
    &settleTimeStart=2021-08-04 00:00:00
    &settleTimeEnd=2021-08-05 23:59:59
    &queryType=1'''
    def __init__(self):
        self.url = feedbackOrderController_settlementlist.url.replace("http://test.",com.get_global_config("global_data", "environment", "en"))
        self.header = feedbackOrderController_settlementlist.header
        self.body = feedbackOrderController_settlementlist.body

# focsl = feedbackOrderController_settlementlist()
# re = sy1.post(url = focsl.url,data = focsl.body.replace("\n",""),headers = focsl.header,proxies = my.proxies)
# print(re.json())