Commit 2cbf737b authored by xiao-hesheng's avatar xiao-hesheng
Browse files

Merge remote-tracking branch 'remotes/origin/core_folw'

# Conflicts:
#	data/b5_spd3_core_business_flow/message10
#	data/b5_spd3_core_business_flow/message11
#	data/b5_spd3_core_business_flow/message12
#	data/b5_spd3_core_business_flow/message13
#	data/b5_spd3_core_business_flow/message14
#	data/b5_spd3_core_business_flow/message15
#	data/b5_spd3_core_business_flow/message8
#	data/b5_spd3_core_business_flow/message9
parent 546db672
......@@ -22,22 +22,22 @@ python runner_test.py tag id2303-13 debug mdm3
def check_mcms_dept_buy_car(type=1):
hos_goods_id='hos_goods_id'
if type==1:
hos_goods_id = 'hos_goods_id'
if type == 1:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
elif type==2:
elif type == 2:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
elif type==3:
elif type == 3:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
branch_id = get_branch_id()
# 获取每次都会变化的字段create_time的值
create_time = get_create_time(
"select create_time from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s';" % (
branch_id, hos_goods_id))
print('create_time',create_time)
print('create_time', create_time)
id = get_id(
"select id from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s';" % (branch_id, hos_goods_id))
print('id',id)
print('id', id)
create_user = get_id(
"select create_user from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s' LIMIT 1;" % (
branch_id, hos_goods_id))
......@@ -65,16 +65,18 @@ def check_mcms_dept_buy_car(type=1):
# print('actual_value2')
# print( actual_value2)
# prov_hos_goods_id = '8d6273b7bca84dd8aace12b9422d7fd6'
expected_value2='expected_value2'
if type==1 or type==3:
expected_value2 = 'expected_value2'
if type == 1 or type == 3:
expected_value2 = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_dept_buy_car_low_value', id, get_hosid(), branch_id, deptid2,
'check_mcms_dept_buy_car_low_value', id, get_hosid(), branch_id,
deptid2,
deptname2, areaCode, areaName, hos_goods_id, mdm_goods_code,
goodsCode,pur_mode, pkgDefId, pkgDefName
goodsCode, pur_mode, pkgDefId, pkgDefName
, create_user, create_time, last_modified, last_modified_user)
elif type==2:
elif type == 2:
expected_value2 = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_dept_buy_car_high_value', id, get_hosid(), branch_id,
'check_mcms_dept_buy_car_high_value', id, get_hosid(),
branch_id,
deptid2,
deptname2, areaCode, areaName, hos_goods_id, mdm_goods_code,
goodsCode, pur_mode,
......@@ -95,42 +97,54 @@ def check_mcms_dept_buy_car(type=1):
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
def check_mcms_dept_buy():
branch_id = get_branch_id()
sql = """select * from mcms_dept_buy where branch_id='%s' order by create_time desc LIMIT 3;;
sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;;
""" % (branch_id)
actual=check_mcms_dept_buy_sql(sql)
actual = check_mcms_dept_buy_sql(sql)
print(actual)
#获取主键id
sql="select id from mcms_dept_buy where branch_id='%s' order by create_time desc LIMIT 3;"%branch_id
id=get_dept_buy_id(sql)
id1=process_tuple(id[0]);id2=process_tuple(id[1]);id3=process_tuple(id[2])
#获取order_no
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' order by create_time desc LIMIT 3;" % branch_id
order_no = get_dept_buy_id(sql1)
order_no1 = process_tuple(order_no[0]); order_no2 = process_tuple(order_no[1])
order_no3 = process_tuple(order_no[2])
print(id1,id2,id3,order_no1,order_no2,order_no3)
# 获取主键id
sql = "select id from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id
id1 = get_dept_buy_id(sql)
# 获取order_no
sql1 = "select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id
order_no1 = get_dept_buy_id(sql1)
print(process_tuple(id1), process_tuple(order_no1))
deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
# target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
area_code = get_stockAreaId_new(deptid2, deptname2, 2)
area_name = '默认库区'
# 读取文件中的信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21')
list_a = info['list_a']
mdm_goods_code = commonFuc().analysis_json('mdmGoodsCode', list_a)
target_dept_id = commonFuc().analysis_json('targetDeptId', list_a)
target_dept_name = commonFuc().analysis_json('targetDeptName', list_a)
pur_mode = commonFuc().analysis_json('purMode', list_a)
goodsCode = commonFuc().analysis_json('goodsCode', list_a)
pkgDefId = commonFuc().analysis_json('pkgDefId', list_a)
pkgDefName = commonFuc().analysis_json('pkgDefName', list_a)
target_stock_id='边仓id,从边仓表获取'
expected=commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy', id1, order_no1,get_hosid(),branch_id,deptid2,deptname2,area_code,area_name,target_dept_id,target_dept_name,target_stock_id)
print('expected',expected)
target_stock_id = '边仓id,从边仓表获取'
bill_expdt_date = '从数据获取'
rec_user = 'rec_user';
create_user = 'create_user'
create_time = 'create_time';
last_modified = 'last_modified'
last_modified_user = 'last_modified_user'
last_auditor = 'last_auditor'
last_audit_time = 'last_audit_time'
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy', id1, order_no1, get_hosid(), branch_id, deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, bill_expdt_date, rec_user, create_user, create_time,
last_modified, last_modified_user, last_auditor, last_audit_time)
print('expected', expected)
try:
#==============暂时注释==================
# ==============暂时注释==================
# set_dept_lead() # 设置二级科室负责人
# # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# pro_path = commonFuc().get_pro_path2()
......
"check_mcms_dept_buy_car_low_value": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": %s, "pkg_def_id": "%s", "pkg_def_name": "%s", "pkg_def_qty": Decimal("100.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("100.00"), "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
"check_mcms_dept_buy_car_high_value": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": %s, "pkg_def_id": null, "pkg_def_name": null, "pkg_def_qty": Decimal("1.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("1.00"), "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
"mcms_dept_buy": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "1", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "自动化测试12345", "bill_expdt_date": datetime.datetime(2024, 8, 9, 0, 0), "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 20, "close_status": 0, "tb_status": 70, "rec_user": "h0347_UID-051404", "rec_phone": "None", "rec_addr": "二级检验科002", "create_user": "h0347_UID-051404", "create_time": datetime.datetime(2024, 7, 9, 9, 52, 48), "last_modified": datetime.datetime(2024, 7, 9, 10, 16, 14), "last_modified_user": "h0347_UID-051404", "version": 3, "del_flag": 0, "last_auditor": "h0347_UID-051404", "last_audit_time": datetime.datetime(2024, 7, 9, 10, 3, 30), "close_time": None, "old_order_no": None}, {"id": "Bh03472024070900006", "order_no": "BUY2024070906054", "bill_mode": "66", "hos_id": "h0347", "branch_id": "h0347-3738", "dept_id": "7b4d11aec57042e096684a46e9148fdd", "dept_name": "二级检验科002", "area_code": "areah03472686", "area_name": "默认库区", "source_id": None, "buy_way": "1", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "d467187bce7f458eb5c4e1007f557353", "target_dept_name": "设备科001", "target_stock_id": "32bc153acdb34c969f4ed39bf10d58c2", "target_stock_name": "东土城路院区8SpTq中心库房", "bill_expdt_date": datetime.datetime(2024, 8, 9, 0, 0), "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 20, "close_status": 0, "tb_status": 70, "rec_user": "h0347_UID-051404", "rec_phone": "None", "rec_addr": "二级检验科002", "create_user": "h0347_UID-051404", "create_time": datetime.datetime(2024, 7, 9, 9, 52, 48), "last_modified": datetime.datetime(2024, 7, 9, 10, 15, 52), "last_modified_user": "h0347_UID-051404", "version": 3, "del_flag": 0, "last_auditor": "h0347_UID-051404", "last_audit_time": datetime.datetime(2024, 7, 9, 10, 3, 30), "close_time": None, "old_order_no": None}, {"id": "Bh03472024070900007", "order_no": "BUY2024070906055", "bill_mode": "20", "hos_id": "h0347", "branch_id": "h0347-3738", "dept_id": "7b4d11aec57042e096684a46e9148fdd", "dept_name": "二级检验科002", "area_code": "areah03472686", "area_name": "默认库区", "source_id": None, "buy_way": "1", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "d467187bce7f458eb5c4e1007f557353", "target_dept_name": "设备科001", "target_stock_id": "32bc153acdb34c969f4ed39bf10d58c2", "target_stock_name": "东土城路院区8SpTq中心库房", "bill_expdt_date": datetime.datetime(2024, 8, 9, 0, 0), "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 20, "close_status": 0, "tb_status": 70, "rec_user": "h0347_UID-051404", "rec_phone": "None", "rec_addr": "二级检验科002", "create_user": "h0347_UID-051404", "create_time": datetime.datetime(2024, 7, 9, 9, 52, 48), "last_modified": datetime.datetime(2024, 7, 9, 10, 16, 4), "last_modified_user": "h0347_UID-051404", "version": 3, "del_flag": 0, "last_auditor": "h0347_UID-051404", "last_audit_time": datetime.datetime(2024, 7, 9, 10, 3, 30), "close_time": None, "old_order_no": None}'
"mcms_dept_buy": '{'id': '%s', 'order_no': '%s', 'bill_mode': '16', 'hos_id': '%s', 'branch_id': '%s', 'dept_id': '%s', 'dept_name': '%s', 'area_code': '%s', 'area_name': '%s', 'source_id': None, 'buy_way': '2', 'create_type': 'SG', 'buy_kind': 'KS', 'target_dept_id': '%s', 'target_dept_name': '%s', 'target_stock_id': '%s', 'target_stock_name': '%s', 'bill_expdt_date': %s, 'bill_expect_date': None, 'priority': 0, 'buy_priority': 0, 'barcode_flag': 1, 'pkg_flag': 1, 'remark': '', 'dept_audit_remark': None, 'audit_remark': None, 'close_remark': None, 'srv_id': None, 'srv_name': None, 'gen_status': 0, 'close_status': 0, 'tb_status': 10, 'rec_user': '%s', 'rec_phone': 'None', 'rec_addr': '%s', 'create_user': '%s', 'create_time': %s, 'last_modified': %s, 'last_modified_user': '%s', 'version': 0, 'del_flag': 0, 'last_auditor': None, 'last_audit_time': None, 'close_time': None, 'old_order_no': None}'
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