Commit eadfa36cca48f7aac1fda4ab2ab913ea59e87c45

Authored by liujiqiang
1 parent a0e72c42

进门缴费

commons/api/entranceFeeBillList.py
@@ -249,7 +249,7 @@ def do_doPay(host="",autocompletecartype=None,fee_str="",**kwargs): @@ -249,7 +249,7 @@ def do_doPay(host="",autocompletecartype=None,fee_str="",**kwargs):
249 249
250 250
251 251
252 -a = listPage(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108050900003") 252 +a = listPage(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900012")
253 print("listPage",a.json()) 253 print("listPage",a.json())
254 orderId = a.json()["rows"][0]["id"] 254 orderId = a.json()["rows"][0]["id"]
255 number = a.json()["rows"][0]["number"] 255 number = a.json()["rows"][0]["number"]
@@ -346,10 +346,12 @@ billItemCheckIdsV = re.findall('" maxlength="15" data-old="(.*?)"',res.text)[0] @@ -346,10 +346,12 @@ billItemCheckIdsV = re.findall('" maxlength="15" data-old="(.*?)"',res.text)[0]
346 receivable = re.findall('id="creceivableLong" name="receivable" value="(.*?)">',res.text)[0] 346 receivable = re.findall('id="creceivableLong" name="receivable" value="(.*?)">',res.text)[0]
347 347
348 348
  349 +
349 soup = BeautifulSoup(res.text, "html.parser") 350 soup = BeautifulSoup(res.text, "html.parser")
350 # 查找dl标签class为包含'ui-font-'字符的所有dl标签 351 # 查找dl标签class为包含'ui-font-'字符的所有dl标签
351 fee_str = "correctDiscount=1&billItems=&billItemsDic=" 352 fee_str = "correctDiscount=1&billItems=&billItemsDic="
352 fee_int = 0 353 fee_int = 0
  354 +discount_amount = 0
353 for tag in soup.findAll("div", class_="d-flex align-items-center"): 355 for tag in soup.findAll("div", class_="d-flex align-items-center"):
354 print("=============================================") 356 print("=============================================")
355 c = tag.findAll("input") 357 c = tag.findAll("input")
@@ -360,43 +362,50 @@ for tag in soup.findAll("div", class_="d-flex align-items-center"): @@ -360,43 +362,50 @@ for tag in soup.findAll("div", class_="d-flex align-items-center"):
360 fee_str = fee_str + "&" + i.get("name") + "=" + urllib.parse.quote(i.get("value")) 362 fee_str = fee_str + "&" + i.get("name") + "=" + urllib.parse.quote(i.get("value"))
361 if i.get("type") == "text": 363 if i.get("type") == "text":
362 print("---------------- f 2 s----------------") 364 print("---------------- f 2 s----------------")
  365 + print(i)
  366 + print(i.get("value"))
363 fee_int = fee_int+int(float(i.get("value"))) 367 fee_int = fee_int+int(float(i.get("value")))
364 print("---------------- f 2 e----------------") 368 print("---------------- f 2 e----------------")
  369 + if "优惠" in i.get("value"):
  370 + discount_amount = discount_amount+int(json.loads(i.get("value"))["receivable"])/100
