Commit 826af3e1eb233607456bf74249e4e0e87aa1f2bc

Authored by liujiqiang
1 parent a0762179

结算管理相关模块添加

commons/api/hg/CheckIn/CheckIn.py
... ... @@ -154,6 +154,6 @@ def create_registerRecord(session=None,host=None,ic="888800010591",goodsName="è‘
154 154 return resSave
155 155  
156 156  
157   -# res = create_registerRecord(session=sessionHg,ic="888800010592",host=host,goodsName="苹果",allLevelKeyword="金牛区",
158   -# nameLike="西区",tradePassword="111111",weight="50")
159   -# print(res.text)
160 157 \ No newline at end of file
  158 +res = create_registerRecord(session=sessionHg,ic="888800010592",host=host,goodsName="苹果",allLevelKeyword="金牛区",
  159 + nameLike="西区",tradePassword="111111",weight="50")
  160 +print(res.text)
161 161 \ No newline at end of file
... ...
commons/api/hg/settlement/batch.py
... ... @@ -50,3 +50,5 @@ def changeBatchCodeState(session=None,host=None,**kwargs):
50 50  
51 51 # res = changeBatchCodeState(session=sessionHg,host=host,batchCode="2109000202",state=1)
52 52 # print(res.json())
  53 +
  54 +
... ...
commons/api/hg/settlement/demo.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +
  3 +# @Time : 2021/9/9 14:41
  4 +# @Author : Ljq
  5 +# @File : demo.py
  6 +# @Software: PyCharm
  7 +
  8 +"""
  9 +
  10 +"""
  11 +
  12 +import json,time,random,re
  13 +from commons.scripts import dealContentType as dct
  14 +from commons.scripts import jsonToUrlCode
  15 +from commons.scripts import replaceJsonData as rJD
  16 +import urllib.parse
  17 +from commons.MySession import sessionHg
  18 +
  19 +def save_red(session=None,host=None,**kwargs):
  20 + """
  21 + 登记单状态变更
  22 + :param batchCode:等级单号
  23 + :param state:变更状态,1继续,2停止
  24 + """
  25 + url = "http://test.card.diligrp.com:8386/contract/save.action"
  26 + headers = dct.jsonCode()
  27 + data = {
  28 + "notes": "123备注",
  29 + "customerId": 141963,
  30 + "consignorCustomerName": "杭果客户长歌一",
  31 + "cardNo": "888800010592",
  32 + "consignorCustomerIDCode": "110101202108265741",
  33 + "consignorCustomerMobile": "18080018009",
  34 + "consignorCustomerCode": "00131684",
  35 + "consignorAccountId": 107667,
  36 + "startTime": "2021-09-09",
  37 + "endTime": "2021-09-13",
  38 + "consignors": [{
  39 + "consigneeName": "张三",
  40 + "consigneeIdCode": "513922198704216819",
  41 + "consigneeIdMobile": "asda",
  42 + "signatureImagePath": "5f68851207864520924e41b7f73c208c"
  43 + }],
  44 + "consigneeNames": "唐川",
  45 + "node": "signatureImagePathConsignor",
  46 + "signatureImagePath": "bbdcbcca70a74adfb10b7fb86de5d04c"
  47 +}
  48 + data = dict(data,**kwargs)
  49 + res = session.useHeadersRequests(method="post",url=url,data=json.dumps(data),headers=headers)
  50 + return res
  51 +
  52 +res = save_red(session=sessionHg,host="")
  53 +print(res.json())
0 54 \ No newline at end of file
... ...
report/test.log
1   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
2   -[2021-09-08 18:19:16] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
3   -[2021-09-08 18:19:16] [INFO] : http://10.28.12.150:80/api/authenticationApi/loginWeb
4   -{'data': None, 'json': {'userName': '111222', 'password': 'UQq2o0Q6W7XIaDqnez/Hyq3gDuBAZUuOnWAy97RA2s99LIQtVP4tTXJdRLOWCNfF3dS+elBLSKoAPfXygUuoPFrSODa6QYZQ3L4Aufl3fk4wn9ei3l2WczKg0rc030FbxfDUBzKL7QMfjRp2oCfpSH+/r6fVPM1UcZXWRhoxfnU='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
5   -
6   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
7   -[2021-09-08 18:19:16] [INFO] : http://test.uap.diligrp.com/login/login.action
8   -[2021-09-08 18:19:16] [INFO] : http://10.28.12.150:80/login/login.action
  1 +[2021-09-09 15:07:28] [INFO] : ======================================================================================
  2 +[2021-09-09 15:07:28] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  3 +[2021-09-09 15:07:28] [INFO] : http://10.28.12.150:80/api/authenticationApi/loginWeb
  4 +{'data': None, 'json': {'userName': '111222', 'password': 'BWgL3Yc1wRb8kJicevOQcaMeCcxB7tFmjcWGQcD8wcX+B06hhtyuk5QMe/N3kKsZGyuKQ1InTE95jy9ZBVnzGxoLcwoVxZzlEsI8anoFst66N7giAyyU2IomupuB2siRt7bDu6o04+Snj/HTpztEecCLRvaVCh6yndLZC/8rNeU='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
  5 +
  6 +[2021-09-09 15:07:28] [INFO] : ======================================================================================
  7 +[2021-09-09 15:07:28] [INFO] : http://test.uap.diligrp.com/login/login.action
  8 +[2021-09-09 15:07:28] [INFO] : http://10.28.12.150:80/login/login.action
9 9 {'data': b'userName=111222&password=111111', 'json': None, 'headers': {'Host': 'test.uap.diligrp.com', 'Connection': 'keep-alive', 'Content-Length': '33', 'Cache-Control': 'max-age=0', 'Upgrade-Insecure-Requests': '1', 'Origin': 'http://test.uap.diligrp.com', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/90.0.4430.212Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Referer': 'http://test.uap.diligrp.com/login/index.html', 'Accept-Encoding': 'gzip,deflate', 'Accept-Language': 'zh-CN,zh-TW;q=0.9,zh;q=0.8,en;q=0.7', 'Cookie': 'UAP_accessToken=;UAP_refreshToken=;UAP_loginPath='}, 'allow_redirects': False}
10 10  
11   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
12   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/hg-trading/api/businessChargeItem/listBusinessChargeItem
13   -{"marketId": 15, "businessType": "501"}
14   -{}
15   -
16   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
17   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/card-web/accountQuery/simpleInfo.action
18   -None
19   -{'params': {'cardNo': '888800010592'}}
20   -
21   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
22   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree
23   -{"marketId": 15, "keyword": "\u82f9\u679c", "state": 1}
24   -{}
25   -
26   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
27   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/city/listByKeywordsWithCityCode
28   -{"allLevelKeyword": "\u91d1\u725b\u533a"}
29   -{}
30   -
31   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
32   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/district/search
33   -{"marketId": 15, "nameLike": "\u897f\u533a"}
34   -{}
35   -
36   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
37   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/dili-rule/api/chargeRule/queryFee
38   -{"businessType": "501", "chargeItem": 518, "marketId": 15}
39   -{}
40   -
41   -[2021-09-08 18:19:16] [INFO] : ======================================================================================
42   -[2021-09-08 18:19:16] [INFO] : http://test.gateway.diligrp.com:8285/dili-rule/api/chargeRule/queryFee
43   -{"businessType": "501", "chargeItem": 520, "marketId": 15}
44   -{}
45   -
46   -[2021-09-08 18:19:17] [INFO] : ======================================================================================
47   -[2021-09-08 18:19:17] [INFO] : http://test.gateway.diligrp.com:8285/hg-trading/api/registerRecord/save
48   -{"accountId": 107667, "cardNo": "888800010592", "customerId": 141963, "customerCode": "00131684", "customerName": "\u676d\u679c\u5ba2\u6237\u957f\u6b4c\u4e00", "fixedphoneNumber": null, "mobilephoneNumber": "18080018009", "identityCardAddress": "", "identityCardNo": "110101202108265741", "identityCardType": "ID", "registerDetailDtoList": [{"id": 0, "areaId": 272, "areaName": "\u897f\u533a", "quantity": 0, "productId": 374690, "registerRecordId": 0, "remark": null, "weight": "50", "weightType": 0, "created": null, "createdById": 0, "createdByName": null, "createdByDepartmentId": 0, "createdByDepartmentName": null, "registerCertificateList": null, "product": null, "registerCertificateDtoList": null, "productDto": {"id": 0, "originId": 510106, "originName": "\u91d1\u725b\u533a", "pieceWeight": 0, "categoryId": 374690, "categoryCode": 374690, "categoryName": "\u82f9\u679c", "created": null}}], "registerFeeDtoList": [{"id": 0, "actualFee": 200, "receivableFee": 1300, "discountFee": 1100, "registerRecordId": 0, "payStatus": 0, "chargeItemName": "\u5176\u4ed6\u6536\u8d39", "chargeType": 1, "chargeItemId": 518, "registerFeeType": 999, "created": null, "createdById": 0, "createdByName": null, "settleDate": null, "isBehalf": 0, "registerLoadingFeeExtDto": null}], "tradePassword": "111111"}
  11 +[2021-09-09 15:07:28] [INFO] : ======================================================================================
  12 +[2021-09-09 15:07:28] [INFO] : http://test.card.diligrp.com:8386/contract/save.action
  13 +{"notes": "123\u5907\u6ce8", "customerId": 141963, "consignorCustomerName": "\u676d\u679c\u5ba2\u6237\u957f\u6b4c\u4e00", "cardNo": "888800010592", "consignorCustomerIDCode": "110101202108265741", "consignorCustomerMobile": "18080018009", "consignorCustomerCode": "00131684", "consignorAccountId": 107667, "startTime": "2021-09-09", "endTime": "2021-09-13", "consignors": [{"consigneeName": "\u5f20\u4e09", "consigneeIdCode": "513922198704216819", "consigneeIdMobile": "asda", "signatureImagePath": "5f68851207864520924e41b7f73c208c"}], "consigneeNames": "\u5510\u5ddd", "node": "signatureImagePathConsignor", "signatureImagePath": "bbdcbcca70a74adfb10b7fb86de5d04c"}
49 14 {}
50 15  
... ...