Commit 2831c2d8aca6267b3fbb14dcd8fa68628a9735b0
1 parent
6d358ee4
订单冻结解冻
Showing
6 changed files
with
227 additions
and
46 deletions
commons/api/hpApi.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | + | ||
3 | +# @Time : 2021/8/12 17:04 | ||
4 | +# @Author : Ljq | ||
5 | +# @File : hpApi.py | ||
6 | +# @Software: PyCharm | ||
7 | + | ||
8 | +""" | ||
9 | +回皮相关接口 | ||
10 | +""" | ||
11 | + | ||
12 | +import json,time,random | ||
13 | +from commons.scripts import dealContentType as dct | ||
14 | +from commons.MySession import my | ||
15 | +from commons.api import zcApi | ||
16 | +from commons.api import entranceFeeBillList as eFBL | ||
17 | + | ||
18 | +host = "http://test.gateway.diligrp.com:8285" | ||
19 | + | ||
20 | +def get_listBackSkinTrucks(host="",**kwargs): | ||
21 | + """获取接车员信息""" | ||
22 | + url = host + "/jmsf-web/api/jmsf/query/listBackSkinTrucks" | ||
23 | + data = {"plate":"","number":"","customerName":""} | ||
24 | + headers = dct.jsonCode() | ||
25 | + data = dict(data, **kwargs) | ||
26 | + res = my.useHeadersRequests(method="POST", url=url, data=json.dumps(data), headers=headers) | ||
27 | + return res | ||
28 | + | ||
29 | +def backSkinWeighSave(host="",**kwargs): | ||
30 | + """获取接车员信息""" | ||
31 | + url = host + "/jmsf-web/api/entrace/backSkinWeighSave" | ||
32 | + data = {"hasStoreTruck": 1, "number": "202108120900052", "outGreeterId": 223, "outGreeterName": "测试沈阳", | ||
33 | + "plate": "川B00001", "rail": 1, "tareWeight": 343.0, "tareWeightDate": "2021-08-12 17:18:19", | ||
34 | + "weighImgs": [], "weighId": 0, "remark": "123", "carTypeWeight": 333.0, "trailerNumber": "川B00001", | ||
35 | + "pathAddress": "A4-BB-6D-0A-F4-13", "bskinWithGoods": -1, "ic": "", "customerName": None, "customerId": 0, | ||
36 | + "carTypeCode": "003", "carTypeId": 53, "carTypeName": "板车"} | ||
37 | + headers = dct.jsonCode() | ||
38 | + data = dict(data, **kwargs) | ||
39 | + res = my.useHeadersRequests(method="POST", url=url, data=json.dumps(data), headers=headers) | ||
40 | + return res | ||
41 | + | ||
42 | +def do_backSkinWeighSave(host="",number=None,userName=None): | ||
43 | + orderInfo = get_listBackSkinTrucks(host=host,number=number).json()["data"][0] | ||
44 | + print(orderInfo) | ||
45 | + # 参数 | ||
46 | + number=number | ||
47 | + plate = orderInfo["plate"] | ||
48 | + carTypeWeight=orderInfo["carTypeWeight"] | ||
49 | + grossWeight=orderInfo["grossWeight"] | ||
50 | + tareWeight=random.randint(carTypeWeight,grossWeight) | ||
51 | + trailerNumber=orderInfo["trailerNumber"] | ||
52 | + carTypeCode=orderInfo["carTypeCode"] | ||
53 | + carTypeId=orderInfo["carTypeId"] | ||
54 | + carTypeName=orderInfo["carTypeName"] | ||
55 | + tareWeightDate=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | ||
56 | + | ||
57 | + # 获取接车员信息 | ||
58 | + listByExample = zcApi.get_listByExample(host=host) | ||
59 | + print(listByExample.json()) | ||
60 | + if userName == None: | ||
61 | + listByExampleIndex = 0 | ||
62 | + else: | ||
63 | + listByExampleIndex = listByExample.json()["data"].index( | ||
64 | + [i for i in listByExample.json()["data"] if i["userName"] == userName][0]) | ||
65 | + outGreeterId = listByExample.json()["data"][listByExampleIndex]["id"] | ||
66 | + outGreeterName = listByExample.json()["data"][listByExampleIndex]["realName"] | ||
67 | + | ||
68 | + res_HP = backSkinWeighSave(host=host,number=number,tareWeight=tareWeight,carTypeWeight=carTypeWeight, | ||
69 | + plate=plate,trailerNumber=trailerNumber,carTypeCode=carTypeCode, | ||
70 | + carTypeId=carTypeId,carTypeName=carTypeName,tareWeightDate=tareWeightDate, | ||
71 | + outGreeterId=outGreeterId,outGreeterName=outGreeterName) | ||
72 | + print(res_HP.json()) | ||
73 | + return res_HP | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | +# do_backSkinWeighSave(host=host,number="202108120900062") | ||
78 | + | ||
79 | + | ||
80 | + |
report/test.log
1 | -[2021-08-12 16:33:26] [INFO] : ====================================================================================== | ||
2 | -[2021-08-12 16:33:26] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'TsvBl14/rGbpDCzJW90cFe9V5GpmJGbi/KNYKq19ZT70xOzm+QCB8T4FxpRl+px5AQFpi811iQipzcG2fuPDaSMVeZyP0lutOMJejVgp9ZtBqxyUEkzio6E93+s9+/uNgMZDummUdJbQ+zIxaCG6xjmGw803ucr5Fw8r5yHDU4w='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | 1 | +[2021-08-12 18:40:52] [INFO] : ====================================================================================== |
2 | +[2021-08-12 18:40:52] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'TMwrgbaOlLn4QnWUdkq+qALWosYK6LvQBepR5wVm/1WBprZulgw5dCG24lZ/iTc7SLP3FOPc5wQx4e4DfUKSKbT2RqDSrVjdwxH8AjlOhVoaSfaa64yO/IUDamyI8jn8U7R8uphJJzSF5CoJvvZNGvyBcjKaXTIwHMYao46LXGA='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | ||
4 | 4 | ||
5 | -[2021-08-12 16:33:26] [INFO] : ====================================================================================== | ||
6 | -[2021-08-12 16:33:26] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | -{'data': None, 'json': {'userName': 'sygangda', 'password': 'bdP/9I0APbjvB9U43GLWT24JeAyXs484whJD/gafVjUB0TeKcUenuv24aeSU9cSDvwKv9JgaHKgjJ4sCxpoKWH+A1CJrNC2BVL6FKlsrKBLggey8x6pKZheOh3McgcvMIz5Ap/l7AcpbX+KhCaDKkp8TJNEnatFV2h+9hJNr5j8='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | 5 | +[2021-08-12 18:40:53] [INFO] : ====================================================================================== |
6 | +[2021-08-12 18:40:53] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | +{'data': None, 'json': {'userName': 'sygangda', 'password': 'HzgRUgZrF2KHRwq+ZSc+pqDC1SQ2dFCNZdBrWPz3MivsxW/VnxWCKDOSMsQjM5pEW6YOlDCQQb5TYtbQamjkg8/jjt8t1alaAFUQCB6qn5AxeSJudE74YY51yT9KDCtfiQkaCmQgcakkyS6PdCky83HSL1G6XlygNgDb0bdaogk='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | ||
8 | 8 | ||
9 | -[2021-08-12 16:33:26] [INFO] : ====================================================================================== | ||
10 | -[2021-08-12 16:33:26] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | 9 | +[2021-08-12 18:40:53] [INFO] : ====================================================================================== |
10 | +[2021-08-12 18:40:53] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | ||
11 | +None | ||
12 | +{} | ||
13 | + | ||
14 | +[2021-08-12 18:40:54] [INFO] : ====================================================================================== | ||
15 | +[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | ||
11 | {"businessCode": "jmsf"} | 16 | {"businessCode": "jmsf"} |
12 | {} | 17 | {} |
13 | 18 | ||
14 | -[2021-08-12 16:33:27] [INFO] : ====================================================================================== | ||
15 | -[2021-08-12 16:33:27] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | 19 | +[2021-08-12 18:40:54] [INFO] : ====================================================================================== |
20 | +[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | ||
16 | {"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"} | 21 | {"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"} |
17 | {} | 22 | {} |
18 | 23 | ||
19 | -[2021-08-12 16:33:27] [INFO] : ====================================================================================== | ||
20 | -[2021-08-12 16:33:27] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | 24 | +[2021-08-12 18:40:54] [INFO] : ====================================================================================== |
25 | +[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | ||
21 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} | 26 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} |
22 | {} | 27 | {} |
23 | 28 | ||
24 | -[2021-08-12 16:33:27] [INFO] : ====================================================================================== | ||
25 | -[2021-08-12 16:33:27] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | 29 | +[2021-08-12 18:40:54] [INFO] : ====================================================================================== |
30 | +[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | ||
26 | {"pageNum": 100, "pageSize": 100, "marketId": 9} | 31 | {"pageNum": 100, "pageSize": 100, "marketId": 9} |
27 | {} | 32 | {} |
28 | 33 | ||
29 | -[2021-08-12 16:33:27] [INFO] : ====================================================================================== | ||
30 | -[2021-08-12 16:33:27] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | 34 | +[2021-08-12 18:40:55] [INFO] : ====================================================================================== |
35 | +[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
31 | None | 36 | None |
32 | {'params': {'pid': 'goods_tag'}} | 37 | {'params': {'pid': 'goods_tag'}} |
33 | 38 | ||
34 | -[2021-08-12 16:33:27] [INFO] : ====================================================================================== | ||
35 | -[2021-08-12 16:33:27] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | 39 | +[2021-08-12 18:40:55] [INFO] : ====================================================================================== |
40 | +[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | ||
36 | {"province": "C", "city": null, "area": null} | 41 | {"province": "C", "city": null, "area": null} |
37 | {} | 42 | {} |
38 | 43 | ||
39 | -[2021-08-12 16:33:28] [INFO] : ====================================================================================== | ||
40 | -[2021-08-12 16:33:28] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | 44 | +[2021-08-12 18:40:55] [INFO] : ====================================================================================== |
45 | +[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | ||
41 | None | 46 | None |
42 | {'params': {'keyword': ''}} | 47 | {'params': {'keyword': ''}} |
43 | 48 | ||
44 | -[2021-08-12 16:33:28] [INFO] : ====================================================================================== | ||
45 | -[2021-08-12 16:33:28] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | 49 | +[2021-08-12 18:40:56] [INFO] : ====================================================================================== |
50 | +[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
46 | None | 51 | None |
47 | {'params': {'pid': 'prove_type'}} | 52 | {'params': {'pid': 'prove_type'}} |
48 | 53 | ||
49 | -[2021-08-12 16:33:28] [INFO] : ====================================================================================== | ||
50 | -[2021-08-12 16:33:28] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | 54 | +[2021-08-12 18:40:56] [INFO] : ====================================================================================== |
55 | +[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | ||
51 | None | 56 | None |
52 | {} | 57 | {} |
53 | 58 | ||
54 | -[2021-08-12 16:33:29] [INFO] : ====================================================================================== | ||
55 | -[2021-08-12 16:33:29] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
56 | -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddA50009", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14158, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 432, "grossWeightDate": "2021-08-12 16:33:29", "newWeight": 99, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddA50009", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 58, "depName": "\u6c34\u679c\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": "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} | 59 | +[2021-08-12 18:40:56] [INFO] : ====================================================================================== |
60 | +[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
61 | +{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddB67062", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14158, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 432, "grossWeightDate": "2021-08-12 18:40:56", "newWeight": 99, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddB67062", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 58, "depName": "\u6c34\u679c\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": "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} | ||
57 | {} | 62 | {} |
58 | 63 | ||
59 | -[2021-08-12 16:33:29] [INFO] : ====================================================================================== | ||
60 | -[2021-08-12 16:33:29] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action | ||
61 | -{'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': '202108120900027'} | 64 | +[2021-08-12 18:40:57] [INFO] : ====================================================================================== |
65 | +[2021-08-12 18:40:57] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action | ||
66 | +{'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': '202108120900083'} | ||
62 | {} | 67 | {} |
63 | 68 | ||
64 | -[2021-08-12 16:33:30] [INFO] : ====================================================================================== | ||
65 | -[2021-08-12 16:33:30] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/4024.action | 69 | +[2021-08-12 18:40:57] [INFO] : ====================================================================================== |
70 | +[2021-08-12 18:40:57] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/4080.action | ||
66 | None | 71 | None |
67 | {} | 72 | {} |
68 | 73 | ||
69 | -[2021-08-12 16:33:31] [INFO] : ====================================================================================== | ||
70 | -[2021-08-12 16:33:31] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | 74 | +[2021-08-12 18:40:59] [INFO] : ====================================================================================== |
75 | +[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | ||
71 | None | 76 | None |
72 | {} | 77 | {} |
73 | 78 | ||
74 | -[2021-08-12 16:33:32] [INFO] : ====================================================================================== | ||
75 | -[2021-08-12 16:33:32] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | 79 | +[2021-08-12 18:40:59] [INFO] : ====================================================================================== |
80 | +[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | ||
76 | None | 81 | None |
77 | {} | 82 | {} |
78 | 83 | ||
79 | -[2021-08-12 16:33:32] [INFO] : ====================================================================================== | ||
80 | -[2021-08-12 16:33:32] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
81 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 4024, 'goodsId': '4038', 'number': '202108120900027', 'modified': '2021-08-12 16:33:32', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川A50009', 'autocomplete-cartype': '003(板车)', 'carTypeName': '板车', 'carTypeCode': '003', 'carTypeId': '53', 'carTypeWeight': '333', 'storeTareWeight': '', 'proveType': '665', 'grossWeight': '432', 'tareWeight': '333', 'weight': '99', 'goodsNum': '', 'itemWeight': '', 'productPrice': '1.00000', 'unitPrice': '100.0', 'depName': '水果部', 'calcDepId': '58', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '14158', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-12 16:33:30', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-12 16:33:30', 'tareWeightDate': '2021-08-12 16:33:30', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '测试沈阳', 'inGreeterId': '223', 'outGreeterId': '', 'sumPrice': '9900', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | 84 | +[2021-08-12 18:40:59] [INFO] : ====================================================================================== |
85 | +[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
86 | +{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 4080, 'goodsId': '4094', 'number': '202108120900083', 'modified': '2021-08-12 18:40:59', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川B67062', 'autocomplete-cartype': '003(板车)', 'carTypeName': '板车', 'carTypeCode': '003', 'carTypeId': '53', 'carTypeWeight': '333', 'storeTareWeight': '', 'proveType': '665', 'grossWeight': '432', 'tareWeight': '333', 'weight': '99', 'goodsNum': '', 'itemWeight': '', 'productPrice': '1.00000', 'unitPrice': '100.0', 'depName': '水果部', 'calcDepId': '58', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '14158', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-12 18:40:58', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-12 18:40:57', 'tareWeightDate': '2021-08-12 18:40:57', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '测试沈阳', 'inGreeterId': '223', 'outGreeterId': '', 'sumPrice': '9900', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | ||
87 | +{} | ||
88 | + | ||
89 | +[2021-08-12 18:41:00] [INFO] : ====================================================================================== | ||
90 | +[2021-08-12 18:41:00] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doFreeze.action | ||
91 | +protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=4080&goodsId=4094&number=202108120900083&modified=2021-08-12%2018%3A40%3A58&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%9DB67062&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=665&grossWeight=432&tareWeight=333&weight=99&goodsNum=&itemWeight=&productPrice=1.00000&unitPrice=100.0&depName=%E6%B0%B4%E6%9E%9C%E9%83%A8&calcDepId=58&dep=58®ionName=®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=70&chargeTotalAmount=800&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-12%2018%3A40%3A58&remark=&goodsTagIds=663&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-12%2018%3A40%3A57&tareWeightDate=2021-08-12%2018%3A40%3A57&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=&inGreeterId=0&outGreeterId=&sumPrice=9900&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 | ||
82 | {} | 92 | {} |
83 | 93 | ||
84 | -[2021-08-12 16:33:32] [INFO] : ====================================================================================== | ||
85 | -[2021-08-12 16:33:32] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doFreeze.action | ||
86 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=4024&goodsId=4038&number=202108120900027&modified=2021-08-12%2016%3A33%3A30&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%9DA50009&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=665&grossWeight=432&tareWeight=333&weight=99&goodsNum=&itemWeight=&productPrice=1.00000&unitPrice=100.0&depName=%E6%B0%B4%E6%9E%9C%E9%83%A8&calcDepId=58&dep=58®ionName=®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=70&chargeTotalAmount=800&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-12%2016%3A33%3A30&remark=&goodsTagIds=663&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-12%2016%3A33%3A30&tareWeightDate=2021-08-12%2016%3A33%3A30&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=&inGreeterId=0&outGreeterId=&sumPrice=9900&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 | 94 | +[2021-08-12 18:41:04] [INFO] : ====================================================================================== |
95 | +[2021-08-12 18:41:04] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listBackSkinTrucks | ||
96 | +{"plate": "", "number": "", "customerName": "\u957f\u6b4c\u4e70\u5bb6\u7701\u5185\u554a\u554a\u554a\u563f"} | ||
87 | {} | 97 | {} |
88 | 98 |
testcase/test_HP/__init__.py
0 → 100644
testcase/test_HP/test_HP.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | + | ||
3 | +# @Time : 2021/8/12 17:34 | ||
4 | +# @Author : Ljq | ||
5 | +# @File : test_HP.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 | +from commons.api import hpApi | ||
18 | +import time,random | ||
19 | + | ||
20 | +class test_ZCCreate(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 | + cls.ic = rC.returnOptionsItems("testInfo", "cardNumRe") | ||
34 | + | ||
35 | + @classmethod | ||
36 | + def tearDownClass(cls) -> None: | ||
37 | + pass | ||
38 | + | ||
39 | + def test_hp(self): | ||
40 | + plate = f"川B{random.randint(10000,99999)}" | ||
41 | + goods="火龙果" | ||
42 | + cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate,keyword=goods) | ||
43 | + print(cre_res.json()) | ||
44 | + number = cre_res.json()["data"]["number"] | ||
45 | + aa = eFBL.do_freezeOrder(host=self.jmsfHost,attrValue=number) | ||
46 | + res = hpApi.do_backSkinWeighSave(host=self.gatewayHost,number=number) | ||
47 | + assert res.json()["code"]=="200","回皮失败" | ||
48 | + assert "data" in res.text,"回皮失败" | ||
49 | + | ||
50 | + def test_SearchByPlate(self): | ||
51 | + plate = f"川B{random.randint(10000,99999)}" | ||
52 | + goods="火龙果" | ||
53 | + cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate,keyword=goods) | ||
54 | + print(cre_res.json()) | ||
55 | + number = cre_res.json()["data"]["number"] | ||
56 | + aa = eFBL.do_freezeOrder(host=self.jmsfHost,attrValue=number) | ||
57 | + res = hpApi.get_listBackSkinTrucks(host=self.gatewayHost,plate=plate) | ||
58 | + print(res.json()) | ||
59 | + assert res.json()["code"]=="200","车号查询失败" | ||
60 | + assert res.json()["data"][-1]["number"]==number,"车号查询失败" | ||
61 | + | ||
62 | + def test_SearchByCusName(self): | ||
63 | + plate = f"川B{random.randint(10000,99999)}" | ||
64 | + goods="雪莲果" | ||
65 | + ic = self.ic | ||
66 | + customerName= eFBL.get_icCheck(host=self.jmsfHost,ic=ic).json()["data"]["aInfo"]["customerName"] | ||
67 | + print(customerName) | ||
68 | + cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate,keyword=goods) | ||
69 | + print(cre_res.json()) | ||
70 | + number = cre_res.json()["data"]["number"] | ||
71 | + aa = eFBL.do_freezeOrder(host=self.jmsfHost,attrValue=number) | ||
72 | + res = hpApi.get_listBackSkinTrucks(host=self.gatewayHost,customerName=customerName) | ||
73 | + print(res.json()) | ||
74 | + assert res.json()["code"]=="200","车号查询失败" | ||
75 | + assert res.json()["data"][-1]["number"]==number,"车号查询失败" | ||
0 | \ No newline at end of file | 76 | \ No newline at end of file |
testcase/test_ZC/demo.py
@@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
8 | """ | 8 | """ |
9 | 9 | ||
10 | """ | 10 | """ |
11 | - | ||
12 | - | 11 | +import json |
12 | +import random | ||
13 | 13 | ||
14 | a = ["protocolId","pwd","clientRedirectTag","viewType","optType","optUrl","correctInfo","weightType","id","goodsId","number","modified","status","source","updateFeeItems","correctDiscount","totalAmount","customerId","fundAccount","accountId","ic","customerName","customerPhone","payway","plate","autocomplete-cartype","carTypeName","carTypeCode","carTypeId","carTypeWeight","storeTareWeight","proveType","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","dep","regionId","productName","productId","productArea","originId","tradeTypeId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","remark","goodsTagIds","shareRatio","handlingTeam","steveTeamId","handlingRatio","handActualAmount","handManageAmount","handCollectionAmount","marketFlag","totalMoney","receivable","collectionPrice","discountAmount","handReceivableAmount","itemReceivableAmount","correctDiscount","billItems","billItemsDic","billItemCheckIds","103","billItems","billItemDicCheckIds","billItemsDic","billItemCheckIds","106","billItems","receivableAmount","categoryName","categoryId","driverTel","grossWeightDate","tareWeightDate","grossPathName","grossPathId","tarePathId","goodsRemark","inGreeterName","inGreeterId","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepId"] | 14 | a = ["protocolId","pwd","clientRedirectTag","viewType","optType","optUrl","correctInfo","weightType","id","goodsId","number","modified","status","source","updateFeeItems","correctDiscount","totalAmount","customerId","fundAccount","accountId","ic","customerName","customerPhone","payway","plate","autocomplete-cartype","carTypeName","carTypeCode","carTypeId","carTypeWeight","storeTareWeight","proveType","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","dep","regionId","productName","productId","productArea","originId","tradeTypeId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","remark","goodsTagIds","shareRatio","handlingTeam","steveTeamId","handlingRatio","handActualAmount","handManageAmount","handCollectionAmount","marketFlag","totalMoney","receivable","collectionPrice","discountAmount","handReceivableAmount","itemReceivableAmount","correctDiscount","billItems","billItemsDic","billItemCheckIds","103","billItems","billItemDicCheckIds","billItemsDic","billItemCheckIds","106","billItems","receivableAmount","categoryName","categoryId","driverTel","grossWeightDate","tareWeightDate","grossPathName","grossPathId","tarePathId","goodsRemark","inGreeterName","inGreeterId","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepId"] |
15 | b = ["protocolId","pwd","clientRedirectTag","viewType","optType","optUrl","correctInfo","weightType","id","goodsId","number","modified","status","source","updateFeeItems","correctDiscount","totalAmount","customerId","fundAccount","accountId","ic","customerName","customerPhone","payway","plate","autocomplete-cartype","carTypeName","carTypeCode","carTypeId","carTypeWeight","storeTareWeight","proveType","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","calcDepId","dep","regionName","regionId","productName","productId","productArea","parentId","levelType","originId","tradeTypeId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","remark","goodsTagIds","shareRatio","handlingTeam","handActualAmount","handManageAmount","handCollectionAmount","marketFlag","totalMoney","receivable","collectionPrice","discountAmount","handReceivableAmount","itemReceivableAmount","correctDiscount","billItems","billItemsDic","billItemCheckIds","103","billItems","billItemDicCheckIds","billItemsDic","billItemCheckIds","106","billItems","receivableAmount","categoryName","categoryId","driverTel","grossWeightDate","tareWeightDate","grossPathName","grossPathId","tarePathId","goodsRemark","inGreeterName","inGreeterId","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepName","calcFeeDepId","feeDepId"] | 15 | b = ["protocolId","pwd","clientRedirectTag","viewType","optType","optUrl","correctInfo","weightType","id","goodsId","number","modified","status","source","updateFeeItems","correctDiscount","totalAmount","customerId","fundAccount","accountId","ic","customerName","customerPhone","payway","plate","autocomplete-cartype","carTypeName","carTypeCode","carTypeId","carTypeWeight","storeTareWeight","proveType","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","calcDepId","dep","regionName","regionId","productName","productId","productArea","parentId","levelType","originId","tradeTypeId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","remark","goodsTagIds","shareRatio","handlingTeam","handActualAmount","handManageAmount","handCollectionAmount","marketFlag","totalMoney","receivable","collectionPrice","discountAmount","handReceivableAmount","itemReceivableAmount","correctDiscount","billItems","billItemsDic","billItemCheckIds","103","billItems","billItemDicCheckIds","billItemsDic","billItemCheckIds","106","billItems","receivableAmount","categoryName","categoryId","driverTel","grossWeightDate","tareWeightDate","grossPathName","grossPathId","tarePathId","goodsRemark","inGreeterName","inGreeterId","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepName","calcFeeDepId","feeDepId"] |
@@ -30,6 +30,7 @@ print(aa) | @@ -30,6 +30,7 @@ print(aa) | ||
30 | print(bb) | 30 | print(bb) |
31 | 31 | ||
32 | from bs4 import BeautifulSoup | 32 | from bs4 import BeautifulSoup |
33 | +import random | ||
33 | 34 | ||
34 | with open("demo_a.html",encoding="utf-8") as com: | 35 | with open("demo_a.html",encoding="utf-8") as com: |
35 | data = com.read() | 36 | data = com.read() |
@@ -38,4 +39,9 @@ with open("demo_a.html",encoding="utf-8") as com: | @@ -38,4 +39,9 @@ with open("demo_a.html",encoding="utf-8") as com: | ||
38 | 39 | ||
39 | orderDetailsList = BeautifulSoup(data, "html.parser").findAll("input") | 40 | orderDetailsList = BeautifulSoup(data, "html.parser").findAll("input") |
40 | orderDetailsDict = {i.get("name"): i.get("value") for i in orderDetailsList} | 41 | orderDetailsDict = {i.get("name"): i.get("value") for i in orderDetailsList} |
41 | -print(orderDetailsDict) | ||
42 | \ No newline at end of file | 42 | \ No newline at end of file |
43 | +print(orderDetailsDict) | ||
44 | + | ||
45 | +print(random.randint(1,9)) | ||
46 | + | ||
47 | +a = [1,2,3,4] | ||
48 | +print(a[-1]) | ||
43 | \ No newline at end of file | 49 | \ No newline at end of file |
testcase/test_ZC/test_ZC.py
@@ -128,7 +128,7 @@ class test_demo(unittest.TestCase): | @@ -128,7 +128,7 @@ class test_demo(unittest.TestCase): | ||
128 | depName="水果部",goodsTagName="货物标签测试",proveName="绿色蔬菜") | 128 | depName="水果部",goodsTagName="货物标签测试",proveName="绿色蔬菜") |
129 | print(cre_res.json()) | 129 | print(cre_res.json()) |
130 | number = cre_res.json()["data"]["number"] | 130 | number = cre_res.json()["data"]["number"] |
131 | - # aa = eFBL.do_freezeOrder(attrValue=number) | 131 | + aa = eFBL.do_freezeOrder(attrValue=number) |
132 | # aa = eFBL.do_payOrder(attrValue=number) | 132 | # aa = eFBL.do_payOrder(attrValue=number) |
133 | # cre_res = zcA.create_jmsf(host=self.gatewayHost) | 133 | # cre_res = zcA.create_jmsf(host=self.gatewayHost) |
134 | # print(cre_res.json()) | 134 | # print(cre_res.json()) |