Commit be229ed323fd04b00146b5f2d2f35f9d310fe80d

Authored by lixi
1 parent 4cdb192b

修改api的目录层级

Showing 82 changed files with 595 additions and 208 deletions
commons/api/hg/__init__.py 0 → 100644
commons/api/hg/jmsf/__init__.py 0 → 100644
commons/api/hg/jmsf/registerRecord_save.py 0 → 100644
  1 +#!/usr/bin/python
  2 +# -*- coding: UTF-8 -*-
  3 +import urllib3
  4 +from commons import common as com
  5 +from commons.MySession import hg
  6 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  7 +
  8 +
  9 +class registerRecord_save():
  10 + "录入批次号"
  11 +
  12 + def __init__(self):
  13 + self.url = "http://test.gateway.diligrp.com:8285/hg-trading/api/registerRecord/save"
  14 + self.header = {
  15 + "UAP_accessToken" :"demo",
  16 + "UAP_refreshToken" :"demo",
  17 + "UAP_firmId" :"15",
  18 + "Content-Type" :"application/json",
  19 + "Host" :"test.gateway.diligrp.com:8285"}
  20 + self.body = {
  21 + "accountId": 107792,
  22 + "cardNo": "888810026785",
  23 + "customerId": 141992,
  24 + "customerCode": "00131694",
  25 + "customerName": "特朗普vip",
  26 + "fixedphoneNumber": None,
  27 + "mobilephoneNumber": "16111111112",
  28 + "identityCardAddress": "",
  29 + "identityCardNo": "110101198001012390",
  30 + "identityCardType": "ID",
  31 + "registerDetailDtoList": [{
  32 + "id": 0,
  33 + "areaId": 274,
  34 + "areaName": "东区01",
  35 + "quantity": 10,
  36 + "productId": 374690,
  37 + "registerRecordId": 0,
  38 + "remark": None,
  39 + "weight": 10,
  40 + "weightType": 0,
  41 + "created": None,
  42 + "createdById": 0,
  43 + "createdByName": None,
  44 + "createdByDepartmentId": 0,
  45 + "createdByDepartmentName": None,
  46 + "registerCertificateList": None,
  47 + "product": None,
  48 + "registerCertificateDtoList": None,
  49 + "productDto": {
  50 + "id": 0,
  51 + "originId": 510100,
  52 + "originName": "成都市",
  53 + "pieceWeight": 1,
  54 + "categoryId": 374690,
  55 + "categoryCode": "374690",
  56 + "categoryName": "苹果",
  57 + "created": None
  58 + }
  59 + }],
  60 + "registerFeeDtoList": [],
  61 + "tradePassword": "" }
  62 +
  63 +
  64 +
  65 +
  66 +tt=registerRecord_save()
  67 +re=hg.post(url=tt.url,headers=tt.header,json=tt.body,proxies=hg.myproxies)
  68 +print(str(re.json()))
0 69 \ No newline at end of file
... ...
commons/api/sy/__init__.py 0 → 100644
commons/api/entranceFeeBillList/__init__.py renamed to commons/api/sy/entranceFeeBillList/__init__.py
commons/api/entranceFeeBillList/apiDemo.py renamed to commons/api/sy/entranceFeeBillList/apiDemo.py
commons/api/entranceFeeBillList/entranceFeeBillList.py renamed to commons/api/sy/entranceFeeBillList/entranceFeeBillList.py
commons/api/entranceFeeBillList/operationDoAmend.py renamed to commons/api/sy/entranceFeeBillList/operationDoAmend.py
... ... @@ -9,10 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json,time, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
16 16 from bs4 import BeautifulSoup
17 17 import urllib.parse
18 18  
... ...
commons/api/entranceFeeBillList/operationDoCorrect.py renamed to commons/api/sy/entranceFeeBillList/operationDoCorrect.py
... ... @@ -12,7 +12,7 @@
12 12 import json,time,random,re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
16 16 from bs4 import BeautifulSoup
17 17 import urllib.parse
18 18  
... ...
commons/api/entranceFeeBillList/operationDoFreeze.py renamed to commons/api/sy/entranceFeeBillList/operationDoFreeze.py
... ... @@ -9,10 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json,time, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
16 16 from bs4 import BeautifulSoup
17 17 import urllib.parse
18 18  
... ...
commons/api/entranceFeeBillList/operationDoInvalid.py renamed to commons/api/sy/entranceFeeBillList/operationDoInvalid.py
... ... @@ -9,11 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json,time, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.MySession import my
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 16 from bs4 import BeautifulSoup
18 17 import urllib.parse
19 18  
... ...
commons/api/entranceFeeBillList/operationDoUndo.py renamed to commons/api/sy/entranceFeeBillList/operationDoUndo.py
... ... @@ -9,11 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.MySession import my
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 16 from bs4 import BeautifulSoup
18 17 import urllib.parse
19 18  
... ...
commons/api/entranceFeeBillList/operationDoUpdate.py renamed to commons/api/sy/entranceFeeBillList/operationDoUpdate.py
... ... @@ -9,11 +9,11 @@
9 9  
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json,time, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15 15 # from commons.MySession import my
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  16 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 17 from bs4 import BeautifulSoup
18 18 import urllib.parse
19 19  
... ...
commons/api/entranceFeeBillList/operationUnfreeze.py renamed to commons/api/sy/entranceFeeBillList/operationUnfreeze.py
... ... @@ -9,11 +9,10 @@
9 9 进门单操作
10 10 """
11 11  
12   -import json,time,random,re
  12 +import json,time, re
13 13 from commons.scripts import dealContentType as dct
14 14 from commons.scripts import jsonToUrlcode
15   -from commons.MySession import my
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 16 from bs4 import BeautifulSoup
18 17 import urllib.parse
19 18  
... ...
commons/api/entranceFeeBill_details.py renamed to commons/api/sy/entranceFeeBill_details.py
... ... @@ -39,8 +39,8 @@ class entranceFeeBill_details():
39 39 &backSkinStatus=-1
40 40 &tag=20
41 41 &companyId=9
42   - &startTime=2020-08-11 00:00:00&endTime=2025-08-13 00:00:00
43   - &startPayTime=2020-08-11 00:00:00&endPayTime=2025-08-13 00:00:00
  42 + &startTime=2020-08-01 00:00:00&endTime=2025-08-30 00:00:00
  43 + &startPayTime=2020-08-01 00:00:00&endPayTime=2025-08-30 00:00:00
44 44 &attr=number&attrValue=202108120900001"""
45 45  
46 46 def __init__(self):
... ...
commons/api/entranceFeeBill_provesPage.py renamed to commons/api/sy/entranceFeeBill_provesPage.py
commons/api/fc_add.py renamed to commons/api/sy/fc_add.py
commons/api/fc_edit.py renamed to commons/api/sy/fc_edit.py
commons/api/fc_view.py renamed to commons/api/sy/fc_view.py
commons/api/feedbackAccounrecordController_list.py renamed to commons/api/sy/feedbackAccounrecordController_list.py
commons/api/feedbackOrderController_querySumAmount.py renamed to commons/api/sy/feedbackOrderController_querySumAmount.py
commons/api/feedbackOrderController_settlementlist.py renamed to commons/api/sy/feedbackOrderController_settlementlist.py
commons/api/feedback_customer_disable.py renamed to commons/api/sy/feedback_customer_disable.py
commons/api/feedback_customer_enable.py renamed to commons/api/sy/feedback_customer_enable.py
commons/api/feedback_customer_query.py renamed to commons/api/sy/feedback_customer_query.py
commons/api/feedback_order_settlement.py renamed to commons/api/sy/feedback_order_settlement.py
commons/api/feedback_order_settlement_query.py renamed to commons/api/sy/feedback_order_settlement_query.py
commons/api/hpApi.py renamed to commons/api/sy/hpApi.py
... ... @@ -11,9 +11,7 @@
11 11  
12 12 import json,time,random
13 13 from commons.scripts import dealContentType as dct
14   -from commons.MySession import my
15   -from commons.api import zcApi
16   -from commons.api import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi
17 15  
18 16 host = "http://test.gateway.diligrp.com:8285"
19 17  
... ... @@ -55,7 +53,7 @@ def do_backSkinWeighSave(session=None,host="",number=None,userName=None):
55 53 tareWeightDate=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
56 54  
57 55 # 获取接车员信息
58   - listByExample = zcApi.get_listByExample(session=session,host=host)
  56 + listByExample = zcApi.get_listByExample(session=session, host=host)
