Commit ee085349db3774cbbdd02b149312b45c6a2fb62b
1 parent
9f60ff40
进门单作废
Showing
6 changed files
with
999 additions
and
87 deletions
commons/api/entranceFeeBillList/operationDoAmend.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | + | |
3 | +# @Time : 2021/8/13 15:22 | |
4 | +# @Author : Ljq | |
5 | +# @File : operationDoAmend.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.MySession import my | |
16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL | |
17 | +from bs4 import BeautifulSoup | |
18 | +import urllib.parse | |
19 | + | |
20 | + | |
21 | +def get_orderAmend(host="",orderId=None): | |
22 | + """获取订单详情""" | |
23 | + headers = dct.urlCode() | |
24 | + url = host + f"/entranceFeeBill/amend/{orderId}.action" | |
25 | + res = my.useHeadersRequests("get", url=url, headers=headers) | |
26 | + return res | |
27 | + | |
28 | + | |
29 | +def get_calculateRes(host="",autocompletecartype=None,**kwargs): | |
30 | + """缴费金额获取 | |
31 | + :params kwargs: | |
32 | + protocolId: | |
33 | + pwd: | |
34 | + clientRedirectTag: | |
35 | + viewType:pay | |
36 | + optType:${optType} | |
37 | + optUrl: | |
38 | + correctInfo:${correctInfo} | |
39 | + weightType:${weightType} | |
40 | + id:${orderId} | |
41 | + goodsId:${goodsId} | |
42 | + number:${number} | |
43 | + modified:${__time(yyyy-MM-dd HH:mm:ss,)} | |
44 | + status:${status} | |
45 | + source:${source} | |
46 | + updateFeeItems: | |
47 | + correctDiscount:${correctDiscount} | |
48 | + totalAmount: | |
49 | + customerId:0 | |
50 | + fundAccount: | |
51 | + ic: | |
52 | + customerName: | |
53 | + customerPhone: | |
54 | + payway:刷卡 | |
55 | + plate:${plate} | |
56 | + autocomplete-cartype:${carTypeCode}(${carTypeName}) | |
57 | + carTypeName:${carTypeName} | |
58 | + carTypeCode:${carTypeCode} | |
59 | + carTypeId:${carTypeId} | |
60 | + carTypeWeight:${carTypeWeight} | |
61 | + storeTareWeight: | |
62 | + proveType:${proveTypeCode} | |
63 | + grossWeight:${grossWeight} | |
64 | + tareWeight:${tareWeight} | |
65 | + weight:${grossWeight} | |
66 | + goodsNum: | |
67 | + itemWeight: | |
68 | + productPrice:1 | |
69 | + unitPrice:${unitPrice} | |
70 | + depName:${feeDepName} | |
71 | + calcDepId:${feeDepId} | |
72 | + regionName: | |
73 | + regionId:0 | |
74 | + productName:${productName} | |
75 | + productId:${productId} | |
76 | + productArea:万州区 | |
77 | + parentId: | |
78 | + levelType: | |
79 | + originId:${originId} | |
80 | + tradeTypeId:${tradeTypeId} | |
81 | + chargeTotalAmount: | |
82 | + chargeTotalAmountYuan: | |
83 | + freezeMoneySymbol: | |
84 | + comparisonFreezeAmount: | |
85 | + created:${created} | |
86 | + remark: | |
87 | + goodsTagIds:${goodsTagIds} | |
88 | + shareRatio:${shareRatio} | |
89 | + handlingTeam: | |
90 | + handlingRatio: | |
91 | + handActualAmount: | |
92 | + handManageAmount: | |
93 | + handCollectionAmount: | |
94 | + receivableAmount: | |
95 | + categoryName:${productName} | |
96 | + categoryId:${productId} | |
97 | + driverTel: | |
98 | + grossWeightDate:${grossWeightDate} | |
99 | + tareWeightDate:${tareWeightDate} | |
100 | + grossPathName: | |
101 | + grossPathId: | |
102 | + tarePathId: | |
103 | + goodsRemark: | |
104 | + inGreeterName: | |
105 | + inGreeterId:0 | |
106 | + outGreeterId: | |
107 | + sumPrice:${sumPrice} | |
108 | + shipperName: | |
109 | + shipperId: | |
110 | + shipperPhone: | |
111 | + feeDepName: | |
112 | + """ | |
113 | + url = host + "/calculate/index.action" | |
114 | + headers = dct.urlCode() | |
115 | + | |
116 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "pay", "optType": "optType", "optUrl": "", | |
117 | + "correctInfo": "correctInfo", "weightType": "weightType", "id": "orderId", "goodsId": "goodsId", | |
118 | + "number": "number", "modified": "time", "status": "status", "source": "source", "updateFeeItems": "", | |
119 | + "correctDiscount": "correctDiscount", "totalAmount": "", "customerId": "0", "fundAccount": "", | |
120 | + "accountId":"","ic": "","customerName": "", "customerPhone": "", "payway": "刷卡", "plate": "plate", | |
121 | + "autocomplete-cartype": "carTypeCode(carTypeName)", "carTypeName": "carTypeName", | |
122 | + "carTypeCode": "carTypeCode", "carTypeId": "carTypeId", "carTypeWeight": "carTypeWeight", | |
123 | + "storeTareWeight": "", "proveType": "proveTypeCode", "grossWeight": "grossWeight", | |
124 | + "tareWeight": "tareWeight", "weight": "grossWeight", "goodsNum": "", "itemWeight": "", | |
125 | + "productPrice": "1.00000", "unitPrice": "unitPrice", "depName": "feeDepName", | |
126 | + "regionName": "", "regionId": "0", "productName": "productName", "productId": "productId", | |
127 | + "productArea": "重庆,重庆市,万州区", "parentId": "", "levelType": "", "originId": "originId", "tradeTypeId": "tradeTypeId", | |
128 | + "chargeTotalAmount": "", "chargeTotalAmountYuan": "", "freezeMoneySymbol": "", "comparisonFreezeAmount": "", | |
129 | + "created": "created", "remark": "false", "goodsTagIds": "goodsTagIds", "shareRatio": "shareRatio", | |
130 | + "handlingTeam": "", "handlingRatio": "", "handActualAmount": "", "handManageAmount": "", | |
131 | + "handCollectionAmount": "", "receivableAmount": "", "categoryName": "productName", | |
132 | + "categoryId": "productId", "driverTel": "", "grossWeightDate": "grossWeightDate", | |
133 | + "tareWeightDate": "tareWeightDate", "grossPathName": "", "grossPathId": "", "tarePathId": "", | |
134 | + "goodsRemark": "", "inGreeterName": "", "inGreeterId": "0", "outGreeterId": "", "sumPrice": "sumPrice", | |
135 | + "shipperName": "", "shipperId": "", "shipperPhone": ""} | |
136 | + data["autocomplete-cartype"]=autocompletecartype | |
137 | + data = dict(data,**kwargs) | |
138 | + print("get_calculateRes",data) | |
139 | + res = my.useHeadersRequests("post", url=url,data=data,headers=headers) | |
140 | + return res | |
141 | + | |
142 | +def do_doAmend(host="",autocompletecartype=None,fee_str="",**kwargs): | |
143 | + """进门单缴费""" | |
144 | + url = host + "/entranceFeeBill/doAmend.action" | |
145 | + headers = dct.urlCode() | |
146 | + | |
147 | + # data = {"protocolId":"","pwd":"","clientRedirectTag":"","viewType":"unfreeze","optType":"0","optUrl":"","correctInfo":"1","weightType":"1","id":"3968","goodsId":"3982","number":"202108110900122","modified":"2021-08-11+17:32:50","status":"3","source":"1","updateFeeItems":"","correctDiscount":"1","totalAmount":"800","customerId":"389","fundAccount":"105847","accountId":"105847","ic":"888810032426","customerName":"长歌买家省内啊啊啊嘿","customerPhone":"18011501258","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":"水果部","dep":"58","regionId":"72","productName":"雪莲果","productId":"14158","productArea":"重庆,重庆市,万州区","originId":"500101","tradeTypeId":"71","chargeTotalAmount":"800","chargeTotalAmountYuan":"8","freezeMoneySymbol":"13","comparisonFreezeAmount":"13","created":"2021-08-11+17:32:27","remark":"备注","goodsTagIds":"1900","shareRatio":"0","handlingTeam":"","steveTeamId":"","handlingRatio":"","handActualAmount":"0","handManageAmount":"0","handCollectionAmount":"0","marketFlag":"sy","totalMoney":"800","receivable":"1300","collectionPrice":"0","discountAmount":"500","handReceivableAmount":"0","itemReceivableAmount":"1300","receivableAmount":"1300","categoryName":"水果","categoryId":"14436","driverTel":"","grossWeightDate":"2021-08-11+17:32:27","tareWeightDate":"2021-08-11+17:32:27","grossPathName":"","grossPathId":"","tarePathId":"","goodsRemark":"备注","inGreeterName":"通用测试","inGreeterId":"274","outGreeterId":"","sumPrice":"2000","shipperName":"","shipperId":"","shipperPhone":"","feeDepId":"0"} | |
148 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "unfreeze", "optType": "0", "optUrl": "", | |
149 | + "correctInfo": "1", "weightType": "1", "id": "3968", "goodsId": "3982", "number": "202108110900122", | |
150 | + "modified": "2021-08-11+17:32:50", "status": "3", "source": "1", "updateFeeItems": "", | |
151 | + "correctDiscount": "1", "totalAmount": "800", "customerId": "389", "fundAccount": "105847", | |
152 | + "accountId": "105847", "ic": "888810032426", "customerName": "长歌买家省内啊啊啊嘿", "customerPhone": "18011501258", | |
153 | + "payway": "刷卡", "plate": "川B00001", "autocomplete-cartype": "003(板车)", "carTypeName": "板车", | |
154 | + "carTypeCode": "003", "carTypeId": "53", "carTypeWeight": "333", "storeTareWeight": "", "proveType": "1621", | |
155 | + "grossWeight": "353", "tareWeight": "333", "weight": "20", "goodsNum": "", "itemWeight": "", | |
156 | + "productPrice": "1.00000", "unitPrice": "100.0", "depName": "水果部", "dep": "58", "regionId": "72", | |
157 | + "productName": "雪莲果", "productId": "14158", "productArea": "重庆,重庆市,万州区", "originId": "500101", | |
158 | + "tradeTypeId": "71", "chargeTotalAmount": "800", "chargeTotalAmountYuan": "8", "freezeMoneySymbol": "13", | |
159 | + "comparisonFreezeAmount": "13", "created": "2021-08-11+17:32:27", "remark": "备注", "goodsTagIds": "1900", | |
160 | + "shareRatio": "0", "handlingTeam": "", "steveTeamId": "", "handlingRatio": "", "handActualAmount": "0", | |
161 | + "handManageAmount": "0", "handCollectionAmount": "0", "marketFlag": "sy", "totalMoney": "800", | |
162 | + "receivable": "1300", "collectionPrice": "0", "discountAmount": "500", "handReceivableAmount": "0", | |
163 | + "itemReceivableAmount": "1300", "receivableAmount": "1300", "categoryName": "水果", "categoryId": "14436", | |
164 | + "driverTel": "", "grossWeightDate": "2021-08-11+17:32:27", "tareWeightDate": "2021-08-11+17:32:27", | |
165 | + "grossPathName": "", "grossPathId": "", "tarePathId": "", "goodsRemark": "备注", "inGreeterName": "通用测试", | |
166 | + "inGreeterId": "274", "outGreeterId": "", "sumPrice": "2000", "shipperName": "", "shipperId": "", | |
167 | + "shipperPhone": "", "feeDepId": "0"} | |
168 | + | |
169 | + data["autocomplete-cartype"] = autocompletecartype | |
170 | + data = dict(data, **kwargs) | |
171 | + data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str | |
172 | + print("================开始请求================") | |
173 | + res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers) | |
174 | + return res | |
175 | + | |
176 | +def do_amendOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900032",pwd="111111", | |
177 | + ic=888810032426): | |
178 | + a = eFBL.listPage(host=host, attrName=attrName, attrValue=attrValue) | |
179 | + print("listPage", a.json()) | |
180 | + orderId = a.json()["rows"][0]["id"] | |
181 | + number = a.json()["rows"][0]["number"] | |
182 | + created = a.json()["rows"][0]["created"] | |
183 | + print(orderId) | |
184 | + | |
185 | + # # 订单详情获取 | |
186 | + resOrderDetails = get_orderAmend(host=host, orderId=orderId) | |
187 | + print(resOrderDetails.text) | |
188 | + | |
189 | + # bs取值 | |
190 | + orderDetailsList = BeautifulSoup(resOrderDetails.text, "html.parser").findAll("input") | |
191 | + orderDetailsDict = {i.get("name"): i.get("value") for i in orderDetailsList} | |
192 | + print("orderDetailsDict",orderDetailsDict) | |
193 | + unitPrice = orderDetailsDict["unitPrice"] | |
194 | + regionId=orderDetailsDict["regionId"] | |
195 | + goodsId = orderDetailsDict["goodsId"] | |
196 | + status = orderDetailsDict["status"] | |
197 | + source = orderDetailsDict["source"] | |
198 | + optType = orderDetailsDict["optType"] | |
199 | + correctInfo = orderDetailsDict["correctInfo"] | |
200 | + weightType = orderDetailsDict["weightType"] | |
201 | + correctDiscount = orderDetailsDict["correctDiscount"] | |
202 | + goodsTagIds = orderDetailsDict["goodsTagIds"] | |
203 | + sumPrice = orderDetailsDict["sumPrice"] | |
204 | + tradeTypeId = orderDetailsDict["tradeTypeId"] | |
205 | + shareRatio = orderDetailsDict["shareRatio"] | |
206 | + plate = orderDetailsDict["plate"] | |
207 | + carTypeName = orderDetailsDict["carTypeName"] | |
208 | + carTypeCode = orderDetailsDict["carTypeCode"] | |
209 | + carTypeId = orderDetailsDict["carTypeId"] | |
210 | + carTypeWeight = orderDetailsDict["carTypeWeight"] | |
211 | + proveType = orderDetailsDict["proveType"] | |
212 | + grossWeight = orderDetailsDict["grossWeight"] | |
213 | + tareWeight = orderDetailsDict["tareWeight"] | |
214 | + depName = orderDetailsDict["depName"] | |
215 | + dep = orderDetailsDict["dep"] | |
216 | + productName = orderDetailsDict["productName"] | |
217 | + productId = orderDetailsDict["productId"] | |
218 | + grossWeightDate = orderDetailsDict["grossWeightDate"] | |
219 | + tareWeightDate = orderDetailsDict["tareWeightDate"] | |
220 | + weight = orderDetailsDict["weight"] | |
221 | + categoryName = orderDetailsDict["categoryName"] | |
222 | + categoryId = orderDetailsDict["categoryId"] | |
223 | + inGreeterName = orderDetailsDict["inGreeterName"] | |
224 | + inGreeterId = orderDetailsDict["inGreeterId"] | |
225 | + productArea = orderDetailsDict["productArea"] | |
226 | + productPrice = orderDetailsDict["productPrice"] | |
227 | + | |
228 | + | |
229 | + # 用户信息获取 | |
230 | + res = eFBL.get_icCheck(host=host, ic=ic) | |
231 | + print(res.text) | |
232 | + customerId = res.json()["data"]["aInfo"]["customerId"] | |
233 | + customerName = res.json()["data"]["aInfo"]["customerName"] | |
234 | + accountId = res.json()["data"]["aInfo"]["accountId"] | |
235 | + mobile = res.json()["data"]["aInfo"]["mobile"] | |
236 | + | |
237 | + # 省市区获取 | |
238 | + res = eFBL.get_city(host=host, name="万州") | |
239 | + print(res.text) | |
240 | + originId = res.json()["suggestions"][0]["id"] | |
241 | + | |
242 | + # # 获取缴费金额 | |
243 | + autocompletecartype = f"{carTypeCode}({carTypeName})" | |
244 | + print(autocompletecartype) | |
245 | + modified = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | |
246 | + | |
247 | + # 获取缴费金额 | |
248 | + res = get_calculateRes(host=host, autocompletecartype=autocompletecartype, optType=optType, correctInfo=correctInfo, | |
249 | + weightType=weightType, id=orderId, goodsId=goodsId, number=number, modified=modified, | |
250 | + status=status, | |
251 | + source=source, correctDiscount=correctDiscount, plate=plate, carTypeName=carTypeName, | |
252 | + carTypeCode=carTypeCode, | |
253 | + carTypeId=carTypeId, carTypeWeight=carTypeWeight, proveType=proveType, | |
254 | + grossWeight=grossWeight, | |
255 | + tareWeight=tareWeight, unitPrice=unitPrice, depName=depName, productName=productName, | |
256 | + productId=productId, originId=originId, tradeTypeId=tradeTypeId, created=created, | |
257 | + goodsTagIds=goodsTagIds, | |
258 | + shareRatio=shareRatio, categoryName=categoryName, categoryId=categoryId, | |
259 | + grossWeightDate=grossWeightDate, | |
260 | + tareWeightDate=tareWeightDate, sumPrice=sumPrice, weight=weight, | |
261 | + inGreeterName=inGreeterName, inGreeterId=inGreeterId) | |
262 | + | |
263 | + # 缴费信息 | |
264 | + totalMoney = re.findall('name="totalMoney" value="(.*?)">', res.text)[0] | |
265 | + discountAmount = re.findall('name="discountAmount" value="(.*?)">', res.text)[0] | |
266 | + handReceivableAmount = re.findall('name="handReceivableAmount" value="(.*?)">', res.text)[0] | |
267 | + correctDiscount = re.findall('id="correctDiscount" name="correctDiscount" value="(.*?)">', res.text)[0] | |
268 | + receivable = re.findall('id="creceivableLong" name="receivable" value="(.*?)">', res.text)[0] | |
269 | + collectionPrice = re.findall('name="collectionPrice" value="(.*?)"', res.text)[0] | |
270 | + | |
271 | + # 查找dl标签class为包含'ui-font-'字符的所有dl标签 | |
272 | + soup = BeautifulSoup(res.text, "html.parser") | |
273 | + fee_str = "correctDiscount=1&billItems=&billItemsDic=" | |
274 | + fee_int = 0 | |
275 | + discount_amount = 0 | |
276 | + for tag in soup.findAll("div", class_="d-flex align-items-center"): | |
277 | + c = tag.findAll("input") | |
278 | + for i in c: | |
279 | + if i.get("name") != None: | |
280 | + fee_str = fee_str + "&" + i.get("name") + "=" + urllib.parse.quote(i.get("value")) | |
281 | + if i.get("type") == "text": | |
282 | + fee_int = fee_int + int(float(i.get("value"))) | |
283 | + if "优惠" in i.get("value"): | |
284 | + discount_amount = discount_amount + int(json.loads(i.get("value"))["receivable"]) / 100 | |
285 | + | |
286 | + id = orderId | |
287 | + totalAmount = totalMoney | |
288 | + customerPhone = mobile | |
289 | + chargeTotalAmount = totalMoney | |
290 | + chargeTotalAmountYuan = fee_int - int(discount_amount) | |
291 | + freezeMoneySymbol = fee_int | |
292 | + comparisonFreezeAmount = fee_int | |
293 | + modified = created | |
294 | + firmCode = my.userInfo["data"]["user"]["firmCode"] | |
295 | + marketFlag = firmCode | |
296 | + itemReceivableAmount = receivable | |
297 | + receivableAmount = receivable | |
298 | + tareWeightDate = tareWeightDate | |
299 | + | |
300 | + aa = do_amendOrder(host=host, autocompletecartype=autocompletecartype, fee_str=fee_str, pwd=pwd, optType=optType, | |
301 | + weightType=weightType, id=id, goodsId=goodsId, number=number, created=created, status=status, | |
302 | + source=source, | |
303 | + correctDiscount=correctDiscount, totalAmount=totalAmount, customerId=customerId, | |
304 | + fundAccount=accountId, | |
305 | + accountId=accountId, ic=ic, customerName=customerName, customerPhone=customerPhone, plate=plate, | |
306 | + carTypeName=carTypeName, carTypeCode=carTypeCode, carTypeId=carTypeId, carTypeWeight=carTypeWeight, | |
307 | + proveType=proveType, grossWeight=grossWeight, tareWeight=tareWeight, weight=weight, | |
308 | + productPrice=productPrice, | |
309 | + unitPrice=unitPrice, depName=depName, dep=dep, | |
310 | + regionId=regionId, | |
311 | + productName=productName, productId=productId, productArea=productArea, originId=originId, | |
312 | + tradeTypeId=tradeTypeId, correctInfo=correctInfo, chargeTotalAmount=chargeTotalAmount, | |
313 | + freezeMoneySymbol=freezeMoneySymbol, comparisonFreezeAmount=comparisonFreezeAmount, modified=modified, | |
314 | + goodsTagIds=goodsTagIds, marketFlag=marketFlag, totalMoney=totalMoney, receivable=receivable, | |
315 | + collectionPrice=collectionPrice, discountAmount=discountAmount, | |
316 | + handReceivableAmount=handReceivableAmount, | |
317 | + itemReceivableAmount=itemReceivableAmount, receivableAmount=receivableAmount, | |
318 | + categoryName=categoryName, | |
319 | + categoryId=carTypeId, grossWeightDate=grossWeightDate, tareWeightDate=tareWeightDate, | |
320 | + sumPrice=sumPrice, | |
321 | + chargeTotalAmountYuan=chargeTotalAmountYuan) | |
322 | + | |
323 | + print(aa.text) | |
324 | + return aa | |
325 | + | |
326 | +# time.sleep(5) | |
327 | +do_amendOrder(attrValue="202108130900121") | |
0 | 328 | \ No newline at end of file | ... | ... |
commons/api/entranceFeeBillList/operationDoCorrect.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | + | |
3 | +# @Time : 2021/8/13 14:21 | |
4 | +# @Author : Ljq | |
5 | +# @File : operationDoCorrect.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.MySession import my | |
16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL | |
17 | +from bs4 import BeautifulSoup | |
18 | +import urllib.parse | |
19 | + | |
20 | + | |
21 | +def get_orderCorrect(host="",orderId=None): | |
22 | + """获取订单详情""" | |
23 | + headers = dct.urlCode() | |
24 | + url = host + f"/entranceFeeBill/correct/{orderId}.action" | |
25 | + res = my.useHeadersRequests("get", url=url, headers=headers) | |
26 | + return res | |
27 | + | |
28 | + | |
29 | +def get_calculateRes(host="",autocompletecartype=None,**kwargs): | |
30 | + """缴费金额获取 | |
31 | + :params kwargs: | |
32 | + protocolId: | |
33 | + pwd: | |
34 | + clientRedirectTag: | |
35 | + viewType:pay | |
36 | + optType:${optType} | |
37 | + optUrl: | |
38 | + correctInfo:${correctInfo} | |
39 | + weightType:${weightType} | |
40 | + id:${orderId} | |
41 | + goodsId:${goodsId} | |
42 | + number:${number} | |
43 | + modified:${__time(yyyy-MM-dd HH:mm:ss,)} | |
44 | + status:${status} | |
45 | + source:${source} | |
46 | + updateFeeItems: | |
47 | + correctDiscount:${correctDiscount} | |
48 | + totalAmount: | |
49 | + customerId:0 | |
50 | + fundAccount: | |
51 | + ic: | |
52 | + customerName: | |
53 | + customerPhone: | |
54 | + payway:刷卡 | |
55 | + plate:${plate} | |
56 | + autocomplete-cartype:${carTypeCode}(${carTypeName}) | |
57 | + carTypeName:${carTypeName} | |
58 | + carTypeCode:${carTypeCode} | |
59 | + carTypeId:${carTypeId} | |
60 | + carTypeWeight:${carTypeWeight} | |
61 | + storeTareWeight: | |
62 | + proveType:${proveTypeCode} | |
63 | + grossWeight:${grossWeight} | |
64 | + tareWeight:${tareWeight} | |
65 | + weight:${grossWeight} | |
66 | + goodsNum: | |
67 | + itemWeight: | |
68 | + productPrice:1 | |
69 | + unitPrice:${unitPrice} | |
70 | + depName:${feeDepName} | |
71 | + calcDepId:${feeDepId} | |
72 | + regionName: | |
73 | + regionId:0 | |
74 | + productName:${productName} | |
75 | + productId:${productId} | |
76 | + productArea:万州区 | |
77 | + parentId: | |
78 | + levelType: | |
79 | + originId:${originId} | |
80 | + tradeTypeId:${tradeTypeId} | |
81 | + chargeTotalAmount: | |
82 | + chargeTotalAmountYuan: | |
83 | + freezeMoneySymbol: | |
84 | + comparisonFreezeAmount: | |
85 | + created:${created} | |
86 | + remark: | |
87 | + goodsTagIds:${goodsTagIds} | |
88 | + shareRatio:${shareRatio} | |
89 | + handlingTeam: | |
90 | + handlingRatio: | |
91 | + handActualAmount: | |
92 | + handManageAmount: | |
93 | + handCollectionAmount: | |
94 | + receivableAmount: | |
95 | + categoryName:${productName} | |
96 | + categoryId:${productId} | |
97 | + driverTel: | |
98 | + grossWeightDate:${grossWeightDate} | |
99 | + tareWeightDate:${tareWeightDate} | |
100 | + grossPathName: | |
101 | + grossPathId: | |
102 | + tarePathId: | |
103 | + goodsRemark: | |
104 | + inGreeterName: | |
105 | + inGreeterId:0 | |
106 | + outGreeterId: | |
107 | + sumPrice:${sumPrice} | |
108 | + shipperName: | |
109 | + shipperId: | |
110 | + shipperPhone: | |
111 | + feeDepName: | |
112 | + """ | |
113 | + url = host + "/calculate/index.action" | |
114 | + headers = dct.urlCode() | |
115 | + | |
116 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "pay", "optType": "optType", "optUrl": "", | |
117 | + "correctInfo": "correctInfo", "weightType": "weightType", "id": "orderId", "goodsId": "goodsId", | |
118 | + "number": "number", "modified": "time", "status": "status", "source": "source", "updateFeeItems": "", | |
119 | + "correctDiscount": "correctDiscount", "totalAmount": "", "customerId": "0", "fundAccount": "", | |
120 | + "accountId":"","ic": "","customerName": "", "customerPhone": "", "payway": "刷卡", "plate": "plate", | |
121 | + "autocomplete-cartype": "carTypeCode(carTypeName)", "carTypeName": "carTypeName", | |
122 | + "carTypeCode": "carTypeCode", "carTypeId": "carTypeId", "carTypeWeight": "carTypeWeight", | |
123 | + "storeTareWeight": "", "proveType": "proveTypeCode", "grossWeight": "grossWeight", | |
124 | + "tareWeight": "tareWeight", "weight": "grossWeight", "goodsNum": "", "itemWeight": "", | |
125 | + "productPrice": "1.00000", "unitPrice": "unitPrice", "depName": "feeDepName", | |
126 | + "regionName": "", "regionId": "0", "productName": "productName", "productId": "productId", | |
127 | + "productArea": "重庆,重庆市,万州区", "parentId": "", "levelType": "", "originId": "originId", "tradeTypeId": "tradeTypeId", | |
128 | + "chargeTotalAmount": "", "chargeTotalAmountYuan": "", "freezeMoneySymbol": "", "comparisonFreezeAmount": "", | |
129 | + "created": "created", "remark": "false", "goodsTagIds": "goodsTagIds", "shareRatio": "shareRatio", | |
130 | + "handlingTeam": "", "handlingRatio": "", "handActualAmount": "", "handManageAmount": "", | |
131 | + "handCollectionAmount": "", "receivableAmount": "", "categoryName": "productName", | |
132 | + "categoryId": "productId", "driverTel": "", "grossWeightDate": "grossWeightDate", | |
133 | + "tareWeightDate": "tareWeightDate", "grossPathName": "", "grossPathId": "", "tarePathId": "", | |
134 | + "goodsRemark": "", "inGreeterName": "", "inGreeterId": "0", "outGreeterId": "", "sumPrice": "sumPrice", | |
135 | + "shipperName": "", "shipperId": "", "shipperPhone": ""} | |
136 | + data["autocomplete-cartype"]=autocompletecartype | |
137 | + data = dict(data,**kwargs) | |
138 | + print("get_calculateRes",data) | |
139 | + res = my.useHeadersRequests("post", url=url,data=data,headers=headers) | |
140 | + return res | |
141 | + | |
142 | +def do_doCorrect(host="",autocompletecartype=None,fee_str="",**kwargs): | |
143 | + """进门单缴费""" | |
144 | + url = host + "/entranceFeeBill/doCorrect.action" | |
145 | + headers = dct.urlCode() | |
146 | + | |
147 | + # data = {"protocolId":"","pwd":"","clientRedirectTag":"","viewType":"unfreeze","optType":"0","optUrl":"","correctInfo":"1","weightType":"1","id":"3968","goodsId":"3982","number":"202108110900122","modified":"2021-08-11+17:32:50","status":"3","source":"1","updateFeeItems":"","correctDiscount":"1","totalAmount":"800","customerId":"389","fundAccount":"105847","accountId":"105847","ic":"888810032426","customerName":"长歌买家省内啊啊啊嘿","customerPhone":"18011501258","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":"水果部","dep":"58","regionId":"72","productName":"雪莲果","productId":"14158","productArea":"重庆,重庆市,万州区","originId":"500101","tradeTypeId":"71","chargeTotalAmount":"800","chargeTotalAmountYuan":"8","freezeMoneySymbol":"13","comparisonFreezeAmount":"13","created":"2021-08-11+17:32:27","remark":"备注","goodsTagIds":"1900","shareRatio":"0","handlingTeam":"","steveTeamId":"","handlingRatio":"","handActualAmount":"0","handManageAmount":"0","handCollectionAmount":"0","marketFlag":"sy","totalMoney":"800","receivable":"1300","collectionPrice":"0","discountAmount":"500","handReceivableAmount":"0","itemReceivableAmount":"1300","receivableAmount":"1300","categoryName":"水果","categoryId":"14436","driverTel":"","grossWeightDate":"2021-08-11+17:32:27","tareWeightDate":"2021-08-11+17:32:27","grossPathName":"","grossPathId":"","tarePathId":"","goodsRemark":"备注","inGreeterName":"通用测试","inGreeterId":"274","outGreeterId":"","sumPrice":"2000","shipperName":"","shipperId":"","shipperPhone":"","feeDepId":"0"} | |
148 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "unfreeze", "optType": "0", "optUrl": "", | |
149 | + "correctInfo": "1", "weightType": "1", "id": "3968", "goodsId": "3982", "number": "202108110900122", | |
150 | + "modified": "2021-08-11+17:32:50", "status": "3", "source": "1", "updateFeeItems": "", | |
151 | + "correctDiscount": "1", "totalAmount": "800", "customerId": "389", "fundAccount": "105847", | |
152 | + "accountId": "105847", "ic": "888810032426", "customerName": "长歌买家省内啊啊啊嘿", "customerPhone": "18011501258", | |
153 | + "payway": "刷卡", "plate": "川B00001", "autocomplete-cartype": "003(板车)", "carTypeName": "板车", | |
154 | + "carTypeCode": "003", "carTypeId": "53", "carTypeWeight": "333", "storeTareWeight": "", "proveType": "1621", | |
155 | + "grossWeight": "353", "tareWeight": "333", "weight": "20", "goodsNum": "", "itemWeight": "", | |
156 | + "productPrice": "1.00000", "unitPrice": "100.0", "depName": "水果部", "dep": "58", "regionId": "72", | |
157 | + "productName": "雪莲果", "productId": "14158", "productArea": "重庆,重庆市,万州区", "originId": "500101", | |
158 | + "tradeTypeId": "71", "chargeTotalAmount": "800", "chargeTotalAmountYuan": "8", "freezeMoneySymbol": "13", | |
159 | + "comparisonFreezeAmount": "13", "created": "2021-08-11+17:32:27", "remark": "备注", "goodsTagIds": "1900", | |
160 | + "shareRatio": "0", "handlingTeam": "", "steveTeamId": "", "handlingRatio": "", "handActualAmount": "0", | |
161 | + "handManageAmount": "0", "handCollectionAmount": "0", "marketFlag": "sy", "totalMoney": "800", | |
162 | + "receivable": "1300", "collectionPrice": "0", "discountAmount": "500", "handReceivableAmount": "0", | |
163 | + "itemReceivableAmount": "1300", "receivableAmount": "1300", "categoryName": "水果", "categoryId": "14436", | |
164 | + "driverTel": "", "grossWeightDate": "2021-08-11+17:32:27", "tareWeightDate": "2021-08-11+17:32:27", | |
165 | + "grossPathName": "", "grossPathId": "", "tarePathId": "", "goodsRemark": "备注", "inGreeterName": "通用测试", | |
166 | + "inGreeterId": "274", "outGreeterId": "", "sumPrice": "2000", "shipperName": "", "shipperId": "", | |
167 | + "shipperPhone": "", "feeDepId": "0"} | |
168 | + | |
169 | + data["autocomplete-cartype"] = autocompletecartype | |
170 | + data = dict(data, **kwargs) | |
171 | + data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str | |
172 | + print("================开始请求================") | |
173 | + res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers) | |
174 | + return res | |
175 | + | |
176 | +def do_correctOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900032",pwd="111111", | |
177 | + ic=888810032426): | |
178 | + a = eFBL.listPage(host=host, attrName=attrName, attrValue=attrValue) | |
179 | + print("listPage", a.json()) | |
180 | + orderId = a.json()["rows"][0]["id"] | |
181 | + number = a.json()["rows"][0]["number"] | |
182 | + created = a.json()["rows"][0]["created"] | |
183 | + print(orderId) | |
184 | + | |
185 | + # # 订单详情获取 | |
186 | + resOrderDetails = get_orderCorrect(host=host, orderId=orderId) | |
187 | + print(resOrderDetails.text) | |
188 | + | |
189 | + # bs取值 | |
190 | + orderDetailsList = BeautifulSoup(resOrderDetails.text, "html.parser").findAll("input") | |
191 | + orderDetailsDict = {i.get("name"): i.get("value") for i in orderDetailsList} | |
192 | + print("orderDetailsDict",orderDetailsDict) | |
193 | + unitPrice = orderDetailsDict["unitPrice"] | |
194 | + regionId=orderDetailsDict["regionId"] | |
195 | + goodsId = orderDetailsDict["goodsId"] | |
196 | + status = orderDetailsDict["status"] | |
197 | + source = orderDetailsDict["source"] | |
198 | + optType = orderDetailsDict["optType"] | |
199 | + correctInfo = orderDetailsDict["correctInfo"] | |
200 | + weightType = orderDetailsDict["weightType"] | |
201 | + correctDiscount = orderDetailsDict["correctDiscount"] | |
202 | + goodsTagIds = orderDetailsDict["goodsTagIds"] | |
203 | + sumPrice = orderDetailsDict["sumPrice"] | |
204 | + tradeTypeId = orderDetailsDict["tradeTypeId"] | |
205 | + shareRatio = orderDetailsDict["shareRatio"] | |
206 | + plate = orderDetailsDict["plate"] | |
207 | + carTypeName = orderDetailsDict["carTypeName"] | |
208 | + carTypeCode = orderDetailsDict["carTypeCode"] | |
209 | + carTypeId = orderDetailsDict["carTypeId"] | |
210 | + carTypeWeight = orderDetailsDict["carTypeWeight"] | |
211 | + proveType = orderDetailsDict["proveType"] | |
212 | + grossWeight = orderDetailsDict["grossWeight"] | |
213 | + tareWeight = orderDetailsDict["tareWeight"] | |
214 | + depName = orderDetailsDict["depName"] | |
215 | + dep = orderDetailsDict["dep"] | |
216 | + productName = orderDetailsDict["productName"] | |
217 | + productId = orderDetailsDict["productId"] | |
218 | + grossWeightDate = orderDetailsDict["grossWeightDate"] | |
219 | + tareWeightDate = orderDetailsDict["tareWeightDate"] | |
220 | + weight = orderDetailsDict["weight"] | |
221 | + categoryName = orderDetailsDict["categoryName"] | |
222 | + categoryId = orderDetailsDict["categoryId"] | |
223 | + inGreeterName = orderDetailsDict["inGreeterName"] | |
224 | + inGreeterId = orderDetailsDict["inGreeterId"] | |
225 | + productArea = orderDetailsDict["productArea"] | |
226 | + productPrice = orderDetailsDict["productPrice"] | |
227 | + | |
228 | + | |
229 | + # 用户信息获取 | |
230 | + res = eFBL.get_icCheck(host=host, ic=ic) | |
231 | + print(res.text) | |
232 | + customerId = res.json()["data"]["aInfo"]["customerId"] | |
233 | + customerName = res.json()["data"]["aInfo"]["customerName"] | |
234 | + accountId = res.json()["data"]["aInfo"]["accountId"] | |
235 | + mobile = res.json()["data"]["aInfo"]["mobile"] | |
236 | + | |
237 | + # 省市区获取 | |
238 | + res = eFBL.get_city(host=host, name="万州") | |
239 | + print(res.text) | |
240 | + originId = res.json()["suggestions"][0]["id"] | |
241 | + | |
242 | + # # 获取缴费金额 | |
243 | + autocompletecartype = f"{carTypeCode}({carTypeName})" | |
244 | + print(autocompletecartype) | |
245 | + modified = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | |
246 | + | |
247 | + # 获取缴费金额 | |
248 | + res = get_calculateRes(host=host, autocompletecartype=autocompletecartype, optType=optType, correctInfo=correctInfo, | |
249 | + weightType=weightType, id=orderId, goodsId=goodsId, number=number, modified=modified, | |
250 | + status=status, | |
251 | + source=source, correctDiscount=correctDiscount, plate=plate, carTypeName=carTypeName, | |
252 | + carTypeCode=carTypeCode, | |
253 | + carTypeId=carTypeId, carTypeWeight=carTypeWeight, proveType=proveType, | |
254 | + grossWeight=grossWeight, | |
255 | + tareWeight=tareWeight, unitPrice=unitPrice, depName=depName, productName=productName, | |
256 | + productId=productId, originId=originId, tradeTypeId=tradeTypeId, created=created, | |
257 | + goodsTagIds=goodsTagIds, | |
258 | + shareRatio=shareRatio, categoryName=categoryName, categoryId=categoryId, | |
259 | + grossWeightDate=grossWeightDate, | |
260 | + tareWeightDate=tareWeightDate, sumPrice=sumPrice, weight=weight, | |
261 | + inGreeterName=inGreeterName, inGreeterId=inGreeterId) | |
262 | + | |
263 | + # 缴费信息 | |
264 | + totalMoney = re.findall('name="totalMoney" value="(.*?)">', res.text)[0] | |
265 | + discountAmount = re.findall('name="discountAmount" value="(.*?)">', res.text)[0] | |
266 | + handReceivableAmount = re.findall('name="handReceivableAmount" value="(.*?)">', res.text)[0] | |
267 | + correctDiscount = re.findall('id="correctDiscount" name="correctDiscount" value="(.*?)">', res.text)[0] | |
268 | + receivable = re.findall('id="creceivableLong" name="receivable" value="(.*?)">', res.text)[0] | |
269 | + collectionPrice = re.findall('name="collectionPrice" value="(.*?)"', res.text)[0] | |
270 | + | |
271 | + # 查找dl标签class为包含'ui-font-'字符的所有dl标签 | |
272 | + soup = BeautifulSoup(res.text, "html.parser") | |
273 | + fee_str = "correctDiscount=1&billItems=&billItemsDic=" | |
274 | + fee_int = 0 | |
275 | + discount_amount = 0 | |
276 | + for tag in soup.findAll("div", class_="d-flex align-items-center"): | |
277 | + c = tag.findAll("input") | |
278 | + for i in c: | |
279 | + if i.get("name") != None: | |
280 | + fee_str = fee_str + "&" + i.get("name") + "=" + urllib.parse.quote(i.get("value")) | |
281 | + if i.get("type") == "text": | |
282 | + fee_int = fee_int + int(float(i.get("value"))) | |
283 | + if "优惠" in i.get("value"): | |
284 | + discount_amount = discount_amount + int(json.loads(i.get("value"))["receivable"]) / 100 | |
285 | + | |
286 | + id = orderId | |
287 | + totalAmount = totalMoney | |
288 | + customerPhone = mobile | |
289 | + chargeTotalAmount = totalMoney | |
290 | + chargeTotalAmountYuan = fee_int - int(discount_amount) | |
291 | + freezeMoneySymbol = fee_int | |
292 | + comparisonFreezeAmount = fee_int | |
293 | + modified = created | |
294 | + firmCode = my.userInfo["data"]["user"]["firmCode"] | |
295 | + marketFlag = firmCode | |
296 | + itemReceivableAmount = receivable | |
297 | + receivableAmount = receivable | |
298 | + tareWeightDate = tareWeightDate | |
299 | + | |
300 | + aa = do_doCorrect(host=host, autocompletecartype=autocompletecartype, fee_str=fee_str, pwd=pwd, optType=optType, | |
301 | + weightType=weightType, id=id, goodsId=goodsId, number=number, created=created, status=status, | |
302 | + source=source, | |
303 | + correctDiscount=correctDiscount, totalAmount=totalAmount, customerId=customerId, | |
304 | + fundAccount=accountId, | |
305 | + accountId=accountId, ic=ic, customerName=customerName, customerPhone=customerPhone, plate=plate, | |
306 | + carTypeName=carTypeName, carTypeCode=carTypeCode, carTypeId=carTypeId, carTypeWeight=carTypeWeight, | |
307 | + proveType=proveType, grossWeight=grossWeight, tareWeight=tareWeight, weight=weight, | |
308 | + productPrice=productPrice, | |
309 | + unitPrice=unitPrice, depName=depName, dep=dep, | |
310 | + regionId=regionId, | |
311 | + productName=productName, productId=productId, productArea=productArea, originId=originId, | |
312 | + tradeTypeId=tradeTypeId, correctInfo=correctInfo, chargeTotalAmount=chargeTotalAmount, | |
313 | + freezeMoneySymbol=freezeMoneySymbol, comparisonFreezeAmount=comparisonFreezeAmount, modified=modified, | |
314 | + goodsTagIds=goodsTagIds, marketFlag=marketFlag, totalMoney=totalMoney, receivable=receivable, | |
315 | + collectionPrice=collectionPrice, discountAmount=discountAmount, | |
316 | + handReceivableAmount=handReceivableAmount, | |
317 | + itemReceivableAmount=itemReceivableAmount, receivableAmount=receivableAmount, | |
318 | + categoryName=categoryName, | |
319 | + categoryId=carTypeId, grossWeightDate=grossWeightDate, tareWeightDate=tareWeightDate, | |
320 | + sumPrice=sumPrice, | |
321 | + chargeTotalAmountYuan=chargeTotalAmountYuan) | |
322 | + | |
323 | + print(aa.text) | |
324 | + return aa | |
325 | + | |
326 | +# time.sleep(5) | |
327 | +# do_correctOrder(attrValue="202108130900121") | |
0 | 328 | \ No newline at end of file | ... | ... |
commons/api/entranceFeeBillList/operationDoInvalid.py
... | ... | @@ -18,7 +18,7 @@ from bs4 import BeautifulSoup |
18 | 18 | import urllib.parse |
19 | 19 | |
20 | 20 | |
21 | -def get_orderUnfreeze(host="",orderId=None): | |
21 | +def get_orderInvalid(host="",orderId=None): | |
22 | 22 | """获取订单详情""" |
23 | 23 | headers = dct.urlCode() |
24 | 24 | url = host + f"/entranceFeeBill/invalid/{orderId}.action" |
... | ... | @@ -144,7 +144,6 @@ def do_doInvalid(host="",autocompletecartype=None,fee_str="",**kwargs): |
144 | 144 | url = host + "/entranceFeeBill/doInvalid.action" |
145 | 145 | headers = dct.urlCode() |
146 | 146 | |
147 | - # data = {"protocolId":"","pwd":"","clientRedirectTag":"","viewType":"unfreeze","optType":"0","optUrl":"","correctInfo":"1","weightType":"1","id":"3968","goodsId":"3982","number":"202108110900122","modified":"2021-08-11+17:32:50","status":"3","source":"1","updateFeeItems":"","correctDiscount":"1","totalAmount":"800","customerId":"389","fundAccount":"105847","accountId":"105847","ic":"888810032426","customerName":"长歌买家省内啊啊啊嘿","customerPhone":"18011501258","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":"水果部","dep":"58","regionId":"72","productName":"雪莲果","productId":"14158","productArea":"重庆,重庆市,万州区","originId":"500101","tradeTypeId":"71","chargeTotalAmount":"800","chargeTotalAmountYuan":"8","freezeMoneySymbol":"13","comparisonFreezeAmount":"13","created":"2021-08-11+17:32:27","remark":"备注","goodsTagIds":"1900","shareRatio":"0","handlingTeam":"","steveTeamId":"","handlingRatio":"","handActualAmount":"0","handManageAmount":"0","handCollectionAmount":"0","marketFlag":"sy","totalMoney":"800","receivable":"1300","collectionPrice":"0","discountAmount":"500","handReceivableAmount":"0","itemReceivableAmount":"1300","receivableAmount":"1300","categoryName":"水果","categoryId":"14436","driverTel":"","grossWeightDate":"2021-08-11+17:32:27","tareWeightDate":"2021-08-11+17:32:27","grossPathName":"","grossPathId":"","tarePathId":"","goodsRemark":"备注","inGreeterName":"通用测试","inGreeterId":"274","outGreeterId":"","sumPrice":"2000","shipperName":"","shipperId":"","shipperPhone":"","feeDepId":"0"} | |
148 | 147 | data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "unfreeze", "optType": "0", "optUrl": "", |
149 | 148 | "correctInfo": "1", "weightType": "1", "id": "3968", "goodsId": "3982", "number": "202108110900122", |
150 | 149 | "modified": "2021-08-11+17:32:50", "status": "3", "source": "1", "updateFeeItems": "", |
... | ... | @@ -183,7 +182,7 @@ def do_invalidOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单 |
183 | 182 | print(orderId) |
184 | 183 | |
185 | 184 | # # 订单详情获取 |
186 | - resOrderDetails = eFBL.get_orderUnfreeze(host=host, orderId=orderId) | |
185 | + resOrderDetails = get_orderInvalid(host=host, orderId=orderId) | |
187 | 186 | |
188 | 187 | # bs取值 |
189 | 188 | orderDetailsList = BeautifulSoup(resOrderDetails.text, "html.parser").findAll("input") |
... | ... | @@ -323,4 +322,4 @@ def do_invalidOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单 |
323 | 322 | return aa |
324 | 323 | |
325 | 324 | # time.sleep(5) |
326 | -# do_invalidOrder(attrValue="202108130900098") | |
327 | 325 | \ No newline at end of file |
326 | +# do_invalidOrder(attrValue="202108130900105") | |
328 | 327 | \ No newline at end of file | ... | ... |
commons/api/entranceFeeBillList/operationDoUpdate.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | + | |
3 | +# @Time : 2021/8/13 14:08 | |
4 | +# @Author : Ljq | |
5 | +# @File : operationModify.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.MySession import my | |
16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL | |
17 | +from bs4 import BeautifulSoup | |
18 | +import urllib.parse | |
19 | + | |
20 | + | |
21 | +def get_orderUpdate(host="",orderId=None): | |
22 | + """获取订单详情""" | |
23 | + headers = dct.urlCode() | |
24 | + url = host + f"/entranceFeeBill/update/{orderId}.action" | |
25 | + res = my.useHeadersRequests("get", url=url, headers=headers) | |
26 | + return res | |
27 | + | |
28 | + | |
29 | +def get_calculateRes(host="",autocompletecartype=None,**kwargs): | |
30 | + """缴费金额获取 | |
31 | + :params kwargs: | |
32 | + protocolId: | |
33 | + pwd: | |
34 | + clientRedirectTag: | |
35 | + viewType:pay | |
36 | + optType:${optType} | |
37 | + optUrl: | |
38 | + correctInfo:${correctInfo} | |
39 | + weightType:${weightType} | |
40 | + id:${orderId} | |
41 | + goodsId:${goodsId} | |
42 | + number:${number} | |
43 | + modified:${__time(yyyy-MM-dd HH:mm:ss,)} | |
44 | + status:${status} | |
45 | + source:${source} | |
46 | + updateFeeItems: | |
47 | + correctDiscount:${correctDiscount} | |
48 | + totalAmount: | |
49 | + customerId:0 | |
50 | + fundAccount: | |
51 | + ic: | |
52 | + customerName: | |
53 | + customerPhone: | |
54 | + payway:刷卡 | |
55 | + plate:${plate} | |
56 | + autocomplete-cartype:${carTypeCode}(${carTypeName}) | |
57 | + carTypeName:${carTypeName} | |
58 | + carTypeCode:${carTypeCode} | |
59 | + carTypeId:${carTypeId} | |
60 | + carTypeWeight:${carTypeWeight} | |
61 | + storeTareWeight: | |
62 | + proveType:${proveTypeCode} | |
63 | + grossWeight:${grossWeight} | |
64 | + tareWeight:${tareWeight} | |
65 | + weight:${grossWeight} | |
66 | + goodsNum: | |
67 | + itemWeight: | |
68 | + productPrice:1 | |
69 | + unitPrice:${unitPrice} | |
70 | + depName:${feeDepName} | |
71 | + calcDepId:${feeDepId} | |
72 | + regionName: | |
73 | + regionId:0 | |
74 | + productName:${productName} | |
75 | + productId:${productId} | |
76 | + productArea:万州区 | |
77 | + parentId: | |
78 | + levelType: | |
79 | + originId:${originId} | |
80 | + tradeTypeId:${tradeTypeId} | |
81 | + chargeTotalAmount: | |
82 | + chargeTotalAmountYuan: | |
83 | + freezeMoneySymbol: | |
84 | + comparisonFreezeAmount: | |
85 | + created:${created} | |
86 | + remark: | |
87 | + goodsTagIds:${goodsTagIds} | |
88 | + shareRatio:${shareRatio} | |
89 | + handlingTeam: | |
90 | + handlingRatio: | |
91 | + handActualAmount: | |
92 | + handManageAmount: | |
93 | + handCollectionAmount: | |
94 | + receivableAmount: | |
95 | + categoryName:${productName} | |
96 | + categoryId:${productId} | |
97 | + driverTel: | |
98 | + grossWeightDate:${grossWeightDate} | |
99 | + tareWeightDate:${tareWeightDate} | |
100 | + grossPathName: | |
101 | + grossPathId: | |
102 | + tarePathId: | |
103 | + goodsRemark: | |
104 | + inGreeterName: | |
105 | + inGreeterId:0 | |
106 | + outGreeterId: | |
107 | + sumPrice:${sumPrice} | |
108 | + shipperName: | |
109 | + shipperId: | |
110 | + shipperPhone: | |
111 | + feeDepName: | |
112 | + """ | |
113 | + url = host + "/calculate/index.action" | |
114 | + headers = dct.urlCode() | |
115 | + | |
116 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "pay", "optType": "optType", "optUrl": "", | |
117 | + "correctInfo": "correctInfo", "weightType": "weightType", "id": "orderId", "goodsId": "goodsId", | |
118 | + "number": "number", "modified": "time", "status": "status", "source": "source", "updateFeeItems": "", | |
119 | + "correctDiscount": "correctDiscount", "totalAmount": "", "customerId": "0", "fundAccount": "", | |
120 | + "accountId":"","ic": "","customerName": "", "customerPhone": "", "payway": "刷卡", "plate": "plate", | |
121 | + "autocomplete-cartype": "carTypeCode(carTypeName)", "carTypeName": "carTypeName", | |
122 | + "carTypeCode": "carTypeCode", "carTypeId": "carTypeId", "carTypeWeight": "carTypeWeight", | |
123 | + "storeTareWeight": "", "proveType": "proveTypeCode", "grossWeight": "grossWeight", | |
124 | + "tareWeight": "tareWeight", "weight": "grossWeight", "goodsNum": "", "itemWeight": "", | |
125 | + "productPrice": "1.00000", "unitPrice": "unitPrice", "depName": "feeDepName", | |
126 | + "regionName": "", "regionId": "0", "productName": "productName", "productId": "productId", | |
127 | + "productArea": "重庆,重庆市,万州区", "parentId": "", "levelType": "", "originId": "originId", "tradeTypeId": "tradeTypeId", | |
128 | + "chargeTotalAmount": "", "chargeTotalAmountYuan": "", "freezeMoneySymbol": "", "comparisonFreezeAmount": "", | |
129 | + "created": "created", "remark": "false", "goodsTagIds": "goodsTagIds", "shareRatio": "shareRatio", | |
130 | + "handlingTeam": "", "handlingRatio": "", "handActualAmount": "", "handManageAmount": "", | |
131 | + "handCollectionAmount": "", "receivableAmount": "", "categoryName": "productName", | |
132 | + "categoryId": "productId", "driverTel": "", "grossWeightDate": "grossWeightDate", | |
133 | + "tareWeightDate": "tareWeightDate", "grossPathName": "", "grossPathId": "", "tarePathId": "", | |
134 | + "goodsRemark": "", "inGreeterName": "", "inGreeterId": "0", "outGreeterId": "", "sumPrice": "sumPrice", | |
135 | + "shipperName": "", "shipperId": "", "shipperPhone": ""} | |
136 | + data["autocomplete-cartype"]=autocompletecartype | |
137 | + data = dict(data,**kwargs) | |
138 | + print("get_calculateRes",data) | |
139 | + res = my.useHeadersRequests("post", url=url,data=data,headers=headers) | |
140 | + return res | |
141 | + | |
142 | +def do_doUpdate(host="",autocompletecartype=None,fee_str="",**kwargs): | |
143 | + """进门单缴费""" | |
144 | + url = host + "/entranceFeeBill/doUpdate.action" | |
145 | + headers = dct.urlCode() | |
146 | + | |
147 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "update", "optType": "0", "optUrl": "", | |
148 | + "correctInfo": "1", "weightType": "1", "id": "3968", "goodsId": "3982", "number": "202108110900122", | |
149 | + "modified": "2021-08-11+17:32:50", "status": "3", "source": "1", "updateFeeItems": "", | |
150 | + "correctDiscount": "1", "totalAmount": "800", "customerId": "389", "fundAccount": "105847", | |
151 | + "accountId": "105847", "ic": "888810032426", "customerName": "长歌买家省内啊啊啊嘿", "customerPhone": "18011501258", | |
152 | + "payway": "刷卡", "plate": "川B00001", "autocomplete-cartype": "003(板车)", "carTypeName": "板车", | |
153 | + "carTypeCode": "003", "carTypeId": "53", "carTypeWeight": "333", "storeTareWeight": "", "proveType": "1621", | |
154 | + "grossWeight": "353", "tareWeight": "333", "weight": "20", "goodsNum": "", "itemWeight": "", | |
155 | + "productPrice": "1.00000", "unitPrice": "100.0", "depName": "水果部", "dep": "58", "regionId": "72", | |
156 | + "productName": "雪莲果", "productId": "14158", "productArea": "重庆,重庆市,万州区", "originId": "500101", | |
157 | + "tradeTypeId": "71", "chargeTotalAmount": "800", "chargeTotalAmountYuan": "8", "freezeMoneySymbol": "13", | |
158 | + "comparisonFreezeAmount": "13", "created": "2021-08-11+17:32:27", "remark": "备注", "goodsTagIds": "1900", | |
159 | + "shareRatio": "0", "handlingTeam": "", "steveTeamId": "", "handlingRatio": "", "handActualAmount": "0", | |
160 | + "handManageAmount": "0", "handCollectionAmount": "0", "marketFlag": "sy", "totalMoney": "800", | |
161 | + "receivable": "1300", "collectionPrice": "0", "discountAmount": "500", "handReceivableAmount": "0", | |
162 | + "itemReceivableAmount": "1300", "receivableAmount": "1300", "categoryName": "水果", "categoryId": "14436", | |
163 | + "driverTel": "", "grossWeightDate": "2021-08-11+17:32:27", "tareWeightDate": "2021-08-11+17:32:27", | |
164 | + "grossPathName": "", "grossPathId": "", "tarePathId": "", "goodsRemark": "备注", "inGreeterName": "通用测试", | |
165 | + "inGreeterId": "274", "outGreeterId": "", "sumPrice": "2000", "shipperName": "", "shipperId": "", | |
166 | + "shipperPhone": "", "feeDepId": "0"} | |
167 | + | |
168 | + data["autocomplete-cartype"] = autocompletecartype | |
169 | + data = dict(data, **kwargs) | |
170 | + data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str | |
171 | + print("================开始请求================") | |
172 | + res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers) | |
173 | + return res | |
174 | + | |
175 | +def do_updateOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号",attrValue="202108060900032",pwd="111111", | |
176 | + ic=888810032426): | |
177 | + a = eFBL.listPage(host=host, attrName=attrName, attrValue=attrValue) | |
178 | + print("listPage", a.json()) | |
179 | + orderId = a.json()["rows"][0]["id"] | |
180 | + number = a.json()["rows"][0]["number"] | |
181 | + created = a.json()["rows"][0]["created"] | |
182 | + print(orderId) | |
183 | + | |
184 | + # # 订单详情获取 | |
185 | + resOrderDetails = get_orderUpdate(host=host, orderId=orderId) | |
186 | + | |
187 | + # bs取值 | |
188 | + orderDetailsList = BeautifulSoup(resOrderDetails.text, "html.parser").findAll("input") | |
189 | + orderDetailsDict = {i.get("name"): i.get("value") for i in orderDetailsList} | |
190 | + print("orderDetailsDict",orderDetailsDict) | |
191 | + unitPrice = orderDetailsDict["unitPrice"] | |
192 | + # regionId=orderDetailsDict["regionId"] | |
193 | + goodsId = orderDetailsDict["goodsId"] | |
194 | + status = orderDetailsDict["status"] | |
195 | + source = orderDetailsDict["source"] | |
196 | + optType = orderDetailsDict["optType"] | |
197 | + correctInfo = orderDetailsDict["correctInfo"] | |
198 | + weightType = orderDetailsDict["weightType"] | |
199 | + correctDiscount = orderDetailsDict["correctDiscount"] | |
200 | + goodsTagIds = orderDetailsDict["goodsTagIds"] | |
201 | + sumPrice = orderDetailsDict["sumPrice"] | |
202 | + tradeTypeId = orderDetailsDict["tradeTypeId"] | |
203 | + shareRatio = orderDetailsDict["shareRatio"] | |
204 | + plate = orderDetailsDict["plate"] | |
205 | + carTypeName = orderDetailsDict["carTypeName"] | |
206 | + carTypeCode = orderDetailsDict["carTypeCode"] | |
207 | + carTypeId = orderDetailsDict["carTypeId"] | |
208 | + carTypeWeight = orderDetailsDict["carTypeWeight"] | |
209 | + proveType = orderDetailsDict["proveType"] | |
210 | + grossWeight = orderDetailsDict["grossWeight"] | |
211 | + tareWeight = orderDetailsDict["tareWeight"] | |
212 | + depName = orderDetailsDict["depName"] | |
213 | + # dep = orderDetailsDict["dep"] | |
214 | + productName = orderDetailsDict["productName"] | |
215 | + productId = orderDetailsDict["productId"] | |
216 | + grossWeightDate = orderDetailsDict["grossWeightDate"] | |
217 | + tareWeightDate = orderDetailsDict["tareWeightDate"] | |
218 | + weight = orderDetailsDict["weight"] | |
219 | + categoryName = orderDetailsDict["categoryName"] | |
220 | + categoryId = orderDetailsDict["categoryId"] | |
221 | + inGreeterName = orderDetailsDict["inGreeterName"] | |
222 | + inGreeterId = orderDetailsDict["inGreeterId"] | |
223 | + productArea = orderDetailsDict["productArea"] | |
224 | + productPrice = orderDetailsDict["productPrice"] | |
225 | + | |
226 | + | |
227 | + # 用户信息获取 | |
228 | + res = eFBL.get_icCheck(host=host, ic=ic) | |
229 | + print(res.text) | |
230 | + customerId = res.json()["data"]["aInfo"]["customerId"] | |
231 | + customerName = res.json()["data"]["aInfo"]["customerName"] | |
232 | + accountId = res.json()["data"]["aInfo"]["accountId"] | |
233 | + mobile = res.json()["data"]["aInfo"]["mobile"] | |
234 | + | |
235 | + # 省市区获取 | |
236 | + res = eFBL.get_city(host=host, name="万州") | |
237 | + print(res.text) | |
238 | + originId = res.json()["suggestions"][0]["id"] | |
239 | + | |
240 | + # # 获取缴费金额 | |
241 | + autocompletecartype = f"{carTypeCode}({carTypeName})" | |
242 | + print(autocompletecartype) | |
243 | + modified = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) | |
244 | + | |
245 | + # 获取缴费金额 | |
246 | + res = get_calculateRes(host=host, autocompletecartype=autocompletecartype, optType=optType, correctInfo=correctInfo, | |
247 | + weightType=weightType, id=orderId, goodsId=goodsId, number=number, modified=modified, | |
248 | + status=status, | |
249 | + source=source, correctDiscount=correctDiscount, plate=plate, carTypeName=carTypeName, | |
250 | + carTypeCode=carTypeCode, | |
251 | + carTypeId=carTypeId, carTypeWeight=carTypeWeight, proveType=proveType, | |
252 | + grossWeight=grossWeight, | |
253 | + tareWeight=tareWeight, unitPrice=unitPrice, depName=depName, productName=productName, | |
254 | + productId=productId, originId=originId, tradeTypeId=tradeTypeId, created=created, | |
255 | + goodsTagIds=goodsTagIds, | |
256 | + shareRatio=shareRatio, categoryName=categoryName, categoryId=categoryId, | |
257 | + grossWeightDate=grossWeightDate, | |
258 | + tareWeightDate=tareWeightDate, sumPrice=sumPrice, weight=weight, | |
259 | + inGreeterName=inGreeterName, inGreeterId=inGreeterId) | |
260 | + | |
261 | + # 缴费信息 | |
262 | + totalMoney = re.findall('name="totalMoney" value="(.*?)">', res.text)[0] | |
263 | + discountAmount = re.findall('name="discountAmount" value="(.*?)">', res.text)[0] | |
264 | + handReceivableAmount = re.findall('name="handReceivableAmount" value="(.*?)">', res.text)[0] | |
265 | + correctDiscount = re.findall('id="correctDiscount" name="correctDiscount" value="(.*?)">', res.text)[0] | |
266 | + receivable = re.findall('id="creceivableLong" name="receivable" value="(.*?)">', res.text)[0] | |
267 | + collectionPrice = re.findall('name="collectionPrice" value="(.*?)"', res.text)[0] | |
268 | + | |
269 | + # 查找dl标签class为包含'ui-font-'字符的所有dl标签 | |
270 | + soup = BeautifulSoup(res.text, "html.parser") | |
271 | + fee_str = "correctDiscount=1&billItems=&billItemsDic=" | |
272 | + fee_int = 0 | |
273 | + discount_amount = 0 | |
274 | + for tag in soup.findAll("div", class_="d-flex align-items-center"): | |
275 | + c = tag.findAll("input") | |
276 | + for i in c: | |
277 | + if i.get("name") != None: | |
278 | + fee_str = fee_str + "&" + i.get("name") + "=" + urllib.parse.quote(i.get("value")) | |
279 | + if i.get("type") == "text": | |
280 | + fee_int = fee_int + int(float(i.get("value"))) | |
281 | + if "优惠" in i.get("value"): | |
282 | + discount_amount = discount_amount + int(json.loads(i.get("value"))["receivable"]) / 100 | |
283 | + | |
284 | + id = orderId | |
285 | + totalAmount = totalMoney | |
286 | + customerPhone = mobile | |
287 | + chargeTotalAmount = totalMoney | |
288 | + chargeTotalAmountYuan = fee_int - int(discount_amount) | |
289 | + freezeMoneySymbol = fee_int | |
290 | + comparisonFreezeAmount = fee_int | |
291 | + modified = created | |
292 | + firmCode = my.userInfo["data"]["user"]["firmCode"] | |
293 | + marketFlag = firmCode | |
294 | + itemReceivableAmount = receivable | |
295 | + receivableAmount = receivable | |
296 | + tareWeightDate = tareWeightDate | |
297 | + | |
298 | + aa = do_doUpdate(host=host, autocompletecartype=autocompletecartype, fee_str=fee_str, pwd=pwd, optType=optType, | |
299 | + weightType=weightType, id=id, goodsId=goodsId, number=number, created=created, status=status, | |
300 | + source=source, | |
301 | + correctDiscount=correctDiscount, totalAmount=totalAmount, customerId=customerId, | |
302 | + fundAccount=accountId, | |
303 | + accountId=accountId, ic=ic, customerName=customerName, customerPhone=customerPhone, plate=plate, | |
304 | + carTypeName=carTypeName, carTypeCode=carTypeCode, carTypeId=carTypeId, carTypeWeight=carTypeWeight, | |
305 | + proveType=proveType, grossWeight=grossWeight, tareWeight=tareWeight, weight=weight, | |
306 | + productPrice=productPrice, | |
307 | + unitPrice=unitPrice, depName=depName, | |
308 | + productName=productName, productId=productId, productArea=productArea, originId=originId, | |
309 | + tradeTypeId=tradeTypeId, correctInfo=correctInfo, chargeTotalAmount=chargeTotalAmount, | |
310 | + freezeMoneySymbol=freezeMoneySymbol, comparisonFreezeAmount=comparisonFreezeAmount, modified=modified, | |
311 | + goodsTagIds=goodsTagIds, marketFlag=marketFlag, totalMoney=totalMoney, receivable=receivable, | |
312 | + collectionPrice=collectionPrice, discountAmount=discountAmount, | |
313 | + handReceivableAmount=handReceivableAmount, | |
314 | + itemReceivableAmount=itemReceivableAmount, receivableAmount=receivableAmount, | |
315 | + categoryName=categoryName, | |
316 | + categoryId=carTypeId, grossWeightDate=grossWeightDate, tareWeightDate=tareWeightDate, | |
317 | + sumPrice=sumPrice, | |
318 | + chargeTotalAmountYuan=chargeTotalAmountYuan) | |
319 | + | |
320 | + print(aa.text) | |
321 | + return aa | |
322 | + | |
323 | +# time.sleep(5) | |
324 | +# do_updateOrder(attrValue="202108130900106") | |
0 | 325 | \ No newline at end of file | ... | ... |
report/test.log
1 | -[2021-08-13 11:30:50] [INFO] : ====================================================================================== | |
2 | -[2021-08-13 11:30:50] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | |
3 | -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'm2VX7krKuHAhaaQJ5asUczCO0HgCxqxdsFOb554TQ2YbZUXwJqq0g5sN9U0hazoMYOeNaApfu4UrG38GSzM/OO/2CbAG6pBhgBb9mz3otVBQLAzrKeh7GD8g2D9gwucGblDun3EESEk3VwQ3m3rsx24K0dsskcl/Ava+dlY1dm4='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | |
1 | +[2021-08-13 15:24:03] [INFO] : ====================================================================================== | |
2 | +[2021-08-13 15:24:03] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | |
3 | +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'Jo8f8Anx1ekGZ4mJDYYRYiY8UivisyVbVKr50TwDthYIuZpSgFgSXEGRb4ij+8AYjZUwO3ZETx5BWolQi15KUcWW+LPDTL/jCHuJ+rTxh9Eh6MlrBn0Esh0khj5vACqFpgpQ+dJ0xPpJeBB7fmgIPUglhBkO0pXxmGz4LHxu56I='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | |
4 | 4 | |
5 | -[2021-08-13 11:30:50] [INFO] : ====================================================================================== | |
6 | -[2021-08-13 11:30:50] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | |
7 | -{'data': None, 'json': {'userName': 'sygangda', 'password': 'bpLYhcg/TeZvGg1V7UqInqwYpzVm/kOqyaB6VJ7kRX33MWFDKCDZpOpUpYQE49paOmCDK2h6SbW02rAPCLhJM/Ehk+2WPOm2qiNUEH8AsXPRd2nYrKevsxYZkbql9LmGqrczCGKx7zAc2VunRl0BeQZ1WPJPPb5yvVtzXWCLKAA='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | |
5 | +[2021-08-13 15:24:03] [INFO] : ====================================================================================== | |
6 | +[2021-08-13 15:24:03] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | |
7 | +{'data': None, 'json': {'userName': 'sygangda', 'password': 'XxlKs1Gy/1v8s3M3lMP3n5bf7nam1sSAFT0AFD6l/QGsKHwOjkyG3P2RldsxM4S+hZsXHtldscKWiYM593o4BbkVcd+RwUOIq862gz+TSCML9icCvY3Fx9SPdH9xSEDiplh+8K6FYro6U/Hm0AUYHWVF6nYNGIU8fYpU9/2xM98='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} | |
8 | 8 | |
9 | -[2021-08-13 11:30:50] [INFO] : ====================================================================================== | |
10 | -[2021-08-13 11:30:50] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | |
11 | -{"businessCode": "jmsf"} | |
9 | +[2021-08-13 15:24:04] [INFO] : ====================================================================================== | |
10 | +[2021-08-13 15:24:04] [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': '202108130900121'} | |
12 | 12 | {} |
13 | 13 | |
14 | -[2021-08-13 11:30:51] [INFO] : ====================================================================================== | |
15 | -[2021-08-13 11:30:51] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | |
16 | -{"marketId": 9, "state": 1, "keyword": "\u852c\u83dc"} | |
17 | -{} | |
18 | - | |
19 | -[2021-08-13 11:30:51] [INFO] : ====================================================================================== | |
20 | -[2021-08-13 11:30:51] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | |
21 | -{"firmCode": "sy", "departmentId": 58, "keyword": ""} | |
22 | -{} | |
23 | - | |
24 | -[2021-08-13 11:30:51] [INFO] : ====================================================================================== | |
25 | -[2021-08-13 11:30:51] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | |
26 | -{"pageNum": 100, "pageSize": 100, "marketId": 9} | |
27 | -{} | |
28 | - | |
29 | -[2021-08-13 11:30:51] [INFO] : ====================================================================================== | |
30 | -[2021-08-13 11:30:51] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
31 | -None | |
32 | -{'params': {'pid': 'goods_tag'}} | |
33 | - | |
34 | -[2021-08-13 11:30:52] [INFO] : ====================================================================================== | |
35 | -[2021-08-13 11:30:52] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | |
36 | -{"province": "C", "city": null, "area": null} | |
37 | -{} | |
38 | - | |
39 | -[2021-08-13 11:30:52] [INFO] : ====================================================================================== | |
40 | -[2021-08-13 11:30:52] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | |
41 | -None | |
42 | -{'params': {'keyword': ''}} | |
43 | - | |
44 | -[2021-08-13 11:30:52] [INFO] : ====================================================================================== | |
45 | -[2021-08-13 11:30:52] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | |
14 | +[2021-08-13 15:24:04] [INFO] : ====================================================================================== | |
15 | +[2021-08-13 15:24:04] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/amend/4201.action | |
46 | 16 | None |
47 | -{'params': {'pid': 'prove_type'}} | |
48 | - | |
49 | -[2021-08-13 11:30:53] [INFO] : ====================================================================================== | |
50 | -[2021-08-13 11:30:53] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | |
51 | -None | |
52 | -{} | |
53 | - | |
54 | -[2021-08-13 11:30:53] [INFO] : ====================================================================================== | |
55 | -[2021-08-13 11:30:53] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | |
56 | -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddA48539", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14152, "productName": "\u852c\u83dc", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 432, "grossWeightDate": "2021-08-13 11:30:53", "newWeight": 99, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddA48539", "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} | |
57 | -{} | |
58 | - | |
59 | -[2021-08-13 11:30:53] [INFO] : ====================================================================================== | |
60 | -[2021-08-13 11:30:53] [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': '202108130900104'} | |
62 | -{} | |
63 | - | |
64 | -[2021-08-13 11:30:54] [INFO] : ====================================================================================== | |
65 | -[2021-08-13 11:30:54] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/unfreeze/4184.action | |
66 | -None | |
67 | -{} | |
68 | - | |
69 | -[2021-08-13 11:30:55] [INFO] : ====================================================================================== | |
70 | -[2021-08-13 11:30:55] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | |
71 | -None | |
72 | -{} | |
73 | - | |
74 | -[2021-08-13 11:30:56] [INFO] : ====================================================================================== | |
75 | -[2021-08-13 11:30:56] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | |
76 | -None | |
77 | -{} | |
78 | - | |
79 | -[2021-08-13 11:30:56] [INFO] : ====================================================================================== | |
80 | -[2021-08-13 11:30:56] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | |
81 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 4184, 'goodsId': '4198', 'number': '202108130900104', 'modified': '2021-08-13 11:30:56', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川A48539', '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': '水果部', 'regionName': '', 'regionId': '0', 'productName': '蔬菜', 'productId': '14152', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-13 11:30:53', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '蔬菜', 'categoryId': '14152', 'driverTel': '', 'grossWeightDate': '2021-08-13 11:30:53', 'tareWeightDate': '2021-08-13 11:30:53', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '测试沈阳', 'inGreeterId': '223', 'outGreeterId': '', 'sumPrice': '9900', 'shipperName': '', 'shipperId': '', 'shipperPhone': ''} | |
82 | -{} | |
83 | - | |
84 | -[2021-08-13 11:30:56] [INFO] : ====================================================================================== | |
85 | -[2021-08-13 11:30:56] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/doInvalid.action | |
86 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=unfreeze&optType=0&optUrl=&correctInfo=1&weightType=1&id=4184&goodsId=4198&number=202108130900104&modified=2021-08-13%2011%3A30%3A53&status=2&source=1&updateFeeItems=&correctDiscount=1&totalAmount=600&customerId=389&fundAccount=105847&accountId=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%9DA48539&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&dep=58®ionId=&productName=%E8%94%AC%E8%8F%9C&productId=14152&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&originId=500101&tradeTypeId=70&chargeTotalAmount=600&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-13%2011%3A30%3A53&remark=%E5%A4%87%E6%B3%A8&goodsTagIds=663&shareRatio=0&handlingTeam=&steveTeamId=&handlingRatio=&handActualAmount=0&handManageAmount=0&handCollectionAmount=0&marketFlag=sy&totalMoney=600&receivable=1300&collectionPrice=200&discountAmount=500&handReceivableAmount=10000&itemReceivableAmount=1300&receivableAmount=1300&categoryName=%E8%94%AC%E8%8F%9C&categoryId=53&driverTel=&grossWeightDate=2021-08-13%2011%3A30%3A53&tareWeightDate=2021-08-13%2011%3A30%3A53&grossPathName=&grossPathId=&tarePathId=&goodsRemark=%E5%A4%87%E6%B3%A8&inGreeterName=%E9%80%9A%E7%94%A8%E6%B5%8B%E8%AF%95&inGreeterId=274&outGreeterId=&sumPrice=9900&shipperName=&shipperId=&shipperPhone=&feeDepId=0&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 | 17 | {} |
88 | 18 | ... | ... |
testcase/test_ZC/demo.py
... | ... | @@ -11,8 +11,13 @@ |
11 | 11 | import json |
12 | 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"] | |
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"] | |
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"] | |
16 | + | |
17 | +# a系统 | |
18 | +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","proveTypeName","proveType","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","dep","regionId","productName","productId","productArea","originId","tradeTypeId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","backSkinTwo","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","bskinWithGoods","goodsRemark","inGreeterName","inGreeterId","outGreeterName","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepName","calcFeeDepId","feeDepId"] | |
19 | +# b自己 | |
20 | +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","grossWeight","tareWeight","weight","goodsNum","itemWeight","productPrice","unitPrice","depName","dep","regionId","productName","productId","productArea","originId","chargeTotalAmount","chargeTotalAmountYuan","freezeMoneySymbol","comparisonFreezeAmount","created","remark","goodsTagIds","shareRatio","handlingTeam","steveTeamId","handlingRatio","handActualAmount","handManageAmount","handCollectionAmount","marketFlag","totalMoney","receivable","collectionPrice","discountAmount","handReceivableAmount","itemReceivableAmount","receivableAmount","categoryName","categoryId","driverTel","grossWeightDate","tareWeightDate","grossPathName","grossPathId","tarePathId","goodsRemark","inGreeterName","inGreeterId","outGreeterId","sumPrice","shipperName","shipperId","shipperPhone","feeDepId","correctDiscount","billItems","billItemsDic","billItemCheckIds","103","billItems","billItemDicCheckIds","billItemsDic","billItemCheckIds","106","billItems"] | |
16 | 21 | |
17 | 22 | c = list(set(a)^set(b)) |
18 | 23 | # print(c) | ... | ... |