Commit da8ca43af61bf026c453c6bc0b1bb3e8fe57bb04
1 parent
f8b5fb7e
文件上传
Showing
3 changed files
with
136 additions
and
67 deletions
report/test.log
1 | -[2021-08-06 17:47:43] [INFO] : ====================================================================================== | ||
2 | -[2021-08-06 17:47:43] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'nlOSkQxwrWzmePVqT3dyvOrguE30v5DlCA5nMYmVKA44kRbTqNg9YPpp+v1jpKV0stUOR7XDtVGPACdU1wKfbeqjrgFy4PKd5EUDeADP2kl2mzYdW795Lm2vab3Pf36N0rtRatXdAsI7KNT7DoKgicHrBXAsR9r9BNOuh2TcKuE='}, '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 17:47:43] [INFO] : ====================================================================================== | ||
6 | -[2021-08-06 17:47:43] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | -{'data': None, 'json': {'userName': 'sygangda', 'password': 'fnPe6E0qGfzHqjbIW4Jvu4Yx5WsWkLrnOANTMzNDP11uhBVRGF6SnDrFx+fE9Qe+P0gX9uInKVlmyn3cus4MAvuLU1oJN4Id4N4c/VaIa2cPSKkUfNxfujAcgRs1ieJaw9zPwFA1fRlIukdjF5BmefA+YOOcC/CeFXcUu3vvMOE='}, '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 17:47:43] [INFO] : ====================================================================================== | ||
10 | -[2021-08-06 17:47:43] [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 | ||
11 | {"businessCode": "jmsf"} | 11 | {"businessCode": "jmsf"} |
12 | {} | 12 | {} |
13 | 13 | ||
14 | -[2021-08-06 17:47:44] [INFO] : ====================================================================================== | ||
15 | -[2021-08-06 17:47:44] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | ||
16 | -{"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"} | ||
17 | {} | 17 | {} |
18 | 18 | ||
19 | -[2021-08-06 17:47:44] [INFO] : ====================================================================================== | ||
20 | -[2021-08-06 17:47:44] [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 | ||
21 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} | 21 | {"firmCode": "sy", "departmentId": 58, "keyword": ""} |
22 | {} | 22 | {} |
23 | 23 | ||
24 | -[2021-08-06 17:47:44] [INFO] : ====================================================================================== | ||
25 | -[2021-08-06 17:47:44] [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 | ||
26 | {"pageNum": 100, "pageSize": 100, "marketId": 9} | 26 | {"pageNum": 100, "pageSize": 100, "marketId": 9} |
27 | {} | 27 | {} |
28 | 28 | ||
29 | -[2021-08-06 17:47:44] [INFO] : ====================================================================================== | ||
30 | -[2021-08-06 17:47:44] [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 | ||
31 | None | 31 | None |
32 | {'params': {'pid': 'goods_tag'}} | 32 | {'params': {'pid': 'goods_tag'}} |
33 | 33 | ||
34 | -[2021-08-06 17:47:45] [INFO] : ====================================================================================== | ||
35 | -[2021-08-06 17:47:45] [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 | ||
36 | {"province": "C", "city": null, "area": null} | 36 | {"province": "C", "city": null, "area": null} |
37 | {} | 37 | {} |
38 | 38 | ||
39 | -[2021-08-06 17:47:45] [INFO] : ====================================================================================== | ||
40 | -[2021-08-06 17:47:45] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | 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 | ||
41 | None | 41 | None |
42 | {'params': {'keyword': ''}} | 42 | {'params': {'keyword': ''}} |
43 | 43 | ||
44 | -[2021-08-06 17:47:45] [INFO] : ====================================================================================== | ||
45 | -[2021-08-06 17:47:45] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | 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 | ||
46 | None | 46 | None |
47 | {'params': {'pid': 'prove_type'}} | 47 | {'params': {'pid': 'prove_type'}} |
48 | 48 | ||
49 | -[2021-08-06 17:47:46] [INFO] : ====================================================================================== | ||
50 | -[2021-08-06 17:47:46] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | 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 | ||
51 | None | 51 | None |
52 | {} | 52 | {} |
53 | 53 | ||
54 | -[2021-08-06 17:47:46] [INFO] : ====================================================================================== | ||
55 | -[2021-08-06 17:47:46] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
56 | -{"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 17:47:46", "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} | ||
57 | -{} | ||
58 | - | ||
59 | -[2021-08-06 17:47:48] [INFO] : ====================================================================================== | ||
60 | -[2021-08-06 17:47:48] [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': '202108060900038'} | ||
62 | -{} | ||
63 | - | ||
64 | -[2021-08-06 17:47:49] [INFO] : ====================================================================================== | ||
65 | -[2021-08-06 17:47:49] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/3764.action | ||
66 | -None | ||
67 | -{} | ||
68 | - | ||
69 | -[2021-08-06 17:47:50] [INFO] : ====================================================================================== | ||
70 | -[2021-08-06 17:47:50] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | ||
71 | -None | ||
72 | -{} | ||
73 | - | ||
74 | -[2021-08-06 17:47:57] [INFO] : ====================================================================================== | ||
75 | -[2021-08-06 17:47:57] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | ||
76 | -None | ||
77 | -{} | ||
78 | - | ||
79 | -[2021-08-06 17:47:57] [INFO] : ====================================================================================== | ||
80 | -[2021-08-06 17:47:57] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
81 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 3764, 'goodsId': '3778', 'number': '202108060900038', 'modified': '2021-08-06 17:47:57', '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 17:47:48', 'remark': 'false', 'goodsTagIds': '1900', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-06 17:47:47', 'tareWeightDate': '2021-08-06 17:47:47', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '2000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | ||
82 | -{} | ||
83 | - | ||
84 | -[2021-08-06 17:47:58] [INFO] : ====================================================================================== | ||
85 | -[2021-08-06 17:47:58] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action | ||
86 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=3764&goodsId=3778&number=202108060900038&modified=2021-08-06%2017%3A47%3A48&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%2017%3A47%3A48&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%2017%3A47%3A47&tareWeightDate=2021-08-06%2017%3A47%3A47&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} | ||
87 | {} | 57 | {} |
88 | 58 |
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_ZCCreate.py
@@ -9,8 +9,15 @@ | @@ -9,8 +9,15 @@ | ||
9 | 整车进门但创建测试 | 9 | 整车进门但创建测试 |
10 | """ | 10 | """ |
11 | 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 | + | ||
12 | class test_ZCCreate(unittest.TestCase): | 19 | class test_ZCCreate(unittest.TestCase): |
13 | - """整车-创建整车进门单基础信息接口测试""" | 20 | + """整车-创建整车进门单""" |
14 | def setUp(self) -> None: | 21 | def setUp(self) -> None: |
15 | pass | 22 | pass |
16 | 23 | ||
@@ -25,4 +32,96 @@ class test_ZCCreate(unittest.TestCase): | @@ -25,4 +32,96 @@ class test_ZCCreate(unittest.TestCase): | ||
25 | 32 | ||
26 | @classmethod | 33 | @classmethod |
27 | def tearDownClass(cls) -> None: | 34 | def tearDownClass(cls) -> None: |
28 | - pass | ||
29 | \ No newline at end of file | 35 | \ No newline at end of file |
36 | + pass | ||
37 | + | ||
38 | + def test_creZC(self): | ||
39 | + """整车-整车创建:按接车员名称信息查询接车员""" | ||
40 | + """整车-整车创建:获取车型接口调用测试""" | ||
41 | + # 依赖数据 | ||
42 | + plate = "川A12323" | ||
43 | + productState = "1" | ||
44 | + trailerNumber = plate | ||
45 | + | ||
46 | + # 获取车型 | ||
47 | + carType = zcA.get_carType(host=self.gatewayHost) | ||
48 | + print(carType.text) | ||
49 | + print(carType.json()["data"][0]) | ||
50 | + carTypeCode = carType.json()["data"][0]["code"] | ||
51 | + carTypeId = carType.json()["data"][0]["id"] | ||
52 | + carTypeName = carType.json()["data"][0]["carTypeName"] | ||
53 | + carTypeWeight = carType.json()["data"][0]["weight"] | ||
54 | + | ||
55 | + # 获取商品 | ||
56 | + categoryByCondition = zcA.get_listCategoryByCondition(host=self.gatewayHost) | ||
57 | + print(categoryByCondition.json()) | ||
58 | + cateId = categoryByCondition.json()["data"][0]["id"] | ||
59 | + productId = categoryByCondition.json()["data"][0]["id"] | ||
60 | + productName = categoryByCondition.json()["data"][0]["name"] | ||
61 | + productCode = categoryByCondition.json()["data"][0]["keycode"] | ||
62 | + | ||
63 | + # 获取接车员 | ||
64 | + listByExample = zcA.get_listByExample(host=self.gatewayHost) | ||
65 | + print(listByExample.json()) | ||
66 | + inGreeterId = listByExample.json()["data"][0]["id"] | ||
67 | + inGreeterName = listByExample.json()["data"][0]["realName"] | ||
68 | + | ||
69 | + # 获取交易类型 | ||
70 | + transactionType = zcA.query_transactionType(host=self.gatewayHost) | ||
71 | + print(transactionType.json()) | ||
72 | + tradeType = transactionType.json()["rows"][0]["code"] | ||
73 | + tradeTypeId = transactionType.json()["rows"][0]["id"] | ||
74 | + tradeTypeName = transactionType.json()["rows"][0]["name"] | ||
75 | + | ||
76 | + # 获取货物标签 | ||
77 | + goodsTag = zcA.get_goodsTag(host=self.gatewayHost) | ||
78 | + print(goodsTag.json()) | ||
79 | + goodsTagId = goodsTag.json()["data"][0]["id"] | ||
80 | + | ||
81 | + # 产地信息获取 | ||
82 | + address = zcA.get_address(host=self.gatewayHost) | ||
83 | + print(address.json()) | ||
84 | + originId = address.json()["data"][0]["id"] | ||
85 | + origin = address.json()["data"][0]["name"] | ||
86 | + originCode = address.json()["data"][0]["cityCode"] | ||
87 | + | ||
88 | + # 查询部门信息 | ||
89 | + depRes = zcA.get_dep(host=self.gatewayHost) | ||
90 | + print(depRes.json()) | ||
91 | + feeDepId = depRes.json()["data"][0]["id"] | ||
92 | + feeDepName = depRes.json()["data"][0]["name"] | ||
93 | + | ||
94 | + # 获取证明类型 | ||
95 | + proveType = zcA.get_proveType(host=self.gatewayHost) | ||
96 | + print(proveType.json()) | ||
97 | + proveTypeCode = proveType.json()["data"][0]["id"] | ||
98 | + proveTypeName = proveType.json()["data"][0]["name"] | ||
99 | + | ||
100 | + # 获取防重token | ||
101 | + duplicateTokenRes = zcA.get_duplicateToken(host=self.gatewayHost) | ||
102 | + print(duplicateTokenRes.json()) | ||
103 | + duplicateToken = duplicateTokenRes.json()["data"] | ||
104 | + | ||
105 | + # 重量信息准备 | ||
106 | + grossWeight = random.randint(carTypeWeight, carTypeWeight + 100) | ||
107 | + tareWeight = carTypeWeight | ||
108 | + weighmanRecord = {"grossWeight": None, "grossWeightDate": "", "newWeight": None, "tareWeight": None, | ||
109 | + "tareWeightDate": None, "weighImgs": []} | ||
110 | + weighmanRecord["grossWeight"] = grossWeight | ||
111 | + weighmanRecord["tareWeight"] = carTypeWeight | ||
112 | + weighmanRecord["newWeight"] = grossWeight - carTypeWeight | ||
113 | + weighmanRecord["grossWeightDate"] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | ||
114 | + | ||
115 | + # 创建进门单 | ||
116 | + cre_res = zcA.create_wholeCarWeighSave(host=self.gatewayHost, duplicateToken=duplicateToken, | ||
117 | + carTypeCode=carTypeCode, carTypeId=carTypeId, | ||
118 | + carTypeName=carTypeName, carTypeWeight=carTypeWeight, plate=plate, | ||
119 | + productId=productId, productName=productName, | ||
120 | + proveTypeCode=proveTypeCode, | ||
121 | + proveTypeName=proveTypeName, trailerNumber=trailerNumber, | ||
122 | + depName=feeDepName, | ||
123 | + cateId=cateId, originId=originId, origin=origin, originCode=originCode, | ||
124 | + tradeType=tradeType, tradeTypeName=tradeTypeName, | ||
125 | + productState=productState, | ||
126 | + tradeTypeId=tradeTypeId, goodsTagId=goodsTagId, inGreeterId=inGreeterId, | ||
127 | + inGreeterName=inGreeterName, dep=feeDepId, weighmanRecord=weighmanRecord) | ||
128 | + print(cre_res.json()) | ||
30 | \ No newline at end of file | 129 | \ No newline at end of file |