59 57 print(listByExample.json())
60 58 if userName == None:
61 59 listByExampleIndex = 0
... ...
commons/api/sjApi.py renamed to commons/api/sy/sjApi.py
... ... @@ -9,11 +9,9 @@
9 9 散件
10 10 """
11 11  
12   -import json,time,random
  12 +import json
13 13 from commons.scripts import dealContentType as dct
14   -from commons.MySession import my
15   -from commons.api import zcApi
16   -from commons.api import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi
17 15 from commons.basic import getLookupList as gLL
18 16  
19 17  
... ... @@ -106,7 +104,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
106 104  
107 105 # 获取车型
108 106 if "车型" in templateAttr_list:
109   - carType = zcApi.get_carType(session=session,host=host)
  107 + carType = zcApi.get_carType(session=session, host=host)
110 108 print(carType.text)
111 109 if carTypeName == None:
112 110 carTypeIndex = 0
... ... @@ -126,7 +124,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
126 124  
127 125 # 获取商品
128 126 if "商品" in templateAttr_list or "商品(末级)" in templateAttr_list:
129   - categoryByCondition = zcApi.get_listCategoryByCondition(session=session,host=host, keyword=keyword)
  127 + categoryByCondition = zcApi.get_listCategoryByCondition(session=session, host=host, keyword=keyword)
130 128 cateId = categoryByCondition.json()["data"][0]["id"]
131 129 productId = categoryByCondition.json()["data"][0]["id"]
132 130 productName = categoryByCondition.json()["data"][0]["name"]
... ... @@ -152,7 +150,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
152 150 # print(firmCode)
153 151 # print(departmentId)
154 152 # print("==========1============")
155   - listByExample = zcApi.get_listByExample(session=session,host=host,firmCode=firmCode,departmentId=departmentId)
  153 + listByExample = zcApi.get_listByExample(session=session, host=host, firmCode=firmCode, departmentId=departmentId)
156 154 print("listByExample",listByExample.json())
157 155 if userName == None:
158 156 listByExampleIndex = 0
... ... @@ -181,7 +179,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
181 179  
182 180 # 获取交易类型
183 181 if "交易类型" in templateAttr_list:
184   - transactionType = zcApi.query_transactionType(session=session,host=host)
  182 + transactionType = zcApi.query_transactionType(session=session, host=host)
185 183 print(transactionType.json())
186 184 print("交易类型")
187 185 if transactionName == None:
... ... @@ -199,7 +197,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
199 197  
200 198 # 获取货物标签
201 199 if "货物标签" in templateAttr_list:
202   - goodsTag = zcApi.get_goodsTag(session=session,host=host)
  200 + goodsTag = zcApi.get_goodsTag(session=session, host=host)
203 201 print(goodsTag.json())
204 202 if goodsTagName == None:
205 203 transactionTypeIndex = 0
... ... @@ -212,7 +210,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
212 210  
213 211 # 产地信息获取
214 212 if "产地" in templateAttr_list:
215   - address = zcApi.get_address(session=session,host=host)
  213 + address = zcApi.get_address(session=session, host=host)
216 214 print(address.json())
217 215 originId = address.json()["data"][0]["id"]
218 216 origin = address.json()["data"][0]["name"]
... ... @@ -225,7 +223,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
225 223 # 查询部门信息
226 224 # 查询部门信息
227 225 if "接车部门" in templateAttr_list or "收费部门" in templateAttr_list:
228   - depRes = zcApi.get_dep(session=session,host=host)
  226 + depRes = zcApi.get_dep(session=session, host=host)
229 227 print(depRes.json())
230 228 if depName == None:
231 229 depResIndex = 0
... ... @@ -240,7 +238,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
240 238  
241 239 # 获取证明类型
242 240 if "证明类型" in templateAttr_list:
243   - proveType = zcApi.get_proveType(session=session,host=host)
  241 + proveType = zcApi.get_proveType(session=session, host=host)
244 242 print(proveType.json())
245 243 # print("proveName",proveName)
246 244 if proveName == None:
... ... @@ -257,7 +255,7 @@ def create_sj(session=None,host=None,carTypeName=None,keyword="蔬菜",userName=
257 255 print("proveTypeName", proveTypeName)
258 256  
259 257 # 获取防重token
260   - duplicateTokenRes = zcApi.get_duplicateToken(session=session,host=host)
  258 + duplicateTokenRes = zcApi.get_duplicateToken(session=session, host=host)
261 259 print(duplicateTokenRes.json())
262 260 duplicateToken = duplicateTokenRes.json()["data"]
263 261  
... ...
commons/api/weighingServiceSave.py renamed to commons/api/sy/weighingServiceSave.py
commons/api/weightBizBill_doRefund.py renamed to commons/api/sy/weightBizBill_doRefund.py
commons/api/weightBizBill_listPage.py renamed to commons/api/sy/weightBizBill_listPage.py
commons/api/zcApi.py renamed to commons/api/sy/zcApi.py
testcase/heb/CZFW/test_weightBizBill_doRefund.py
... ... @@ -2,11 +2,10 @@
2 2 # -*- coding: UTF-8 -*-
3 3 import unittest
4 4 import urllib3
5   -from commons import common as com
6 5 from commons import ConfigDB as db
7 6 from commons.MySession import my,heb
8   -from commons.api.weightBizBill_doRefund import weightBizBill_doRefund
9   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weightBizBill_doRefund import weightBizBill_doRefund
  8 +from commons.api.sy.weighingServiceSave import weighingServiceSave
10 9 from commons.basic.listCarType import listCarType
11 10 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
12 11 do=weightBizBill_doRefund()
... ...
testcase/heb/CZFW/test_weightBizBill_listPage.py
... ... @@ -3,10 +3,9 @@
3 3 import unittest
4 4 import urllib3
5 5 import time
6   -from commons import common as com
7 6 from commons.MySession import my,heb
8   -from commons.api.weightBizBill_listPage import weightBizBill_listPage
9   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weightBizBill_listPage import weightBizBill_listPage
  8 +from commons.api.sy.weighingServiceSave import weighingServiceSave
10 9 from commons.basic.listCarType import listCarType
11 10 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
12 11 bi=weightBizBill_listPage()
... ...
testcase/heb/FeedbackCustomerController/test_fc_add.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,heb
4   -from commons.api.fc_add import fc_add
  3 +from commons.MySession import heb
  4 +from commons.api.sy.fc_add import fc_add
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 from commons.Faker import random_data
7 7 import commons.ConfigDB as db
... ...
testcase/heb/FeedbackCustomerController/test_fc_edit.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,heb
4   -from commons.api.fc_edit import fc_edit
  3 +from commons.MySession import heb
  4 +from commons.api.sy.fc_edit import fc_edit
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 from commons.Faker import random_data
7   -from commons.api.fc_add import fc_add
  7 +from commons.api.sy.fc_add import fc_add
8 8 ra = random_data()
9 9 fca = fc_add()
10 10 import commons.ConfigDB as db
... ...
testcase/heb/FeedbackCustomerController/test_fc_view.py
1 1 import unittest
2 2 import urllib3
3 3 import commons.ConfigDB as db
4   -from commons.MySession import my,heb
5   -from commons.api.fc_view import fc_view
6   -from commons.api.fc_add import fc_add
  4 +from commons.MySession import heb
  5 +from commons.api.sy.fc_view import fc_view
  6 +from commons.api.sy.fc_add import fc_add
7 7 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
8 8 ad = fc_add()
9 9 vi = fc_view()
... ...
testcase/heb/FeedbackCustomerController/test_feedback_customer_disable.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,heb
4   -from commons.api.feedback_customer_disable import feedback_customer_disable
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedback_customer_disable import feedback_customer_disable
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 fcd = feedback_customer_disable()
7 7 import commons.ConfigDB as db
... ...
testcase/heb/FeedbackCustomerController/test_feedback_customer_enable.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedback_customer_enable import feedback_customer_enable
  5 +from commons.api.sy.feedback_customer_disable import feedback_customer_disable
  6 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  7 +fce = feedback_customer_enable()
  8 +fcd = feedback_customer_disable
  9 +import commons.ConfigDB as db
  10 +
  11 +"""
  12 +进门收费——返点管理——返还人管理——启用返还人
  13 +"""
  14 +@unittest.skip
  15 +class test_feedback_customer_enable(unittest.TestCase):
  16 + "哈尔滨——返还人管理——返还人启用"
  17 + @classmethod
  18 + def setUpClass(cls):
  19 + pass
  20 +
  21 + def setUp(self):
  22 + self.ids = db.mysql_selectOne('''
  23 + SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and
  24 + market_id='''+str(heb.user["heb_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0]
  25 + print(self.ids)
  26 + def test_feedback_customer_enable_01(self):
  27 + "返还人启用"
  28 + url = fce.url.replace("49",str(self.ids))
  29 + re = heb.post(url = url, headers = fce.header)
  30 + # print(fce.url)
  31 + # print(re.headers)
  32 + # print(re.json())
  33 + self.assertTrue("操作成功" in str(re.json()))
  34 + @classmethod
  35 + def tearDownClass(cls):
  36 + pass
  37 +
  38 +
  39 +if __name__ == '__main__':
  40 + unittest.main()
... ...
testcase/heb/FeedbackCustomerController/test_feedback_customer_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedback_customer_query import feedback_customer_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +import datetime
  7 +import commons.ConfigDB as db
  8 +fcq = feedback_customer_query()
  9 +
  10 +"""
  11 +进门收费——返点管理——返还人管理——返还人列表查询
  12 +"""
  13 +@unittest.skip
  14 +class test_feedback_customer_query(unittest.TestCase):
  15 + "哈尔滨——返还人管理——返还人列表查询"
  16 + @classmethod
  17 + def setUpClass(cls):
  18 + pass
  19 + def setUp(self):
  20 + self.name1 = db.mysql_selectOne('''SELECT name FROM `dili_jmsf`.`feedback_customer`
  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):
  23 + "返还人列表查询"
  24 + print(fcq.url)
  25 + body = fcq.body\
  26 + .replace("潘婷婷", str(self.name1))\
  27 + .replace("2021-08-11 00:00:00",(datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
  28 + replace("2021-08-11 23:59:59",datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
  29 + # print(body)
  30 + re = heb.post(url = fcq.url, data = body.replace("\n","").encode('utf-8'),headers = fcq.header)
  31 + # print(re.headers)
  32 + # print(re.text)
  33 + # print("士大夫十",str(self.name1))
  34 + self.assertTrue(str(self.name1) in str(re.text))
  35 +
  36 + @classmethod
  37 + def tearDownClass(cls):
  38 + pass
  39 +
  40 +
  41 +if __name__ == '__main__':
  42 + unittest.main()
... ...
testcase/heb/FeedbackOrderController/test_feedback_order_settlement.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedback_order_settlement import feedback_order_settlement
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +from commons.api.sy.feedback_order_settlement_query import feedback_order_settlement_query
  7 +fosq = feedback_order_settlement_query()
  8 +import datetime
  9 +fos = feedback_order_settlement()
  10 +
  11 +"""
  12 +进门收费——返点管理——结账管理——选择需要返点的订单进行结账
  13 +"""
  14 +@unittest.skip
  15 +class test_feedback_order_settlement(unittest.TestCase):
  16 + "哈尔滨——结账管理——选择需要返点的订单进行结账"
  17 + @classmethod
  18 + def setUpClass(cls):
  19 + pass
  20 +
  21 + def setUp(self):
  22 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").replace("2021-07-22 00:00:00", "\
  23 + 2021-07-03 00:00:00").replace("2021-08-03 23:59:59", str(datetime.datetime.now()))
  24 + re = heb.post(url = fosq.url, data = body, headers = fosq.header)
  25 +
  26 + self.Amount = re.json()["rows"][0]["unsettledAmount"]
  27 + self.ids = re.json()["rows"][0]["id"]
  28 + self.billIds = re.json()["rows"][0]["billId"]
  29 + #查询出结账金额、结算单id和与之相关联的进门单id
  30 + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settleAccount.action"
  31 + header = {
  32 + "X-Requested-With": "XMLHttpRequest",
  33 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  34 + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
  35 + }
  36 + body = "customerId=16"
  37 + re2 = heb.post(url = url,headers = header,data = body)
  38 + self.idd = re2.json()["id"]
  39 + self.name = re2.json()["name"]
  40 + self.cardNumber = re2.json()["cardNumber"]
  41 + #查询出结账单的id、name、cardnumber
  42 +
  43 + def test_feedback_order_settlement_01(self):
  44 + "选择需要返点的订单进行结账."
  45 + body = fos.body.replace("id=25","id="+str(self.idd)).\
  46 + replace("888810057654",str(self.cardNumber)).\
  47 + replace("settleAmount=2","settleAmount="+str(self.Amount)).\
  48 + replace("ids=12034","ids="+str(self.ids)).\
  49 + replace("feedbackCustomerId=25","feedbackCustomerId="+str(self.idd)).\
  50 + replace("feedbackCustomerName=验证员工推送到CRM","feedbackCustomerName="+str(self.name)).\
  51 + replace("billIds=3621","billIds="+str(self.billIds)).\
  52 + replace("settledAmounts=2","settledAmounts="+str(self.Amount))
  53 + # print(body)
  54 + re = heb.post(url = fos.url, headers = fos.header, data = body.encode('utf-8'))
  55 + # print(re.headers)
  56 +
  57 + # print(re.json())
  58 + self.assertTrue("操作成功" in str(re.json()))
  59 + return re
  60 +
  61 + @classmethod
  62 + def tearDownClass(cls):
  63 + pass
  64 +
  65 +
  66 +if __name__ == '__main__':
  67 + unittest.main()
0 68 \ No newline at end of file
... ...
testcase/heb/FeedbackOrderController/test_feedback_order_settlement_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedback_order_settlement_query import feedback_order_settlement_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fosq = feedback_order_settlement_query()
  7 +import commons.ConfigDB as db
  8 +import datetime
  9 +
  10 +"""
  11 +进门收费——返点管理——结账管理——根据返还人和缴费时间进行查询
  12 +"""
  13 +@unittest.skip
  14 +class test_feedback_order_settlement_query(unittest.TestCase):
  15 + "哈尔滨——结账管理列表查询——根据返还人和缴费时间进行查询"
  16 + @classmethod
  17 + def setUpClass(cls):
  18 + pass
  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]
  23 + def test_feedback_order_settlement_query_01(self):
  24 + "根据返还人和缴费时间进行查询"
  25 + print(fosq.url)
  26 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.ids)).\
  27 + replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).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"))
  29 + # print(body)
  30 + re = heb.post(url = fosq.url, data = body,headers = fosq.header)
  31 + print(re.headers)
  32 + print(re.json())
  33 + self.assertTrue("rows" in str(re.json()))
  34 +
  35 + @classmethod
  36 + def tearDownClass(cls):
  37 + pass
  38 +
  39 +
  40 +if __name__ == '__main__':
  41 + unittest.main()
... ...
testcase/heb/entranceFeeBill_detail/test_entranceFeeBill_details.py
... ... @@ -3,9 +3,8 @@
3 3 import unittest
4 4 import urllib3
5 5 from commons import ConfigDB as db
6   -from commons import common as com
7 6 from commons.MySession import my,heb
8   -from commons.api.entranceFeeBill_details import entranceFeeBill_details
  7 +from commons.api.sy.entranceFeeBill_details import entranceFeeBill_details
9 8 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 9 en=entranceFeeBill_details()
11 10  
... ...
testcase/heb/entranceFeeBill_proves/test_entranceFeeBill_provesPage.py
... ... @@ -3,9 +3,8 @@
3 3 import unittest
4 4 import urllib3
5 5 from commons import ConfigDB as db
6   -from commons import common as com
7 6 from commons.MySession import my,heb
8   -from commons.api.entranceFeeBill_provesPage import entranceFeeBill_provesPage
  7 +from commons.api.sy.entranceFeeBill_provesPage import entranceFeeBill_provesPage
9 8 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 9 en=entranceFeeBill_provesPage()
11 10  
... ...
testcase/heb/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
1 1 import unittest
2 2 import urllib3
3 3 from commons.MySession import my,heb
4   -from commons.api.feedbackAccounrecordController_list import feedbackAccounrecordController_list
  4 +from commons.api.sy.feedbackAccounrecordController_list import feedbackAccounrecordController_list
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import commons.ConfigDB as db
7 7 farcl = feedbackAccounrecordController_list()
... ...
testcase/heb/feedbackOrderController_settlementlist/feedbackOrderController_querySumAmount.py
1 1 import unittest
2 2 import urllib3
3 3 from commons.MySession import heb
4   -from commons.api.feedbackOrderController_querySumAmount import querySumAmount
  4 +from commons.api.sy.feedbackOrderController_querySumAmount import querySumAmount
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import datetime
7 7 qsa = querySumAmount()
... ...
testcase/heb/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,heb
4   -from commons.api.feedbackOrderController_settlementlist import feedbackOrderController_settlementlist
  3 +from commons.MySession import heb
  4 +from commons.api.sy.feedbackOrderController_settlementlist import feedbackOrderController_settlementlist
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import commons.ConfigDB as db
7 7 import datetime
... ...
testcase/heb/test_HP/test_HP.py
... ... @@ -9,14 +9,11 @@
9 9 回皮功能接口测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
17   -from commons.api.entranceFeeBillList import operationDoFreeze as oDF
18   -from commons.api import hpApi
19   -import time,random
  14 +from commons.api.sy import zcApi as zcA, hpApi
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL, operationDoFreeze as oDF
  16 +import random
20 17  
21 18 from commons.MySession import sessionHeb
22 19 session = sessionHeb
... ... @@ -48,7 +45,7 @@ class test_HPCreate(unittest.TestCase):
48 45 print(cre_res.json())
49 46 number = cre_res.json()["data"]["number"]
50 47 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
51   - res,tareWeight = hpApi.do_backSkinWeighSave(session=session,host=self.gatewayHost,number=number)
  48 + res,tareWeight = hpApi.do_backSkinWeighSave(session=session, host=self.gatewayHost, number=number)
52 49 assert res.json()["code"]=="200","回皮失败"
53 50 assert "data" in res.text,"回皮失败"
54 51  
... ... @@ -60,7 +57,7 @@ class test_HPCreate(unittest.TestCase):
60 57 print(cre_res.json())
61 58 number = cre_res.json()["data"]["number"]
62 59 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
63   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,plate=plate)
  60 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, plate=plate)
64 61 print(res.json())
65 62 assert res.json()["code"]=="200","车号查询失败"
66 63 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
... ... @@ -73,7 +70,7 @@ class test_HPCreate(unittest.TestCase):
73 70 print(cre_res.json())
74 71 number = cre_res.json()["data"]["number"]
75 72 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
76   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,number=number)
  73 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, number=number)
77 74 print(res.json())
78 75 assert res.json()["code"]=="200","车号查询失败"
79 76 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
... ... @@ -89,7 +86,7 @@ class test_HPCreate(unittest.TestCase):
89 86 print(cre_res.json())
90 87 number = cre_res.json()["data"]["number"]
91 88 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
92   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,customerName=customerName)
  89 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, customerName=customerName)
93 90 print(res.json())
94 91 assert res.json()["code"]=="200","车号查询失败"
95 92 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
96 93 \ No newline at end of file
... ...
testcase/heb/test_SJ/test_SJ.py
... ... @@ -9,13 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
17   -from commons.api import sjApi
18   -import time,random
  14 +from commons.api.sy import zcApi as zcA, sjApi
  15 +import random
19 16 from commons.MySession import sessionHeb
20 17 session = sessionHeb
21 18  
... ... @@ -108,15 +105,15 @@ class test_SJCreate(unittest.TestCase):
108 105 weight = int(itemWeight) * int(qty)
109 106  
110 107 # 创建进门单
111   - cre_res = sjApi.create_sparePartsWeighSave(session=session,host=self.gatewayHost, duplicateToken=duplicateToken,
112   - carTypeCode=carTypeCode, carTypeId=carTypeId,
113   - carTypeName=carTypeName, plate=plate, weight=weight,
114   - productId=productId, productName=productName, proveTypeCode=proveTypeCode,
115   - proveTypeName=proveTypeName, trailerNumber=trailerNumber,
116   - depName=feeDepName,
117   - cateId=cateId, originId=originId, origin=origin, originCode=originCode,
118   - tradeType=tradeType, tradeTypeName=tradeTypeName,
119   - productState=productState,
120   - tradeTypeId=tradeTypeId, inGreeterId=inGreeterId,
121   - inGreeterName=inGreeterName, dep=feeDepId)
  108 + cre_res = sjApi.create_sparePartsWeighSave(session=session, host=self.gatewayHost, duplicateToken=duplicateToken,
  109 + carTypeCode=carTypeCode, carTypeId=carTypeId,
  110 + carTypeName=carTypeName, plate=plate, weight=weight,
  111 + productId=productId, productName=productName, proveTypeCode=proveTypeCode,
  112 + proveTypeName=proveTypeName, trailerNumber=trailerNumber,
  113 + depName=feeDepName,
  114 + cateId=cateId, originId=originId, origin=origin, originCode=originCode,
  115 + tradeType=tradeType, tradeTypeName=tradeTypeName,
  116 + productState=productState,
  117 + tradeTypeId=tradeTypeId, inGreeterId=inGreeterId,
  118 + inGreeterName=inGreeterName, dep=feeDepId)
122 119 print(cre_res.json())
123 120 \ No newline at end of file
... ...
testcase/heb/test_ZC/demo_ZC.py
... ... @@ -9,11 +9,10 @@
9 9 整车进门测试用例
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi as zcA
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 16 import time,random
18 17  
19 18 class test_demo(unittest.TestCase):
... ...
testcase/heb/test_ZC/test_ZCBasic.py
... ... @@ -9,10 +9,9 @@
9 9 整车进门基础数据获取测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
  14 +from commons.api.sy import zcApi as zcA
16 15 from commons.basic import getLookupList as gLL
17 16 from commons.MySession import sessionHeb
18 17 session = sessionHeb
... ...
testcase/heb/test_ZC/test_ZCCreate.py
... ... @@ -9,12 +9,9 @@
9 9 整车进门但创建测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.MySession import sessionHeb
17   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi as zcA
18 15 import time,random
19 16 from commons.MySession import sessionHeb
20 17 session = sessionHeb
... ...
testcase/heb/test_listPage/test_listPageOperation.py
... ... @@ -11,17 +11,10 @@
11 11  
12 12 import unittest
13 13 from commons.scripts.readConf import rC
14   -from commons.api import zcApi as zcA
15   -from commons.api import sjApi
16   -from commons.api import hpApi
17   -from commons.api.entranceFeeBillList import operationUnfreeze as eOp
18   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
19   -from commons.api.entranceFeeBillList import operationDoInvalid as oDI
20   -from commons.api.entranceFeeBillList import operationDoCorrect as oDC
21   -from commons.api.entranceFeeBillList import operationDoAmend as oDA
22   -from commons.api.entranceFeeBillList import operationDoUndo as oDU
23   -from commons.api.entranceFeeBillList import operationDoUpdate as oDUp
24   -from commons.api.entranceFeeBillList import operationDoFreeze as oDF
  14 +from commons.api.sy import zcApi as zcA, hpApi, sjApi
  15 +from commons.api.sy.entranceFeeBillList import operationDoUpdate as oDUp, operationDoInvalid as oDI, \
  16 + entranceFeeBillList as eFBL, operationDoAmend as oDA, operationDoCorrect as oDC, operationDoUndo as oDU, \
  17 + operationDoFreeze as oDF, operationUnfreeze as eOp
25 18 import random
26 19  
27 20 from commons.MySession import sessionHeb
... ... @@ -79,7 +72,7 @@ class test_listPage(unittest.TestCase):
79 72 """进门单列表-操作:散件进门交费测试"""
80 73 plate = f"川A{random.randint(10000,99999)}"
81 74 goods = "雪莲果"
82   - cre_res = sjApi.create_sj(session=session,host=self.gatewayHost,plate=plate,keyword=goods)
  75 + cre_res = sjApi.create_sj(session=session, host=self.gatewayHost, plate=plate, keyword=goods)
83 76 print(cre_res.json())
84 77 number = cre_res.json()["data"]["number"]
85 78 res_pay = eFBL.do_payOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
... ... @@ -96,7 +89,7 @@ class test_listPage(unittest.TestCase):
96 89 res_pay = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
97 90 assert res_pay.json()["code"]=="200","缴费失败"
98 91 assert res_pay.json()["message"] == "OK", "缴费失败"
99   - res,tareWeight = hpApi.do_backSkinWeighSave(session=session,host=self.gatewayHost,number=number)
  92 + res,tareWeight = hpApi.do_backSkinWeighSave(session=session, host=self.gatewayHost, number=number)
100 93 assert res.json()["code"]=="200","回皮失败"
101 94 assert "data" in res.text,"回皮失败"
102 95 resListPage = eFBL.listPage(session=session,host=self.jmsfHost,attrValue=number)
... ...
testcase/heb/test_listPage/test_searchByAttrName.py
... ... @@ -9,15 +9,13 @@
9 9 进门单列表查询
10 10 """
11 11  
12   -
13   -import json
14 12 import unittest
15 13 from commons.scripts.readConf import rC
16   -from commons.api import zcApi as zcA
  14 +from commons.api.sy import zcApi as zcA
