Commit 054ed7c68d88f519fe56a076e627c8c4a7fee5c6

Authored by lixi
2 parents 86af3667 ab3d9ecf

Merge remote-tracking branch 'origin/master'

Showing 26 changed files with 285 additions and 164 deletions
commons/api/entranceFeeBillList/operationDoAmend.py
@@ -167,6 +167,11 @@ def do_doAmend(host="",autocompletecartype=None,fee_str="",**kwargs): @@ -167,6 +167,11 @@ def do_doAmend(host="",autocompletecartype=None,fee_str="",**kwargs):
167 167
168 data["autocomplete-cartype"] = autocompletecartype 168 data["autocomplete-cartype"] = autocompletecartype
169 data = dict(data, **kwargs) 169 data = dict(data, **kwargs)
  170 +
  171 + # 当模板没有配置货物标签时,参数不能传递货物标签所以需要删除
  172 + if kwargs["goodsTagIds"] =="":
  173 + del data["goodsTagIds"]
  174 +
170 data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str 175 data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str
171 print("================开始请求================") 176 print("================开始请求================")
172 res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers) 177 res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers)
@@ -201,7 +206,14 @@ def do_amendOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单 @@ -201,7 +206,14 @@ def do_amendOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单
201 correctInfo = orderDetailsDict["correctInfo"] 206 correctInfo = orderDetailsDict["correctInfo"]
202 weightType = orderDetailsDict["weightType"] 207 weightType = orderDetailsDict["weightType"]
203 correctDiscount = orderDetailsDict["correctDiscount"] 208 correctDiscount = orderDetailsDict["correctDiscount"]
204 - goodsTagIds = orderDetailsDict["goodsTagIds"] 209 +
  210 + # goodsTagIds = orderDetailsDict["goodsTagIds"]
  211 + # 货物标签特别判断
  212 + if "goodsTagIds" in orderDetailsDict.keys():
  213 + goodsTagIds = orderDetailsDict["goodsTagIds"]
  214 + else:
  215 + goodsTagIds = ""
  216 +
205 sumPrice = orderDetailsDict["sumPrice"] 217 sumPrice = orderDetailsDict["sumPrice"]
206 shareRatio = orderDetailsDict["shareRatio"] 218 shareRatio = orderDetailsDict["shareRatio"]
207 plate = orderDetailsDict["plate"] 219 plate = orderDetailsDict["plate"]
commons/api/entranceFeeBillList/operationDoCorrect.py
@@ -169,6 +169,11 @@ def do_doCorrect(host="",autocompletecartype=None,fee_str="",**kwargs): @@ -169,6 +169,11 @@ def do_doCorrect(host="",autocompletecartype=None,fee_str="",**kwargs):
169 169
170 data["autocomplete-cartype"] = autocompletecartype 170 data["autocomplete-cartype"] = autocompletecartype
171 data = dict(data, **kwargs) 171 data = dict(data, **kwargs)
  172 +
  173 + # 当模板没有配置货物标签时,参数不能传递货物标签所以需要删除
  174 + if kwargs["goodsTagIds"] =="":
  175 + del data["goodsTagIds"]
  176 +
172 data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str 177 data_uc = jsonToUrlcode.jsonToUrlcode(data_json=data)+fee_str
173 print("================开始请求================") 178 print("================开始请求================")
174 res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers) 179 res = my.useHeadersRequests("post", url=url, data=data_uc, headers=headers)
@@ -203,7 +208,14 @@ def do_correctOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单 @@ -203,7 +208,14 @@ def do_correctOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单
203 correctInfo = orderDetailsDict["correctInfo"] 208 correctInfo = orderDetailsDict["correctInfo"]
204 weightType = orderDetailsDict["weightType"] 209 weightType = orderDetailsDict["weightType"]
205 correctDiscount = "2" 210 correctDiscount = "2"
206 - goodsTagIds = orderDetailsDict["goodsTagIds"] 211 +
  212 + # goodsTagIds = orderDetailsDict["goodsTagIds"]
  213 + # 货物标签特别判断
  214 + if "goodsTagIds" in orderDetailsDict.keys():
  215 + goodsTagIds = orderDetailsDict["goodsTagIds"]
  216 + else:
  217 + goodsTagIds = ""
  218 +
207 sumPrice = orderDetailsDict["sumPrice"] 219 sumPrice = orderDetailsDict["sumPrice"]
208 shareRatio = orderDetailsDict["shareRatio"] 220 shareRatio = orderDetailsDict["shareRatio"]
209 plate = orderDetailsDict["plate"] 221 plate = orderDetailsDict["plate"]
commons/api/entranceFeeBillList/operationDoInvalid.py
@@ -197,7 +197,14 @@ def do_invalidOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单 @@ -197,7 +197,14 @@ def do_invalidOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单
197 correctInfo = orderDetailsDict["correctInfo"] 197 correctInfo = orderDetailsDict["correctInfo"]
198 weightType = orderDetailsDict["weightType"] 198 weightType = orderDetailsDict["weightType"]
199 correctDiscount = orderDetailsDict["correctDiscount"] 199 correctDiscount = orderDetailsDict["correctDiscount"]
200 - goodsTagIds = orderDetailsDict["goodsTagIds"] 200 +
  201 + # goodsTagIds = orderDetailsDict["goodsTagIds"]
  202 + # 货物标签特别判断
  203 + if "goodsTagIds" in orderDetailsDict.keys():
  204 + goodsTagIds = orderDetailsDict["goodsTagIds"]
  205 + else:
  206 + goodsTagIds = ""
  207 +
201 sumPrice = orderDetailsDict["sumPrice"] 208 sumPrice = orderDetailsDict["sumPrice"]
202 tradeTypeId = orderDetailsDict["tradeTypeId"] 209 tradeTypeId = orderDetailsDict["tradeTypeId"]
203 shareRatio = orderDetailsDict["shareRatio"] 210 shareRatio = orderDetailsDict["shareRatio"]
commons/api/entranceFeeBillList/operationDoUndo.py
@@ -42,7 +42,7 @@ def get_calculateRes(host="",autocompletecartype=None,**kwargs): @@ -42,7 +42,7 @@ def get_calculateRes(host="",autocompletecartype=None,**kwargs):
42 "regionName": "", "regionId": "0", "productName": "productName", "productId": "productId", 42 "regionName": "", "regionId": "0", "productName": "productName", "productId": "productId",
43 "productArea": "重庆,重庆市,万州区", "parentId": "", "levelType": "", "originId": "originId", "tradeTypeId": "tradeTypeId", 43 "productArea": "重庆,重庆市,万州区", "parentId": "", "levelType": "", "originId": "originId", "tradeTypeId": "tradeTypeId",
44 "chargeTotalAmount": "", "chargeTotalAmountYuan": "", "freezeMoneySymbol": "", "comparisonFreezeAmount": "", 44 "chargeTotalAmount": "", "chargeTotalAmountYuan": "", "freezeMoneySymbol": "", "comparisonFreezeAmount": "",
45 - "created": "created", "remark": "false", "goodsTagIds": "goodsTagIds", "shareRatio": "shareRatio", 45 + "created": "created", "remark": "false", "goodsTagIds": "", "shareRatio": "shareRatio",
46 "handlingTeam": "", "handlingRatio": "", "handActualAmount": "", "handManageAmount": "", 46 "handlingTeam": "", "handlingRatio": "", "handActualAmount": "", "handManageAmount": "",
47 "handCollectionAmount": "", "receivableAmount": "", "categoryName": "productName", 47 "handCollectionAmount": "", "receivableAmount": "", "categoryName": "productName",
48 "categoryId": "productId", "driverTel": "", "grossWeightDate": "grossWeightDate", 48 "categoryId": "productId", "driverTel": "", "grossWeightDate": "grossWeightDate",
@@ -117,7 +117,14 @@ def do_undoOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号 @@ -117,7 +117,14 @@ def do_undoOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费单号
117 correctInfo = orderDetailsDict["correctInfo"] 117 correctInfo = orderDetailsDict["correctInfo"]
118 weightType = orderDetailsDict["weightType"] 118 weightType = orderDetailsDict["weightType"]
119 correctDiscount = orderDetailsDict["correctDiscount"] 119 correctDiscount = orderDetailsDict["correctDiscount"]
120 - goodsTagIds = orderDetailsDict["goodsTagIds"] 120 +
  121 + # goodsTagIds = orderDetailsDict["goodsTagIds"]
  122 + # 货物标签特别判断
  123 + if "goodsTagIds" in orderDetailsDict.keys():
  124 + goodsTagIds = orderDetailsDict["goodsTagIds"]
  125 + else:
  126 + goodsTagIds = ""
  127 +