365 # fee_int = fee_int+int(i.get("value")) 371 # fee_int = fee_int+int(i.get("value"))
366 -print(fee_str)  
367 -print(fee_int)  
368 -  
369 -# pwd = "111111"  
370 -# id = orderId  
371 -# totalAmount = totalMoney  
372 -# customerPhone=mobile  
373 -# productPrice="1.00000"  
374 -# dep=feeDepId  
375 -# productArea = "重庆,重庆市,万州区"  
376 -# chargeTotalAmount = totalMoney  
377 -# chargeTotalAmountYuan = int(chargeTotalAmount)/100  
378 -# freezeMoneySymbol =  
379 -# comparisonFreezeAmount =  
380 -# modified = created  
381 -# firmCode = "9"  
382 -# marketFlag=firmCode  
383 -# collectionPrice=discountAmount  
384 -# itemReceivableAmount=receivable  
385 -# receivableAmount=receivable  
386 -# tareWeightDate=tareWeightDate  
387 -# aa = do_doPay(host=host,autocompletecartype=autocompletecartype,fee_str=fee_str,pwd=pwd,optType=optType,  
388 -# weightType=weightType,id=id,goodsId=goodsId,number=number,created=created,status=status,source=source,  
389 -# correctDiscount=correctDiscount,totalAmount=totalAmount,customerId=customerId,fundAccount=accountId,  
390 -# accountId=accountId,ic=ic,customerName=customerName,customerPhone=customerPhone,plate=plate,  
391 -# carTypeName=carTypeName,carTypeCode=carTypeCode,carTypeId=carTypeId,carTypeWeight=carTypeWeight,  
392 -# proveType=proveType,grossWeight=grossWeight,tareWeight=tareWeight,weight=weight,productPrice=productPrice,  
393 -# unitPrice=unitPrice,depName=depName,calcDepId=calcDepId,dep=dep,regionName=regionName,regionId=regionId,  
394 -# productName=productName,productId=productId,productArea=productArea,originId=originId,  
395 -# tradeTypeId=tradeTypeId,correctInfo=correctInfo,chargeTotalAmount=chargeTotalAmount,  
396 -# freezeMoneySymbol=freezeMoneySymbol,comparisonFreezeAmount=comparisonFreezeAmount,modified=modified,  
397 -# goodsTagIds=goodsTagIds,marketFlag=marketFlag,totalMoney=totalMoney,receivable=receivable,  
398 -# collectionPrice=collectionPrice,discountAmount=discountAmount,handReceivableAmount=handReceivableAmount,  
399 -# itemReceivableAmount=itemReceivableAmount,receivableAmount=receivableAmount,categoryName=categoryName,  
400 -# categoryId=carTypeId,grossWeightDate=grossWeightDate,tareWeightDate=tareWeightDate,sumPrice=sumPrice)  
401 -#  
402 -# print(aa.text)  
403 \ No newline at end of file 372 \ No newline at end of file
  373 +# print(fee_str)
  374 +# print(fee_int)
  375 +# print("discount_amount",discount_amount)
  376 +# print("discountAmount",discountAmount)
  377 +
  378 +pwd = "111111"
  379 +id = orderId
  380 +totalAmount = totalMoney
  381 +customerPhone=mobile
  382 +productPrice="1.00000"
  383 +dep=feeDepId
  384 +productArea = "重庆,重庆市,万州区"
  385 +chargeTotalAmount = totalMoney
  386 +chargeTotalAmountYuan = fee_int-int(discount_amount)
  387 +freezeMoneySymbol = fee_int
  388 +comparisonFreezeAmount = fee_int
  389 +modified = created
  390 +firmCode = "sy"
  391 +marketFlag=firmCode
  392 +collectionPrice=0
  393 +itemReceivableAmount=receivable
  394 +receivableAmount=receivable
  395 +tareWeightDate=tareWeightDate
  396 +aa = do_doPay(host=host,autocompletecartype=autocompletecartype,fee_str=fee_str,pwd=pwd,optType=optType,
  397 + weightType=weightType,id=id,goodsId=goodsId,number=number,created=created,status=status,source=source,
  398 + correctDiscount=correctDiscount,totalAmount=totalAmount,customerId=customerId,fundAccount=accountId,
  399 + accountId=accountId,ic=ic,customerName=customerName,customerPhone=customerPhone,plate=plate,
  400 + carTypeName=carTypeName,carTypeCode=carTypeCode,carTypeId=carTypeId,carTypeWeight=carTypeWeight,
  401 + proveType=proveType,grossWeight=grossWeight,tareWeight=tareWeight,weight=weight,productPrice=productPrice,
  402 + unitPrice=unitPrice,depName=depName,calcDepId=calcDepId,dep=dep,regionName=regionName,regionId=regionId,
  403 + productName=productName,productId=productId,productArea=productArea,originId=originId,
  404 + tradeTypeId=tradeTypeId,correctInfo=correctInfo,chargeTotalAmount=chargeTotalAmount,
  405 + freezeMoneySymbol=freezeMoneySymbol,comparisonFreezeAmount=comparisonFreezeAmount,modified=modified,
  406 + goodsTagIds=goodsTagIds,marketFlag=marketFlag,totalMoney=totalMoney,receivable=receivable,
  407 + collectionPrice=collectionPrice,discountAmount=discountAmount,handReceivableAmount=handReceivableAmount,
  408 + itemReceivableAmount=itemReceivableAmount,receivableAmount=receivableAmount,categoryName=categoryName,
  409 + categoryId=carTypeId,grossWeightDate=grossWeightDate,tareWeightDate=tareWeightDate,sumPrice=sumPrice,
  410 + chargeTotalAmountYuan=chargeTotalAmountYuan)
  411 +
  412 +print(aa.text)