17 15 from commons import ConfigDB as CoDB
18 16 from commons.MySession import my
19   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
20   -import time,random
  17 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
  18 +import random
21 19 from commons.MySession import sessionHeb
22 20 session = sessionHeb
23 21  
... ...
testcase/heb/test_listPage/test_searchByOther.py
... ... @@ -9,16 +9,14 @@
9 9 进门单列表其他他查询条件
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from bs4 import BeautifulSoup
15 14 from commons.scripts.readConf import rC
16   -from commons.api import zcApi as zcA
  15 +from commons.api.sy import zcApi as zcA
17 16 from commons.basic import getLookupList as gLL
18 17 from commons.ConfigDB import mysql_selectAll as msa
19   -from commons.api.entranceFeeBillList import operationDoUndo as oDU
20   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
21   -from commons.api.entranceFeeBillList import operationDoUpdate as oDUp
  18 +from commons.api.sy.entranceFeeBillList import operationDoUpdate as oDUp, entranceFeeBillList as eFBL, \
  19 + operationDoUndo as oDU
22 20 import time,random
23 21 from commons.MySession import sessionHeb
24 22 session = sessionHeb
... ...
testcase/heb/weightBizBill/test_weighingServiceSave.py
... ... @@ -4,7 +4,7 @@ import unittest
4 4 import urllib3
5 5 from commons import common as com
6 6 from commons.MySession import my,heb
7   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weighingServiceSave import weighingServiceSave
8 8 from commons.basic.listCarType import listCarType
9 9 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 10 we=weighingServiceSave(heb)
... ...
testcase/sy/CZFW/test_weightBizBill_doRefund.py
... ... @@ -2,11 +2,10 @@
2 2 # -*- coding: UTF-8 -*-
3 3 import unittest
4 4 import urllib3
5   -from commons import common as com
6 5 from commons import ConfigDB as db
7 6 from commons.MySession import my,sy1
8   -from commons.api.weightBizBill_doRefund import weightBizBill_doRefund
9   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weightBizBill_doRefund import weightBizBill_doRefund
  8 +from commons.api.sy.weighingServiceSave import weighingServiceSave