121 sumPrice = orderDetailsDict["sumPrice"] 128 sumPrice = orderDetailsDict["sumPrice"]
122 tradeTypeId = orderDetailsDict["tradeTypeId"] 129 tradeTypeId = orderDetailsDict["tradeTypeId"]
123 shareRatio = orderDetailsDict["shareRatio"] 130 shareRatio = orderDetailsDict["shareRatio"]
commons/api/entranceFeeBillList/operationUnfreeze.py
@@ -188,7 +188,14 @@ def do_unfreezeOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费å @@ -188,7 +188,14 @@ def do_unfreezeOrder(host="http://test.jmsf.diligrp.com:8385",attrName="收费å
188 correctInfo = orderDetailsDict["correctInfo"] 188 correctInfo = orderDetailsDict["correctInfo"]
189 weightType = orderDetailsDict["weightType"] 189 weightType = orderDetailsDict["weightType"]
190 correctDiscount = orderDetailsDict["correctDiscount"] 190 correctDiscount = orderDetailsDict["correctDiscount"]
191 - goodsTagIds = orderDetailsDict["goodsTagIds"] 191 +
  192 + # goodsTagIds = orderDetailsDict["goodsTagIds"]
  193 + # 货物标签特别判断
  194 + if "goodsTagIds" in orderDetailsDict.keys():
  195 + goodsTagIds = orderDetailsDict["goodsTagIds"]
  196 + else:
  197 + goodsTagIds = ""
  198 +
192 sumPrice = orderDetailsDict["sumPrice"] 199 sumPrice = orderDetailsDict["sumPrice"]
193 tradeTypeId = orderDetailsDict["tradeTypeId"] 200 tradeTypeId = orderDetailsDict["tradeTypeId"]
194 shareRatio = orderDetailsDict["shareRatio"] 201 shareRatio = orderDetailsDict["shareRatio"]
commons/api/feedbackOrderController_settlementlist.py
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 已结账明细——已结账笔数和已结账金额查询 10 已结账明细——已结账笔数和已结账金额查询
11 """ 11 """
12 from commons import common as com 12 from commons import common as com
13 -from commons.MySession import sy1 13 +from commons.MySession import sy1,my
14 14
15 class feedbackOrderController_settlementlist(): 15 class feedbackOrderController_settlementlist():
16 url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist.action" 16 url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist.action"
@@ -57,5 +57,5 @@ class feedbackOrderController_settlementlist(): @@ -57,5 +57,5 @@ class feedbackOrderController_settlementlist():
57 self.body = feedbackOrderController_settlementlist.body 57 self.body = feedbackOrderController_settlementlist.body
58 58
59 # focsl = feedbackOrderController_settlementlist() 59 # focsl = feedbackOrderController_settlementlist()
60 -# re = sy1.post(url = focsl.url,data = focsl.body,headers = focsl.header) 60 +# re = sy1.post(url = focsl.url,data = focsl.body.replace("\n",""),headers = focsl.header,proxies = my.proxies)
61 # print(re.json()) 61 # print(re.json())
62 \ No newline at end of file 62 \ No newline at end of file
commons/api/sjApi.py
@@ -14,6 +14,7 @@ from commons.scripts import dealContentType as dct @@ -14,6 +14,7 @@ from commons.scripts import dealContentType as dct
14 from commons.MySession import my 14 from commons.MySession import my
15 from commons.api import zcApi 15 from commons.api import zcApi
16 from commons.api import entranceFeeBillList as eFBL 16 from commons.api import entranceFeeBillList as eFBL
  17 +from commons.basic import getLookupList as gLL
17 18
18 19
19 def create_sparePartsWeighSave(host="",duplicateToken=None,**kwargs): 20 def create_sparePartsWeighSave(host="",duplicateToken=None,**kwargs):
@@ -99,92 +100,159 @@ def create_sj(host=None,carTypeName=None,keyword="蔬菜",userName=None,transact @@ -99,92 +100,159 @@ def create_sj(host=None,carTypeName=None,keyword="蔬菜",userName=None,transact
99 """ 100 """
100 101
101 """ 102 """
  103 + # 模板获取
  104 + templateAttr_list = gLL.get_templateAttr(host=host,moduleCode="SJ")
  105 + print(templateAttr_list)
  106 +
102 # 获取车型 107 # 获取车型
103 - carType = zcApi.get_carType(host=host)  
104 - print(carType.text)  
105 - if carTypeName ==None:  
106 - carTypeIndex = 0 108 + if "车型" in templateAttr_list:
  109 + carType = zcApi.get_carType(host=host)
  110 + print(carType.text)
  111 + if carTypeName == None:
  112 + carTypeIndex = 0
  113 + else:
  114 + carTypeIndex = carType.json()["data"].index(
  115 + [i for i in carType.json()["data"] if i["carTypeName"] == carTypeName][0])
  116 + carTypeCode = carType.json()["data"][carTypeIndex]["code"]
  117 + carTypeId = carType.json()["data"][carTypeIndex]["id"]
  118 + carTypeName = carType.json()["data"][carTypeIndex]["carTypeName"]
  119 + carTypeWeight = carType.json()["data"][carTypeIndex]["weight"]
107 else: 120 else:
108 - carTypeIndex = carType.json()["data"].index(  
109 - [i for i in carType.json()["data"] if i["carTypeName"] == carTypeName][0])  
110 - carTypeCode = carType.json()["data"][carTypeIndex]["code"]  
111 - carTypeId = carType.json()["data"][carTypeIndex]["id"]  
112 - carTypeName = carType.json()["data"][carTypeIndex]["carTypeName"]  
113 - carTypeWeight = carType.json()["data"][carTypeIndex]["weight"] 121 + carTypeCode = ""
  122 + carTypeId = ""
  123 + carTypeName = ""
  124 + carTypeWeight = ""
  125 +
114 126
115 # 获取商品 127 # 获取商品
116 - categoryByCondition = zcApi.get_listCategoryByCondition(host=host,keyword=keyword)  
117 - print(categoryByCondition.json())  
118 - cateId = categoryByCondition.json()["data"][0]["id"]  
119 - productId = categoryByCondition.json()["data"][0]["id"]  
120 - productName = categoryByCondition.json()["data"][0]["name"]  
121 - # productCode = categoryByCondition.json()["data"][0]["keycode"]  
122 - print(productName)  
123 - print(productId) 128 + if "商品" in templateAttr_list or "商品(末级)" in templateAttr_list:
  129 + categoryByCondition = zcApi.get_listCategoryByCondition(host=host, keyword=keyword)
  130 + cateId = categoryByCondition.json()["data"][0]["id"]
  131 + productId = categoryByCondition.json()["data"][0]["id"]
  132 + productName = categoryByCondition.json()["data"][0]["name"]
  133 + # productCode = categoryByCondition.json()["data"][0]["keycode"]
  134 + else:
  135 + cateId = ""
  136 + productId = ""
  137 + productName = ""
  138 +
124 139
125 # 获取接车员信息 140 # 获取接车员信息
126 - listByExample = zcApi.get_listByExample(host=host)  
127 - print(listByExample.json())  
128 - if userName ==None:  
129 - listByExampleIndex = 0 141 + if "进门接车员" in templateAttr_list:
  142 + firmCode = my.userInfo["data"]["user"]["firmCode"]
  143 + firmId = my.userInfo["data"]["user"]["firmId"]
  144 +
  145 + try:
  146 + res_config = gLL.get_config(host=host, marketId=firmId)
  147 + departmentId = [i["value"] for i in res_config.json()["rows"] if i["name"] == "DepartmentId"][0]
  148 + except:
  149 + departmentId = None
  150 + # print("==========1============")
  151 + # print(my.userInfo["data"]["user"])
  152 + # print(firmCode)
  153 + # print(departmentId)
  154 + # print("==========1============")
  155 + listByExample = zcApi.get_listByExample(host=host,firmCode=firmCode,departmentId=departmentId)
  156 + print("listByExample",listByExample.json())
  157 + if userName == None:
  158 + listByExampleIndex = 0
  159 + else:
  160 + listByExampleIndex = listByExample.json()["data"].index(
  161 + [i for i in listByExample.json()["data"] if i["userName"] == userName][0])
  162 + inGreeterId = listByExample.json()["data"][listByExampleIndex]["id"]
  163 + inGreeterName = listByExample.json()["data"][listByExampleIndex]["realName"]
130 else: 164 else:
131 - listByExampleIndex = listByExample.json()["data"].index(  
132 - [i for i in listByExample.json()["data"] if i["userName"] == userName][0])  
133 - inGreeterId = listByExample.json()["data"][listByExampleIndex]["id"]  
134 - inGreeterName = listByExample.json()["data"][listByExampleIndex]["realName"] 165 + inGreeterId=""
  166 + inGreeterName = ""
  167 +
  168 + # if "进门接车员" in templateAttr_list:
  169 + # listByExample = zcApi.get_listByExample(host=host)
  170 + # print(listByExample.json())
  171 + # if userName == None:
  172 + # listByExampleIndex = 0
  173 + # else:
  174 + # listByExampleIndex = listByExample.json()["data"].index(
  175 + # [i for i in listByExample.json()["data"] if i["userName"] == userName][0])
  176 + # inGreeterId = listByExample.json()["data"][listByExampleIndex]["id"]
  177 + # inGreeterName = listByExample.json()["data"][listByExampleIndex]["realName"]
  178 + # else:
  179 + # inGreeterId = ""
  180 + # inGreeterName = ""
135 181
136 # 获取交易类型 182 # 获取交易类型
137 - transactionType = zcApi.query_transactionType(host=host)  
138 - print(transactionType.json())  
139 - print("交易类型")  
140 - if transactionName ==None:  
141 - transactionTypeIndex = 0 183 + if "交易类型" in templateAttr_list:
  184 + transactionType = zcApi.query_transactionType(host=host)
  185 + print(transactionType.json())
  186 + print("交易类型")
  187 + if transactionName == None:
  188 + transactionTypeIndex = 0
  189 + else:
  190 + transactionTypeIndex = transactionType.json()["rows"].index(
  191 + [i for i in transactionType.json()["rows"] if i["name"] == transactionName][0])
  192 + tradeType = transactionType.json()["rows"][transactionTypeIndex]["code"]
  193 + tradeTypeId = transactionType.json()["rows"][transactionTypeIndex]["id"]
  194 + tradeTypeName = transactionType.json()["rows"][transactionTypeIndex]["name"]
142 else: 195 else:
143 - transactionTypeIndex = transactionType.json()["rows"].index(  
144 - [i for i in transactionType.json()["rows"] if i["name"] == transactionName][0])  
145 - tradeType = transactionType.json()["rows"][transactionTypeIndex]["code"]  
146 - tradeTypeId = transactionType.json()["rows"][transactionTypeIndex]["id"]  
147 - tradeTypeName = transactionType.json()["rows"][transactionTypeIndex]["name"] 196 + tradeType = ""
  197 + tradeTypeId = ""
  198 + tradeTypeName = ""
148 199
149 # 获取货物标签 200 # 获取货物标签
150 - goodsTag = zcApi.get_goodsTag(host=host)  
151 - print(goodsTag.json())  
152 - if goodsTagName ==None:  
153 - transactionTypeIndex = 0 201 + if "货物标签" in templateAttr_list:
  202 + goodsTag = zcApi.get_goodsTag(host=host)
  203 + print(goodsTag.json())
  204 + if goodsTagName == None:
  205 + transactionTypeIndex = 0
  206 + else:
  207 + transactionTypeIndex = goodsTag.json()["data"].index(
  208 + [i for i in goodsTag.json()["data"] if i["name"] == goodsTagName][0])
  209 + goodsTagId = goodsTag.json()["data"][transactionTypeIndex]["id"]
154 else: 210 else:
155 - transactionTypeIndex = goodsTag.json()["data"].index(  
156 - [i for i in goodsTag.json()["data"] if i["name"] == goodsTagName][0])  
157 - goodsTagId = goodsTag.json()["data"][transactionTypeIndex]["id"] 211 + goodsTagId = ""
158 212
159 # 产地信息获取 213 # 产地信息获取
160 - address = zcApi.get_address(host=host)  
161 - print(address.json())  
162 - originId = address.json()["data"][0]["id"]  
163 - origin = address.json()["data"][0]["name"]  
164 - originCode = address.json()["data"][0]["cityCode"] 214 + if "产地" in templateAttr_list:
  215 + address = zcApi.get_address(host=host)
  216 + print(address.json())
  217 + originId = address.json()["data"][0]["id"]
  218 + origin = address.json()["data"][0]["name"]
  219 + originCode = address.json()["data"][0]["cityCode"]
  220 + else:
  221 + originId = ""
  222 + origin = ""
  223 + originCode = ""
165 224
166 # 查询部门信息 225 # 查询部门信息
167 - depRes = zcApi.get_dep(host=host)  
168 - print(depRes.json())  
169 - if depName ==None:  
170 - depResIndex = 0 226 + # 查询部门信息
  227 + if "接车部门" in templateAttr_list or "收费部门" in templateAttr_list:
  228 + depRes = zcApi.get_dep(host=host)
  229 + print(depRes.json())
  230 + if depName == None:
  231 + depResIndex = 0
  232 + else:
  233 + depResIndex = depRes.json()["data"].index(
  234 + [i for i in depRes.json()["data"] if i["name"] == depName][0])
  235 + feeDepId = depRes.json()["data"][depResIndex]["id"]
  236 + feeDepName = depRes.json()["data"][depResIndex]["name"]
171 else: 237 else:
172 - depResIndex = depRes.json()["data"].index(  
173 - [i for i in depRes.json()["data"] if i["name"] == depName][0])  
174 - feeDepId = depRes.json()["data"][depResIndex]["id"]  
175 - feeDepName = depRes.json()["data"][depResIndex]["name"] 238 + feeDepId = ""
  239 + feeDepName = ""
176 240
177 # 获取证明类型 241 # 获取证明类型
178 - proveType = zcApi.get_proveType(host=host)  
179 - print(proveType.json())  
180 - # print("proveName",proveName)  
181 - if proveName ==None:  
182 - proveTypeIndex = 0 242 + if "证明类型" in templateAttr_list:
  243 + proveType = zcApi.get_proveType(host=host)
  244 + print(proveType.json())
  245 + # print("proveName",proveName)
  246 + if proveName == None:
  247 + proveTypeIndex = 0
  248 + else:
  249 + proveTypeIndex = proveType.json()["data"].index(
  250 + [i for i in proveType.json()["data"] if i["name"] == proveName][0])
  251 + proveTypeCode = proveType.json()["data"][proveTypeIndex]["id"]
  252 + proveTypeName = proveType.json()["data"][proveTypeIndex]["name"]
183 else: 253 else:
184 - proveTypeIndex = proveType.json()["data"].index(  
185 - [i for i in proveType.json()["data"] if i["name"] == proveName][0])  
186 - proveTypeCode = proveType.json()["data"][proveTypeIndex]["id"]  
187 - proveTypeName = proveType.json()["data"][proveTypeIndex]["name"] 254 + proveTypeCode = ""
  255 + proveTypeName = ""
188 print("proveTypeCode", proveTypeCode) 256 print("proveTypeCode", proveTypeCode)
189 print("proveTypeName", proveTypeName) 257 print("proveTypeName", proveTypeName)
190 258
commons/api/zcApi.py
@@ -233,16 +233,19 @@ def create_jmsf(host=None,carTypeName=None,keyword="蔬菜",userName=None,transa @@ -233,16 +233,19 @@ def create_jmsf(host=None,carTypeName=None,keyword="蔬菜",userName=None,transa
233 233
234 # 获取接车员信息 234 # 获取接车员信息
235 if "进门接车员" in templateAttr_list: 235 if "进门接车员" in templateAttr_list:
236 - print('my.userInfo["data"]["user"]', my.userInfo["data"]["user"])  
237 firmCode = my.userInfo["data"]["user"]["firmCode"] 236 firmCode = my.userInfo["data"]["user"]["firmCode"]
238 firmId = my.userInfo["data"]["user"]["firmId"] 237 firmId = my.userInfo["data"]["user"]["firmId"]
239 - res_config = gLL.get_config(host=host,marketId=firmId)  
240 - departmentId = [i["value"] for i in res_config.json()["rows"] if i["name"]=="DepartmentId"][0]  
241 - print("==========1============")  
242 - print(my.userInfo["data"]["user"])  
243 - print(firmCode)  
244 - print(departmentId)  
245 - print("==========1============") 238 +
  239 + try:
  240 + res_config = gLL.get_config(host=host, marketId=firmId)
  241 + departmentId = [i["value"] for i in res_config.json()["rows"] if i["name"] == "DepartmentId"][0]
  242 + except:
  243 + departmentId = None
  244 + # print("==========1============")
  245 + # print(my.userInfo["data"]["user"])
  246 + # print(firmCode)
  247 + # print(departmentId)
  248 + # print("==========1============")
246 listByExample = get_listByExample(host=host,firmCode=firmCode,departmentId=departmentId) 249 listByExample = get_listByExample(host=host,firmCode=firmCode,departmentId=departmentId)
247 print("listByExample",listByExample.json()) 250 print("listByExample",listByExample.json())
248 if userName == None: 251 if userName == None:
commons/basic/getLookupList.py
@@ -62,15 +62,15 @@ def get_templateAttr(host="http://test.gateway.diligrp.com:8285",moduleCode="ZC" @@ -62,15 +62,15 @@ def get_templateAttr(host="http://test.gateway.diligrp.com:8285",moduleCode="ZC"
62 def get_config(host="",marketId="9"): 62 def get_config(host="",marketId="9"):
63 """通过部门编号获取区域""" 63 """通过部门编号获取区域"""
64 url = host + "/assets-service/api/config/query" 64 url = host + "/assets-service/api/config/query"
65 - data = {"marketId":9,"pageNum":100,"pageSize":100} 65 + data = {"marketId":marketId,"pageNum":100,"pageSize":100}
66 headers = dct.jsonCode() 66 headers = dct.jsonCode()
67 res = my.useHeadersRequests(method="POST", url=url, data=json.dumps(data), headers=headers) 67 res = my.useHeadersRequests(method="POST", url=url, data=json.dumps(data), headers=headers)
68 return res 68 return res
69 69
70 -# host="http://test.jmsf.diligrp.com:8385"  
71 -host="http://test.gateway.diligrp.com:8285"  
72 -# print(get_LookupList(host=host,providerName="货物品类").json())  
73 -# print(get_reach(host).json())  
74 -# print(get_category(host=host,productName="蔬菜").json())  
75 -# print(get_templateAttr(host=host))  
76 -print([i["value"] for i in get_config(host=host).json()["rows"] if i["name"]=="DepartmentId"][0])  
77 \ No newline at end of file 70 \ No newline at end of file
  71 +# # host="http://test.jmsf.diligrp.com:8385"
  72 +# host="http://test.gateway.diligrp.com:8285"
  73 +# # print(get_LookupList(host=host,providerName="货物品类").json())
  74 +# # print(get_reach(host).json())
  75 +# # print(get_category(host=host,productName="蔬菜").json())
  76 +# # print(get_templateAttr(host=host))
  77 +# print([i["value"] for i in get_config(host=host).json()["rows"] if i["name"]=="DepartmentId"][0])
78 \ No newline at end of file 78 \ No newline at end of file
report/test.log
1 -[2021-08-24 14:23:23] [INFO] : ======================================================================================  
2 -[2021-08-24 14:23:23] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb  
3 -{'data': None, 'json': {'userName': 'sy_chen', 'password': 'H2+hKsNXm+sWUzOs4itYTSdjIX4VbHpCDHodXmTh0kzN14KbZST9IXX+EvB/fXctpuklQu47X+xRSGnHN+BU9SDjwAX8VEZZOOEHMxEn/lwNRZgbaMgwpBquXLagAMW8XKL0EpvO/RoypWY62uawXkXRbLXFz6pDEy5JEgEhiA4='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} 1 +[2021-08-24 15:20:00] [INFO] : ======================================================================================
  2 +[2021-08-24 15:20:00] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  3 +{'data': None, 'json': {'userName': 'sy_chen', 'password': 'C42blCKuy0KGckFVnm6jVxlefUvHjUhXxhxrlZeRzeyRpnCoeVkBGIp4513NT9a3GydAFl63/2CWJV1rIpQ7VYnEKP/mDQtc+yjnIawnF4Nu7HqDs77Jv4MJOtSWo1y2BfezF1zesosf9Fbpd7xvtsC0voeRRxO++nQ+cCpnmdM='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
4 4
5 -[2021-08-24 14:23:23] [INFO] : ======================================================================================  
6 -[2021-08-24 14:23:23] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb  
7 -{'data': None, 'json': {'userName': '哈尔滨田太子', 'password': 'Wb/uT3WvDmxdY3Ti2pSPFt0CUDp+3H1kDJ4rOmQBK04p/2lDzJQZ/zDf+a5/NQi8wA/nmFOp6oI18exnz7z2GZfdIOUCAWMP2y+tsuSPTS3sRiLuDFxGJ3KfEy5uhbw/koEgIUlGTwvwRM3UQZFuHufIGk4vkuyMnIq0+dww33s='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}} 5 +[2021-08-24 15:20:00] [INFO] : ======================================================================================
  6 +[2021-08-24 15:20:00] [INFO] : http://test.uap.diligrp.com/api/authenticationApi/loginWeb
  7 +{'data': None, 'json': {'userName': '哈尔滨田太子', 'password': 'Mw7xAxBDv/FmpNrLr26u3AIzsVQgUcvnp3cjMSAkPI7VfpCiKX1ttiXs8dLYy3rtAgIb+0LOs6YIOi89GJZLQLKoVD6vgCEKj6M/Vt6XtDMEOuhdjDnbnMRiMKM/AhQcvIq9AiYDv+l9F7nd7E42cV8nQr5DT5/tzot25EvG1V0='}, 'headers': {'Content-Type': 'text/plain;charset=utf-8', 'Host': 'test.uap.diligrp.com', 'Content-Length': '209', 'Expect': '100-continue'}}
8 8
9 -[2021-08-24 14:23:23] [INFO] : ======================================================================================  
10 -[2021-08-24 14:23:23] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/config/query  
11 -{"marketId": 9, "pageNum": 100, "pageSize": 100}  
12 -{}  
13 -  
14 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
15 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/template/getTemplateUnit?marketCode=9&moduleCode=ZC 9 +[2021-08-24 15:20:00] [INFO] : ======================================================================================
  10 +[2021-08-24 15:20:00] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/template/getTemplateUnit?marketCode=9&moduleCode=SJ
16 None 11 None
17 {} 12 {}
18 13
19 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
20 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType 14 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  15 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCarType
21 {"businessCode": "jmsf"} 16 {"businessCode": "jmsf"}
22 {} 17 {}
23 18
24 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
25 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree 19 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  20 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/cusCategory/getTree
26 {"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"} 21 {"marketId": 9, "state": 1, "keyword": "\u96ea\u83b2\u679c"}
27 {} 22 {}
28 23
29 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
30 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/config/query 24 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  25 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/config/query
31 {"marketId": 9, "pageNum": 100, "pageSize": 100} 26 {"marketId": 9, "pageNum": 100, "pageSize": 100}
32 {} 27 {}
33 28
34 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
35 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api 29 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  30 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/dili-uap/userApi/listByExample.api
36 {"firmCode": "sy", "departmentId": "58", "keyword": ""} 31 {"firmCode": "sy", "departmentId": "58", "keyword": ""}
37 {} 32 {}
38 33
39 -[2021-08-24 14:23:24] [INFO] : ======================================================================================  
40 -[2021-08-24 14:23:24] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query 34 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  35 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/assets-service/api/tradeType/query
41 {"pageNum": 100, "pageSize": 100, "marketId": 9} 36 {"pageNum": 100, "pageSize": 100, "marketId": 9}
42 {} 37 {}
43 38
44 -[2021-08-24 14:23:25] [INFO] : ======================================================================================  
45 -[2021-08-24 14:23:25] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid 39 +[2021-08-24 15:20:01] [INFO] : ======================================================================================
  40 +[2021-08-24 15:20:01] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
46 None 41 None
47 {'params': {'pid': 'goods_tag'}} 42 {'params': {'pid': 'goods_tag'}}
48 43
49 -[2021-08-24 14:23:25] [INFO] : ======================================================================================  
50 -[2021-08-24 14:23:25] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address 44 +[2021-08-24 15:20:02] [INFO] : ======================================================================================
  45 +[2021-08-24 15:20:02] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/address
51 {"province": "C", "city": null, "area": null} 46 {"province": "C", "city": null, "area": null}
52 {} 47 {}
53 48
54 -[2021-08-24 14:23:25] [INFO] : ======================================================================================  
55 -[2021-08-24 14:23:25] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep 49 +[2021-08-24 15:20:02] [INFO] : ======================================================================================
  50 +[2021-08-24 15:20:02] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/dep
56 None 51 None
57 {'params': {'keyword': ''}} 52 {'params': {'keyword': ''}}
58 53
59 -[2021-08-24 14:23:26] [INFO] : ======================================================================================  
60 -[2021-08-24 14:23:26] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid 54 +[2021-08-24 15:20:03] [INFO] : ======================================================================================
  55 +[2021-08-24 15:20:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/jmsf/query/listCodeByPid
61 None 56 None
62 {'params': {'pid': 'prove_type'}} 57 {'params': {'pid': 'prove_type'}}
63 58
64 -[2021-08-24 14:23:26] [INFO] : ======================================================================================  
65 -[2021-08-24 14:23:26] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action 59 +[2021-08-24 15:20:03] [INFO] : ======================================================================================
  60 +[2021-08-24 15:20:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/appCommon/duplicateToken.action
66 None 61 None
67 {} 62 {}
68 63
69 -[2021-08-24 14:23:26] [INFO] : ======================================================================================  
70 -[2021-08-24 14:23:26] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/wholeCarWeighSave  
71 -{"carTypeCode": "003", "carTypeId": 53, "carTypeName": "\u677f\u8f66", "carTypeWeight": 333, "plate": "\u5dddA91818", "inGreeterId": 274, "inGreeterName": "\u901a\u7528\u6d4b\u8bd5", "productId": 2182, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "weighRemark": "\u5907\u6ce8", "weighmanRecord": {"grossWeight": 432, "grossWeightDate": "2021-08-24 14:23:26", "newWeight": 99, "tareWeight": 333, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "trailerNumber": "\u5dddA91818", "pathAddress": "A4-BB-6D-0A-F4-13", "haveTruckWeight": false, "source": 4, "entryPlateInputType": 1, "dep": 58, "depName": "\u6c34\u679c\u90e8", "cateId": 2182, "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} 64 +[2021-08-24 15:20:03] [INFO] : ======================================================================================
  65 +[2021-08-24 15:20:03] [INFO] : http://test.gateway.diligrp.com:8285/jmsf-web/api/entrace/sparePartsWeighSave
  66 +{"driverTel": "", "inGreeterId": 223, "inGreeterName": "\u6d4b\u8bd5\u6c88\u9633", "itemWeight": 11, "productId": 2182, "productName": "\u96ea\u83b2\u679c", "proveTypeCode": 665, "proveTypeName": "\u98df\u54c1\u5b89\u5168", "qty": 33, "weighRemark": null, "weight": 220, "weighmanRecord": {"grossWeight": null, "grossWeightDate": null, "newWeight": null, "tareWeight": null, "tareWeightDate": null, "weighImgs": []}, "productCode": null, "plate": "\u5dddA90810", "carTypeId": 53, "carTypeCode": "003", "carTypeName": "\u677f\u8f66", "pathAddress": "A4-BB-6D-0A-F4-13", "entryPlateInputType": 1, "feeDepId": 0, "feeDepName": null, "dep": 58, "depName": "\u6c34\u679c\u90e8", "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, "type": 2, "tradeTypeId": 70, "tradeType": "9001", "tradeTypeName": "\u6c88\u96331\u53f7", "goodsTagId": 663, "originId": 500101, "origin": "\u4e07\u5dde\u533a", "originCode": "023", "trailerNumber": "\u5dddA90810", "cateId": 2182, "productState": "1"}
72 {} 67 {}
73 68
74 -[2021-08-24 14:23:27] [INFO] : ======================================================================================  
75 -[2021-08-24 14:23:27] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action  
76 -{'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': '202108240900199'} 69 +[2021-08-24 15:20:04] [INFO] : ======================================================================================
  70 +[2021-08-24 15:20:04] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action
  71 +{'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': '202108240900321'}
77 {} 72 {}
78 73
79 -[2021-08-24 14:23:27] [INFO] : ======================================================================================  
80 -[2021-08-24 14:23:27] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/5195.action 74 +[2021-08-24 15:20:04] [INFO] : ======================================================================================
  75 +[2021-08-24 15:20:04] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/pay/5349.action
81 None 76 None
82 {} 77 {}
83 78
84 -[2021-08-24 14:23:29] [INFO] : ======================================================================================  
85 -[2021-08-24 14:23:29] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810032426 79 +[2021-08-24 15:20:06] [INFO] : ======================================================================================
  80 +[2021-08-24 15:20:06] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/icCheck?ic=888810033081
86 None 81 None
87 {} 82 {}
88 83
89 -[2021-08-24 14:23:30] [INFO] : ======================================================================================  
90 -[2021-08-24 14:23:30] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州 84 +[2021-08-24 15:20:07] [INFO] : ======================================================================================
  85 +[2021-08-24 15:20:07] [INFO] : http://test.jmsf.diligrp.com:8385/api/jmsf/ajax/city/?name=万州&query=万州
91 None 86 None
92 {} 87 {}
93 88
94 -[2021-08-24 14:23:30] [INFO] : ======================================================================================  
95 -[2021-08-24 14:23:30] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action  
96 -{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '1', 'id': 5195, 'goodsId': '5209', 'number': '202108240900199', 'modified': '2021-08-24 14:23:30', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川A91818', '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': '2182', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-24 14:23:28', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '1616', 'driverTel': '', 'grossWeightDate': '2021-08-24 14:23:28', 'tareWeightDate': '2021-08-24 14:23:28', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '通用测试', 'inGreeterId': '274', 'outGreeterId': '', 'sumPrice': '9900', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''}  
97 -{}  
98 -  
99 -[2021-08-24 14:23:30] [INFO] : ======================================================================================  
100 -[2021-08-24 14:23:30] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action  
101 -protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=1&id=5195&goodsId=5209&number=202108240900199&modified=2021-08-24%2014%3A23%3A28&status=2&source=1&updateFeeItems=&correctDiscount=1&totalAmount=4800&customerId=384&fundAccount=107575&ic=888810032426&customerName=%2A%2A%2A%2A%2A%2A&customerPhone=19010001000&payway=%E5%88%B7%E5%8D%A1&plate=%E5%B7%9DA91818&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&regionName=A1%E5%8C%BA&regionId=72&productName=%E9%9B%AA%E8%8E%B2%E6%9E%9C&productId=2182&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=500100&levelType=&originId=500101&tradeTypeId=70&chargeTotalAmount=4800&chargeTotalAmountYuan=48&freezeMoneySymbol=53&comparisonFreezeAmount=53&created=2021-08-24%2014%3A23%3A28&remark=&goodsTagIds=663&marketFlag=sy&totalMoney=4800&receivable=5300&collectionPrice=0&discountAmount=500&handReceivableAmount=0&itemReceivableAmount=5300&shareRatio=0&handlingTeam=&handActualAmount=0&handManageAmount=0&handCollectionAmount=0&receivableAmount=5300&categoryName=%E6%B0%B4%E6%9E%9C&categoryId=1616&driverTel=&grossWeightDate=2021-08-24%2014%3A23%3A28&tareWeightDate=2021-08-24%2014%3A23%3A28&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=%E9%80%9A%E7%94%A8%E6%B5%8B%E8%AF%95&inGreeterId=274&outGreeterId=&sumPrice=9900&shipperName=&shipperId=&shipperPhone=&feeDepName=&calcFeeDepId=&feeDepId=&accountId=107575&correctDiscount=1&billItems=&billItemsDic=&billItemCheckIds=103&103=50.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%3A5000%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 89 +[2021-08-24 15:20:07] [INFO] : ======================================================================================
  90 +[2021-08-24 15:20:07] [INFO] : http://test.jmsf.diligrp.com:8385/calculate/index.action
  91 +{'protocolId': '', 'pwd': '', 'clientRedirectTag': '', 'viewType': 'pay', 'optType': '0', 'optUrl': '', 'correctInfo': '1', 'weightType': '2', 'id': 5349, 'goodsId': '5363', 'number': '202108240900321', 'modified': '2021-08-24 15:20:07', 'status': '2', 'source': '1', 'updateFeeItems': '', 'correctDiscount': '1', 'totalAmount': '', 'customerId': '0', 'fundAccount': '', 'accountId': '', 'ic': '', 'customerName': '', 'customerPhone': '', 'payway': '刷卡', 'plate': '川A90810', 'autocomplete-cartype': '003(板车)', 'carTypeName': '板车', 'carTypeCode': '003', 'carTypeId': '53', 'carTypeWeight': '', 'storeTareWeight': '', 'proveType': '665', 'grossWeight': '0', 'tareWeight': '0', 'weight': '220', 'goodsNum': '', 'itemWeight': '', 'productPrice': '1.00000', 'unitPrice': '100.0', 'depName': '水果部', 'calcDepId': '58', 'regionName': '', 'regionId': '0', 'productName': '雪莲果', 'productId': '2182', 'productArea': '重庆,重庆市,万州区', 'parentId': '', 'levelType': '', 'originId': 500101, 'tradeTypeId': '70', 'chargeTotalAmount': '', 'chargeTotalAmountYuan': '', 'freezeMoneySymbol': '', 'comparisonFreezeAmount': '', 'created': '2021-08-24 15:20:05', 'remark': 'false', 'goodsTagIds': '663', 'shareRatio': '0', 'handlingTeam': '', 'handlingRatio': '', 'handActualAmount': '', 'handManageAmount': '', 'handCollectionAmount': '', 'receivableAmount': '', 'categoryName': '水果', 'categoryId': '1616', 'driverTel': '', 'grossWeightDate': '2021-08-24 15:20:04', 'tareWeightDate': '2021-08-24 15:20:04', 'grossPathName': '', 'grossPathId': '', 'tarePathId': '', 'goodsRemark': '', 'inGreeterName': '测试沈阳', 'inGreeterId': '223', 'outGreeterId': '', 'sumPrice': '22000', 'shipperName': '', 'shipperId': '', 'shipperPhone': '', 'feeDepName': '', 'calcFeeDepId': ''}
102 {} 92 {}
103 93
104 -[2021-08-24 14:23:35] [INFO] : ======================================================================================  
105 -[2021-08-24 14:23:35] [INFO] : http://test.jmsf.diligrp.com:8385/entranceFeeBill/listPage.action  
106 -{'rows': '10', 'page': '1', 'sort': 'et.created', 'order': 'desc', 'metadata[created]': '{"provider": "datetimeProvider", "index": 10, "field": "created"}', 'metadata[totalPrice]': '{"provider": "moneyProvider", "index": 20, "field": "totalPrice"}', 'metadata[paymentTime]': '{"provider": "datetimeProvider", "index": 30, "field": "paymentTime"}', 'metadata[type]': '{"provider": "entranceFeeBillTypeProvider", "index": 40, "field": "type"}', 'metadata[status]': '{"provider": "entranceFeeBillStateProvider", "index": 50, "field": "status"}', 'attr': 'pay', 'attrValue': '沈阳长歌'} 94 +[2021-08-24 15:20:07] [INFO] : ======================================================================================
  95 +[2021-08-24 15:20:07] [INFO] : http://test.jmsf.diligrp.com:8385/entranceTrade/doPay.action
  96 +protocolId=&pwd=111111&clientRedirectTag=&viewType=pay&optType=0&optUrl=&correctInfo=1&weightType=2&id=5349&goodsId=5363&number=202108240900321&modified=2021-08-24%2015%3A20%3A05&status=2&source=1&updateFeeItems=&correctDiscount=1&totalAmount=4800&customerId=384&fundAccount=103101&ic=888810033081&customerName=%2A%2A%2A%2A%2A%2A&customerPhone=19010001000&payway=%E5%88%B7%E5%8D%A1&plate=%E5%B7%9DA90810&autocomplete-cartype=003%28%E6%9D%BF%E8%BD%A6%29&carTypeName=%E6%9D%BF%E8%BD%A6&carTypeCode=003&carTypeId=53&carTypeWeight=&storeTareWeight=&proveType=665&grossWeight=0&tareWeight=0&weight=220&goodsNum=&itemWeight=&productPrice=1.00000&unitPrice=100.0&depName=%E6%B0%B4%E6%9E%9C%E9%83%A8&calcDepId=58&dep=58&regionName=A1%E5%8C%BA&regionId=72&productName=%E9%9B%AA%E8%8E%B2%E6%9E%9C&productId=2182&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=500100&levelType=&originId=500101&tradeTypeId=70&chargeTotalAmount=4800&chargeTotalAmountYuan=48&freezeMoneySymbol=53&comparisonFreezeAmount=53&created=2021-08-24%2015%3A20%3A05&remark=&goodsTagIds=663&marketFlag=sy&totalMoney=4800&receivable=5300&collectionPrice=0&discountAmount=500&handReceivableAmount=0&itemReceivableAmount=5300&shareRatio=0&handlingTeam=&handActualAmount=0&handManageAmount=0&handCollectionAmount=0&receivableAmount=5300&categoryName=%E6%B0%B4%E6%9E%9C&categoryId=1616&driverTel=&grossWeightDate=2021-08-24%2015%3A20%3A04&tareWeightDate=2021-08-24%2015%3A20%3A04&grossPathName=&grossPathId=&tarePathId=&goodsRemark=&inGreeterName=%E6%B5%8B%E8%AF%95%E6%B2%88%E9%98%B3&inGreeterId=223&outGreeterId=&sumPrice=22000&shipperName=&shipperId=&shipperPhone=&feeDepName=&calcFeeDepId=&feeDepId=&accountId=103101&correctDiscount=1&billItems=&billItemsDic=&billItemCheckIds=103&103=50.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%3A5000%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
107 {} 97 {}
108 98
testcase/heb/FeedbackCustomerController/test_fc_add.py
@@ -19,7 +19,7 @@ class test_fc_add(unittest.TestCase): @@ -19,7 +19,7 @@ class test_fc_add(unittest.TestCase):
19 pass 19 pass
20 def setUp(self): 20 def setUp(self):
21 self.cardnb = db.mysql_selectOne('''SELECT card_no FROM `dili_account`.`account_user_card` WHERE state = 1 21 self.cardnb = db.mysql_selectOne('''SELECT card_no FROM `dili_account`.`account_user_card` WHERE state = 1
22 - AND firm_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY id LIMIT 1''')[0] 22 + AND firm_id = '''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY id LIMIT 1''')[0]
23 def test_fc_add_01(self): 23 def test_fc_add_01(self):
24 "新增返还人" 24 "新增返还人"
25 body = fc.body.replace("18828281176",ra.phone_number()).\ 25 body = fc.body.replace("18828281176",ra.phone_number()).\
testcase/heb/FeedbackCustomerController/test_fc_edit.py
@@ -31,7 +31,7 @@ class test_fc_edit(unittest.TestCase): @@ -31,7 +31,7 @@ class test_fc_edit(unittest.TestCase):
31 # # print(body) 31 # # print(body)
32 # re = heb.post(url = fc.url, headers = fc.header, data = body.encode('utf-8'), proxies = my.proxies) 32 # re = heb.post(url = fc.url, headers = fc.header, data = body.encode('utf-8'), proxies = my.proxies)
33 self.mesg = db.mysql_selectOne('''SELECT id,name,mobile,card_number 33 self.mesg = db.mysql_selectOne('''SELECT id,name,mobile,card_number
34 -FROM `dili_jmsf`.`feedback_customer` WHERE market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''') 34 +FROM `dili_jmsf`.`feedback_customer` WHERE market_id = '''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')
35 # print(self.mesg) 35 # print(self.mesg)
36 def test_fc_edit_01(self): 36 def test_fc_edit_01(self):
37 "修改返还人" 37 "修改返还人"
testcase/heb/FeedbackCustomerController/test_fc_view.py
@@ -22,7 +22,7 @@ class test_fc_view(unittest.TestCase): @@ -22,7 +22,7 @@ class test_fc_view(unittest.TestCase):
22 def setUp(self): 22 def setUp(self):
23 # 获取数据:从MYSQL获取新增返还人的id号 23 # 获取数据:从MYSQL获取新增返还人的id号
24 self.code = db.mysql_selectOne('''SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE 24 self.code = db.mysql_selectOne('''SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE
25 - market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] 25 + market_id = '''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0]
26 26
27 27
28 # @unittest.case_mark(my.mark()) 28 # @unittest.case_mark(my.mark())
testcase/heb/FeedbackCustomerController/test_feedback_customer_disable.py
@@ -18,7 +18,7 @@ class test_feedback_customer_disable(unittest.TestCase): @@ -18,7 +18,7 @@ class test_feedback_customer_disable(unittest.TestCase):
18 18
19 def setUp(self): 19 def setUp(self):
20 self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` 20 self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer`
21 - WHERE `status` = '1' and market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' 21 + WHERE `status` = '1' and market_id = '''+str(heb.user["heb_user01"]["firmId"])+'''
22 ORDER BY `id` DESC LIMIT 1''')[0] 22 ORDER BY `id` DESC LIMIT 1''')[0]
23 # print("查询出返还人id", self.id) 23 # print("查询出返还人id", self.id)
24 24
testcase/heb/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
@@ -20,7 +20,7 @@ class test_feedbackAccounrecordController_list(unittest.TestCase): @@ -20,7 +20,7 @@ class test_feedbackAccounrecordController_list(unittest.TestCase):
20 self.body = db.mysql_selectOne( 20 self.body = db.mysql_selectOne(
21 '''SELECT dili_jmsf.feedback_account_record.created,dili_jmsf.feedback_order.record_number 21 '''SELECT dili_jmsf.feedback_account_record.created,dili_jmsf.feedback_order.record_number
22 FROM `dili_jmsf`.`feedback_order` LEFT JOIN `dili_jmsf`.`feedback_account_record` ON dili_jmsf.feedback_order.id = dili_jmsf.feedback_account_record.order_ids 22 FROM `dili_jmsf`.`feedback_order` LEFT JOIN `dili_jmsf`.`feedback_account_record` ON dili_jmsf.feedback_order.id = dili_jmsf.feedback_account_record.order_ids
23 -WHERE market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''') 23 +WHERE market_id = '''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''')
24 # print("查询出查询时间和交易流水号:", self.body[0],self.body[1]) 24 # print("查询出查询时间和交易流水号:", self.body[0],self.body[1])
25 25
26 def test_feedbackAccounrecordController_list_01(self): 26 def test_feedbackAccounrecordController_list_01(self):
testcase/heb/FeedbackCustomerController/test_feedback_customer_enable.py renamed to testcase/heb/feedbackCustomerController/test_feedback_customer_enable.py
@@ -21,7 +21,7 @@ class test_feedback_customer_enable(unittest.TestCase): @@ -21,7 +21,7 @@ class test_feedback_customer_enable(unittest.TestCase):
21 def setUp(self): 21 def setUp(self):
22 self.ids = db.mysql_selectOne(''' 22 self.ids = db.mysql_selectOne('''
23 SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and 23 SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and
24 - market_id='''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] 24 + market_id='''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0]
25 print(self.ids) 25 print(self.ids)
26 def test_feedback_customer_enable_01(self): 26 def test_feedback_customer_enable_01(self):
27 "返还人启用" 27 "返还人启用"
testcase/heb/FeedbackCustomerController/test_feedback_customer_query.py renamed to testcase/heb/feedbackCustomerController/test_feedback_customer_query.py
@@ -18,7 +18,7 @@ class test_feedback_customer_query(unittest.TestCase): @@ -18,7 +18,7 @@ class test_feedback_customer_query(unittest.TestCase):
18 pass 18 pass
19 def setUp(self): 19 def setUp(self):
20 self.name1 = db.mysql_selectOne('''SELECT name FROM `dili_jmsf`.`feedback_customer` 20 self.name1 = db.mysql_selectOne('''SELECT name FROM `dili_jmsf`.`feedback_customer`
21 - WHERE market_id = ''' + str(heb.user["sy_user01"]["firmId"]) + ''' ORDER BY `id` DESC LIMIT 1''')[0] 21 + WHERE market_id = ''' + str(heb.user["heb_user01"]["firmId"]) + ''' ORDER BY `id` DESC LIMIT 1''')[0]
22 def test_feedback_customer_query_01(self): 22 def test_feedback_customer_query_01(self):
23 "返还人列表查询" 23 "返还人列表查询"
24 print(fcq.url) 24 print(fcq.url)
testcase/heb/FeedbackOrderController/test_feedback_order_settlement.py renamed to testcase/heb/feedbackOrderController/test_feedback_order_settlement.py
testcase/heb/FeedbackOrderController/test_feedback_order_settlement_query.py renamed to testcase/heb/feedbackOrderController/test_feedback_order_settlement_query.py
@@ -4,6 +4,7 @@ from commons.MySession import my,heb @@ -4,6 +4,7 @@ from commons.MySession import my,heb
4 from commons.api.feedback_order_settlement_query import feedback_order_settlement_query 4 from commons.api.feedback_order_settlement_query import feedback_order_settlement_query
5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 fosq = feedback_order_settlement_query() 6 fosq = feedback_order_settlement_query()
  7 +import commons.ConfigDB as db
7 import datetime 8 import datetime
8 9
9 """ 10 """
@@ -15,17 +16,20 @@ class test_feedback_order_settlement_query(unittest.TestCase): @@ -15,17 +16,20 @@ class test_feedback_order_settlement_query(unittest.TestCase):
15 @classmethod 16 @classmethod
16 def setUpClass(cls): 17 def setUpClass(cls):
17 pass 18 pass
18 - 19 + def setUp(self):
  20 + self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE
  21 + `status` = '1' and market_id = ''' + str(heb.user["heb_user01"]["firmId"]) + '''
  22 + ORDER BY `id` DESC LIMIT 1''')[0]
19 def test_feedback_order_settlement_query_01(self): 23 def test_feedback_order_settlement_query_01(self):
20 "根据返还人和缴费时间进行查询" 24 "根据返还人和缴费时间进行查询"
21 print(fosq.url) 25 print(fosq.url)
22 - body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").\ 26 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.ids)).\
23 replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ 27 replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
24 replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) 28 replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
25 # print(body) 29 # print(body)
26 re = heb.post(url = fosq.url, data = body,headers = fosq.header) 30 re = heb.post(url = fosq.url, data = body,headers = fosq.header)
27 - # print(re.headers)  
28 - # print(re.json()) 31 + print(re.headers)
  32 + print(re.json())
29 self.assertTrue("rows" in str(re.json())) 33 self.assertTrue("rows" in str(re.json()))
30 34
31 @classmethod 35 @classmethod
testcase/heb/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
@@ -16,14 +16,17 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase): @@ -16,14 +16,17 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase):
16 @classmethod 16 @classmethod
17 def setUpClass(cls): 17 def setUpClass(cls):
18 pass 18 pass
  19 +
19 def setUp(self): 20 def setUp(self):
20 - pass 21 + self.idf = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE
  22 + `status` = '1' and market_id = ''' + str(heb.user["heb_user01"]["firmId"]) + '''
  23 + ORDER BY `id` DESC LIMIT 1''')[0]
21 24
22 def test_feedbackOrderController_settlementlist_01(self): 25 def test_feedbackOrderController_settlementlist_01(self):
23 "根据返还人和结算时间进行查询" 26 "根据返还人和结算时间进行查询"
24 body = focsl.body.replace("2021-08-04 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ 27 body = focsl.body.replace("2021-08-04 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
25 replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\ 28 replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\
26 - replace("feedbackCustomerId=25", "feedbackCustomerId=26") 29 + replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.idf))
27 # print(body) 30 # print(body)
28 re = heb.post(url=focsl.url, data=body, headers=focsl.header) 31 re = heb.post(url=focsl.url, data=body, headers=focsl.header)
29 self.assertEqual(re.status_code, 200) 32 self.assertEqual(re.status_code, 200)
testcase/heb/test_listPage/test_listPageOperation.py
@@ -165,7 +165,7 @@ class test_listPage(unittest.TestCase): @@ -165,7 +165,7 @@ class test_listPage(unittest.TestCase):
165 goods = "雪莲果" 165 goods = "雪莲果"
166 cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate,keyword=goods) 166 cre_res = zcA.create_jmsf(host=self.gatewayHost,plate=plate,keyword=goods)
167 number = cre_res.json()["data"]["number"] 167 number = cre_res.json()["data"]["number"]
168 - res_pay = eFBL.do_payOrder(host=self.jmsfHost,attrValue=number) 168 + res_pay = eFBL.do_payOrder(host=self.jmsfHost,attrValue=number,ic=self.ic)
169 res_undo = oDU.do_undoOrder(host=self.jmsfHost,attrValue=number) 169 res_undo = oDU.do_undoOrder(host=self.jmsfHost,attrValue=number)
170 assert res_undo.json()["code"] == "200","退款失败" 170 assert res_undo.json()["code"] == "200","退款失败"
171 assert res_undo.json()["message"] == "OK","退款失败" 171 assert res_undo.json()["message"] == "OK","退款失败"
172 \ No newline at end of file 172 \ No newline at end of file
testcase/sy/FeedbackCustomerController/test_feedback_customer_enable.py renamed to testcase/sy/feedbackCustomerController/test_feedback_customer_enable.py
testcase/sy/FeedbackCustomerController/test_feedback_customer_query.py renamed to testcase/sy/feedbackCustomerController/test_feedback_customer_query.py
testcase/sy/FeedbackOrderController/test_feedback_order_settlement.py renamed to testcase/sy/feedbackOrderController/test_feedback_order_settlement.py
testcase/sy/FeedbackOrderController/test_feedback_order_settlement_query.py renamed to testcase/sy/feedbackOrderController/test_feedback_order_settlement_query.py
@@ -4,6 +4,7 @@ from commons.MySession import my,sy1 @@ -4,6 +4,7 @@ from commons.MySession import my,sy1
4 from commons.api.feedback_order_settlement_query import feedback_order_settlement_query 4 from commons.api.feedback_order_settlement_query import feedback_order_settlement_query
5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 fosq = feedback_order_settlement_query() 6 fosq = feedback_order_settlement_query()
  7 +import commons.ConfigDB as db
7 import datetime 8 import datetime
8 9
9 """ 10 """
@@ -15,11 +16,16 @@ class test_feedback_order_settlement_query(unittest.TestCase): @@ -15,11 +16,16 @@ class test_feedback_order_settlement_query(unittest.TestCase):
15 @classmethod 16 @classmethod
16 def setUpClass(cls): 17 def setUpClass(cls):
17 pass 18 pass
18 - 19 + def setUp(self):
  20 + self.ids = db.mysql_selectOne('''
  21 + SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '1'
  22 + and market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + '''
  23 + ORDER BY `id` DESC LIMIT 1''')[0]
  24 + # print(self.ids)
19 def test_feedback_order_settlement_query_01(self): 25 def test_feedback_order_settlement_query_01(self):
20 "根据返还人和缴费时间进行查询" 26 "根据返还人和缴费时间进行查询"
21 print(fosq.url) 27 print(fosq.url)
22 - body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").\ 28 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.ids)).\
23 replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ 29 replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
24 replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) 30 replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
25 # print(body) 31 # print(body)
testcase/sy/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
@@ -17,15 +17,17 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase): @@ -17,15 +17,17 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase):
17 def setUpClass(cls): 17 def setUpClass(cls):
18 pass 18 pass
19 def setUp(self): 19 def setUp(self):
20 - pass 20 + self.idf = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE
  21 + `status` = '1' and market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + '''
  22 + ORDER BY `id` DESC LIMIT 1''')[0]
21 23
22 def test_feedbackOrderController_settlementlist_01(self): 24 def test_feedbackOrderController_settlementlist_01(self):
23 "根据返还人和结算时间进行查询" 25 "根据返还人和结算时间进行查询"
24 body = focsl.body.replace("2021-08-04 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ 26 body = focsl.body.replace("2021-08-04 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
25 replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\ 27 replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\
26 - replace("feedbackCustomerId=25", "feedbackCustomerId=26") 28 + replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.idf))
27 # print(body) 29 # print(body)
28 - re = sy1.post(url=focsl.url, data=body, headers=focsl.header) 30 + re = sy1.post(url=focsl.url, data=body.replace("\n",""), headers=focsl.header,proxies = my.proxies)
29 self.assertEqual(re.status_code, 200) 31 self.assertEqual(re.status_code, 200)
30 # print(re.json()) 32 # print(re.json())
31 33