Commit a283a5c3ead93d29a3a2ab4a121b08624b56297c
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
27 additions
and
130 deletions
commons/api/feedback_customer_disable.py
... | ... | @@ -5,3 +5,27 @@ |
5 | 5 | @File :feedback_customer_disable.py |
6 | 6 | @IDE :PyCharm |
7 | 7 | """ |
8 | +from commons import common as com | |
9 | +from commons.MySession import my | |
10 | + | |
11 | +class feedback_customer_disable(): | |
12 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/disable.action?id=44" | |
13 | + | |
14 | + header = { | |
15 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0", | |
16 | + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385", | |
17 | + "X-Requested-With": "XMLHttpRequest", | |
18 | + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | |
19 | + "Accept-Language": "zh-CN,zh;q=0.9", | |
20 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | |
21 | + "Accept-Encoding": "gzip,deflate", | |
22 | + "Cookie": "UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5;UAP_firmId=9;UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4OTI3MzYsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4OTQ1MzYsImlhdCI6MTYyNzg5MjczNiwianRpIjoiNDYzMTY0MTUtYmUzYy00NTkzLWI3ODctYjRhZmI3MDQ1ODFiIn0.N5kEGcM9CR09wc3G7fLE0TwkdvO-hM3HQPKEFDUmdmewk-7iHlbzMHuRiY-Z_hPBbhv1v9y8Ibvyh6T6gikkt7C0movQ-oCqdNY-hzOrBZk9Ht-6mbf69zZKHOJv0TXcSs3y265eVviVbgZG6TgrptXWdSBvSt_Q94sfbMsQ7SA" | |
23 | + | |
24 | + } | |
25 | + def __init__(self): | |
26 | + self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | |
27 | + self.header = feedback_customer_disable.header | |
28 | + | |
29 | +fcd = feedback_customer_disable() | |
30 | +re = my.post(url=fcd.url, headers=fcd.header) | |
31 | +print(re.json()) | |
8 | 32 | \ No newline at end of file | ... | ... |
commons/api/zcApi.py
report/test.log
1 | -[2021-08-02 16:53:41] [INFO] : ====================================================================================== | |
2 | -[2021-08-02 16:53:41] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | |
3 | -{"businessCode": "jmsf"} | |
4 | -{} | |
5 | - | |
6 | -[2021-08-02 16:53:41] [INFO] : ====================================================================================== | |
7 | -[2021-08-02 16:53:41] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | |
8 | -{"marketId": 9, "state": 1, "keyword": "\u5c71\u836f"} | |
9 | -{} | |
10 | - | |
11 | -[2021-08-02 16:53:41] [INFO] : ====================================================================================== | |
12 | -[2021-08-02 16:53:41] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | |
13 | -{"firmCode": "sy", "departmentId": 58, "keyword": ""} | |
14 | -{} | |
15 | - | |
16 | -[2021-08-02 16:53:42] [INFO] : ====================================================================================== | |
17 | -[2021-08-02 16:53:42] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | |
18 | -{"pageNum": 100, "pageSize": 100, "marketId": 9} | |
19 | -{} | |
20 | - | |
21 | -[2021-08-02 16:53:42] [INFO] : ====================================================================================== | |
22 | -[2021-08-02 16:53:42] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
23 | -None | |
24 | -{'params': {'pid': 'goods_tag'}} | |
25 | - | |
26 | -[2021-08-02 16:53:42] [INFO] : ====================================================================================== | |
27 | -[2021-08-02 16:53:42] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | |
28 | -{"province": "C", "city": null, "area": null} | |
29 | -{} | |
30 | - | |
31 | -[2021-08-02 16:53:42] [INFO] : ====================================================================================== | |
32 | -[2021-08-02 16:53:42] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | |
33 | -{"keyword": ""} | |
34 | -{} | |
35 | - | |
36 | -[2021-08-02 16:53:43] [INFO] : ====================================================================================== | |
37 | -[2021-08-02 16:53:43] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
38 | -None | |
39 | -{'params': {'pid': 'prove_type'}} | |
40 | - | |
41 | -[2021-08-02 16:53:43] [INFO] : ====================================================================================== | |
42 | -[2021-08-02 16:53:43] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | |
43 | -None | |
44 | -{} | |
45 | - | |
46 | -[2021-08-02 16:53:43] [INFO] : ====================================================================================== | |
47 | -[2021-08-02 16:53:43] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | |
48 | -{"carTypeCode": "gc", "carTypeId": 59, "carTypeName": "\u6302\u8f66", "carTypeWeight": 1, "plate": "\u5dddB00001", "inGreeterId": 274, "inGreeterName": "\u901a\u7528\u6d4b\u8bd5", "productId": 14156, "productName": "\u5c71\u836f", "proveTypeCode": 1621, "proveTypeName": "\u7eff\u8272\u852c\u83dc", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 21, "grossWeightDate": "2021-08-02 16:53:43", "newWeight": 20, "tareWeight": 1, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddB00001", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 103, "depName": "\u63a5\u8f66\u90e8", "cateId": 14156, "notice": 0, "backSkinTwo": -1, "recordOriginId": 0, "recordOriginName": null, "recordProductId": 0, "recordProductName": null, "recordWeight": null, "codeIc": null, "codeId": 0, "difference": 0, "bindRecordSign": 0, "recordDesc": null, "hasCodeItems": false, "customerId": 0, "customerName": "", "driverIc": null, "driverName": null, "totalPrice": null, "originId": 500101, "origin": "\u4e07\u5dde\u533a", "originCode": "023", "tradeType": "9002", "tradeTypeName": "\u6c88\u96332\u53f7", "weight": 2.0, "pwd": "", "type": 1, "ic": "", "boothNumber": "210728154359", "productState": "1", "accountId": 0, "passCheckId": 0, "passCheckName": null, "tradeTypeId": 71, "id": 0, "protocolId": null, "goodsTagId": 1900} | |
49 | -{} | |
50 | - | |
51 | -[2021-08-02 16:53:44] [INFO] : ====================================================================================== | |
52 | -[2021-08-02 16:53:44] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | |
53 | -{"businessCode": "jmsf"} | |
54 | -{} | |
55 | - | |
56 | -[2021-08-02 16:53:44] [INFO] : ====================================================================================== | |
57 | -[2021-08-02 16:53:44] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | |
58 | -{"marketId": 9, "state": 1, "keyword": "\u852c\u83dc"} | |
59 | -{} | |
60 | - | |
61 | -[2021-08-02 16:53:45] [INFO] : ====================================================================================== | |
62 | -[2021-08-02 16:53:45] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | |
63 | -{"firmCode": "sy", "departmentId": 58, "keyword": ""} | |
64 | -{} | |
65 | - | |
66 | -[2021-08-02 16:53:45] [INFO] : ====================================================================================== | |
67 | -[2021-08-02 16:53:45] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | |
68 | -{"pageNum": 100, "pageSize": 100, "marketId": 9} | |
69 | -{} | |
70 | - | |
71 | -[2021-08-02 16:53:45] [INFO] : ====================================================================================== | |
72 | -[2021-08-02 16:53:45] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
73 | -None | |
74 | -{'params': {'pid': 'goods_tag'}} | |
75 | - | |
76 | -[2021-08-02 16:53:45] [INFO] : ====================================================================================== | |
77 | -[2021-08-02 16:53:45] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | |
78 | -{"province": "C", "city": null, "area": null} | |
79 | -{} | |
80 | - | |
81 | -[2021-08-02 16:53:46] [INFO] : ====================================================================================== | |
82 | -[2021-08-02 16:53:46] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | |
83 | -{"keyword": ""} | |
84 | -{} | |
85 | - | |
86 | -[2021-08-02 16:53:46] [INFO] : ====================================================================================== | |
87 | -[2021-08-02 16:53:46] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
88 | -None | |
89 | -{'params': {'pid': 'prove_type'}} | |
90 | - | |
91 | -[2021-08-02 16:53:46] [INFO] : ====================================================================================== | |
92 | -[2021-08-02 16:53:46] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | |
93 | -None | |
94 | -{} | |
95 | - | |
96 | -[2021-08-02 16:53:47] [INFO] : ====================================================================================== | |
97 | -[2021-08-02 16:53:47] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | |
98 | -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddB00002", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14152, "productName": "\u852c\u83dc", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 353, "grossWeightDate": "2021-08-02 16:53:47", "newWeight": 20, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddB00002", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 58, "depName": "\u6c34\u679c\u90e8", "cateId": 14152, "notice": 0, "backSkinTwo": -1, "recordOriginId": 0, "recordOriginName": null, "recordProductId": 0, "recordProductName": null, "recordWeight": null, "codeIc": null, "codeId": 0, "difference": 0, "bindRecordSign": 0, "recordDesc": null, "hasCodeItems": false, "customerId": 0, "customerName": "", "driverIc": null, "driverName": null, "totalPrice": null, "originId": 500101, "origin": "\u4e07\u5dde\u533a", "originCode": "023", "tradeType": "9001", "tradeTypeName": "\u6c88\u96331\u53f7", "weight": 2.0, "pwd": "", "type": 1, "ic": "", "boothNumber": "210728154359", "productState": "1", "accountId": 0, "passCheckId": 0, "passCheckName": null, "tradeTypeId": 70, "id": 0, "protocolId": null, "goodsTagId": 663} | |
99 | -{} | |
100 | - |
testcase/test_ZC/demo.py
... | ... | @@ -7,33 +7,4 @@ |
7 | 7 | |
8 | 8 | """ |
9 | 9 | |
10 | -""" | |
11 | - | |
12 | -import json | |
13 | -import datetime,time | |
14 | -import urllib | |
15 | - | |
16 | -# print(time.localtime()) | |
17 | -import urllib3 | |
18 | - | |
19 | -# print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())) | |
20 | - | |
21 | -# a = {"aa":"阿三大苏打","bb":"bb","cc":{"cc1":"啊实打","cc2":"ad"}} | |
22 | -# print(a) | |
23 | -# data = {"cc":{"cc1":"2"}} | |
24 | -# b = dict(a,**data) | |
25 | -# print(b) | |
26 | - | |
27 | -# def doDcit(**kwargs): | |
28 | -# a = {"aa": "阿三大苏打", "bb": "bb", "cc": {"cc1": "啊实打","cc2":"ad"}} | |
29 | -# print(a) | |
30 | -# b = dict(a,**kwargs) | |
31 | -# print(b) | |
32 | - | |
33 | -a = {"code":"200","data":[{"autoPass":2,"autoSave":1,"carTypeName":"板车","code":"003","id":53,"number":"0007","remark":"","status":1,"tag":"jmsf","weight":333},{"autoPass":1,"autoSave":1,"carTypeName":"挂车","code":"gc","id":59,"number":"0030","remark":"","status":1,"tag":"jmsf","weight":1},{"autoPass":2,"carTypeName":"柜车","code":"23","id":60,"number":"0031","remark":"","status":1,"tag":"jmsf","weight":0},{"autoPass":1,"autoSave":1,"carTypeName":"地排车","code":"008","id":87,"number":"0001","remark":"","status":1,"tag":"jmsf","weight":2},{"autoPass":2,"autoSave":1,"carTypeName":"玉玺","code":"888","id":128,"number":"0042","remark":"","status":1,"tag":"jmsf","weight":0},{"autoPass":2,"carTypeName":"军车","code":"555","id":61,"number":"0013","remark":"","status":1,"tag":"jmsf","weight":0},{"autoPass":2,"carTypeName":"小面包","code":"","id":142,"number":"0008","remark":"","status":1,"tag":"jmsf","weight":22},{"autoPass":1,"autoSave":1,"carTypeName":"小轿车","code":"001","id":51,"number":"0002","remark":"","status":1,"tag":"jmsf","weight":0},{"autoPass":2,"carTypeName":"123456789012345","code":"1245","id":160,"number":"0044","remark":"","status":1,"tag":"jmsf","weight":11},{"autoPass":2,"carTypeName":"111111111222222","code":"6432","id":161,"number":"0045","remark":"","status":1,"tag":"jmsf","weight":22},{"autoPass":2,"autoSave":1,"carTypeName":"test0731","code":"12345","id":162,"number":"0047","remark":"asdf g hgsaf","status":1,"tag":"jmsf","weight":11}],"message":"OK","result":"OK","success":True} | |
34 | -print(a["data"]) | |
35 | -# lambda file_name: os.path.getmtime(report_path + file_name) | |
36 | -b = a["data"].index([i for i in a["data"] if i["carTypeName"]=="地排车"][0]) | |
37 | -print(b) | |
38 | -# c ="2" if b !=None else "1" | |
39 | -# print(c) | |
40 | 10 | \ No newline at end of file |
11 | +""" | |
41 | 12 | \ No newline at end of file | ... | ... |