404 \ No newline at end of file 413 \ No newline at end of file
report/test.log
1 -[2021-08-05 18:25:26] [INFO] : ======================================================================================  
2 -[2021-08-05 18:25:26] [INFO] : http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/add.action  
3 -b'id=40&name=\xe5\x86\x9c\xe4\xba\xa4&mobile=18828281176&cardNumber=888810054630& relationCardTemp=210720133001&relationalCard[0].cardNumber=210720131533' 1 +[2021-08-06 14:53:06] [INFO] : ======================================================================================
  2 +[2021-08-06 14:53:06] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  3 +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'djloMMZX09IFz9m3sReewWP43BrHo5ku+AEsuzLnnOqZCCFaSXs3QQKfGv2XdIoS5CSc7S16hd3NpON3tmsOfKQZea4iHg+fJpnRyJiYWDrqG3rK8XRmeVJD5qtRYs0AAzBPu9SINLc4A4fN2ZMlYPe5XqXxtQ0vqPkwYzuzkfU='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
  4 +
  5 +[2021-08-06 14:53:06] [INFO] : ======================================================================================
  6 +[2021-08-06 14:53:06] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  7 +{'data': None, 'json': {'userName': 'sygangda', 'password': 'VeAwXLYVfhwK/3jlYU28b54m0S0NKkEL5hi4BzZSQozFewTZdI9LEqaE0Q+A21Dh6IlNcGX4Sr1gCGtcqMVY/RaH0VVLE9NVUrsIbxSPG4fCTeTBcOEF2sxAiA6Lurq7FBv3FIxSqi+FKDIrWBk30ALuLyIlZL6j8K5EWz/YK6Q='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
  8 +
  9 +[2021-08-06 14:53:07] [INFO] : ======================================================================================
  10 +[2021-08-06 14:53:07] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action
  11 +{'rows': '10', 'page': '1', 'sort': 'et.created', 'order': 'desc', 'metadata[created]': '{"provider": "datetimeProvider", "index": 10, "field": "created"}', 'metadata[totalPrice]': '{"provider": "moneyProvider", "index": 20, "field": "totalPrice"}', 'metadata[paymentTime]': '{"provider": "datetimeProvider", "index": 30, "field": "paymentTime"}', 'metadata[type]': '{"provider": "entranceFeeBillTypeProvider", "index": 40, "field": "type"}', 'metadata[status]': '{"provider": "entranceFeeBillStateProvider", "index": 50, "field": "status"}', 'attr': 'number', 'attrValue': '202108060900012'}
  12 +{}
  13 +
  14 +[2021-08-06 14:53:07] [INFO] : ======================================================================================
  15 +[2021-08-06 14:53:07] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/3738.action
4 None 16 None
5 -{'headers': {'Host': 'test.jmsf.diligrp.com:8385', 'Connection': 'keep-alive', 'Content-Length': '148', 'Accept': 'application/json,text/javascript,*/*;q=0.01', 'Origin': 'http://test.jmsf.diligrp.com:8385', 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Referer': 'http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list', 'Accept-Encoding': 'gzip,deflate', 'Cookie': 'UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5; UAP_firmId=9; UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NzAyMzUsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NzIwMzUsImlhdCI6MTYyNzg3MDIzNSwianRpIjoiNDc3MDU5N2YtMGRjZi00OGIwLTg5YjQtNmVhODFiZjVhNTJjIn0.nso2DlyjXlOnwFp5D-N9jvyEKHJJ76K-BIzTdT-1UQAbqKD_9m4ZKXESxh-9333GWtYHORsnbav6MXI6h1Si4Ee_6rxB1DrkqxXoohavvAPutNr5byXjIUejLfFv_YTyCuXCkjiSCUlribURiqG_jKccr5BfIVUigSLkB9ff3f4'}} 17 +{}
  18 +
  19 +[2021-08-06 14:53:08] [INFO] : ======================================================================================
  20 +[2021-08-06 14:53:08] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426
  21 +None
  22 +{}
  23 +
  24 +[2021-08-06 14:53:09] [INFO] : ======================================================================================
  25 +[2021-08-06 14:53:09] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州
  26 +None
  27 +{}
  28 +
  29 +[2021-08-06 14:53:09] [INFO] : ======================================================================================
  30 +[2021-08-06 14:53:09] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action
  31 +{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 3738, 'goodsId': '3752', 'number': '202108060900012', 'modified': '2021-08-06 14:53:09', '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 14:52:55', 'remark': 'false', 'goodsTagIds': '1900', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-06 14:52:55', 'tareWeightDate': '2021-08-06 14:52:55', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '2000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''}
  32 +{}
  33 +
  34 +[2021-08-06 14:53:10] [INFO] : ======================================================================================
  35 +[2021-08-06 14:53:10] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action
  36 +protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=3738&goodsId=3752&number=202108060900012&modified=2021-08-06%2014%3A52%3A55&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=A1%E5%8C%BA&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-06%2014%3A52%3A55&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%2014%3A52%3A55&tareWeightDate=2021-08-06%2014%3A52%3A55&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
  37 +{}
  38 +