Commit 5883669c54a35fbcd642faa3d069228cba5e17f6

Authored by liujiqiang
1 parent d1bd1cdf

文件上传

commons/api/entranceFeeBillList.py
... ... @@ -243,7 +243,8 @@ def do_doPay(host="",autocompletecartype=None,fee_str="",**kwargs):
243 243 res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers)
244 244 return res
245 245  
246   -def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900032",pwd="111111"):
  246 +def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900032",pwd="111111",
  247 + ic=888810032426):
247 248 a = listPage(host=host, attrName=attrName, attrValue=attrValue)
248 249 print("listPage", a.json())
249 250 orderId = a.json()["rows"][0]["id"]
... ... @@ -299,7 +300,6 @@ def do_payOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号"
299 300  
300 301  
301 302 # 用户信息获取
302   - ic = 888810032426
303 303 res = get_icCheck(host=host, ic=ic)
304 304 print(res.text)
305 305 customerId = res.json()["data"]["aInfo"]["customerId"]
... ...
config/marketConfig/test_config_hg.conf
... ... @@ -12,7 +12,7 @@ cCNumB=110101199903077593
12 12 #入库未开卡的卡号
13 13 cardNum=210607113166
14 14 #已开卡的卡号
15   -cardNumRe=888800001207
  15 +cardNumRe=888810032426
16 16 #密码设置
17 17 loginPwd=111111
18 18  
... ...
report/test.log
1   -[2021-08-10 15:40:03] [INFO] : ======================================================================================
2   -[2021-08-10 15:40:03] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
3   -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'e5gw9dDaOPPEZkiK6zSJUURUHcHxUHrDwJEJhc1pD2mEJUFLgiMBIf1yRrsRPqHmztKH9eI6BE7MqxIJWFfHVjaVwPxyjd4bSUevO3IRZeKEphQfaiOVr28UMDTvi3EWvlhML8YJDe+syTlboul0mwDdLY940xVaOjuDrWOw6zU='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
  1 +[2021-08-10 17:26:46] [INFO] : ======================================================================================
  2 +[2021-08-10 17:26:46] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  3 +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'fYr4z+Wz7W/N49WNNryzkbksWNE7dwuREMcjAbmp8I/PazTMaGkBAXBdE2pcDPnQb99N/kCJNysDVblJaaCThtEttuSNaw1YP+MELSqPGtFdfS2b555/Wl4YN3lXAku2DQZwEoiR1OdG0XvEylsB9oQSxt7QjJZJZRQ50959zJ0='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
