Commit 3a6d7da5 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

新增库区设置部分脚本

parent c4b6d43d
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,r_b8库房管理_库区设置_同步库房信息,id2263,id2263-221,sit,on
内网:r_b8库房管理_库区设置_同步库房信息
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:r_b8库房管理_库区设置_同步库房信息
用例名称:r_b8库房管理_库区设置_同步库房信息
输入:""
输出:"rtn_msg": {"code": 0, "msg": null, "data":[]}
"""
# 内网登录
username = commonFuc().get_business_data(module, "username")
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# r_b8库房管理_库区设置_同步库房信息
# pro_path = commonFuc().get_pro_path()
# sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
# userid = test1()
# print(list_id)
# for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockInfo_syncStock_url")
# url=url+userid
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# str1 = commonFuc().get_business_data(module, 'data14')
# str = commonFuc().get_business_data(module, 'data7')
# list2 = list(str.split(","))
# print(list2)
# #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_hms(2)
# for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
# 请求体
request_body = commonFuc().get_business_data(module, "payload62")
# request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"')
# print(new_request_body)
# import json
# request_body_json = json.loads(new_request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
data1 = commonFuc().analysis_json('data', data)
pageSize = commonFuc().analysis_json('pageSize', data)
print(pageSize, type(pageSize))
if code == 0 and data == 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,r_b9库房管理_库区设置_库房查询_查询全部,id2263,id2263-222,sit,on
内网:r_b9库房管理_库区设置_库房查询_查询全部
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:r_b9库房管理_库区设置_库房查询_查询全部
用例名称:r_b9库房管理_库区设置_库房查询_查询全部
输入:""
输出:"rtn_msg": {"code": 0, "msg": null, "data":[]}
"""
# 内网登录
username = commonFuc().get_business_data(module, "username")
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# r_b9库房管理_库区设置_库房查询_查询全部
# pro_path = commonFuc().get_pro_path()
# sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
# userid = test1()
# print(list_id)
# for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockInfo_stockTree_url")
# url=url+userid
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# str1 = commonFuc().get_business_data(module, 'data14')
# str = commonFuc().get_business_data(module, 'data7')
# list2 = list(str.split(","))
# print(list2)
# #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_hms(2)
# for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
# 请求体
request_body = commonFuc().get_business_data(module, "payload62_1")
# request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"')
# print(new_request_body)
# import json
# request_body_json = json.loads(new_request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# pageSize = commonFuc().analysis_json('pageSize', data)
# print(pageSize, type(pageSize))
if code == 0 and len(data) >= 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,r_c0库房管理_库区设置_库房查询_精确查询,id2263,id2263-223,sit,on
内网:r_c0库房管理_库区设置_库房查询_精确查询
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:r_c0库房管理_库区设置_库房查询_精确查询
用例名称:r_b9库房管理_库区设置_库房查询_查询全部
输入:""
输出:"rtn_msg": {"code": 0, "msg": null, "data":[]}
"""
# 内网登录
username = commonFuc().get_business_data(module, "username")
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# r_c0库房管理_库区设置_库房查询_精确查询
# pro_path = commonFuc().get_pro_path()
# sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
# userid = test1()
# print(list_id)
# for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockInfo_stockTree_url")
# url=url+userid
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# str1 = commonFuc().get_business_data(module, 'data14')
str = commonFuc().get_business_data(module, 'data16')
list2 = list(str.split(","))
print(list2)
# #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_hms(2)
for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
# 请求体
request_body = commonFuc().get_business_data(module, "payload62_2",i)
# request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"')
# print(new_request_body)
# import json
# request_body_json = json.loads(new_request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# pageSize = commonFuc().analysis_json('pageSize', data)
# print(pageSize, type(pageSize))
if code == 0 and len(data) >= 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,r_c1库房管理_库区设置_库房查询_模糊查询,id2263,id2263-224,sit,on
内网:r_c1库房管理_库区设置_库房查询_模糊查询
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:r_c1库房管理_库区设置_库房查询_模糊查询
用例名称:r_c1库房管理_库区设置_库房查询_模糊查询
输入:""
输出:"rtn_msg": {"code": 0, "msg": null, "data":[]}
"""
# 内网登录
username = commonFuc().get_business_data(module, "username")
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# r_c1库房管理_库区设置_库房查询_模糊查询
# pro_path = commonFuc().get_pro_path()
# sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
# userid = test1()
# print(list_id)
# for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockInfo_stockTree_url")
# url=url+userid
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# str1 = commonFuc().get_business_data(module, 'data14')
str = commonFuc().get_business_data(module, 'data17')
list2 = list(str.split(","))
print(list2)
# #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_hms(2)
for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
# 请求体
request_body = commonFuc().get_business_data(module, "payload62_2",i)
# request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"')
# print(new_request_body)
# import json
# request_body_json = json.loads(new_request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# pageSize = commonFuc().analysis_json('pageSize', data)
# print(pageSize, type(pageSize))
if code == 0 and len(data) >= 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,r_c2库房管理_库区设置_库房查询_异常查询,id2263,id2263-225,sit,on
内网:r_c2库房管理_库区设置_库房查询_异常查询
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:r_c2库房管理_库区设置_库房查询_异常查询
用例名称:r_c2库房管理_库区设置_库房查询_异常查询
输入:""
输出:"rtn_msg": {"code": 0, "msg": null, "data":[]}
"""
# 内网登录
username = commonFuc().get_business_data(module, "username")
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# r_c2库房管理_库区设置_库房查询_异常查询
# pro_path = commonFuc().get_pro_path()
# sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
# from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
# userid = test1()
# print(list_id)
# for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockInfo_stockTree_url")
# url=url+userid
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# str1 = commonFuc().get_business_data(module, 'data14')
str = commonFuc().get_business_data(module, 'data3')
list2 = list(str.split(","))
print(list2)
# #获取日期
# date1=timeUtils().get_time_hms(2)
# date2=timeUtils().get_time_hms(2)
for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
# 请求体
request_body = commonFuc().get_business_data(module, "payload62_2",i)
# request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"')
# print(new_request_body)
# import json
# request_body_json = json.loads(new_request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
# 断言
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
# data1 = commonFuc().analysis_json('data', data)
# pageSize = commonFuc().analysis_json('pageSize', data)
# print(pageSize, type(pageSize))
if code == 0 and len(data) == 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
......@@ -89,6 +89,8 @@
"deptProcOrder_deptUser_url": "/api/platformService/sys/user/v2/deptUser/list"
"deptProcOrder_resetpassword__url": "/api/platformService/sys/user/v2/reset/pass/"
"deptProcOrder_update__url": "/api/platformService/sys/org/v2/update"
"basic_stockInfo_syncStock_url": "/api/herpService/basic/stockInfo/syncStock"
"basic_stockInfo_stockTree_url": "/api/herpService/basic/stockInfo/stockTree"
data1: '条码,high_info,check_detail,高值打码,out_stock,goods_change_baseInfo,center_out_stock_pkg,mcms_centre_out_stock,pkg_info,mcms_dept_out_stock,barcode_common,mcms_centre_in_stock,goods_change_price,mcms_dept_in_stock,check_detail_pkg,center_out_stock_high,center_out_stock_high,high_consume,shelf_code,barcode_common_pkg,check_detail_high,balance_bill,barcode_rfid,bottle_info,验收单明细打印,产品信息变更,中心库出库单低值,医院中心库出库单,包信息,医院科室出库单,高值纸质条码打印,医院中心库入库单,产品调价,医院科室入库单,低值验收单,中心库出库单高值,高值耗材使用登记表,货位码,单元包纸质条码打印,高值验收单,结算单打印,高值RFID条码打印,单瓶码打印'
data2: 'code,医院标识,code1,code1,erpCode,JDE编码修改,GOODS_CHANGE_STATUS,产品信息变更状态,GOODS_CHARGE_COST,是否计入成本,GOODS_KIND_TYPE,产品分类类型,MFRS_KIND,企业职能,miCode,医保编码修改,NOTICE_RANGE_KIND,公告通知范围,PUR_MODE,耗材类型,YWMS,业务模式,CORP_TYPE,主体类别,PROGRAM_TYPE,程序端,GRAIN,参数粒度,ENV,发布环境,PROJECT_GROUP,系统分组,RETURN_REASON_TYPE,退货原因,NEWCPFL,新产品分类,ZZLX,企业证照类型,68FL,68器械分类,18FL,18器械分类,GOODS_START_STOP,产品启停,YYDJ,医院等级,GOODS_TEMP,产品临采,GLJB,耗材管理级别,GOODS_PURCHASE,产品是否采购,HIS_CODE_CHANGE,HIS编码修改,MI_CODE_CHANGE,医保型号修改,MI_GOODS_GG_CHANGE,医保产品规格,MI_GOODS_XH_CHANGE,医保型号修改,GOODS_CHARGE,产品是否计费,GOODS_BAR_CODE,产品管理模式,GOODS_PUR_MODE,耗材类型,GOODS_CHANGE_PRICE,产品调价类型,GOODS_BAR_CODE_STRATEGY,UDI管理策略,FOCUS_CONTROL_TYPE,重点管控分类,MANUAL_PICK_REASON,手工出库原因,RFID_LABEL_CHANGE,RFID标签管理,ALLOT_PICK_REASON,调拨出库原因,MAGRE_PICK_REASON,移库出库原因'
......@@ -105,6 +107,8 @@ data12: "002,006检验科1,0,1,006,检验科"
data13: "0,00,2,006检验科,0,1,006,检验科"
data14: "xhs"
data15: "x,h,s"
data16: "006检验科1库房,东土城院区中心库房,006"
data17: "006检验科,1库房,00,6"
"username": "xhs1009"
"password": "1qaz!QAZ"
......@@ -444,7 +448,9 @@ json_headers2: {
"payload61_4": {"queryObject":{"orgId":"feb0cc16618c437fb4d033cd339a0377","cname":"%s"},"pageNum":1,"pageSize":50}
"payload61_5": {"userLeaderId":"%s","id":"feb0cc16618c437fb4d033cd339a0377"}
"payload61_6": {"queryObject":{"orgId":"feb0cc16618c437fb4d033cd339a0377","cname":""},"pageNum":1,"pageSize":"%s"}
"payload62": {"hosId":"h0347"}
"payload62_1": {"hosId":"h0347","stockCode":""}
"payload62_2": {"hosId":"h0347","stockCode":"%s"}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
......
......@@ -55,9 +55,9 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分4</td>
<td class="details-col-elapsed">100.0%</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>0分2</td>
<td class="details-col-elapsed">0.0%</td>
</tr>
</table>
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/l9运维管理_编码规则管理_规则编码_启用/log.html' target='_blank'>l9运维管理_编码规则管理_规则编码_启用</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">4.635</td>
<td class="details-col-elapsed"><a href='../log/r_c2库房管理_库区设置_库房查询_异常查询/log.html' target='_blank'>r_c2库房管理_库区设置_库房查询_异常查询</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">2.042</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment