Commit 1158b6e25a4379fa47cb25163305e1bf768eac66
1 parent
34b20e63
1
Showing
1 changed file
with
0 additions
and
38 deletions
commons/api/fieldConfig.py deleted
100644 → 0
1 | -#!/usr/bin/python | ||
2 | -# -*- coding: UTF-8 -*- | ||
3 | -import requests | ||
4 | -import json | ||
5 | -import urllib3 | ||
6 | -from commons import common as com | ||
7 | -from commons.MySession import my | ||
8 | -urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
9 | - | ||
10 | -class fieldConfig(): | ||
11 | - | ||
12 | - url="http://test.trace.diligrp.com:8393/fieldConfig/doUpdate.action" | ||
13 | - header={ | ||
14 | - "Host": "test.trace.diligrp.com:8393", | ||
15 | - "Connection": "keep-alive", | ||
16 | - "Content-Length": "1378", | ||
17 | - "Accept": "application/json,text/javascript,*/*;q=0.01", | ||
18 | - "X-Requested-With": "XMLHttpRequest", | ||
19 | - "User-Agent": "Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/91.0.4472.77Safari/537.36", | ||
20 | - "Content-Type": "application/json", | ||
21 | - "Origin": "http://test.trace.diligrp.com:8393", | ||
22 | - "Referer": "http://test.trace.diligrp.com:8393/fieldConfig/bill.html", | ||
23 | - "Accept-Encoding": "gzip,deflate", | ||
24 | - "Accept-Language": "zh-CN,zh-TW;q=0.9,zh;q=0.8,en;q=0.7"} | ||
25 | - | ||
26 | - body={"moduleType":"1","marketId":"8","fieldConfigDetailList":[{"fieldName":"unitPrice","jsonPath":"$.unitPrice","defaultId":"3","displayed":"1","required":"0"},{"fieldName":"arrivalTallynos","jsonPath":"$.arrivalTallynos","defaultId":"10","displayed":"1","required":"0"},{"fieldName":"brandName","jsonPath":"$.brandName","defaultId":"5","displayed":"1","required":"0"},{"fieldName":"truckTareWeight","jsonPath":"$.truckTareWeight","defaultId":"1","displayed":"1","required":"0"},{"fieldName":"originId","jsonPath":"$.originId","defaultId":"7","displayed":"1","required":"0"},{"fieldName":"specName","jsonPath":"$.specName","defaultId":"4","displayed":"1","required":"0"},{"fieldName":"truckType","jsonPath":"$.truckType","defaultId":"2","displayed":"1","required":"1","availableValueList":["10","20"]},{"fieldName":"imageCertList","jsonPath":"$.imageCertList[*]certType","defaultId":"11","displayed":"1","required":"0","availableValueList":["2","3"]},{"fieldName":"arrivalDatetime","jsonPath":"$.arrivalDatetime","defaultId":"9","displayed":"1","required":"0"},{"fieldName":"remark","jsonPath":"$.remark","defaultId":"8","displayed":"1","required":"0"},{"fieldName":"remark","jsonPath":"$.remark","defaultId":"6","displayed":"1","required":"0"},{"fieldName":"measureType","jsonPath":"$.measureType","defaultId":"12","displayed":"1","required":"1","availableValueList":["10","20"]}]} | ||
27 | - | ||
28 | - def __init__(self): | ||
29 | - self.url=fieldConfig.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) | ||
30 | - self.header=fieldConfig.header | ||
31 | - self.body=fieldConfig.body | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | -# tt=fieldConfig() | ||
37 | -# re=my.post(url=tt.url,headers=tt.header,json=tt.body) | ||
38 | -# print(re.json()) | ||
39 | \ No newline at end of file | 0 | \ No newline at end of file |