4 4  
5   -[2021-08-10 15:40:04] [INFO] : ======================================================================================
6   -[2021-08-10 15:40:04] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
7   -{'data': None, 'json': {'userName': 'sygangda', 'password': 'UBxtkYEVDcwm4E6LPccZ7zoEbHtWWk2YVGkazHSADOQt3Bnsmlxrk8+WrVH6NdFcGXKdptdoWINzxpbaFsw++lAvxYjPMG/zRNh/FG1lj9Pyb4UrBqxfVXzh2vSU1QzqHam4yZTlbg3GAqHYQx9vwxVvHgr3SfSfodgFjq77frc='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
  5 +[2021-08-10 17:26:46] [INFO] : ======================================================================================
  6 +[2021-08-10 17:26:46] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  7 +{'data': None, 'json': {'userName': 'sygangda', 'password': 'ExWrgYxXAYJc5cmP6sXkoY5dL7qXJnW6RnjJhlp0Y3I2qMu6C7o56WjWYGKdlrt9TSGx7nUAtoJSOvnuQWps5w2KhqUXtdWY8TX6nR0y+Cbii1LHIafMj92jNYCsJ7tRBOWZGHgWzLrwoC1tcJrB01mgVswpR7/SBxjaGmBUUwc='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
8 8  
9   -[2021-08-10 15:40:04] [INFO] : ======================================================================================
10   -[2021-08-10 15:40:04] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType
  9 +[2021-08-10 17:26:47] [INFO] : ======================================================================================
  10 +[2021-08-10 17:26:47] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType
11 11 {"businessCode": "jmsf"}
12 12 {}
13 13  
14   -[2021-08-10 15:40:04] [INFO] : ======================================================================================
15   -[2021-08-10 15:40:04] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree
  14 +[2021-08-10 17:26:47] [INFO] : ======================================================================================
  15 +[2021-08-10 17:26:47] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree
16 16 {"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"}
17 17 {}
18 18  
19   -[2021-08-10 15:40:05] [INFO] : ======================================================================================
20   -[2021-08-10 15:40:05] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api
  19 +[2021-08-10 17:26:47] [INFO] : ======================================================================================
  20 +[2021-08-10 17:26:47] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api
21 21 {"firmCode": "sy", "departmentId": 58, "keyword": ""}
22 22 {}
23 23  
24   -[2021-08-10 15:40:05] [INFO] : ======================================================================================
25   -[2021-08-10 15:40:05] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query
  24 +[2021-08-10 17:26:47] [INFO] : ======================================================================================
  25 +[2021-08-10 17:26:47] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query
26 26 {"pageNum": 100, "pageSize": 100, "marketId": 9}
27 27 {}
28 28  
29   -[2021-08-10 15:40:05] [INFO] : ======================================================================================
30   -[2021-08-10 15:40:05] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
  29 +[2021-08-10 17:26:47] [INFO] : ======================================================================================
  30 +[2021-08-10 17:26:47] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
31 31 None
32 32 {'params': {'pid': 'goods_tag'}}
33 33  
34   -[2021-08-10 15:40:05] [INFO] : ======================================================================================
35   -[2021-08-10 15:40:05] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address
  34 +[2021-08-10 17:26:48] [INFO] : ======================================================================================
  35 +[2021-08-10 17:26:48] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address
36 36 {"province": "C", "city": null, "area": null}
37 37 {}
38 38  
39   -[2021-08-10 15:40:06] [INFO] : ======================================================================================
40   -[2021-08-10 15:40:06] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep
  39 +[2021-08-10 17:26:48] [INFO] : ======================================================================================
  40 +[2021-08-10 17:26:48] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep
41 41 None
42 42 {'params': {'keyword': ''}}
43 43  
44   -[2021-08-10 15:40:06] [INFO] : ======================================================================================
45   -[2021-08-10 15:40:06] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
  44 +[2021-08-10 17:26:49] [INFO] : ======================================================================================
  45 +[2021-08-10 17:26:49] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
46 46 None
47 47 {'params': {'pid': 'prove_type'}}
48 48  
49   -[2021-08-10 15:40:06] [INFO] : ======================================================================================
50   -[2021-08-10 15:40:06] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action
  49 +[2021-08-10 17:26:49] [INFO] : ======================================================================================
  50 +[2021-08-10 17:26:49] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action
51 51 None
52 52 {}
53 53  
54   -[2021-08-10 15:40:06] [INFO] : ======================================================================================
55   -[2021-08-10 15:40:06] [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-10 15:40:06", "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}
  54 +[2021-08-10 17:26:49] [INFO] : ======================================================================================
  55 +[2021-08-10 17:26:49] [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-10 17:26:49", "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 57 {}
58 58  
59   -[2021-08-10 15:40:07] [INFO] : ======================================================================================
60   -[2021-08-10 15:40:07] [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': '202108100900022'}
  59 +[2021-08-10 17:26:50] [INFO] : ======================================================================================
  60 +[2021-08-10 17:26:50] [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': '202108100900062'}
  62 +{}
  63 +
  64 +[2021-08-10 17:26:50] [INFO] : ======================================================================================
  65 +[2021-08-10 17:26:50] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/3839.action
  66 +None
  67 +{}
  68 +
  69 +[2021-08-10 17:26:51] [INFO] : ======================================================================================
  70 +[2021-08-10 17:26:51] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426
  71 +None
  72 +{}
  73 +
  74 +[2021-08-10 17:26:52] [INFO] : ======================================================================================
  75 +[2021-08-10 17:26:52] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州
  76 +None
  77 +{}
  78 +
  79 +[2021-08-10 17:26:52] [INFO] : ======================================================================================
  80 +[2021-08-10 17:26:52] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action
  81 +{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 3839, 'goodsId': '3853', 'number': '202108100900062', 'modified': '2021-08-10 17:26:52', '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-10 17:26:49', 'remark': 'false', 'goodsTagIds': '1900', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-10 17:26:49', 'tareWeightDate': '2021-08-10 17:26:49', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '2000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''}
  82 +{}
  83 +
  84 +[2021-08-10 17:26:53] [INFO] : ======================================================================================
  85 +[2021-08-10 17:26:53] [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=3839&goodsId=3853&number=202108100900062&modified=2021-08-10%2017%3A26%3A49&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&regionName=&regionId=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-10%2017%3A26%3A49&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-10%2017%3A26%3A49&tareWeightDate=2021-08-10%2017%3A26%3A49&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
  87 +{}
  88 +
  89 +[2021-08-10 17:26:58] [INFO] : ======================================================================================
  90 +[2021-08-10 17:26:58] [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': 'pay', 'attrValue': '沈阳'}
62 92 {}
63 93  
... ...
testcase/test_ZC/demo.py
... ... @@ -10,14 +10,11 @@
10 10 """
11 11  
12 12 import re
13   -from bs4 import BeautifulSoup
  13 +from commons import ConfigDB as CoDB
14 14  
15   -with open('demo_b.html',encoding="utf-8") as con:
16   - data = con.read()
17   -soup = BeautifulSoup(data,"html.parser")
18   -all_list = soup.findAll("input")
19   -aa = {i.get("name"):i.get("value") for i in all_list}
20   -print(aa)
21   -# print(aa["autocomplete-cartype"])
22   -# c = [i.get("value") for i in soup.findAll("input") if i.get("name")=="categoryName"]
23   -# print(c)
24 15 \ No newline at end of file
  16 +res = CoDB.mysql_selectAll('SELECT number FROM entrance_fee_bill WHERE number in ("202108100900029","202108100900023")')
  17 +print(res)
  18 +a = [i[0] for i in res]
  19 +print(a)
  20 +a_str = ",".join(a)
  21 +print(a_str)
25 22 \ No newline at end of file
... ...
testcase/test_listPage/test_listPage.py
... ... @@ -14,12 +14,13 @@ import json
14 14 import unittest
15 15 from commons.scripts.readConf import rC
16 16 from commons.api import zcApi as zcA
  17 +from commons import ConfigDB as CoDB
17 18 from commons.MySession import my
18 19 from commons.api import entranceFeeBillList as eFBL
19 20 import time,random
20 21  
21 22 class test_listPage(unittest.TestCase):
22   - """整车-创建整车进门单基础信息接口测试"""
  23 + """进门单列表:attr进门单属性查询测试"""
23 24 def setUp(self) -> None:
24 25 pass
25 26  
... ... @@ -31,12 +32,14 @@ class test_listPage(unittest.TestCase):
31 32 def setUpClass(cls) -> None:
32 33 cls.gatewayHost = rC.returnOptionsItems("host", "gatewayHost")
33 34 cls.jmsfHost = rC.returnOptionsItems("host", "jmsfHost")
  35 + cls.ic = rC.returnOptionsItems("testInfo", "cardNumRe")
34 36  
35 37 @classmethod
36 38 def tearDownClass(cls) -> None:
37 39 pass
38 40  
39 41 def test_searchByNumber(self):
  42 + """进门单列表-查询:收费单号查询测试"""
40 43 cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword="雪莲果",
41 44 userName="ty_test",transactionName="沈阳2号",newWeight=20,
42 45 depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
... ... @@ -46,12 +49,105 @@ class test_listPage(unittest.TestCase):
46 49 assert resListPage.json()["rows"][0]["number"] == number,"按照收费单号查询失败"
47 50 assert len(resListPage.json()["rows"]) == 1,"按照收费单号查询失败"
48 51  
49   - def test_searchByNumber(self):
  52 + def test_searchByPlate(self):
  53 + """进门单列表-查询:车牌号查询测试"""
  54 + plate = f"川A{random.randint(10000,99999)}"
  55 + print("create plate number: ",plate)
  56 + cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate=plate,keyword="雪莲果",
  57 + userName="ty_test",transactionName="沈阳2号",newWeight=20,
  58 + depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
  59 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="车号",attrValue=plate)
  60 + print(resListPage.json())
  61 + assert resListPage.json()["rows"][0]["plate"] == plate,"按照车牌号查询失败"
  62 +
  63 + def test_searchByGoods(self):
  64 + """进门单列表-查询:商品查询测试"""
  65 + goods = "圣女果"
  66 + cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword=goods,
  67 + userName="ty_test",transactionName="沈阳2号",newWeight=20,
  68 + depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
  69 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="商品",attrValue=goods)
  70 + print(resListPage.json())
  71 + assert resListPage.json()["rows"][0]["productName"] == goods,"按照商品查询失败"
  72 +
  73 + def test_searchByTollman(self):
  74 + """进门单列表-查询:收费员查询测试"""
50 75 cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword="雪莲果",
51 76 userName="ty_test",transactionName="沈阳2号",newWeight=20,
52 77 depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
53 78 number = cre_res.json()["data"]["number"]
54   - resListPage = eFBL.listPage(host=self.jmsfHost,attrValue=number)
  79 +
  80 + # 进门单缴费
  81 + eFBL.do_payOrder(host=self.jmsfHost,attrValue=number)
  82 + payUser = my.userInfo["data"]["user"]["realName"]
  83 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="收费员",attrValue=payUser)
  84 + numberList = [i["number"] for i in resListPage.json()["rows"]]
  85 + numberStr = ",".join(numberList)
  86 + # 缴费状态验证
  87 + assert resListPage.json()["rows"][0]["status"] == "已缴费","收费状态错误"
  88 + # 查询结果验证
  89 + cashier_name = CoDB.mysql_selectAll(f'SELECT cashier_name FROM entrance_fee_bill WHERE number in ({numberStr})')
  90 + cashier_name_list = [i[0] for i in cashier_name]
  91 + assert cashier_name_list[0] == payUser, "按照收费员查询失败"
  92 +
  93 + def test_searchByCname(self):
  94 + """进门单列表-查询:客户名称查询测试"""
  95 + ic = self.ic
  96 + cName = eFBL.get_icCheck(host=self.jmsfHost,ic=ic).json()["data"]["aInfo"]["customerName"]
  97 + # 创建进门单
  98 + cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword="雪莲果",
  99 + userName="ty_test",transactionName="沈阳2号",newWeight=20,
  100 + depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
  101 + number = cre_res.json()["data"]["number"]
  102 +
  103 + # 进门单缴费
  104 + eFBL.do_payOrder(host=self.jmsfHost,attrValue=number,ic=ic)
  105 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="客户姓名",attrValue=cName)
55 106 print(resListPage.json())
56   - assert resListPage.json()["rows"][0]["number"] == number,"按照收费单号查询失败"
57   - assert len(resListPage.json()["rows"]) == 1,"按照收费单号查询失败"
58 107 \ No newline at end of file
  108 + cNameList = list(set([i["customerName"] for i in resListPage.json()["rows"]]))
  109 + print(cNameList)
  110 + # 缴费状态验证
  111 + assert resListPage.json()["rows"][0]["status"] == "已缴费","按照客户姓名查询失败"
  112 + assert len(cNameList)==1,"按照客户姓名查询失败"
  113 + assert cName == cNameList[0], "按照客户姓名查询失败"
  114 +
  115 + def test_searchByIc(self):
  116 + """进门单列表-查询:客户卡号查询测试"""
  117 + ic = self.ic
  118 + # 创建进门单
  119 + cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword="雪莲果",
  120 + userName="ty_test",transactionName="沈阳2号",newWeight=20,
  121 + depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
  122 + number = cre_res.json()["data"]["number"]
  123 +
  124 + # 进门单缴费
  125 + eFBL.do_payOrder(host=self.jmsfHost,attrValue=number,ic=ic)
  126 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="客户卡号",attrValue=ic)
  127 + print(resListPage.json())
  128 + icList = list(set([i["ic"] for i in resListPage.json()["rows"]]))
  129 + print(icList)
  130 + # 缴费状态验证
  131 + assert resListPage.json()["rows"][0]["status"] == "已缴费","按照客户卡号查询失败"
  132 + assert len(icList)==1,"按照客户卡号查询失败"
  133 + assert ic == icList[0], "按照客户卡号查询失败"
  134 +
  135 + def test_searchByPhone(self):
  136 + """进门单列表-查询:手机号码询测试"""
  137 + ic = self.ic
  138 + cPhone = eFBL.get_icCheck(host=self.jmsfHost,ic=ic).json()["data"]["aInfo"]["customerContactsPhone"]
  139 + # 创建进门单并缴费
  140 + cre_res = zcA.create_jmsf(host=self.gatewayHost,carTypeName="板车",plate="川B00001",keyword="雪莲果",
  141 + userName="ty_test",transactionName="沈阳2号",newWeight=20,
  142 + depName="接车部",goodsTagName="货物标签测试",proveName="绿色蔬菜")
  143 + number = cre_res.json()["data"]["number"]
  144 + eFBL.do_payOrder(host=self.jmsfHost,attrValue=number,ic=ic)
  145 + # 查询进门单
  146 + resListPage = eFBL.listPage(host=self.jmsfHost,attrName="手机号码",attrValue=cPhone)
  147 + numberList = [i["number"] for i in resListPage.json()["rows"]]
  148 + numberStr = ",".join(numberList)
  149 + cPhoneFromDb = CoDB.mysql_selectAll(f'SELECT customer_phone FROM entrance_fee_bill WHERE number in ({numberStr});')
  150 + cPhoneList = list(set([i[0] for i in cPhoneFromDb]))
  151 + # 缴费状态验证
  152 + assert resListPage.json()["rows"][0]["status"] == "已缴费","按照客户姓名查询失败"
  153 + assert cPhone == cPhoneList[0], "按照客户姓名查询失败"
  154 +
... ...