10 9 from commons.basic.listCarType import listCarType
11 10 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
12 11 do=weightBizBill_doRefund()
... ...
testcase/sy/CZFW/test_weightBizBill_listPage.py
... ... @@ -3,10 +3,9 @@
3 3 import unittest
4 4 import urllib3
5 5 import time
6   -from commons import common as com
7 6 from commons.MySession import my,sy1
8   -from commons.api.weightBizBill_listPage import weightBizBill_listPage
9   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weightBizBill_listPage import weightBizBill_listPage
  8 +from commons.api.sy.weighingServiceSave import weighingServiceSave
10 9 from commons.basic.listCarType import listCarType
11 10 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
12 11 bi=weightBizBill_listPage()
... ...
testcase/sy/FeedbackCustomerController/test_fc_add.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,sy1
4   -from commons.api.fc_add import fc_add
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.fc_add import fc_add
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 from commons.Faker import random_data
7 7 import commons.ConfigDB as db
... ...
testcase/sy/FeedbackCustomerController/test_fc_edit.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,sy1
4   -from commons.api.fc_edit import fc_edit
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.fc_edit import fc_edit
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 from commons.Faker import random_data
7   -from commons.api.fc_add import fc_add
  7 +from commons.api.sy.fc_add import fc_add
8 8 ra = random_data()
9 9 fca = fc_add()
10 10 import commons.ConfigDB as db
... ...
testcase/sy/FeedbackCustomerController/test_fc_view.py
1 1 import unittest
2 2 import urllib3
3 3 import commons.ConfigDB as db
4   -from commons.MySession import my,sy1
5   -from commons.api.fc_view import fc_view
6   -from commons.api.fc_add import fc_add
  4 +from commons.MySession import sy1
  5 +from commons.api.sy.fc_view import fc_view
  6 +from commons.api.sy.fc_add import fc_add
