Commit 5c0e5e56 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程二脚本提交

parent 209c037d
# -*- encoding=utf8 -*-
from air_case.public1.public1.public1 import get_branch_id, check_mcms_pur_sql, get_create_time, \
get_login_user_uxid_bydb, get_id, get_process_list2, compare_text_index
from air_case.public1.public1.public1 import updateUserLoginDefaultRange, get_listUserMgrRangePage, call_login, \
get_branch_id, get_dept_buy_id, check_mcms_pur_plan_sql, get_hosid, get_id, \
get_stockAreaId_new_fromDb, get_login_user_uxid, get_expdt_date, get_create_time, get_process_list2, \
compare_text_index, check_mcms_pur_sql, check_source_id, get_mdm_goods_code1, get_goods_code1, get_supply_id, \
get_pkg_def_id, get_goods_gg, get_goods_name, get_login_user_uxid_bydb, process_tuple, get_prov_id, get_prov_id1
from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
......@@ -15,7 +18,7 @@ from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
from air_case.public1.public1.public1 import *
def check_supply_relation(type=1):
print('检查供应关系表数据')
......@@ -24,8 +27,8 @@ def check_supply_relation(type=1):
actual = check_mcms_pur_sql(sql1)
print('actual', actual)
id=get_id("select id from spd_ybtest_hdi.supply_relation order by create_time desc limit 1;")
hos_id=get_hosid()
prov_id = get_prov_id()
hos_id=get_id("select hos_id from spd_ybtest_hdi.supply_relation where id='%s';" % id)
prov_id = get_prov_id1()
sub_prov_id=prov_id
contact_way=get_id("select contact_way from spd_ybtest_hdi.supply_relation where id='%s';" % id)
contact_user=get_id("select contact_user from spd_ybtest_hdi.supply_relation where id='%s';" % id)
......@@ -37,9 +40,9 @@ def check_supply_relation(type=1):
# FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"])
# last_modified_user = create_user
audit_time= get_create_time("select audit_time from spd_ybtest_hdi.supply_relation where id='%s';" % id)
last_modified = get_id("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id)
last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id)
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_goods_info', id,hos_id,prov_id,sub_prov_id,contact_way
'check_supply_relation', id,hos_id,prov_id,sub_prov_id,contact_way
,contact_user,auditor,audit_time, create_time, last_modified)
actual_value1 = get_process_list2(actual)
......@@ -83,4 +86,5 @@ try:
except Exception as e:
# 打印错误信息
print(f"发生错误: {e}")
print("发生异常:", str(e))
print('a_a2_流程二供货关系申请提交审批,出现异常,请检查')
......@@ -3764,6 +3764,10 @@ def comparison_result(actual, expected):
def get_prov_id():
return FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"]
def get_prov_id1():
return FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请', 'message')["e_corpId"]
def get_prov_name():
return FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"]
......
企业信息:
e_id: CR202411040038
cname: 国药集团公司%jH@*
e_id: CR202411040062
cname: 国药集团公司iKXtO
供货关系申请:
e_corpId: p1e4d1
e_corpId: p1e4dd
h_corpId: h0347
e_username: 国药集团公司%jH@*
e_username: 国药集团公司iKXtO
h_name: test_1
......@@ -530,5 +530,5 @@
"check_mcms_goods_info_after_approval4": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info_after_approval5": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
#检查应关系表
#检查应关系表
"check_supply_relation": '{"id": "%s", "hos_id": "%s", "prov_id": "%s", "sub_prov_id": "%s", "client_type": "1", "invitation_code": None, "contact_way": "%s", "contact_user": "%s", "tb_status": 20, "active_flag": "1", "auditor": "%s", "audit_time": %s, "audit_comment": None, "version": 1, "create_user": "GYQX-SPD:user-19669", "create_time": %s, "last_modified_user": "h0347:UID-042066", "last_modified": %s}'
\ 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