Commit 339334ea authored by xiao-hesheng's avatar xiao-hesheng
Browse files

开发在数据库中对部门请领的表增加了字段,create_from,所以需要调整脚本

parent 19bed11e
......@@ -17,6 +17,7 @@ __author__ = "xiaohesheng"
case_tag:api,spd_core,a_b7流程十四退库业务_消耗退库,id2302,id2302-17,sit,on
核心业务流:a_b7流程十四退库业务_消耗退库
python runner_test.py tag id2302-17 debug mdm3
低值产品需要保证2个库存,脚本才能正常
"""
......@@ -174,6 +175,9 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
elif type == 1:
print('低值耗材消耗出库')
udi_code = get_udi2(1,token)
if udi_code=='pkgCodeSee':
print('没有获取到有效条码')
sys.exit(0)
data1 = pickScan4(udi_code)
# 获取必要信息
areaCode = commonFuc().analysis_json('areaCode', data1)
......@@ -389,6 +393,9 @@ def sCan_grant(type=1): # 获取条码and扫码发放高值不能发放
udi_code = get_udi2(3,token) # 获取条码 低值1 高值2 试剂3
else:
udi_code = 'udi_code'
if udi_code=='pkgCodeSee':
print('没有获取有效条码')
sys.exit(0)
if type == 1:
pickScan3(udi_code, 1) # 低值扫码发放
elif type == 3:
......
......@@ -136,7 +136,7 @@ def check_mcms_psi_dept_in(type=10):
def check_mcms_psi_dept_batch_in(DR_ID1,DR_ID,type):
branch_id = get_branch_id()
if type==67:
sql = " select * from mcms_psi_dept_batch where pid='%s' order by create_time desc LIMIT 1;" % (
sql = "select * from mcms_psi_dept_batch where pid='%s' order by create_time desc LIMIT 1;" % (
DR_ID1)
count=process_tuple(get_id("select count(*) from mcms_psi_dept_batch where pid='%s'"%DR_ID1))
if count=='100':
......@@ -145,7 +145,7 @@ def check_mcms_psi_dept_batch_in(DR_ID1,DR_ID,type):
else:
commonFuc().check_text_exist_result_text('error', 'SUCCESS')
else:
sql = " select * from mcms_psi_dept_batch where pid='%s';" % (
sql = "select * from mcms_psi_dept_batch where pid='%s';" % (
DR_ID1)
actual = check_mcms_dept_buy_sql(sql)
print('actual', actual)
......@@ -851,7 +851,7 @@ def check_mcms_psi_dept_XH_CK(type1=10,type2=16):
check_mcms_psi_dept_batch_xhrk(DR_ID1,source_id,type2,order_no1)
source_id="-"
source_area_code=None
his_charge_no=get_id(" select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;"%(branch_id,DR_ID1))
his_charge_no=get_id("select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;"%(branch_id,DR_ID1))
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_out_xhrk1', DR_ID1, order_no1, target_corp_id, target_branch_id,
target_dept_id, target_dept_name, target_stock_id
......@@ -867,7 +867,7 @@ def check_mcms_psi_dept_XH_CK(type1=10,type2=16):
source_id = "-"
source_area_code = None
his_charge_no = get_id(
" select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;" % (
"select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;" % (
branch_id, DR_ID1))
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_out_xhrk2', DR_ID1, order_no1, target_corp_id,
......@@ -920,17 +920,25 @@ from a_b7流程十四退库业务_消耗退库 import sCan_grant,second_dept_con
try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
sCan_grant(1) # 低值扫码发放
time.sleep(8)
check_mcms_psi_dept_out_and_in(16,10)#检查出库单和入库单(包括主表和子表)
sCan_grant(3) # 试剂扫码发放
time.sleep(8)
check_mcms_psi_dept_out_and_in(66,67)#检查出库单和入库单(包括主表和子表)
second_dept_consume_Out_Stock(2) # 高值消耗出库
time.sleep(8)
second_dept_consume_in_Stock(2) # 高值消耗退货入库
time.sleep(8)
check_mcms_psi_dept_out_and_in(20, 20) #检查高值消耗出库单和消耗入库单包括主表和子表)
second_dept_consume_Out_Stock(1) # 低值消耗出库
time.sleep(8)
second_dept_consume_in_Stock(1) # 低值消耗退回入库
time.sleep(8)
check_mcms_psi_dept_XH_CK(10,10)#检查低值消耗出库单和消耗入库单包括主表和子表
second_dept_consume_Out_Stock(3) # 试剂消耗出库
time.sleep(8)
second_dept_consume_in_Stock(3) # 试剂消耗退回入库
time.sleep(8)
check_mcms_psi_dept_XH_CK(67, 67)#检查试剂消耗出库单和消耗入库单包括主表和子表
commonFuc().check_text_exist_result_text('SUCCESS', 'SUCCESS')
except Exception as e:
......
条码信息:
list_a:
- &id001
id: '100000142024080600000751'
snCode: '100000142024080600000751'
ssccCode: '010839000192083723'
pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000751'
id: '100000142024080600000776'
snCode: '100000142024080600000776'
ssccCode: '010839000192086229'
pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000776'
hosGoodsId: h034700004779
hosGoodsCode: '00004779'
goodsCode: '00004779'
......@@ -18,18 +18,18 @@
expdtDate: '2025-02-12'
pkgDefName: '100'
pkgDefQty: 100.0
stockId: 1a570b65b3724d4c98db2a8a4163cd1c
stockName: 三级检测组003库房
areaName: 默认库区
areaCode: areah03472821
stockId: 42c24f7facba4231aeda83b1348d6d1a
stockName: 东土城路院区l7B8J中心库房
areaName: 自动化测试
areaCode: areah03472822
lockStatus: 0
unitName: 100支/100
shelfCode: areah03472821-A-01-01
shelfNo: A01-A-01-01
shelfCode: areah03472822-2-01-01
shelfNo: 自动化测试-2-01-01
pkgDefId: 75012af7fbea44af9dd050857dac199f
extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId":
"CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025",
"inStockTime": "2024-08-07 14:22:47", "distrDetailId": "03840788", "certificateCode":
"inStockTime": "2024-08-06 14:17:06", "distrDetailId": "03840788", "certificateCode":
""}'
bottleId:
pkgType: '66'
......@@ -41,7 +41,7 @@
shelfKindName: 普通货位
provName: 国药集团公司uAfpK
provId: p1e386
inStockDate: '2024-08-07 14:22:47'
inStockDate:
mfrCode:
made: 德国
price:
......
......@@ -125,6 +125,8 @@ def main_text():
print('流程八执行完毕','流程八执行完毕 ')
# sys.exit(0)
def flow9():
# count=get_input()
# print(count)
from execute import flow12
flow12()
print('流程9执行完毕','流程9执行完毕')
......@@ -268,6 +270,31 @@ def main_text():
combo.pack()
root.mainloop()
def get_input():
# import tkinter as tk
#
# def get_input():
# print("你输入的内容是: " + entry.get())
#
# root = tk.Tk()
# root.title("输入框示例")
#
# label = tk.Label(root, text="请输入内容:")
# label.pack()
#
# entry = tk.Entry(root)
# entry.pack(padx=20, pady=20)
#
# button = tk.Button(root, text="获取输入", command=get_input)
# button.pack()
# root.mainloop()
#
# return entry.get()
result = tkinter.messagebox.askokcancel("再次确认", "您确定要执行此删除操作吗?数据删除后不可逆.")
# print(result)
print("用户选择了:", "OK" if result else "Cancel")
return result
# 文本显示的位置。
Button(root, text='流程一\n外网企业注册审批', width=16, height=8,command=flow1).grid(row=2,column=0)
Button(root, text='流程二\n供货关系申请审批', anchor='center', width=16, height=8,command=flow2).grid(row=2,column=2)
......
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