Commit f640deaf75b0d0d4da446c75a752beaaff189f33
Merge remote-tracking branch 'origin/master'
Showing
17 changed files
with
1354 additions
and
109 deletions
commons/api/entranceFeeBillList/__init__.py
0 → 100644
commons/api/entranceFeeBillList.py renamed to commons/api/entranceFeeBillList/entranceFeeBillList.py
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 | \ No newline at end of file | 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 | \ No newline at end of file | 328 | \ No newline at end of file |
commons/api/entranceFeeBillList/operationDoInvalid.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | + | ||
3 | +# @Time : 2021/8/13 10:52 | ||
4 | +# @Author : Ljq | ||
5 | +# @File : operationDoInvalid.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_orderInvalid(host="",orderId=None): | ||
22 | + """获取订单详情""" | ||
23 | + headers = dct.urlCode() | ||
24 | + url = host + f"/entranceFeeBill/invalid/{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_doInvalid(host="",autocompletecartype=None,fee_str="",**kwargs): | ||
143 | + """进门单缴费""" | ||
144 | + url = host + "/entranceFeeBill/doInvalid.action" | ||
145 | + headers = dct.urlCode() | ||
146 | + | ||
147 | + data = {"protocolId": "", "pwd": "", "clientRedirectTag": "", "viewType": "unfreeze", "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_invalidOrder(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_orderInvalid(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_doInvalid(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, dep=dep, | ||
308 | + regionId=regionId, | ||
309 | + productName=productName, productId=productId, productArea=productArea, originId=originId, | ||
310 | + tradeTypeId=tradeTypeId, correctInfo=correctInfo, chargeTotalAmount=chargeTotalAmount, | ||
311 | + freezeMoneySymbol=freezeMoneySymbol, comparisonFreezeAmount=comparisonFreezeAmount, modified=modified, | ||
312 | + goodsTagIds=goodsTagIds, marketFlag=marketFlag, totalMoney=totalMoney, receivable=receivable, | ||
313 | + collectionPrice=collectionPrice, discountAmount=discountAmount, | ||
314 | + handReceivableAmount=handReceivableAmount, | ||
315 | + itemReceivableAmount=itemReceivableAmount, receivableAmount=receivableAmount, | ||
316 | + categoryName=categoryName, | ||
317 | + categoryId=carTypeId, grossWeightDate=grossWeightDate, tareWeightDate=tareWeightDate, | ||
318 | + sumPrice=sumPrice, | ||
319 | + chargeTotalAmountYuan=chargeTotalAmountYuan) | ||
320 | + | ||
321 | + print(aa.text) | ||
322 | + return aa | ||
323 | + | ||
324 | +# time.sleep(5) | ||
325 | +# do_invalidOrder(attrValue="202108130900105") | ||
0 | \ No newline at end of file | 326 | \ 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 | \ No newline at end of file | 325 | \ No newline at end of file |
commons/api/entanceOperation.py renamed to commons/api/entranceFeeBillList/operationUnfreeze.py
@@ -13,7 +13,7 @@ import json,time,random,re | @@ -13,7 +13,7 @@ import json,time,random,re | ||
13 | from commons.scripts import dealContentType as dct | 13 | from commons.scripts import dealContentType as dct |
14 | from commons.scripts import jsonToUrlcode | 14 | from commons.scripts import jsonToUrlcode |
15 | from commons.MySession import my | 15 | from commons.MySession import my |
16 | -from commons.api import entranceFeeBillList as eFBL | 16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
17 | from bs4 import BeautifulSoup | 17 | from bs4 import BeautifulSoup |
18 | import urllib.parse | 18 | import urllib.parse |
19 | 19 |
report/test.log
1 | -[2021-08-12 18:40:52] [INFO] : ====================================================================================== | ||
2 | -[2021-08-12 18:40:52] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
3 | -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'TMwrgbaOlLn4QnWUdkq+qALWosYK6LvQBepR5wVm/1WBprZulgw5dCG24lZ/iTc7SLP3FOPc5wQx4e4DfUKSKbT2RqDSrVjdwxH8AjlOhVoaSfaa64yO/IUDamyI8jn8U7R8uphJJzSF5CoJvvZNGvyBcjKaXTIwHMYao46LXGA='}, '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-12 18:40:53] [INFO] : ====================================================================================== | ||
6 | -[2021-08-12 18:40:53] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb | ||
7 | -{'data': None, 'json': {'userName': 'sygangda', 'password': 'HzgRUgZrF2KHRwq+ZSc+pqDC1SQ2dFCNZdBrWPz3MivsxW/VnxWCKDOSMsQjM5pEW6YOlDCQQb5TYtbQamjkg8/jjt8t1alaAFUQCB6qn5AxeSJudE74YY51yT9KDCtfiQkaCmQgcakkyS6PdCky83HSL1G6XlygNgDb0bdaogk='}, '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-12 18:40:53] [INFO] : ====================================================================================== | ||
10 | -[2021-08-12 18:40:53] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | ||
11 | -None | ||
12 | -{} | ||
13 | - | ||
14 | -[2021-08-12 18:40:54] [INFO] : ====================================================================================== | ||
15 | -[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType | ||
16 | -{"businessCode": "jmsf"} | ||
17 | -{} | ||
18 | - | ||
19 | -[2021-08-12 18:40:54] [INFO] : ====================================================================================== | ||
20 | -[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree | ||
21 | -{"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"} | ||
22 | -{} | ||
23 | - | ||
24 | -[2021-08-12 18:40:54] [INFO] : ====================================================================================== | ||
25 | -[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api | ||
26 | -{"firmCode": "sy", "departmentId": 58, "keyword": ""} | ||
27 | -{} | ||
28 | - | ||
29 | -[2021-08-12 18:40:54] [INFO] : ====================================================================================== | ||
30 | -[2021-08-12 18:40:54] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query | ||
31 | -{"pageNum": 100, "pageSize": 100, "marketId": 9} | ||
32 | -{} | ||
33 | - | ||
34 | -[2021-08-12 18:40:55] [INFO] : ====================================================================================== | ||
35 | -[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
36 | -None | ||
37 | -{'params': {'pid': 'goods_tag'}} | ||
38 | - | ||
39 | -[2021-08-12 18:40:55] [INFO] : ====================================================================================== | ||
40 | -[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address | ||
41 | -{"province": "C", "city": null, "area": null} | ||
42 | -{} | ||
43 | - | ||
44 | -[2021-08-12 18:40:55] [INFO] : ====================================================================================== | ||
45 | -[2021-08-12 18:40:55] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep | ||
46 | -None | ||
47 | -{'params': {'keyword': ''}} | ||
48 | - | ||
49 | -[2021-08-12 18:40:56] [INFO] : ====================================================================================== | ||
50 | -[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid | ||
51 | -None | ||
52 | -{'params': {'pid': 'prove_type'}} | ||
53 | - | ||
54 | -[2021-08-12 18:40:56] [INFO] : ====================================================================================== | ||
55 | -[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action | ||
56 | -None | ||
57 | -{} | ||
58 | - | ||
59 | -[2021-08-12 18:40:56] [INFO] : ====================================================================================== | ||
60 | -[2021-08-12 18:40:56] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave | ||
61 | -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddB67062", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "productId": 14158, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 432, "grossWeightDate": "2021-08-12 18:40:56", "newWeight": 99, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddB67062", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 58, "depName": "\u6c34\u679c\u90e8", "cateId": 14158, "notice": 0, "backSkinTwo": -1, "recordOriginId": 0, "recordOriginName": null, "recordProductId": 0, "recordProductName": null, "recordWeight": null, "codeIc": null, "codeId": 0, "difference": 0, "bindRecordSign": 0, "recordDesc": null, "hasCodeItems": false, "customerId": 0, "customerName": "", "driverIc": null, "driverName": null, "totalPrice": null, "originId": 500101, "origin": "\u4e07\u5dde\u533a", "originCode": "023", "tradeType": "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} | ||
62 | -{} | ||
63 | - | ||
64 | -[2021-08-12 18:40:57] [INFO] : ====================================================================================== | ||
65 | -[2021-08-12 18:40:57] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action | ||
66 | -{'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': '202108120900083'} | ||
67 | -{} | ||
68 | - | ||
69 | -[2021-08-12 18:40:57] [INFO] : ====================================================================================== | ||
70 | -[2021-08-12 18:40:57] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/4080.action | ||
71 | -None | 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'} | ||
72 | {} | 12 | {} |
73 | 13 | ||
74 | -[2021-08-12 18:40:59] [INFO] : ====================================================================================== | ||
75 | -[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 | 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 | ||
76 | None | 16 | None |
77 | {} | 17 | {} |
78 | 18 | ||
79 | -[2021-08-12 18:40:59] [INFO] : ====================================================================================== | ||
80 | -[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 | ||
81 | -None | ||
82 | -{} | ||
83 | - | ||
84 | -[2021-08-12 18:40:59] [INFO] : ====================================================================================== | ||
85 | -[2021-08-12 18:40:59] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action | ||
86 | -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 4080, 'goodsId': '4094', 'number': '202108120900083', 'modified': '2021-08-12 18:40:59', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川B67062', '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': '水果部', 'calcDepId': '58', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '14158', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-12 18:40:58', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '14436', 'driverTel': '', 'grossWeightDate': '2021-08-12 18:40:57', 'tareWeightDate': '2021-08-12 18:40:57', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '测试沈阳', 'inGreeterId': '223', 'outGreeterId': '', 'sumPrice': '9900', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''} | ||
87 | -{} | ||
88 | - | ||
89 | -[2021-08-12 18:41:00] [INFO] : ====================================================================================== | ||
90 | -[2021-08-12 18:41:00] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doFreeze.action | ||
91 | -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=4080&goodsId=4094&number=202108120900083&modified=2021-08-12%2018%3A40%3A58&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%9DB67062&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&calcDepId=58&dep=58®ionName=®ionId=72&productName=%E9%9B%AA%E8%8E%B2%E6%9E%9C&productId=14158&productArea=%E9%87%8D%E5%BA%86%2C%E9%87%8D%E5%BA%86%E5%B8%82%2C%E4%B8%87%E5%B7%9E%E5%8C%BA&parentId=&levelType=&originId=500101&tradeTypeId=70&chargeTotalAmount=800&chargeTotalAmountYuan=8&freezeMoneySymbol=13&comparisonFreezeAmount=13&created=2021-08-12%2018%3A40%3A58&remark=&goodsTagIds=663&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-12%2018%3A40%3A57&tareWeightDate=2021-08-12%2018%3A40%3A57&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=&inGreeterId=0&outGreeterId=&sumPrice=9900&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 | ||
92 | -{} | ||
93 | - | ||
94 | -[2021-08-12 18:41:04] [INFO] : ====================================================================================== | ||
95 | -[2021-08-12 18:41:04] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listBackSkinTrucks | ||
96 | -{"plate": "", "number": "", "customerName": "\u957f\u6b4c\u4e70\u5bb6\u7701\u5185\u554a\u554a\u554a\u563f"} | ||
97 | -{} | ||
98 | - |
testcase/test_HP/test_HP.py
@@ -13,7 +13,7 @@ import json | @@ -13,7 +13,7 @@ import json | ||
13 | import unittest | 13 | import unittest |
14 | from commons.scripts.readConf import rC | 14 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 15 | from commons.api import zcApi as zcA |
16 | -from commons.api import entranceFeeBillList as eFBL | 16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
17 | from commons.api import hpApi | 17 | from commons.api import hpApi |
18 | import time,random | 18 | import time,random |
19 | 19 |
testcase/test_SJ/test_SJ.py
@@ -13,7 +13,7 @@ import json | @@ -13,7 +13,7 @@ import json | ||
13 | import unittest | 13 | import unittest |
14 | from commons.scripts.readConf import rC | 14 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 15 | from commons.api import zcApi as zcA |
16 | -from commons.api import entranceFeeBillList as eFBL | 16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
17 | from commons.api import sjApi | 17 | from commons.api import sjApi |
18 | import time,random | 18 | import time,random |
19 | 19 |
testcase/test_ZC/demo.py
@@ -11,8 +11,13 @@ | @@ -11,8 +11,13 @@ | ||
11 | import json | 11 | import json |
12 | import random | 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 | c = list(set(a)^set(b)) | 22 | c = list(set(a)^set(b)) |
18 | # print(c) | 23 | # print(c) |
testcase/test_ZC/test_ZC.py
@@ -13,7 +13,7 @@ import json | @@ -13,7 +13,7 @@ import json | ||
13 | import unittest | 13 | import unittest |
14 | from commons.scripts.readConf import rC | 14 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 15 | from commons.api import zcApi as zcA |
16 | -from commons.api import entranceFeeBillList as eFBL | 16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
17 | import time,random | 17 | import time,random |
18 | 18 | ||
19 | class test_demo(unittest.TestCase): | 19 | class test_demo(unittest.TestCase): |
@@ -128,7 +128,8 @@ class test_demo(unittest.TestCase): | @@ -128,7 +128,8 @@ class test_demo(unittest.TestCase): | ||
128 | depName="水果部",goodsTagName="货物标签测试",proveName="绿色蔬菜") | 128 | depName="水果部",goodsTagName="货物标签测试",proveName="绿色蔬菜") |
129 | print(cre_res.json()) | 129 | print(cre_res.json()) |
130 | number = cre_res.json()["data"]["number"] | 130 | number = cre_res.json()["data"]["number"] |
131 | - aa = eFBL.do_freezeOrder(attrValue=number) | 131 | + print(number) |
132 | + # aa = eFBL.do_freezeOrder(attrValue=number) | ||
132 | # aa = eFBL.do_payOrder(attrValue=number) | 133 | # aa = eFBL.do_payOrder(attrValue=number) |
133 | # cre_res = zcA.create_jmsf(host=self.gatewayHost) | 134 | # cre_res = zcA.create_jmsf(host=self.gatewayHost) |
134 | # print(cre_res.json()) | 135 | # print(cre_res.json()) |
testcase/test_ZC/test_ZCBasic.py
@@ -14,7 +14,7 @@ import unittest | @@ -14,7 +14,7 @@ import unittest | ||
14 | from commons.scripts.readConf import rC | 14 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 15 | from commons.api import zcApi as zcA |
16 | from commons.MySession import my | 16 | from commons.MySession import my |
17 | -from commons.api import entranceFeeBillList as eFBL | 17 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
18 | import time,random | 18 | import time,random |
19 | 19 | ||
20 | class test_ZCBasic(unittest.TestCase): | 20 | class test_ZCBasic(unittest.TestCase): |
testcase/test_ZC/test_ZCCreate.py
@@ -13,7 +13,7 @@ import json | @@ -13,7 +13,7 @@ import json | ||
13 | import unittest | 13 | import unittest |
14 | from commons.scripts.readConf import rC | 14 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 15 | from commons.api import zcApi as zcA |
16 | -from commons.api import entranceFeeBillList as eFBL | 16 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
17 | import time,random | 17 | import time,random |
18 | 18 | ||
19 | class test_ZCCreate(unittest.TestCase): | 19 | class test_ZCCreate(unittest.TestCase): |
testcase/test_listPage/test_listPageOperation.py
@@ -9,17 +9,14 @@ | @@ -9,17 +9,14 @@ | ||
9 | 9 | ||
10 | """ | 10 | """ |
11 | 11 | ||
12 | -import json | ||
13 | import unittest | 12 | import unittest |
14 | from commons.scripts.readConf import rC | 13 | from commons.scripts.readConf import rC |
15 | from commons.api import zcApi as zcA | 14 | from commons.api import zcApi as zcA |
16 | from commons.api import sjApi | 15 | from commons.api import sjApi |
17 | -from commons.api import entanceOperation as eOp | ||
18 | -from commons.basic import getLookupList as gLL | ||
19 | -from commons import ConfigDB as CoDB | ||
20 | -from commons.MySession import my | ||
21 | -from commons.api import entranceFeeBillList as eFBL | ||
22 | -import time,random | 16 | +from commons.api.entranceFeeBillList import operationUnfreeze as eOp |
17 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL | ||
18 | +from commons.api.entranceFeeBillList import operationDoInvalid as oDI | ||
19 | +import random | ||
23 | 20 | ||
24 | class test_listPage(unittest.TestCase): | 21 | class test_listPage(unittest.TestCase): |
25 | """进门单列表:attr进门单属性查询测试""" | 22 | """进门单列表:attr进门单属性查询测试""" |
@@ -96,3 +93,12 @@ class test_listPage(unittest.TestCase): | @@ -96,3 +93,12 @@ class test_listPage(unittest.TestCase): | ||
96 | res_unfreezeOrder = eOp.do_unfreezeOrder(host=self.jmsfHost,attrValue=number) | 93 | res_unfreezeOrder = eOp.do_unfreezeOrder(host=self.jmsfHost,attrValue=number) |
97 | assert res_unfreezeOrder.json()["code"]=="200","解冻失败" | 94 | assert res_unfreezeOrder.json()["code"]=="200","解冻失败" |
98 | assert res_unfreezeOrder.json()["message"] == "OK", "解冻失败" | 95 | assert res_unfreezeOrder.json()["message"] == "OK", "解冻失败" |
96 | + | ||
97 | + def test_invalidOrder(self): | ||
98 | + plate = f"川A{random.randint(10000,99999)}" | ||
99 | + cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate) | ||
100 | + print(cre_res.json()) | ||
101 | + number = cre_res.json()["data"]["number"] | ||
102 | + res_unfreezeOrder = oDI.do_invalidOrder(host=self.jmsfHost,attrValue=number) | ||
103 | + assert res_unfreezeOrder.json()["number"]==number,"作废测试失败" | ||
104 | + assert res_unfreezeOrder.json()["message"] == "作废成功!", "作废测试失败" |
testcase/test_listPage/test_searchByAttrName.py
@@ -16,7 +16,7 @@ from commons.scripts.readConf import rC | @@ -16,7 +16,7 @@ from commons.scripts.readConf import rC | ||
16 | from commons.api import zcApi as zcA | 16 | from commons.api import zcApi as zcA |
17 | from commons import ConfigDB as CoDB | 17 | from commons import ConfigDB as CoDB |
18 | from commons.MySession import my | 18 | from commons.MySession import my |
19 | -from commons.api import entranceFeeBillList as eFBL | 19 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
20 | import time,random | 20 | import time,random |
21 | 21 | ||
22 | class test_listPage(unittest.TestCase): | 22 | class test_listPage(unittest.TestCase): |
testcase/test_listPage/test_searchByOther.py
@@ -16,7 +16,7 @@ from commons.api import zcApi as zcA | @@ -16,7 +16,7 @@ from commons.api import zcApi as zcA | ||
16 | from commons.basic import getLookupList as gLL | 16 | from commons.basic import getLookupList as gLL |
17 | from commons import ConfigDB as CoDB | 17 | from commons import ConfigDB as CoDB |
18 | from commons.MySession import my | 18 | from commons.MySession import my |
19 | -from commons.api import entranceFeeBillList as eFBL | 19 | +from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL |
20 | import time,random | 20 | import time,random |
21 | 21 | ||
22 | class test_listPage(unittest.TestCase): | 22 | class test_listPage(unittest.TestCase): |