Commit e8c82f42 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

产品管理_产品维护_耗材分类

parent f80802ea
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delByBranchId
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,c7_科室管理_禁用科室,id2263,id2263-27,sit,on
主数据平台:c7_科室管理_禁用科室
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def disable_dept():
"""
场景:c7_科室管理_禁用科室
用例名称:c7_科室管理_禁用科室
输入:无
输出:"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)
#c7_科室管理_禁用科室
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
dept2_id=FileUtils().r_info(module, '科室信息')["dept2_id"]
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "updateDept_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"))
# #请求体
request_body=commonFuc().get_business_data(module, "payload18",dept2_id,branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url,request_body,headers)
print('result', result)
# #断言
checkDict=commonFuc().get_business_data(module,'checkDict2')
commonFuc().check_result(checkDict,result)
disable_dept()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delByBranchId
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,c8_科室管理_启用科室,id2263,id2263-28,sit,on
主数据平台:c8_科室管理_启用科室
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def disable_dept():
"""
场景:c8_科室管理_启用科室
用例名称:c8_科室管理_启用科室
输入:无
输出:"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)
#c8_科室管理_启用科室
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
dept2_id=FileUtils().r_info(module, '科室信息')["dept2_id"]
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "updateDept_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"))
# #请求体
request_body=commonFuc().get_business_data(module, "payload19",dept2_id,branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url,request_body,headers)
print('result', result)
# #断言
checkDict=commonFuc().get_business_data(module,'checkDict2')
commonFuc().check_result(checkDict,result)
disable_dept()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delByBranchId
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,c9_产品管理_产品维护_新增耗材分类,id2263,id2263-29,sit,on
主数据平台:c9_产品管理_产品维护_新增耗材分类
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goodsKind_insert():
"""
场景:c9_产品管理_产品维护_新增耗材分类
用例名称:c9_产品管理_产品维护_新增耗材分类
输入:无
输出:"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)
#c9_产品管理_产品维护_新增耗材分类
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "goodsKind_insert_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"))
# #请求体
request_body=commonFuc().get_business_data(module, "payload20")
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url,request_body,headers)
print('result', result)
# #断言
checkDict=commonFuc().get_business_data(module,'checkDict2')
commonFuc().check_result(checkDict,result)
goodsKind_insert()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delByBranchId
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,d0_产品管理_产品维护_新增耗材分类_分类已存在,id2263,id2263-30,sit,on
主数据平台:d0_产品管理_产品维护_新增耗材分类_分类已存在
"""
from common.common_func import commonFuc
from air_case.a1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "a2_herp3_bs"
def goodsKind_insert():
"""
场景:d0_产品管理_产品维护_新增耗材分类_分类已存在
用例名称:d0_产品管理_产品维护_新增耗材分类_分类已存在
输入:无
输出:"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)
#d0_产品管理_产品维护_新增耗材分类_分类已存在
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "goodsKind_insert_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"))
# #请求体
request_body=commonFuc().get_business_data(module, "payload20")
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url,request_body,headers)
print('result', result)
# #断言
checkDict=commonFuc().get_business_data(module,'checkDict8')
commonFuc().check_result(checkDict,result)
goodsKind_insert()
......@@ -11,6 +11,8 @@
"firmpage_url": "/hospitaltest2api/herpService/basic/firm/page/"
"deptPage_url": "/hospitaltest2api/platformService/sys/org/v2/deptPage/"
"dept_insert_url": "/hospitaltest2api/platformService/sys/org/v2/insert/"
"updateDept_url": "/hospitaltest2api/platformService/sys/org/v2/updateDept/"
"goodsKind_insert_url": "/hospitaltest2api/herpService/goodsKind/insert/"
"username": "xhs1009"
"password": "1qaz!QAZ"
"X-APP-CODE": "herp.pc"
......@@ -135,6 +137,46 @@ json_headers2: {
"flag": "1",
"corpId": "h0347"
}
"payload18": {
"id": "%s",
"address": "二级科室002",
"branchId": "%s",
"code": "002",
"contactWay": "二级科室002",
"deptCate": 1,
"deptKind": 2,
"deptLevel": "2",
"flag": 0,
"pid": "/",
"ename": "二级科室002",
"corpId": "h0347"
}
"payload19": {
"id": "%s",
"address": "二级科室002",
"branchId": "%s",
"code": "002",
"contactWay": "二级科室002",
"deptCate": 1,
"deptKind": 2,
"deptLevel": "2",
"flag": 1,
"pid": "/",
"ename": "二级科室002",
"corpId": "h0347"
}
"payload20": {
"pid": "",
"kindCode": "9999",
"kindName": "9999",
"tbStatus": 0,
"kindType": 1,
"hosId": "h0347"
}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
"code": 0,
......@@ -200,4 +242,5 @@ checkDict4: {"code": 400,'msg': None,'data':None}
checkDict5: {'code': 400, 'msg': '数据更新不成功,可能数据的版本不一致!请刷新页面重试', 'data': None}
checkDict6: {'code': 0, 'msg': None, 'data': []}
checkDict7: {'code': 1100000, 'msg':'暂时没有定义异码,中文描述为:同一院区下科室编码不可重复','data':'/platformService:gyqx.spd.platform.sys.service.impl.SysOrgServiceImpl:156'}
checkDict8: {'code': 14030004, 'msg': '同一个分类类型下产品分类名称不能重复,请修改后继续操作', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.GoodsKindServiceImpl:316', 'data': None}
......@@ -56,7 +56,7 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分0</td>
<td class='details-col-elapsed'>0分2</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/c6_新增科室_不生成库房/log.html' target='_blank'>c6_新增科室_不生成库房</a></td>
<td class="details-col-elapsed"><a href='../log/d0_产品管理_产品维护_新增耗材分类_分类已存在/log.html' target='_blank'>d0_产品管理_产品维护_新增耗材分类_分类已存在</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.734</td>
<td class="details-col-elapsed">2.007</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