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

新增流程十数据库验证脚本

parent e43f724f
......@@ -114,7 +114,13 @@ def mcms_dept_buy_detail(type=16):
# 从数据库中获取实际值
actual = check_mcms_dept_buy_sql(sql1)
print('actual', actual)
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
if type==16:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
elif type==20:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
else:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
# print(hos_goods_id,process_tuple(hos_goods_id))
# 获取子表id
......@@ -122,10 +128,14 @@ def mcms_dept_buy_detail(type=16):
print('detail_id', detail_id)
info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21')
list_a = info['list_a']
mdm_goods_code =get_mdm_goods_code("select mdm_goods_code from mcms_goods_info where id='%s';"%hos_goods_id)
goods_code = get_mdm_goods_code("select hos_goods_code from mcms_goods_info where id='%s';"%hos_goods_id)
pkg_def_id = get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;"%hos_goods_id)
pkg_def_name = get_id("select pkg_def_name from mcms_pkg where hos_goods_id='%s' LIMIT 1;"%hos_goods_id)
mdm_goods_code =process_tuple(get_mdm_goods_code("select mdm_goods_code from mcms_goods_info where id='%s';"%hos_goods_id))
goods_code = process_tuple(get_mdm_goods_code("select hos_goods_code from mcms_goods_info where id='%s';"%hos_goods_id))
pkg_def_id = process_tuple(get_id("select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;"%hos_goods_id))
if pkg_def_id=='None':
print(pkg_def_id)
pkg_def_id=pkg_def_id.replace("'","")
print(pkg_def_id)
pkg_def_name = process_tuple(get_id("select pkg_def_name from mcms_pkg where hos_goods_id='%s' LIMIT 1;"%hos_goods_id))
create_user=get_login_user_uxid()
create_time= get_create_time("select create_time from mcms_dept_buy_detail where pid='%s';" % id1)
last_modified=create_time
......@@ -157,7 +167,7 @@ def mcms_dept_buy_detail(type=16):
print(actual_value2)
result=(compare_text_index(actual_value2,expected_value2))
print('result',result)
if result==None:
if actual_value2 == expected_value2:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
......
......@@ -5,5 +5,5 @@
"mcms_dept_buy2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "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": 0, "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}'
"mcms_dept_buy3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "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}'
"mcms_dept_buy_detail": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 10, "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"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 10, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "re_order_no": None, "coding_type": 0}'
"mcms_dept_buy_detail1": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 10, "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"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 10, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "re_order_no": None, "coding_type": 0}'
"mcms_dept_buy_detail1": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 20, "pkg_def_id": %s, "pkg_def_name": %s, "pkg_def_qty": Decimal("1.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("1.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 10, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "re_order_no": None, "coding_type": 0}'
"mcms_dept_buy_detail2": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 10, "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"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 10, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "re_order_no": None, "coding_type": 0}'
\ No newline at end of file
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