Commit 7b222387 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十四脚本编写

parent a69417f8
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from air_case.public1.public1.public1 import *
__author__ = "xiaohesheng"
"""
case_tag:api,spd_core1,产品检查,idxxxx,id8888-demo,sit,on
主数据平台:产品检查
python runner_test.py tag id8888-demo debug mdm3
"""
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:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
\ No newline at end of file
...@@ -681,14 +681,65 @@ class delData(object): ...@@ -681,14 +681,65 @@ class delData(object):
print('外网产品信息删除成功 ') print('外网产品信息删除成功 ')
cursor.close() cursor.close()
def check_goods_info(self): def check_goods_info(self,hos_goods_id):
# 内网的 # 内网的
connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2", connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2",
charset="utf8") charset="utf8")
cursor = connection.cursor() cursor = connection.cursor()
# 删除产品信息 # 查询产品信息
sql1 = "select * from mcms_goods_info where goods_name like '%一次性注射器%'and goods_spec ='G-31891' and id='h034700003737';" sql="""SELECT id, hos_goods_code,
cursor.execute(sql1) hos_id,
prov_id,
prov_hos_goods_id,
srv_id,
mdm_goods_code,
mdm_goods_spec_code,
spd_goods_code,
goods_name,
goods_general_name,
goods_mfrs_id,
goods_mfrs_name,
goods_reg_cert,
goods_agent_mfrs_id,
brand,
short_pinyin,
kind_sixtyeight_code,
unit,
goods_spec,
goods_package,
bar_code_mng,
unique_code_strategy,
pur_mode,
sub_pur_mode,
erp_code,
herp_code,
hrp,
price,
abroad_flag,
made,
property,
mgr_level,
goods_desc,
charge_flag,
focus_control_type,
temp_flag,
official_status,
focus_control,
storage_conditions,
transport_conditions,
into_cost_flag,
rfid_flag,
purchase_flag,
tb_status,
version,
create_user,
create_time,
last_modified_user,
sterilize_flag,
multi_charge_flag,
use_frequency,
charge_unit FROM mcms_goods_info WHERE id ='%s';""" % hos_goods_id
cursor.execute(sql)
results = cursor.fetchall() results = cursor.fetchall()
cursor.close() cursor.close()
# print(results) # print(results)
......
...@@ -443,3 +443,5 @@ json_headers2: { ...@@ -443,3 +443,5 @@ json_headers2: {
"stockId": "%s", "stockId": "%s",
"pickType": "TH" "pickType": "TH"
} }
"expected_value": "('h034700004220', '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)"
产品审核信息: 产品审核信息:
MSPid: MSP2406210008_1 MSPid: MSP2406210008_1
hosId: h0347 hosId: h0347
hosGoodsId: h034700004197 hosGoodsId: h034700004220
provGoodsid: provGood-99221385 provGoodsid: provGood-99221385
goodsAuditBillId: MSP2406210008 goodsAuditBillId: MSP2406210008
targetId: MSP2406210008_1 targetId: MSP2406210008_1
...@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间 ...@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600"> <tr width="600">
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1分46</td> <td class='details-col-elapsed'>0分0</td>
<td class="details-col-elapsed">100.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间 ...@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a_b1流程八_高值跟台业务流程/log.html' target='_blank'>a_b1流程八_高值跟台业务流程</a></td> <td class="details-col-elapsed"><a href='../log/产品检查/log.html' target='_blank'>产品检查</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">106.338</td> <td class="details-col-elapsed">0.337</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </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