7 7 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
8 8 ad = fc_add()
9 9 vi = fc_view()
... ...
testcase/sy/FeedbackCustomerController/test_feedback_customer_disable.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,sy1
4   -from commons.api.feedback_customer_disable import feedback_customer_disable
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedback_customer_disable import feedback_customer_disable
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 fcd = feedback_customer_disable()
7 7 import commons.ConfigDB as db
... ...
testcase/sy/FeedbackCustomerController/test_feedback_customer_enable.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedback_customer_enable import feedback_customer_enable
  5 +from commons.api.sy.feedback_customer_disable import feedback_customer_disable
  6 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  7 +fce = feedback_customer_enable()
  8 +fcd = feedback_customer_disable
  9 +import commons.ConfigDB as db
  10 +
  11 +"""
  12 +进门收费——返点管理——返还人管理——启用返还人
  13 +"""
  14 +
  15 +class test_feedback_customer_enable(unittest.TestCase):
  16 + "沈阳——返还人管理——返还人启用"
  17 + @classmethod
  18 + def setUpClass(cls):
  19 + pass
  20 +
  21 + def setUp(self):
  22 + self.ids = db.mysql_selectOne('''
  23 + SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and
  24 + market_id='''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0]
  25 + print(self.ids)
  26 + def test_feedback_customer_enable_01(self):
  27 + "返还人启用"
  28 + url = fce.url.replace("49",str(self.ids))
  29 + re = sy1.post(url = url, headers = fce.header)
  30 + # print(fce.url)
  31 + # print(re.headers)
  32 + # print(re.json())
  33 + self.assertTrue("操作成功" in str(re.json()))
  34 + @classmethod
  35 + def tearDownClass(cls):
  36 + pass
  37 +
  38 +if __name__ == '__main__':
  39 + unittest.main()
