Commit 5f8af56aa884eb4f81231806c1a63c890c2e968c
Merge remote-tracking branch 'origin/master'
Showing
7 changed files
with
319 additions
and
107 deletions
commons/api/entranceFeeBillList.py
@@ -386,7 +386,7 @@ def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号" | @@ -386,7 +386,7 @@ def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号" | ||
386 | freezeMoneySymbol = fee_int | 386 | freezeMoneySymbol = fee_int |
387 | comparisonFreezeAmount = fee_int | 387 | comparisonFreezeAmount = fee_int |
388 | modified = created | 388 | modified = created |
389 | - firmCode = "sy" | 389 | + firmCode = my.userInfo["data"]["user"]["firmCode"] |
390 | marketFlag = firmCode | 390 | marketFlag = firmCode |
391 | collectionPrice = 0 | 391 | collectionPrice = 0 |
392 | itemReceivableAmount = receivable | 392 | itemReceivableAmount = receivable |
@@ -418,7 +418,7 @@ def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号" | @@ -418,7 +418,7 @@ def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号" | ||
418 | print(aa.text) | 418 | print(aa.text) |
419 | return aa | 419 | return aa |
420 | 420 | ||
421 | -do_payOrder(attrValue="202108060900035") | 421 | +# do_payOrder(attrValue="202108060900035") |
422 | 422 | ||
423 | 423 | ||
424 | """ | 424 | """ |
commons/api/zcApi.py
@@ -86,7 +86,7 @@ def get_dep(host="",**kwargs): | @@ -86,7 +86,7 @@ def get_dep(host="",**kwargs): | ||
86 | data = {"keyword":""} | 86 | data = {"keyword":""} |
87 | headers = dct.jsonCode() | 87 | headers = dct.jsonCode() |
88 | data = dict(data, **kwargs) | 88 | data = dict(data, **kwargs) |
89 | - res = my.useHeadersRequests(method="get", url=url, data=json.dumps(data), headers=headers) | 89 | + res = my.useHeadersRequests(method="get", url=url, params=data, headers=headers) |
90 | return res | 90 | return res |
91 | 91 | ||
92 | 92 |
report/test.log
1 | -[2021-08-06 16:26:45] [INFO] : ====================================================================================== | ||
2 | -[2021-08-06 16:26:45] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'RpLVclIKYcw4w+0W7Dy4arorr3tELiF61AMIxbZRMIl5OKQjqSmmM9GLIl+hkjpQfknMPmyM7KYE1T3/Stqfq9v48sMmfPNd4Fgie76GPU+roZT2rkAC9CXGqlsiLD/k1lzN9unVwJrtTlCnHAhzb2+JArtjfOis3t2RUax7398='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | 1 | +[2021-08-06 17:59:01] [INFO] : ====================================================================================== |
2 | +[2021-08-06 17:59:01] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'lsWZHfMAgFdA1giqEGJYul8opwYuR43hQpevsvVb43uipM2lnt6JdkBKNUOQqglnozlTCnVQGSo1jClpGUlPrf5vZRqa0pGL+bkt7JeXJEn+PWX6YwcReS35AZjjVMkvte914ZiwNkOhgMS6S/mQeJc6fjJX34NkbMG2yE2jK6w='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | ||
4 | 4 | ||
5 | -[2021-08-06 16:26:45] [INFO] : ====================================================================================== | ||
6 | -[2021-08-06 16:26:45] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | -{'data': None, 'json': {'userName': 'sygangda', 'password': 'XlCvoKN1bvOWvCxcqYIxE+KwB0iiKTCqZL5by2w+jSibVOHdgsX53UY+lVad68+DRw+Qa2nvCJlzwzza3LL/YLnnqw9Ifme3X4C/zak19/4KeAFn2GB2JGbQBQLRaYyiw8l03bJbSb3iw6psYyINQN2SpbaU7CJwjHtehWyObrQ='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | 5 | +[2021-08-06 17:59:01] [INFO] : ====================================================================================== |
6 | +[2021-08-06 17:59:01] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | +{'data': None, 'json': {'userName': 'sygangda', 'password': 'NDKNIWWSXVpWHh9IK/ZgUt60b1DTN6k3jNED6lGBp3Hreemne5supQ8BeLwwxSoRxxt/Ko1Ejg2tLAOBpcsU7yxIvdEBDnuCof8d3OSmsCP83tMGnu/qIe94hIpfz6Pmo5dCQmXK3R83xhFE4FxVhQhL2z1j+QR6iBUWSXnAizU='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | ||
8 | 8 | ||
9 | -[2021-08-06 16:26:45] [INFO] : ====================================================================================== | ||
10 | -[2021-08-06 16:26:45] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action | ||
11 | -{'rows': '10', 'page': '1', 'sort': 'et.created', 'order': 'desc', 'metadata[created]': '{"provider": "datetimeProvider", "index": 10, "field": "created"}', 'metadata[totalPrice]': '{"provider": "moneyProvider", "index": 20, "field": "totalPrice"}', 'metadata[paymentTime]': '{"provider": "datetimeProvider", "index": 30, "field": "paymentTime"}', 'metadata[type]': '{"provider": "entranceFeeBillTypeProvider", "index": 40, "field": "type"}', 'metadata[status]': '{"provider": "entranceFeeBillStateProvider", "index": 50, "field": "status"}', 'attr': 'number', 'attrValue': '202108060900035'} | ||
12 | -{} | ||
13 | - | ||
14 | -[2021-08-06 16:26:45] [INFO] : ====================================================================================== | ||
15 | -[2021-08-06 16:26:45] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/3761.action | ||
16 | -None | ||
17 | -{} | ||
18 | - | ||
19 | -[2021-08-06 16:26:47] [INFO] : ====================================================================================== | ||
20 | -[2021-08-06 16:26:47] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | ||
21 | -None | ||
22 | -{} | ||
23 | - | ||
24 | -[2021-08-06 16:26:48] [INFO] : ====================================================================================== | ||
25 | -[2021-08-06 16:26:48] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | ||
26 | -None | ||
27 | -{} | ||
28 | - | ||
29 | -[2021-08-06 16:26:48] [INFO] : ====================================================================================== | ||
30 | -[2021-08-06 16:26:48] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
31 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 3761, 'goodsId': '3775', 'number': '202108060900035', 'modified': '2021-08-06 16:26:48', 'status': '4', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川B00001', 'autocomplete-cartype': '003(板车)', 'carTypeName': '板车', 'carTypeCode': '003', 'carTypeId': '53', 'carTypeWeight': '333', 'storeTareWeight': '', 'proveType': '1621', 'grossWeight': '353', 'tareWeight': '333', 'weight': '20', 'goodsNum': '', 'itemWeight': '', 'productPrice': '1.00000', 'unitPrice': '100.0', 'depName': '接车部', 'calcDepId': '103', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '14158', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '71', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-06 16:23:44', 'remark': 'false', 'goodsTagIds': '1900', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-06 16:23:44', 'tareWeightDate': '2021-08-06 16:23:44', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '2000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | ||
32 | -{} | ||
33 | - | ||
34 | -[2021-08-06 16:26:48] [INFO] : ====================================================================================== | ||
35 | -[2021-08-06 16:26:48] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action | ||
36 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=3761&goodsId=3775&number=202108060900035&modified=2021-08-06%2016%3A23%3A44&status=4&source=1&updateFeeItems=&correctDiscount=1&totalAmount=800&customerId=389&fundAccount=105847&ic=888810032426&customerName=%E9%95%BF%E6%AD%8C%E4%B9%B0%E5%AE%B6%E7%9C%81%E5%86%85%E5%95%8A%E5%95%8A%E5%95%8A%E5%98%BF&customerPhone=18011501258&payway=%E5%88%B7%E5%8D%A1&plate=%E5%B7%9DB00001&autocomplete-cartype=003%28%E6%9D%BF%E8%BD%A6%29&carTypeName=%E6%9D%BF%E8%BD%A6&carTypeCode=003&carTypeId=53&carTypeWeight=333&storeTareWeight=&proveType=1621&grossWeight=353&tareWeight=333&weight=20&goodsNum=&itemWeight=&productPrice=1.00000&unitPrice=100.0&depName=%E6%8E%A5%E8%BD%A6%E9%83%A8&calcDepId=103&dep=103®ionName=A1%E5%8C%BA®ionId=72&productName=%E9%9B%AA%E8%8E%B2%E6%9E%9C&productId=14158&productArea=%E9%87%8D%E5%BA%86%2C%E9%87%8D%E5%BA%86%E5%B8%82%2C%E4%B8%87%E5%B7%9E%E5%8C%BA&parentId=&levelType=&originId=500101&tradeTypeId=71&chargeTotalAmount=800&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-06%2016%3A23%3A44&remark=&goodsTagIds=1900&marketFlag=sy&totalMoney=800&receivable=1300&collectionPrice=0&discountAmount=500&handReceivableAmount=0&itemReceivableAmount=1300&shareRatio=0&handlingTeam=&handActualAmount=0&handManageAmount=0&handCollectionAmount=0&receivableAmount=1300&categoryName=%E6%B0%B4%E6%9E%9C&categoryId=53&driverTel=&grossWeightDate=2021-08-06%2016%3A23%3A44&tareWeightDate=2021-08-06%2016%3A23%3A44&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=&inGreeterId=0&outGreeterId=&sumPrice=2000&shipperName=&shipperId=&shipperPhone=&feeDepName=&calcFeeDepId=&feeDepId=&accountId=105847&correctDiscount=1&billItems=&billItemsDic=&billItemCheckIds=103&103=10.00&billItems=%7B%22discount%22%3A500%2C%22id%22%3A103%2C%22name%22%3A%22%E4%BA%A4%E6%98%93%E7%AE%A1%E7%90%86%E8%B4%B9%22%2C%22receivable%22%3A1000%2C%22require%22%3A1%7D&billItemDicCheckIds=105&billItemsDic=%7B%22discount%22%3A0%2C%22id%22%3A105%2C%22name%22%3A%22%E4%BC%98%E6%83%A0%E6%94%B6%E8%B4%B9%22%2C%22receivable%22%3A500%2C%22require%22%3A1%7D&billItemCheckIds=106&106=3.00&billItems=%7B%22discount%22%3A0%2C%22id%22%3A106%2C%22name%22%3A%22%E6%A3%80%E6%B5%8B%E8%B4%B9%22%2C%22receivable%22%3A300%2C%22require%22%3A1%7D | ||
37 | -{} | ||
38 | - | ||
39 | -[2021-08-06 16:26:49] [INFO] : ====================================================================================== | ||
40 | -[2021-08-06 16:26:49] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | 9 | +[2021-08-06 17:59:01] [INFO] : ====================================================================================== |
10 | +[2021-08-06 17:59:01] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | ||
41 | {"businessCode": "jmsf"} | 11 | {"businessCode": "jmsf"} |
42 | {} | 12 | {} |
43 | 13 | ||
44 | -[2021-08-06 16:26:49] [INFO] : ====================================================================================== | ||
45 | -[2021-08-06 16:26:49] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | ||
46 | -{"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"} | 14 | +[2021-08-06 17:59:02] [INFO] : ====================================================================================== |
15 | +[2021-08-06 17:59:02] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | ||
16 | +{"marketId": 9, "state": 1, "keyword": "\u852c\u83dc"} | ||
47 | {} | 17 | {} |
48 | 18 | ||
49 | -[2021-08-06 16:26:49] [INFO] : ====================================================================================== | ||
50 | -[2021-08-06 16:26:49] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | 19 | +[2021-08-06 17:59:02] [INFO] : ====================================================================================== |
20 | +[2021-08-06 17:59:02] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | ||
51 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} | 21 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} |
52 | {} | 22 | {} |
53 | 23 | ||
54 | -[2021-08-06 16:26:49] [INFO] : ====================================================================================== | ||
55 | -[2021-08-06 16:26:49] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | 24 | +[2021-08-06 17:59:02] [INFO] : ====================================================================================== |
25 | +[2021-08-06 17:59:02] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | ||
56 | {"pageNum": 100, "pageSize": 100, "marketId": 9} | 26 | {"pageNum": 100, "pageSize": 100, "marketId": 9} |
57 | {} | 27 | {} |
58 | 28 | ||
59 | -[2021-08-06 16:26:49] [INFO] : ====================================================================================== | ||
60 | -[2021-08-06 16:26:49] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | 29 | +[2021-08-06 17:59:02] [INFO] : ====================================================================================== |
30 | +[2021-08-06 17:59:02] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
61 | None | 31 | None |
62 | {'params': {'pid': 'goods_tag'}} | 32 | {'params': {'pid': 'goods_tag'}} |
63 | 33 | ||
64 | -[2021-08-06 16:26:50] [INFO] : ====================================================================================== | ||
65 | -[2021-08-06 16:26:50] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | 34 | +[2021-08-06 17:59:03] [INFO] : ====================================================================================== |
35 | +[2021-08-06 17:59:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | ||
66 | {"province": "C", "city": null, "area": null} | 36 | {"province": "C", "city": null, "area": null} |
67 | {} | 37 | {} |
68 | 38 | ||
69 | -[2021-08-06 16:26:50] [INFO] : ====================================================================================== | ||
70 | -[2021-08-06 16:26:50] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | ||
71 | -{"keyword": ""} | ||
72 | -{} | ||
73 | - | ||
74 | -[2021-08-06 16:26:50] [INFO] : ====================================================================================== | ||
75 | -[2021-08-06 16:26:50] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
76 | -None | ||
77 | -{'params': {'pid': 'prove_type'}} | ||
78 | - | ||
79 | -[2021-08-06 16:26:51] [INFO] : ====================================================================================== | ||
80 | -[2021-08-06 16:26:51] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | ||
81 | -None | ||
82 | -{} | ||
83 | - | ||
84 | -[2021-08-06 16:26:51] [INFO] : ====================================================================================== | ||
85 | -[2021-08-06 16:26:51] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
86 | -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddB00001", "inGreeterId": 274, "inGreeterName": "\u901a\u7528\u6d4b\u8bd5", "productId": 14158, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 1621, "proveTypeName": "\u7eff\u8272\u852c\u83dc", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 353, "grossWeightDate": "2021-08-06 16:26:51", "newWeight": 20, "tareWeight": 333, "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": 14158, "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} | ||
87 | -{} | ||
88 | - | ||
89 | -[2021-08-06 16:26:52] [INFO] : ====================================================================================== | ||
90 | -[2021-08-06 16:26:52] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action | ||
91 | -{'rows': '10', 'page': '1', 'sort': 'et.created', 'order': 'desc', 'metadata[created]': '{"provider": "datetimeProvider", "index": 10, "field": "created"}', 'metadata[totalPrice]': '{"provider": "moneyProvider", "index": 20, "field": "totalPrice"}', 'metadata[paymentTime]': '{"provider": "datetimeProvider", "index": 30, "field": "paymentTime"}', 'metadata[type]': '{"provider": "entranceFeeBillTypeProvider", "index": 40, "field": "type"}', 'metadata[status]': '{"provider": "entranceFeeBillStateProvider", "index": 50, "field": "status"}', 'attr': 'number', 'attrValue': '202108060900037'} | ||
92 | -{} | ||
93 | - | ||
94 | -[2021-08-06 16:26:52] [INFO] : ====================================================================================== | ||
95 | -[2021-08-06 16:26:52] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/3763.action | 39 | +[2021-08-06 17:59:03] [INFO] : ====================================================================================== |
40 | +[2021-08-06 17:59:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | ||
96 | None | 41 | None |
97 | -{} | 42 | +{'params': {'keyword': ''}} |
98 | 43 | ||
99 | -[2021-08-06 16:26:53] [INFO] : ====================================================================================== | ||
100 | -[2021-08-06 16:26:53] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | 44 | +[2021-08-06 17:59:03] [INFO] : ====================================================================================== |
45 | +[2021-08-06 17:59:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
101 | None | 46 | None |
102 | -{} | 47 | +{'params': {'pid': 'prove_type'}} |
103 | 48 | ||
104 | -[2021-08-06 16:26:54] [INFO] : ====================================================================================== | ||
105 | -[2021-08-06 16:26:54] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | 49 | +[2021-08-06 17:59:04] [INFO] : ====================================================================================== |
50 | +[2021-08-06 17:59:04] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | ||
106 | None | 51 | None |
107 | {} | 52 | {} |
108 | 53 | ||
109 | -[2021-08-06 16:26:54] [INFO] : ====================================================================================== | ||
110 | -[2021-08-06 16:26:54] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
111 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 3763, 'goodsId': '3777', 'number': '202108060900037', 'modified': '2021-08-06 16:26:54', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川B00001', 'autocomplete-cartype': '003(板车)', 'carTypeName': '板车', 'carTypeCode': '003', 'carTypeId': '53', 'carTypeWeight': '333', 'storeTareWeight': '', 'proveType': '1621', 'grossWeight': '353', 'tareWeight': '333', 'weight': '20', 'goodsNum': '', 'itemWeight': '', 'productPrice': '1.00000', 'unitPrice': '100.0', 'depName': '接车部', 'calcDepId': '103', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '14158', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '71', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-06 16:26:52', 'remark': 'false', 'goodsTagIds': '1900', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-06 16:26:52', 'tareWeightDate': '2021-08-06 16:26:52', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '2000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | ||
112 | -{} | ||
113 | - | ||
114 | -[2021-08-06 16:26:54] [INFO] : ====================================================================================== | ||
115 | -[2021-08-06 16:26:54] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action | ||
116 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=3763&goodsId=3777&number=202108060900037&modified=2021-08-06%2016%3A26%3A52&status=2&source=1&updateFeeItems=&correctDiscount=1&totalAmount=800&customerId=389&fundAccount=105847&ic=888810032426&customerName=%E9%95%BF%E6%AD%8C%E4%B9%B0%E5%AE%B6%E7%9C%81%E5%86%85%E5%95%8A%E5%95%8A%E5%95%8A%E5%98%BF&customerPhone=18011501258&payway=%E5%88%B7%E5%8D%A1&plate=%E5%B7%9DB00001&autocomplete-cartype=003%28%E6%9D%BF%E8%BD%A6%29&carTypeName=%E6%9D%BF%E8%BD%A6&carTypeCode=003&carTypeId=53&carTypeWeight=333&storeTareWeight=&proveType=1621&grossWeight=353&tareWeight=333&weight=20&goodsNum=&itemWeight=&productPrice=1.00000&unitPrice=100.0&depName=%E6%8E%A5%E8%BD%A6%E9%83%A8&calcDepId=103&dep=103®ionName=A1%E5%8C%BA®ionId=72&productName=%E9%9B%AA%E8%8E%B2%E6%9E%9C&productId=14158&productArea=%E9%87%8D%E5%BA%86%2C%E9%87%8D%E5%BA%86%E5%B8%82%2C%E4%B8%87%E5%B7%9E%E5%8C%BA&parentId=&levelType=&originId=500101&tradeTypeId=71&chargeTotalAmount=800&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-06%2016%3A26%3A52&remark=&goodsTagIds=1900&marketFlag=sy&totalMoney=800&receivable=1300&collectionPrice=0&discountAmount=500&handReceivableAmount=0&itemReceivableAmount=1300&shareRatio=0&handlingTeam=&handActualAmount=0&handManageAmount=0&handCollectionAmount=0&receivableAmount=1300&categoryName=%E6%B0%B4%E6%9E%9C&categoryId=53&driverTel=&grossWeightDate=2021-08-06%2016%3A26%3A52&tareWeightDate=2021-08-06%2016%3A26%3A52&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=&inGreeterId=0&outGreeterId=&sumPrice=2000&shipperName=&shipperId=&shipperPhone=&feeDepName=&calcFeeDepId=&feeDepId=&accountId=105847&correctDiscount=1&billItems=&billItemsDic=&billItemCheckIds=103&103=10.00&billItems=%7B%22discount%22%3A500%2C%22id%22%3A103%2C%22name%22%3A%22%E4%BA%A4%E6%98%93%E7%AE%A1%E7%90%86%E8%B4%B9%22%2C%22receivable%22%3A1000%2C%22require%22%3A1%7D&billItemDicCheckIds=105&billItemsDic=%7B%22discount%22%3A0%2C%22id%22%3A105%2C%22name%22%3A%22%E4%BC%98%E6%83%A0%E6%94%B6%E8%B4%B9%22%2C%22receivable%22%3A500%2C%22require%22%3A0%7D&billItemCheckIds=106&106=3.00&billItems=%7B%22discount%22%3A0%2C%22id%22%3A106%2C%22name%22%3A%22%E6%A3%80%E6%B5%8B%E8%B4%B9%22%2C%22receivable%22%3A300%2C%22require%22%3A1%7D | 54 | +[2021-08-06 17:59:04] [INFO] : ====================================================================================== |
55 | +[2021-08-06 17:59:04] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
56 | +{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddA12323", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14152, "productName": "\u852c\u83dc", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 401, "grossWeightDate": "2021-08-06 17:59:04", "newWeight": 68, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddA12323", "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} | ||
117 | {} | 57 | {} |
118 | 58 |
testcase/test_ZC/demo.py
testcase/test_ZC/test_ZC.py
@@ -34,9 +34,14 @@ class test_demo(unittest.TestCase): | @@ -34,9 +34,14 @@ class test_demo(unittest.TestCase): | ||
34 | def tearDownClass(cls) -> None: | 34 | def tearDownClass(cls) -> None: |
35 | pass | 35 | pass |
36 | 36 | ||
37 | - @unittest.skip | 37 | + # @unittest.skip |
38 | def test_get_carType(self): | 38 | def test_get_carType(self): |
39 | """整车-整车创建:获取车型接口调用测试""" | 39 | """整车-整车创建:获取车型接口调用测试""" |
40 | + # 依赖数据 | ||
41 | + plate = "川A12323" | ||
42 | + productState = "1" | ||
43 | + trailerNumber = plate | ||
44 | + | ||
40 | # 获取车型 | 45 | # 获取车型 |
41 | carType = zcA.get_carType(host=self.gatewayHost) | 46 | carType = zcA.get_carType(host=self.gatewayHost) |
42 | print(carType.text) | 47 | print(carType.text) |
@@ -54,7 +59,7 @@ class test_demo(unittest.TestCase): | @@ -54,7 +59,7 @@ class test_demo(unittest.TestCase): | ||
54 | productName = categoryByCondition.json()["data"][0]["name"] | 59 | productName = categoryByCondition.json()["data"][0]["name"] |
55 | productCode = categoryByCondition.json()["data"][0]["keycode"] | 60 | productCode = categoryByCondition.json()["data"][0]["keycode"] |
56 | 61 | ||
57 | - # 获取商品 | 62 | + # 获取接车员 |
58 | listByExample = zcA.get_listByExample(host=self.gatewayHost) | 63 | listByExample = zcA.get_listByExample(host=self.gatewayHost) |
59 | print(listByExample.json()) | 64 | print(listByExample.json()) |
60 | inGreeterId = listByExample.json()["data"][0]["id"] | 65 | inGreeterId = listByExample.json()["data"][0]["id"] |
@@ -96,11 +101,6 @@ class test_demo(unittest.TestCase): | @@ -96,11 +101,6 @@ class test_demo(unittest.TestCase): | ||
96 | print(duplicateTokenRes.json()) | 101 | print(duplicateTokenRes.json()) |
97 | duplicateToken = duplicateTokenRes.json()["data"] | 102 | duplicateToken = duplicateTokenRes.json()["data"] |
98 | 103 | ||
99 | - # 创建生成进门单 | ||
100 | - plate = "川A12323" | ||
101 | - productState = "1" | ||
102 | - trailerNumber = plate | ||
103 | - | ||
104 | # 重量信息准备 | 104 | # 重量信息准备 |
105 | grossWeight = random.randint(carTypeWeight,carTypeWeight+100) | 105 | grossWeight = random.randint(carTypeWeight,carTypeWeight+100) |
106 | tareWeight = carTypeWeight | 106 | tareWeight = carTypeWeight |
testcase/test_ZC/test_ZCBasic.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | + | ||
3 | +# @Time : 2021/8/6 16:29 | ||
4 | +# @Author : Ljq | ||
5 | +# @File : test_ZCBasic.py | ||
6 | +# @Software: PyCharm | ||
7 | + | ||
8 | +""" | ||
9 | +整车进门基础数据获取测试 | ||
10 | +""" | ||
11 | + | ||
12 | +import json | ||
13 | +import unittest | ||
14 | +from commons.scripts.readConf import rC | ||
15 | +from commons.api import zcApi as zcA | ||
16 | +from commons.MySession import my | ||
17 | +from commons.api import entranceFeeBillList as eFBL | ||
18 | +import time,random | ||
19 | + | ||
20 | +class test_ZCBasic(unittest.TestCase): | ||
21 | + """整车-创建整车进门单基础信息接口测试""" | ||
22 | + def setUp(self) -> None: | ||
23 | + pass | ||
24 | + | ||
25 | + def tearDown(self) -> None: | ||
26 | + pass | ||
27 | + | ||
28 | + | ||
29 | + @classmethod | ||
30 | + def setUpClass(cls) -> None: | ||
31 | + cls.gatewayHost = rC.returnOptionsItems("host", "gatewayHost") | ||
32 | + cls.jmsfHost = rC.returnOptionsItems("host", "jmsfHost") | ||
33 | + | ||
34 | + @classmethod | ||
35 | + def tearDownClass(cls) -> None: | ||
36 | + pass | ||
37 | + | ||
38 | + def test_getCar(self): | ||
39 | + """整车-整车创建:获取车型接口调用测试""" | ||
40 | + # 获取车型 | ||
41 | + carType = zcA.get_carType(host=self.gatewayHost) | ||
42 | + print(carType.text) | ||
43 | + assert carType.json()["code"] == "200" | ||
44 | + assert carType.json()["data"] != [] | ||
45 | + | ||
46 | + def test_getAllCategory(self): | ||
47 | + """整车-整车创建:获取测试商品信息测试""" | ||
48 | + # 获取 | ||
49 | + # print(my.userInfo["data"]["user"]["firmCode"]) | ||
50 | + marketId = my.userInfo["data"]["user"]["firmId"] | ||
51 | + resCategory = zcA.get_listCategoryByCondition(host=self.gatewayHost,marketId=marketId,keyword="") | ||
52 | + print(resCategory.text) | ||
53 | + assert resCategory.json()["code"] == "200","全商品查询失败" | ||
54 | + assert resCategory.json()["data"] != [],"全商品查询失败,查询结果不应该为空" | ||
55 | + | ||
56 | + def test_getOneCategory(self): | ||
57 | + """整车-整车创建:获取测试商品信息测试""" | ||
58 | + # 获取 | ||
59 | + marketId = my.userInfo["data"]["user"]["firmId"] | ||
60 | + resCategory = zcA.get_listCategoryByCondition(host=self.gatewayHost,marketId=marketId,keyword="火龙果") | ||
61 | + print(resCategory.text) | ||
62 | + nameList = [i["name"] for i in resCategory.json()["data"]] | ||
63 | + assert resCategory.json()["code"] == "200" | ||
64 | + for i in nameList: | ||
65 | + assert "火龙果" in i,"指定条件查询失败,按照名称查询出商品错误" | ||
66 | + | ||
67 | + def test_getAllExample(self): | ||
68 | + """整车-整车创建:接车员信息获取测试""" | ||
69 | + # print(my.userInfo["data"]["user"]["departmentId"]) | ||
70 | + firmCode = my.userInfo["data"]["user"]["firmCode"] | ||
71 | + departmentId = my.userInfo["data"]["user"]["departmentId"] | ||
72 | + listByExample = zcA.get_listByExample(host=self.gatewayHost,firmCode=firmCode,departmentId=departmentId) | ||
73 | + print(listByExample.json()) | ||
74 | + assert listByExample.json()["code"]=="200","接车员信息获取测试失败" | ||
75 | + assert listByExample.json()["data"]!=[],"接车员信息获取测试失败" | ||
76 | + | ||
77 | + def test_getOneExample(self): | ||
78 | + """整车-整车创建:按接车员名称信息查询接车员""" | ||
79 | + # print(my.userInfo["data"]["user"]["departmentId"]) | ||
80 | + firmCode = my.userInfo["data"]["user"]["firmCode"] | ||
81 | + departmentId = my.userInfo["data"]["user"]["departmentId"] | ||
82 | + keyword="测试" | ||
83 | + listByExample = zcA.get_listByExample(host=self.gatewayHost,firmCode=firmCode,departmentId=departmentId, | ||
84 | + keyword=keyword) | ||
85 | + print(listByExample.json()) | ||
86 | + assert listByExample.json()["code"]=="200","按接车员名称信息查询接车员测试失败" | ||
87 | + assert listByExample.json()["data"]!=[],"按接车员名称信息查询接车员测试失败" | ||
88 | + | ||
89 | + def test_transactionType(self): | ||
90 | + """整车-整车创建:交易类型获取测试""" | ||
91 | + transactionType = zcA.query_transactionType(host=self.gatewayHost) | ||
92 | + print(transactionType.json()) | ||
93 | + assert transactionType.status_code==200,"交易类型信息获取测试失败" | ||
94 | + assert transactionType.json()["rows"]!=[],"交易类型信息获取测试失败" | ||
95 | + | ||
96 | + def test_getGoodsTag(self): | ||
97 | + """整车-整车创建:货物标签获取测试""" | ||
98 | + goodsTag = zcA.get_goodsTag(host=self.gatewayHost) | ||
99 | + print(goodsTag.json()) | ||
100 | + assert goodsTag.status_code==200,"货物标签信息获取测试失败" | ||
101 | + assert goodsTag.json()["data"]!=[],"货物标签信息获取测试失败" | ||
102 | + | ||
103 | + def test_getAllAddress(self): | ||
104 | + """整车-整车创建:按照省份查询产地""" | ||
105 | + province = "四川省" | ||
106 | + address = zcA.get_address(host=self.gatewayHost,province=province) | ||
107 | + print(address.json()) | ||
108 | + assert address.json()["code"] == "200","按照省份查询产地信息获取测试失败" | ||
109 | + mergerNameList = [i["mergerName"] for i in address.json()["data"] if province not in i["mergerName"]] | ||
110 | + assert mergerNameList == [],"按照省份查询产地信息获取测试失败" | ||
111 | + | ||
112 | + def test_getOneAddress(self): | ||
113 | + """整车-整车创建:按照省份查询产地""" | ||
114 | + province = "四川省" | ||
115 | + city = "成都市" | ||
116 | + area = "锦江区" | ||
117 | + address = zcA.get_address(host=self.gatewayHost,province=province,city=city,area=area) | ||
118 | + print(address.json()) | ||
119 | + assert address.json()["code"]=="200","详细产地信息查询失败" | ||
120 | + assert len(address.json()["data"])==1,"详细产地信息查询只能查询出一个结果,查询结果超过一个测试失败" | ||
121 | + assert address.json()["data"][0]["mergerName"] == "四川省,成都市,锦江区","根据省市区查询插地信息查询失败" | ||
122 | + | ||
123 | + def test_getAllDep(self): | ||
124 | + """整车-整车创建:接车部门信息获取""" | ||
125 | + depRes = zcA.get_dep(host=self.gatewayHost) | ||
126 | + print(depRes.json()) | ||
127 | + assert depRes.json()["code"]=="200","接车部门信息获取测试失败" | ||
128 | + assert depRes.json()["data"] != [], "接车部门信息获取测试失败" | ||
129 | + | ||
130 | + | ||
131 | + def test_getOneDep(self): | ||
132 | + """整车-整车创建:查询指定接车部门信息""" | ||
133 | + keyword="水果部" | ||
134 | + depRes = zcA.get_dep(host=self.gatewayHost,keyword=keyword) | ||
135 | + print(depRes.json()) | ||
136 | + assert depRes.json()["code"]=="200","查询指定接车部门信息获取测试失败" | ||
137 | + assert len(depRes.json()["data"]) == 1, "查询指定接车部门信息获取测试失败" | ||
138 | + assert depRes.json()["data"][0]["name"] == keyword,"查询指定接车部门信息获取测试失败" | ||
139 | + | ||
140 | + def test_getProveType(self): | ||
141 | + """整车-整车创建:证明类型信息获取""" | ||
142 | + proveType = zcA.get_proveType(host=self.gatewayHost) | ||
143 | + print(proveType.json()) | ||
144 | + assert proveType.json()["code"]=="200","证明类型信息获取测试失败" | ||
145 | + assert proveType.json()["data"] != [], "证明类型信息获取测试失败" | ||
146 | + | ||
147 | + def test_getDuplicateToken(self): | ||
148 | + """整车-整车创建:获取防重复token""" | ||
149 | + duplicateTokenRes = zcA.get_duplicateToken(host=self.gatewayHost) | ||
150 | + print(duplicateTokenRes.json()) | ||
151 | + assert duplicateTokenRes.json()["code"]=="200","获取防重复token测试失败" | ||
152 | + assert duplicateTokenRes.json()["data"].isalnum(), "获取防重复token测试失败" |
testcase/test_ZC/test_ZCCreate.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | + | ||
3 | +# @Time : 2021/8/6 17:49 | ||
4 | +# @Author : Ljq | ||
5 | +# @File : test_ZCCreate.py | ||
6 | +# @Software: PyCharm | ||
7 | + | ||
8 | +""" | ||
9 | +整车进门但创建测试 | ||
10 | +""" | ||
11 | + | ||
12 | +import json | ||
13 | +import unittest | ||
14 | +from commons.scripts.readConf import rC | ||
15 | +from commons.api import zcApi as zcA | ||
16 | +from commons.api import entranceFeeBillList as eFBL | ||
17 | +import time,random | ||
18 | + | ||
19 | +class test_ZCCreate(unittest.TestCase): | ||
20 | + """整车-创建整车进门单""" | ||
21 | + def setUp(self) -> None: | ||
22 | + pass | ||
23 | + | ||
24 | + def tearDown(self) -> None: | ||
25 | + pass | ||
26 | + | ||
27 | + | ||
28 | + @classmethod | ||
29 | + def setUpClass(cls) -> None: | ||
30 | + cls.gatewayHost = rC.returnOptionsItems("host", "gatewayHost") | ||
31 | + cls.jmsfHost = rC.returnOptionsItems("host", "jmsfHost") | ||
32 | + | ||
33 | + @classmethod | ||
34 | + def tearDownClass(cls) -> None: | ||
35 | + pass | ||
36 | + | ||
37 | + def test_creZC(self): | ||
38 | + """整车-整车创建:按接车员名称信息查询接车员""" | ||
39 | + """整车-整车创建:获取车型接口调用测试""" | ||
40 | + # 依赖数据 | ||
41 | + plate = "川A12323" | ||
42 | + productState = "1" | ||
43 | + trailerNumber = plate | ||
44 | + | ||
45 | + # 获取车型 | ||
46 | + carType = zcA.get_carType(host=self.gatewayHost) | ||
47 | + print(carType.text) | ||
48 | + print(carType.json()["data"][0]) | ||
49 | + carTypeCode = carType.json()["data"][0]["code"] | ||
50 | + carTypeId = carType.json()["data"][0]["id"] | ||
51 | + carTypeName = carType.json()["data"][0]["carTypeName"] | ||
52 | + carTypeWeight = carType.json()["data"][0]["weight"] | ||
53 | + | ||
54 | + # 获取商品 | ||
55 | + categoryByCondition = zcA.get_listCategoryByCondition(host=self.gatewayHost) | ||
56 | + print(categoryByCondition.json()) | ||
57 | + cateId = categoryByCondition.json()["data"][0]["id"] | ||
58 | + productId = categoryByCondition.json()["data"][0]["id"] | ||
59 | + productName = categoryByCondition.json()["data"][0]["name"] | ||
60 | + productCode = categoryByCondition.json()["data"][0]["keycode"] | ||
61 | + | ||
62 | + # 获取接车员 | ||
63 | + listByExample = zcA.get_listByExample(host=self.gatewayHost) | ||
64 | + print(listByExample.json()) | ||
65 | + inGreeterId = listByExample.json()["data"][0]["id"] | ||
66 | + inGreeterName = listByExample.json()["data"][0]["realName"] | ||
67 | + | ||
68 | + # 获取交易类型 | ||
69 | + transactionType = zcA.query_transactionType(host=self.gatewayHost) | ||
70 | + print(transactionType.json()) | ||
71 | + tradeType = transactionType.json()["rows"][0]["code"] | ||
72 | + tradeTypeId = transactionType.json()["rows"][0]["id"] | ||
73 | + tradeTypeName = transactionType.json()["rows"][0]["name"] | ||
74 | + | ||
75 | + # 获取货物标签 | ||
76 | + goodsTag = zcA.get_goodsTag(host=self.gatewayHost) | ||
77 | + print(goodsTag.json()) | ||
78 | + goodsTagId = goodsTag.json()["data"][0]["id"] | ||
79 | + | ||
80 | + # 产地信息获取 | ||
81 | + address = zcA.get_address(host=self.gatewayHost) | ||
82 | + print(address.json()) | ||
83 | + originId = address.json()["data"][0]["id"] | ||
84 | + origin = address.json()["data"][0]["name"] | ||
85 | + originCode = address.json()["data"][0]["cityCode"] | ||
86 | + | ||
87 | + # 查询部门信息 | ||
88 | + depRes = zcA.get_dep(host=self.gatewayHost) | ||
89 | + print(depRes.json()) | ||
90 | + feeDepId = depRes.json()["data"][0]["id"] | ||
91 | + feeDepName = depRes.json()["data"][0]["name"] | ||
92 | + | ||
93 | + # 获取证明类型 | ||
94 | + proveType = zcA.get_proveType(host=self.gatewayHost) | ||
95 | + print(proveType.json()) | ||
96 | + proveTypeCode = proveType.json()["data"][0]["id"] | ||
97 | + proveTypeName = proveType.json()["data"][0]["name"] | ||
98 | + | ||
99 | + # 获取防重token | ||
100 | + duplicateTokenRes = zcA.get_duplicateToken(host=self.gatewayHost) | ||
101 | + print(duplicateTokenRes.json()) | ||
102 | + duplicateToken = duplicateTokenRes.json()["data"] | ||
103 | + | ||
104 | + # 重量信息准备 | ||
105 | + grossWeight = random.randint(carTypeWeight, carTypeWeight + 100) | ||
106 | + tareWeight = carTypeWeight | ||
107 | + weighmanRecord = {"grossWeight": None, "grossWeightDate": "", "newWeight": None, "tareWeight": None, | ||
108 | + "tareWeightDate": None, "weighImgs": []} | ||
109 | + weighmanRecord["grossWeight"] = grossWeight | ||
110 | + weighmanRecord["tareWeight"] = carTypeWeight | ||
111 | + weighmanRecord["newWeight"] = grossWeight - carTypeWeight | ||
112 | + weighmanRecord["grossWeightDate"] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | ||
113 | + | ||
114 | + # 创建进门单 | ||
115 | + cre_res = zcA.create_wholeCarWeighSave(host=self.gatewayHost, duplicateToken=duplicateToken, | ||
116 | + carTypeCode=carTypeCode, carTypeId=carTypeId, | ||
117 | + carTypeName=carTypeName, carTypeWeight=carTypeWeight, plate=plate, | ||
118 | + productId=productId, productName=productName, | ||
119 | + proveTypeCode=proveTypeCode, | ||
120 | + proveTypeName=proveTypeName, trailerNumber=trailerNumber, | ||
121 | + depName=feeDepName, | ||
122 | + cateId=cateId, originId=originId, origin=origin, originCode=originCode, | ||
123 | + tradeType=tradeType, tradeTypeName=tradeTypeName, | ||
124 | + productState=productState, | ||
125 | + tradeTypeId=tradeTypeId, goodsTagId=goodsTagId, inGreeterId=inGreeterId, | ||
126 | + inGreeterName=inGreeterName, dep=feeDepId, weighmanRecord=weighmanRecord) | ||
127 | + print(cre_res.json()) | ||
0 | \ No newline at end of file | 128 | \ No newline at end of file |