Commit 12a14ec5 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

请领出库渠道设置

parent 33d54201
......@@ -60,7 +60,7 @@ def branch_branchGoodsPkgDef_edit():
result = commonFuc().http_post(url,request_body,headers)
print('result', result)
#断言
checkDict=commonFuc().get_business_data(module,'checkDict10')
checkDict=commonFuc().get_business_data(module,'checkDict17')
commonFuc().check_result(checkDict,result)
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
# if total>=0:
......
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delByBranchId
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,f8_请领出库渠道设置_查询产品信息,id2263,id2263-58,sit,on
内网:f8_请领出库渠道设置_查询产品信息
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goods_select():
"""
场景:f8_请领出库渠道设置_查询产品信息
用例名称:f8_请领出库渠道设置_查询产品信息
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
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)
#f8_请领出库渠道设置_查询产品信息
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "mcmsBranchGoodsInfo_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"))
# 获取院区id
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# #请求体
request_body = commonFuc().get_business_data(module, "payload45", branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict17')
# commonFuc().check_result(checkDict,result)
total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
if total>=1:
commonFuc().check_text_exist(0, result)
data=commonFuc().analysis_json('data',commonFuc().analysis_json('data',result))
branchGoodsId=commonFuc().analysis_json('branchGoodsId',data)
return branchGoodsId
else:
commonFuc().check_text_exist(500, result)
goods_select()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delByBranchId
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,f9_请领出库渠道设置_查询产品信息_不存在的产品,id2263,id2263-59,sit,on
内网:f9_请领出库渠道设置_查询产品信息_不存在的产品
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goods_select():
"""
场景:f9_请领出库渠道设置_查询产品信息_不存在的产品
用例名称:f9_请领出库渠道设置_查询产品信息_不存在的产品
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
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)
#f9_请领出库渠道设置_查询产品信息_不存在的产品
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "mcmsBranchGoodsInfo_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"))
# 获取院区id
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# #请求体
request_body = commonFuc().get_business_data(module, "payload46", branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict17')
# commonFuc().check_result(checkDict,result)
total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
if total==0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist(500, result)
goods_select()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delByBranchId
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,g0_请领出库渠道设置_转移产品到边仓,id2263,id2263-60,sit,on
内网:g0_请领出库渠道设置_转移产品到边仓
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goods_move():
"""
场景:g0_请领出库渠道设置_转移产品到边仓
用例名称:g0_请领出库渠道设置_转移产品到边仓
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
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)
#g0_请领出库渠道设置_转移产品到边仓
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "updateSettleType_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"))
# 获取单元包信息
branchGoodsId = FileUtils().r_info(module, '单元包信息')["branchGoodsId"]
hosGoodsId = FileUtils().r_info(module, '单元包信息')["hosGoodsId"]
# 获取院区id
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# #请求体
request_body = commonFuc().get_business_data(module, "payload47", branchGoodsId,hosGoodsId,branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
#断言
checkDict=commonFuc().get_business_data(module,'checkDict10')
commonFuc().check_result(checkDict,result)
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
# if total==0:
# commonFuc().check_text_exist(0, result)
# else:
# commonFuc().check_text_exist(500, result)
goods_move()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delByBranchId
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,g0_请领出库渠道设置_转移产品到供应商直配,id2263,id2263-61,sit,on
内网:g0_请领出库渠道设置_转移产品到供应商直配
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goods_move():
"""
场景:g0_请领出库渠道设置_转移产品到供应商直配
用例名称:g0_请领出库渠道设置_转移产品到供应商直配
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
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)
#g0_请领出库渠道设置_转移产品到供应商直配
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "updateSettleType_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"))
# 获取单元包信息
branchGoodsId = FileUtils().r_info(module, '单元包信息')["branchGoodsId"]
hosGoodsId = FileUtils().r_info(module, '单元包信息')["hosGoodsId"]
# 获取院区id
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# #请求体
request_body = commonFuc().get_business_data(module, "payload48", branchGoodsId,hosGoodsId,branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
#断言
checkDict=commonFuc().get_business_data(module,'checkDict10')
commonFuc().check_result(checkDict,result)
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
# if total==0:
# commonFuc().check_text_exist(0, result)
# else:
# commonFuc().check_text_exist(500, result)
goods_move()
......@@ -27,6 +27,7 @@
"branchGoodsPkgDef_url": "/hospitaltest2api/herpService/branchGoodsPkgDef/list"
"branchGoodsPkgDef_insert_url": "/hospitaltest2api/herpService/branchGoodsPkgDef/insert"
"branchGoodsPkgDef_update_url": "/hospitaltest2api/herpService/branchGoodsPkgDef/updateById"
"updateSettleType_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/updateSettleType"
"username": "xhs1009"
"password": "1qaz!QAZ"
"X-APP-CODE": "herp.pc"
......@@ -211,7 +212,10 @@ json_headers2: {
"payload42": {"hosId": "h0347",branchId": "%s", "branchGoodsId": "%s"}
"payload43": {"id": "%s","effFlag": 1,"pkgLowQty": "555","pkgUperQty": 555,"hosGoodsId": "%s","branchGoodsId": "%s","branchId": "%s"}
"payload44": {"id": "%s","effFlag": 1,"pkgLowQty": "555","pkgUperQty": 554,"hosGoodsId": "%s","branchGoodsId": "%s","branchId": "%s"}
"payload45": {"queryObject": {"goodsName": "","goodsMfrsName": "","purModes": [],"hosId": "h0347","branchId": "%s","grantRule": 1,"goodsSpec": ""},"pageNum": 1, "pageSize": 50}
"payload46": {"queryObject": {"goodsName": "","goodsMfrsName": "","purModes": [],"hosId": "h0347","branchId": "%s","grantRule": 1,"goodsSpec": "xhs"},"pageNum": 1, "pageSize": 50}
"payload47": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 2,"branchId": "%s"}
"payload48": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 3,"branchId": "%s"}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
......@@ -291,3 +295,5 @@ pl:423', 'data': None}
checkDict15: {'code': 0, 'msg': None, 'tag': None, 'data': []}
checkDict16: {'code': 14030004, 'msg': '单元包含量重复,请修改后继续操作', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.BranchGoodsPkgDefServiceImpl:178', 'data':
None}
checkDict17: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:单元包上限必须大于等于单元包下限!', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.BranchGoodsPkg
DefServiceImpl:208', 'data': None}
......@@ -55,9 +55,9 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>0分0</td>
<td class="details-col-elapsed">0.0%</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分1</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/f4_院区单元包设置_新增后查询单元包信息/log.html' target='_blank'>f4_院区单元包设置_新增后查询单元包信息</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">0.302</td>
<td class="details-col-elapsed"><a href='../log/g1_请领出库渠道设置_转移产品到供应商直配/log.html' target='_blank'>g1_请领出库渠道设置_转移产品到供应商直配</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.925</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