... ...
testcase/sy/FeedbackCustomerController/test_feedback_customer_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedback_customer_query import feedback_customer_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +import datetime
  7 +import commons.ConfigDB as db
  8 +fcq = feedback_customer_query()
  9 +
  10 +"""
  11 +进门收费——返点管理——返还人管理——返还人列表查询
  12 +"""
  13 +
  14 +class test_feedback_customer_query(unittest.TestCase):
  15 + "沈阳——返还人管理——返还人列表查询"
  16 + @classmethod
  17 + def setUpClass(cls):
  18 + pass
  19 + def setUp(self):
  20 + self.name1 = db.mysql_selectOne('''SELECT name FROM `dili_jmsf`.`feedback_customer`
  21 + WHERE market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + ''' ORDER BY `id` DESC LIMIT 1''')[0]
  22 + def test_feedback_customer_query_01(self):
  23 + "返还人列表查询"
  24 + print(fcq.url)
  25 + body = fcq.body\
  26 + .replace("潘婷婷", str(self.name1))\
  27 + .replace("2021-08-11 00:00:00",(datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
  28 + replace("2021-08-11 23:59:59",datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
  29 + # print(body)
  30 + re = sy1.post(url = fcq.url, data = body.replace("\n","").encode('utf-8'),headers = fcq.header)
  31 + # print(re.headers)
  32 + # print(re.text)
  33 + # print("士大夫十",str(self.name1))
  34 + self.assertTrue(str(self.name1) in str(re.text))
  35 +
  36 + @classmethod
  37 + def tearDownClass(cls):
  38 + pass
  39 +
  40 +
  41 +if __name__ == '__main__':
  42 + unittest.main()
... ...
testcase/sy/FeedbackOrderController/test_feedback_order_settlement.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedback_order_settlement import feedback_order_settlement
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +from commons.api.sy.feedback_order_settlement_query import feedback_order_settlement_query
  7 +fosq = feedback_order_settlement_query()
  8 +import datetime
  9 +fos = feedback_order_settlement()
  10 +
  11 +"""
  12 +进门收费——返点管理——结账管理——选择需要返点的订单进行结账
  13 +"""
  14 +
  15 +class test_feedback_order_settlement(unittest.TestCase):
  16 + "沈阳——结账管理——选择需要返点的订单进行结账"
  17 + @classmethod
  18 + def setUpClass(cls):
  19 + pass
  20 +
  21 + def setUp(self):
  22 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").replace("2021-07-22 00:00:00", "\
  23 + 2021-07-03 00:00:00").replace("2021-08-03 23:59:59", str(datetime.datetime.now()))
  24 + re = sy1.post(url = fosq.url, data = body, headers = fosq.header)
  25 +
  26 + self.Amount = re.json()["rows"][0]["unsettledAmount"]
  27 + self.ids = re.json()["rows"][0]["id"]
  28 + self.billIds = re.json()["rows"][0]["billId"]
  29 + #查询出结账金额、结算单id和与之相关联的进门单id
  30 + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settleAccount.action"
  31 + header = {
  32 + "X-Requested-With": "XMLHttpRequest",
  33 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  34 + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
  35 + }
  36 + body = "customerId=16"
  37 + re2 = sy1.post(url = url,headers = header,data = body)
  38 + self.idd = re2.json()["id"]
  39 + self.name = re2.json()["name"]
  40 + self.cardNumber = re2.json()["cardNumber"]
  41 + #查询出结账单的id、name、cardnumber
  42 +
  43 + def test_feedback_order_settlement_01(self):
  44 + "选择需要返点的订单进行结账."
  45 + body = fos.body.replace("id=25","id="+str(self.idd)).\
  46 + replace("888810057654",str(self.cardNumber)).\
  47 + replace("settleAmount=2","settleAmount="+str(self.Amount)).\
  48 + replace("ids=12034","ids="+str(self.ids)).\
  49 + replace("feedbackCustomerId=25","feedbackCustomerId="+str(self.idd)).\
  50 + replace("feedbackCustomerName=验证员工推送到CRM","feedbackCustomerName="+str(self.name)).\
  51 + replace("billIds=3621","billIds="+str(self.billIds)).\
  52 + replace("settledAmounts=2","settledAmounts="+str(self.Amount))
  53 + # print(body)
  54 + re = sy1.post(url = fos.url, headers = fos.header, data = body.encode('utf-8'))
  55 + # print(re.headers)
  56 +
  57 + # print(re.json())
  58 + self.assertTrue("操作成功" in str(re.json()))
  59 + return re
  60 +
  61 + @classmethod
  62 + def tearDownClass(cls):
  63 + pass
  64 +
  65 +
  66 +if __name__ == '__main__':
  67 + unittest.main()
0 68 \ No newline at end of file
... ...
testcase/sy/FeedbackOrderController/test_feedback_order_settlement_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedback_order_settlement_query import feedback_order_settlement_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fosq = feedback_order_settlement_query()
  7 +import commons.ConfigDB as db
  8 +import datetime
  9 +
  10 +"""
  11 +进门收费——返点管理——结账管理——根据返还人和缴费时间进行查询
  12 +"""
  13 +
  14 +class test_feedback_order_settlement_query(unittest.TestCase):
  15 + "沈阳——结账管理列表查询——根据返还人和缴费时间进行查询"
  16 + @classmethod
  17 + def setUpClass(cls):
  18 + pass
  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)
  25 + def test_feedback_order_settlement_query_01(self):
  26 + "根据返还人和缴费时间进行查询"
  27 + print(fosq.url)
  28 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.ids)).\
  29 + replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).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"))
  31 + # print(body)
  32 + re = sy1.post(url = fosq.url, data = body,headers = fosq.header)
  33 + # print(re.headers)
  34 + # print(re.json())
  35 + self.assertTrue("rows" in str(re.json()))
  36 +
  37 + @classmethod
  38 + def tearDownClass(cls):
  39 + pass
  40 +
  41 +
  42 +if __name__ == '__main__':
  43 + unittest.main()
... ...
testcase/sy/entranceFeeBill_detail/test_entranceFeeBill_details.py
... ... @@ -3,9 +3,8 @@
3 3 import unittest
4 4 import urllib3
5 5 from commons import ConfigDB as db
6   -from commons import common as com
7 6 from commons.MySession import my,sy1
8   -from commons.api.entranceFeeBill_details import entranceFeeBill_details
  7 +from commons.api.sy.entranceFeeBill_details import entranceFeeBill_details
9 8 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 9 en=entranceFeeBill_details()
11 10  
... ... @@ -147,5 +146,5 @@ class test_entranceFeeBill_details(unittest.TestCase):
147 146  
148 147 if __name__ == "__main__":
149 148  
150   - # unittest.main(verbosity=2)
151   - com.run_one(test_entranceFeeBill_details("test_entranceFeeBill_details_01"))
  149 + unittest.main(verbosity=2)
  150 + # com.run_one(test_entranceFeeBill_details("test_entranceFeeBill_details_01"))
... ...
testcase/sy/entranceFeeBill_proves/test_entranceFeeBill_provesPage.py
... ... @@ -3,9 +3,8 @@
3 3 import unittest
4 4 import urllib3
5 5 from commons import ConfigDB as db
6   -from commons import common as com
7 6 from commons.MySession import my,sy1
8   -from commons.api.entranceFeeBill_provesPage import entranceFeeBill_provesPage
  7 +from commons.api.sy.entranceFeeBill_provesPage import entranceFeeBill_provesPage
9 8 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 9 en=entranceFeeBill_provesPage()
11 10  
... ...
testcase/sy/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
1 1 import unittest
2 2 import urllib3
3   -from commons.MySession import my,sy1
4   -from commons.api.feedbackAccounrecordController_list import feedbackAccounrecordController_list
  3 +from commons.MySession import sy1
  4 +from commons.api.sy.feedbackAccounrecordController_list import feedbackAccounrecordController_list
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import commons.ConfigDB as db
7 7 farcl = feedbackAccounrecordController_list()
... ...
testcase/sy/feedbackOrderController_settlementlist/feedbackOrderController_querySumAmount.py
1 1 import unittest
2 2 import urllib3
3 3 from commons.MySession import sy1
4   -from commons.api.feedbackOrderController_querySumAmount import querySumAmount
  4 +from commons.api.sy.feedbackOrderController_querySumAmount import querySumAmount
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import datetime
7 7 qsa = querySumAmount()
... ...
testcase/sy/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
1 1 import unittest
2 2 import urllib3
3 3 from commons.MySession import my,sy1
4   -from commons.api.feedbackOrderController_settlementlist import feedbackOrderController_settlementlist
  4 +from commons.api.sy.feedbackOrderController_settlementlist import feedbackOrderController_settlementlist
5 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 import commons.ConfigDB as db
7 7 import datetime
... ...
testcase/sy/test_HP/test_HP.py
... ... @@ -9,14 +9,11 @@
9 9 回皮功能接口测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
17   -from commons.api.entranceFeeBillList import operationDoFreeze as oDF
18   -from commons.api import hpApi
19   -import time,random
  14 +from commons.api.sy import zcApi as zcA, hpApi
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL, operationDoFreeze as oDF
  16 +import random
20 17  
21 18 from commons.MySession import sessionSy
22 19 session = sessionSy
... ... @@ -48,7 +45,7 @@ class test_HPCreate(unittest.TestCase):
48 45 print(cre_res.json())
49 46 number = cre_res.json()["data"]["number"]
50 47 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
51   - res,tareWeight = hpApi.do_backSkinWeighSave(session=session,host=self.gatewayHost,number=number)
  48 + res,tareWeight = hpApi.do_backSkinWeighSave(session=session, host=self.gatewayHost, number=number)
52 49 assert res.json()["code"]=="200","回皮失败"
53 50 assert "data" in res.text,"回皮失败"
54 51  
... ... @@ -60,7 +57,7 @@ class test_HPCreate(unittest.TestCase):
60 57 print(cre_res.json())
61 58 number = cre_res.json()["data"]["number"]
62 59 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
63   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,plate=plate)
  60 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, plate=plate)
64 61 print(res.json())
65 62 assert res.json()["code"]=="200","车号查询失败"
66 63 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
... ... @@ -73,7 +70,7 @@ class test_HPCreate(unittest.TestCase):
73 70 print(cre_res.json())
74 71 number = cre_res.json()["data"]["number"]
75 72 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
76   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,number=number)
  73 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, number=number)
77 74 print(res.json())
78 75 assert res.json()["code"]=="200","车号查询失败"
79 76 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
... ... @@ -89,7 +86,7 @@ class test_HPCreate(unittest.TestCase):
89 86 print(cre_res.json())
90 87 number = cre_res.json()["data"]["number"]
91 88 aa = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
92   - res = hpApi.get_listBackSkinTrucks(session=session,host=self.gatewayHost,customerName=customerName)
  89 + res = hpApi.get_listBackSkinTrucks(session=session, host=self.gatewayHost, customerName=customerName)
93 90 print(res.json())
94 91 assert res.json()["code"]=="200","车号查询失败"
95 92 assert res.json()["data"][-1]["number"]==number,"车号查询失败"
96 93 \ No newline at end of file
... ...
testcase/sy/test_SJ/test_SJ.py
... ... @@ -9,13 +9,10 @@
9 9  
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
17   -from commons.api import sjApi
18   -import time,random
  14 +from commons.api.sy import zcApi as zcA, sjApi
  15 +import random
19 16  
20 17 from commons.MySession import sessionSy
21 18 session = sessionSy
... ... @@ -109,15 +106,15 @@ class test_ZCCreate(unittest.TestCase):
109 106 weight = int(itemWeight) * int(qty)
110 107  
111 108 # 创建进门单
112   - cre_res = sjApi.create_sparePartsWeighSave(session=session,host=self.gatewayHost, duplicateToken=duplicateToken,
113   - carTypeCode=carTypeCode, carTypeId=carTypeId,
114   - carTypeName=carTypeName, plate=plate, weight=weight,
115   - productId=productId, productName=productName, proveTypeCode=proveTypeCode,
116   - proveTypeName=proveTypeName, trailerNumber=trailerNumber,
117   - depName=feeDepName,
118   - cateId=cateId, originId=originId, origin=origin, originCode=originCode,
119   - tradeType=tradeType, tradeTypeName=tradeTypeName,
120   - productState=productState,
121   - tradeTypeId=tradeTypeId, goodsTagId=goodsTagId, inGreeterId=inGreeterId,
122   - inGreeterName=inGreeterName, dep=feeDepId)
  109 + cre_res = sjApi.create_sparePartsWeighSave(session=session, host=self.gatewayHost, duplicateToken=duplicateToken,
  110 + carTypeCode=carTypeCode, carTypeId=carTypeId,
  111 + carTypeName=carTypeName, plate=plate, weight=weight,
  112 + productId=productId, productName=productName, proveTypeCode=proveTypeCode,
  113 + proveTypeName=proveTypeName, trailerNumber=trailerNumber,
  114 + depName=feeDepName,
  115 + cateId=cateId, originId=originId, origin=origin, originCode=originCode,
  116 + tradeType=tradeType, tradeTypeName=tradeTypeName,
  117 + productState=productState,
  118 + tradeTypeId=tradeTypeId, goodsTagId=goodsTagId, inGreeterId=inGreeterId,
  119 + inGreeterName=inGreeterName, dep=feeDepId)
123 120 print(cre_res.json())
124 121 \ No newline at end of file
... ...
testcase/sy/test_ZC/demo_ZC.py
... ... @@ -9,11 +9,10 @@
9 9 整车进门测试用例
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi as zcA
  15 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
17 16 import time,random
18 17  
19 18 class test_demo(unittest.TestCase):
... ...
testcase/sy/test_ZC/demo_b.py
... ... @@ -9,12 +9,9 @@
9 9 整车进门但创建测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import apiDemo
17   -import time,random
  14 +from commons.api.sy.entranceFeeBillList import apiDemo
18 15  
19 16 from commons.MySession import mysession
20 17 session = mysession().cliLogin()
... ... @@ -60,4 +57,4 @@ class test_ZCCreate(unittest.TestCase):
60 57 print(categoryByCondition.json())
61 58  
62 59 print("mk_sign",mk_sign)
63   -print("apiDemo.mk_sign",apiDemo.mk_sign)
64 60 \ No newline at end of file
  61 +print("apiDemo.mk_sign", apiDemo.mk_sign)
65 62 \ No newline at end of file
... ...
testcase/sy/test_ZC/test_ZCBasic.py
... ... @@ -9,10 +9,9 @@
9 9 整车进门基础数据获取测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
  14 +from commons.api.sy import zcApi as zcA
16 15 from commons.basic import getLookupList as gLL
17 16 from commons.MySession import sessionSy
18 17 session = sessionSy
... ...
testcase/sy/test_ZC/test_ZCCreate.py
... ... @@ -9,11 +9,9 @@
9 9 整车进门但创建测试
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from commons.scripts.readConf import rC
15   -from commons.api import zcApi as zcA
16   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
  14 +from commons.api.sy import zcApi as zcA
17 15 import time,random
18 16 from commons.MySession import sessionSy
19 17 session = sessionSy
... ...
testcase/sy/test_listPage/test_listPageOperation.py
... ... @@ -11,17 +11,10 @@
11 11  
12 12 import unittest
13 13 from commons.scripts.readConf import rC
14   -from commons.api import zcApi as zcA
15   -from commons.api import sjApi
16   -from commons.api import hpApi
17   -from commons.api.entranceFeeBillList import operationUnfreeze as eOp
18   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
19   -from commons.api.entranceFeeBillList import operationDoInvalid as oDI
20   -from commons.api.entranceFeeBillList import operationDoCorrect as oDC
21   -from commons.api.entranceFeeBillList import operationDoAmend as oDA
22   -from commons.api.entranceFeeBillList import operationDoUndo as oDU
23   -from commons.api.entranceFeeBillList import operationDoUpdate as oDUp
24   -from commons.api.entranceFeeBillList import operationDoFreeze as oDF
  14 +from commons.api.sy import zcApi as zcA, hpApi, sjApi
  15 +from commons.api.sy.entranceFeeBillList import operationDoUpdate as oDUp, operationDoInvalid as oDI, \
  16 + entranceFeeBillList as eFBL, operationDoAmend as oDA, operationDoCorrect as oDC, operationDoUndo as oDU, \
  17 + operationDoFreeze as oDF, operationUnfreeze as eOp
25 18 import random
26 19  
27 20 from commons.MySession import sessionSy
... ... @@ -80,7 +73,7 @@ class test_listPage(unittest.TestCase):
80 73 """进门单列表-操作:散件进门交费测试"""
81 74 plate = f"川A{random.randint(10000,99999)}"
82 75 goods = "雪莲果"
83   - cre_res = sjApi.create_sj(session=session,host=self.gatewayHost,plate=plate,keyword=goods)
  76 + cre_res = sjApi.create_sj(session=session, host=self.gatewayHost, plate=plate, keyword=goods)
84 77 print(cre_res.json())
85 78 number = cre_res.json()["data"]["number"]
86 79 res_pay = eFBL.do_payOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
... ... @@ -97,7 +90,7 @@ class test_listPage(unittest.TestCase):
97 90 res_pay = oDF.do_freezeOrder(session=session,host=self.jmsfHost,attrValue=number,ic=self.ic)
98 91 assert res_pay.json()["code"]=="200","缴费失败"
99 92 assert res_pay.json()["message"] == "OK", "缴费失败"
100   - res,tareWeight = hpApi.do_backSkinWeighSave(session=session,host=self.gatewayHost,number=number)
  93 + res,tareWeight = hpApi.do_backSkinWeighSave(session=session, host=self.gatewayHost, number=number)
101 94 assert res.json()["code"]=="200","回皮失败"
102 95 assert "data" in res.text,"回皮失败"
103 96 resListPage = eFBL.listPage(session=session,host=self.jmsfHost,attrValue=number)
... ...
testcase/sy/test_listPage/test_searchByAttrName.py
... ... @@ -9,15 +9,12 @@
9 9 进门单列表查询
10 10 """
11 11  
12   -
13   -import json
14 12 import unittest
15 13 from commons.scripts.readConf import rC
16   -from commons.api import zcApi as zcA
  14 +from commons.api.sy import zcApi as zcA
17 15 from commons import ConfigDB as CoDB
18   -from commons.MySession import my
19   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
20   -import time,random
  16 +from commons.api.sy.entranceFeeBillList import entranceFeeBillList as eFBL
  17 +import random
21 18 from commons.MySession import sessionSy
22 19 session = sessionSy
23 20  
... ...
testcase/sy/test_listPage/test_searchByOther.py
... ... @@ -9,16 +9,14 @@
9 9 进门单列表其他他查询条件
10 10 """
11 11  
12   -import json
13 12 import unittest
14 13 from bs4 import BeautifulSoup
15 14 from commons.scripts.readConf import rC
16   -from commons.api import zcApi as zcA
  15 +from commons.api.sy import zcApi as zcA
17 16 from commons.basic import getLookupList as gLL
18 17 from commons.ConfigDB import mysql_selectAll as msa
19   -from commons.api.entranceFeeBillList import operationDoUndo as oDU
20   -from commons.api.entranceFeeBillList import entranceFeeBillList as eFBL
21   -from commons.api.entranceFeeBillList import operationDoUpdate as oDUp
  18 +from commons.api.sy.entranceFeeBillList import operationDoUpdate as oDUp, entranceFeeBillList as eFBL, \
  19 + operationDoUndo as oDU
22 20 import time,random
23 21 from commons.MySession import sessionSy
24 22 session = sessionSy
... ...
testcase/sy/weightBizBill/test_weighingServiceSave.py
... ... @@ -4,7 +4,7 @@ import unittest
4 4 import urllib3
5 5 from commons import common as com
6 6 from commons.MySession import my,sy1
7   -from commons.api.weighingServiceSave import weighingServiceSave
  7 +from commons.api.sy.weighingServiceSave import weighingServiceSave
8 8 from commons.basic.listCarType import listCarType
9 9 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
10 10 we=weighingServiceSave(sy1)
... ...