Commit 0c3a1c80 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十四脚本编写

parent 45bed705
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import main2
from common.fileUtls import FileUtils
from air_case.public1.public1.public1 import *
......@@ -15,13 +16,26 @@ from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
actual_value=delData().check_goods_info(hos_goods_id)
print('actual_value',actual_value)
expected_value=commonFuc().get_business_data('b5_spd3_core_business_flow','expected_value')
print('expected_value',expected_value)
if actual_value==expected_value:
#第一种方式
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
# actual_value=delData().check_goods_info(hos_goods_id)
# print('actual_value',actual_value)
# expected_value=commonFuc().get_business_data('b5_spd3_core_business_flow','expected_value')
# print('expected_value',expected_value)
# if actual_value==expected_value:
# print('ok')
# commonFuc().check_text_exist_result_text('succees', 'succees')
# else:
# print('error')
# commonFuc().check_text_exist_result_text('error', 'succees')
#第二种方式
hos_goods_id = 'h034700004220'
actual_value2=main2(hos_goods_id)
print('actual_value2',actual_value2)
expected_value2=commonFuc().get_business_data('b5_spd3_core_business_flow','expected_value2')
expected_value2=get_process_list(expected_value2)
print('expected_value2',expected_value2)
if actual_value2==expected_value2:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
......
......@@ -743,8 +743,8 @@ class delData(object):
results = cursor.fetchall()
cursor.close()
# print(results)
# s = ''.join(map(str, results))
s = list(results)
s = ''.join(map(str, results))
# s = list(results)
return s
def get_orgCode(self):
......
......@@ -47,7 +47,7 @@ def get_dict_data_sql(cursor, sql):
return res
def main(hos_goods_id):
def main2(hos_goods_id):
db, cursor = get_sql_conn()
sql = """SELECT hos_goods_code,
hos_id,
......@@ -107,4 +107,4 @@ def main(hos_goods_id):
hos_goods_id = 'h034700004220'
main(hos_goods_id)
\ No newline at end of file
main2(hos_goods_id)
\ No newline at end of file
......@@ -445,3 +445,13 @@ json_headers2: {
}
"expected_value": "('00004220', 'h0347', 'p1e2ba', '22f19044b8ae40f08aa5e170dcedc66e', None, '11661168', '11661168', '11661168', '一次性注射器_低值2^p7l', '一次性注射器', 'mfrs-11229', '德国歌德公司 Geuder AG', '', None, '', 'ycxzsq_dz2^p7l', None, '支', 'G-31891', Decimal('1.000000'), 2, '3', 10, None, None, '', None, Decimal('99.9999'), None, '德国', None, None, '', 1, None, 0, None, 0, '', '', None, None, 1, 0, 1, 'p1e2ba:UID-051933', datetime.datetime(2024, 6, 23, 7, 0, 59), 'p1e2ba:UID-051933', 0, 0, 1, None)"
"expected_value2": "{'hos_goods_code': '00004220', 'hos_id': 'h0347', 'prov_id': 'p1e2ba', 'prov_hos_goods_id': '22f19044b8ae40f08aa5e170dcedc66e', 'srv_i
d': None, 'mdm_goods_code': '11661168', 'mdm_goods_spec_code': '11661168', 'spd_goods_code': '11661168', 'goods_name': '一次性注射器_低值2^p7l', 'goo
ds_general_name': '一次性注射器', 'goods_mfrs_id': 'mfrs-11229', 'goods_mfrs_name': '德国歌德公司 Geuder AG', 'goods_reg_cert': '', 'goods_agent_mfrs
_id': None, 'brand': '', 'short_pinyin': 'ycxzsq_dz2^p7l', 'kind_sixtyeight_code': None, 'unit': '支', 'goods_spec': 'G-31891', 'goods_package': Deci
mal('1.000000'), 'bar_code_mng': 2, 'unique_code_strategy': '3', 'pur_mode': 10, 'sub_pur_mode': None, 'erp_code': None, 'herp_code': '', 'hrp': None
, 'price': Decimal('99.9999'), 'abroad_flag': None, 'made': '德国', 'property': None, 'mgr_level': None, 'goods_desc': '', 'charge_flag': 1, 'focus_c
ontrol_type': None, 'temp_flag': 0, 'official_status': None, 'focus_control': 0, 'storage_conditions': '', 'transport_conditions': '', 'into_cost_fla
g': None, 'rfid_flag': None, 'purchase_flag': 1, 'tb_status': 0, 'version': 1, 'create_user': 'p1e2ba:UID-051933', 'create_time': datetime.datetime(2
024, 6, 23, 7, 0, 59), 'last_modified_user': 'p1e2ba:UID-051933', 'sterilize_flag': 0, 'multi_charge_flag': 0, 'use_frequency': 1, 'charge_unit': Non
e}"
\ No newline at end of file
......@@ -76,9 +76,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600">
<td class='details-col-elapsed'>1</td>
<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">100.0%</td>
<td class="details-col-elapsed">0.0%</td>
</tr>
</table>
......@@ -94,8 +94,8 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600">
<td class="details-col-elapsed"><a href='../log/产品检查/log.html' target='_blank'>产品检查</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.337</td>
<td class="fail">失败</td>
<td class="details-col-elapsed">0.348</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