Commit 05591d3e authored by 肖 和生's avatar 肖 和生
Browse files

Merge remote-tracking branch 'remotes/origin/master' into core_flow

parents baa9285f 91cf0c7f
...@@ -265,6 +265,7 @@ def edit_goods_target(currentDeptId, targetDeptId): ...@@ -265,6 +265,7 @@ def edit_goods_target(currentDeptId, targetDeptId):
print('编辑产品请领渠道result', result) print('编辑产品请领渠道result', result)
def pick_execute(): def pick_execute():
module = "b5_spd3_core_business_flow" module = "b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始 # # 登录获取用户id等信息,使用创建的用户登录===========开始
...@@ -283,7 +284,7 @@ def pick_execute(): ...@@ -283,7 +284,7 @@ def pick_execute():
"herpService_stock_out_buyPage_url") "herpService_stock_out_buyPage_url")
info= FileUtils().r_info8('b5_spd3_core_business_flow', "三级库向二级库请领单号", 'message27') info= FileUtils().r_info8('b5_spd3_core_business_flow', "三级库向二级库请领单号", 'message27')
DRNo_list = [] # DRNo_list = []
for i in range(1, 4): for i in range(1, 4):
if i == 1: if i == 1:
orderNo = info['buy_NO1'] orderNo = info['buy_NO1']
...@@ -333,7 +334,7 @@ def pick_execute(): ...@@ -333,7 +334,7 @@ def pick_execute():
print('udi_code', udi_code) print('udi_code', udi_code)
if udi_code=='pkgCodeSee': if udi_code=='pkgCodeSee':
print('没有获取到条码') print('没有获取到条码')
return sys.exit(0)
if billMode == '16': if billMode == '16':
targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 1,token) # 低值 targetAreaCode, sourceId = pickScan2(BH_ID, udi_code, 1,token) # 低值
elif billMode == '20': elif billMode == '20':
...@@ -349,20 +350,33 @@ def pick_execute(): ...@@ -349,20 +350,33 @@ def pick_execute():
print('提交拣货执行单=================', url) print('提交拣货执行单=================', url)
if billMode == '16': if billMode == '16':
request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode, sourceId) request_body = commonFuc().get_business_data(module, "payload51_1_1", targetAreaCode, sourceId)
print('提交拣货执行单', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('提交拣货执行单,result1', result)
DR_id = commonFuc().analysis_json('data', result)
# 将拣货单id写入文件
info1 = (DR_id, DR_id)
titlename = ('DR_NO1低值', 'DR_NO1低值')
FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单低值id', titlename, 'message28')
elif billMode == '20': elif billMode == '20':
request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode, sourceId) request_body = commonFuc().get_business_data(module, "payload51_1_2", targetAreaCode, sourceId)
print('提交拣货执行单', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('提交拣货执行单,result1', result)
DR_id = commonFuc().analysis_json('data', result)
info1 = (DR_id, DR_id)
titlename = ('DR_NO1高值', 'DR_NO1高值')
FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单高值id', titlename, 'message28')
elif billMode == '66': elif billMode == '66':
request_body = commonFuc().get_business_data(module, "payload51_1_3", targetAreaCode, sourceId) request_body = commonFuc().get_business_data(module, "payload51_1_3", targetAreaCode, sourceId)
print('提交拣货执行单', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('提交拣货执行单,result1', result)
DR_id = commonFuc().analysis_json('data', result)
info1 = (DR_id, DR_id)
titlename = ('DR_NO1试剂', 'DR_NO1试剂')
FileUtils().w_info8(info1, 'b5_spd3_core_business_flow', '拣货单试剂id', titlename, 'message28')
print('提交拣货执行单', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('提交拣货执行单,result1', result)
DR_id = commonFuc().analysis_json('data', result)
DRNo_list.append(DR_id)
# 将拣货单id写入文件
info = (DRNo_list[0], DRNo_list[1], DRNo_list[2])
titlename = ('DR_NO1', 'DR_NO2', 'DR_NO3')
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '拣货单id', titlename, 'message28')
def main(): def main():
try: try:
......
...@@ -536,15 +536,18 @@ def check_mcms_psi_dept(type=16): ...@@ -536,15 +536,18 @@ def check_mcms_psi_dept(type=16):
branch_id, type) branch_id, type)
actual = check_mcms_dept_buy_sql(sql) actual = check_mcms_dept_buy_sql(sql)
print(actual) print(actual)
info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28') # info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28')
# print(info) # print(info)
if type == 16: if type == 16:
DR_ID = info['DR_NO2'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单低值id", 'message28')
DR_ID = info['DR_NO1低值']
elif type == 20: elif type == 20:
DR_ID = info['DR_NO3'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单高值id", 'message28')
DR_ID = info['DR_NO1高值']
else: else:
DR_ID = info['DR_NO1'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单试剂id", 'message28')
DR_ID = info['DR_NO1试剂']
DR_ID = ''.join(DR_ID) DR_ID = ''.join(DR_ID)
sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID
order_no = get_id(sql) order_no = get_id(sql)
...@@ -632,13 +635,16 @@ def check_mcms_psi_dept_in(type=16): ...@@ -632,13 +635,16 @@ def check_mcms_psi_dept_in(type=16):
branch_id, type) branch_id, type)
actual = check_mcms_dept_buy_sql(sql) actual = check_mcms_dept_buy_sql(sql)
print(actual) print(actual)
info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单id", 'message28')
if type == 16: if type == 16:
source_id = info['DR_NO2'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单低值id", 'message28')
source_id = info['DR_NO1低值']
elif type == 20: elif type == 20:
source_id = info['DR_NO3'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单高值id", 'message28')
source_id = info['DR_NO1高值']
else: else:
source_id = info['DR_NO1'] info = FileUtils().r_info8('b5_spd3_core_business_flow', "拣货单试剂id", 'message28')
source_id = info['DR_NO1试剂']
source_id = ''.join(source_id) source_id = ''.join(source_id)
source_no=get_id("select order_no from mcms_psi_dept where id='%s';"%source_id) source_no=get_id("select order_no from mcms_psi_dept where id='%s';"%source_id)
#获取入库单主键DR_ID #获取入库单主键DR_ID
...@@ -867,11 +873,13 @@ def main(): ...@@ -867,11 +873,13 @@ def main():
# 低值拣货执行 # 低值拣货执行
pick_execute() pick_execute()
time.sleep(6)
# 检查拣货单 # 检查拣货单
list_data = ['16', '20', '66'] list_data = ['16', '20', '66']
for i in list_data: for i in list_data:
check_mcms_pick(int(i)) check_mcms_pick(int(i))
time.sleep(6)
# 检查出库单 # 检查出库单
check_mcms_psi_dept(16) check_mcms_psi_dept(16)
check_mcms_psi_dept(20) check_mcms_psi_dept(20)
......
...@@ -5,6 +5,9 @@ import traceback ...@@ -5,6 +5,9 @@ import traceback
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from air_case.public1.public1.public1 import * from air_case.public1.public1.public1 import *
from common.db.sql.sql_del_branch_info import delData from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import check_mcms_dept_buy_sql, get_PICK_id, get_buyBillId, get_buyOrderNo, \
get_PICK_order_no, get_login_user_uxid_bydb, get_create_time, get_pick_detail_id, get_mdm_goods_code1, \
get_goods_code1, get_pkg_def_id, check_batch_id, check_barcode_id
from common.fileUtls import FileUtils from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command from common.run_cmd_script import execute_command
...@@ -18,419 +21,393 @@ case_tag:api,b6_spd3_core_business_flow_database_check,a_b8流程十五退库业 ...@@ -18,419 +21,393 @@ case_tag:api,b6_spd3_core_business_flow_database_check,a_b8流程十五退库业
核心业务流:a_b8流程十五退库业务_三级库向二级库退库 核心业务流:a_b8流程十五退库业务_三级库向二级库退库
python runner_test.py tag id2303-18 debug mdm3 python runner_test.py tag id2303-18 debug mdm3
""" """
def check_mcms_psi_dept_out(type1=16):
branch_id = get_branch_id()
sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_LYTK' order by CREATE_TIME desc LIMIT 1;" % (
branch_id, type1)
actual = check_mcms_dept_buy_sql(sql)
print(actual)
DR_ID=get_id(" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_LYTK' order by CREATE_TIME desc LIMIT 1;" % (
branch_id, type1))
sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID
order_no = get_id(sql)
target_corp_id = get_hosid()
target_branch_id = get_branch_id()
target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
target_stock_id = get_stockId_fromdb(target_dept_name + '库房')
target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 2)
PICK_id = get_PICK_id(branch_id, type1)
source_id = PICK_id
source_corp_id = get_hosid()
source_branch_id = get_branch_id()
source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3']
source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3']
source_stock_id = get_stockId_fromdb(source_dept_name + '库房')
source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 2)
buyBillId = get_buyBillId(branch_id, type1)
pickOrderNo = get_PICK_order_no(branch_id, type1)
buyOrderNo = get_buyOrderNo(branch_id, type1)
pickBillId = get_PICK_id(branch_id, type1)
psiDeptOutBillId = DR_ID
psiDeptOutOrderNo = order_no
create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
create_time = get_create_time("select create_time from mcms_psi_dept where id='%s';" % DR_ID)
last_modified = get_create_time("select last_modified from mcms_psi_dept where id='%s';" % DR_ID)
last_modified_user = create_user
accounter=create_user
account_date = process_tuple(get_create_time("select account_date from mcms_psi_dept where id='%s';" % DR_ID))
if type1 == 16:
# 子表检查
check_mcms_psi_dept_batch(DR_ID,type1,order_no)
target_area_code = None
accounter = None
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_tkck1', DR_ID, order_no, target_corp_id, target_branch_id,
target_dept_id, target_dept_name, target_stock_id
, target_area_code, source_id, source_corp_id, source_branch_id,
source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
, create_user, create_time, last_modified, last_modified_user
def second_dept_return_Out_Stock(type): # 三级库退库出库 )
module = "b5_spd3_core_business_flow" elif type1 == 20:
# # 登录获取用户id等信息,使用创建的用户登录===========开始 # 子表检查
info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3') check_mcms_psi_dept_batch(DR_ID,type1,order_no)
username = info['username1'] target_area_code=None
password = commonFuc().get_business_data("b2_herp3_bs", "password") accounter=None
print('username,password', username, password) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
# # 获取token和projectCode 'mcms_psi_dept_tkck2', DR_ID, order_no, target_corp_id, target_branch_id,
token, projectCode, uxid, corpId, info = login(username, password, 2) target_dept_id, target_dept_name, target_stock_id
# 登录获取用户id等信息,使用创建的用户登录============结束 , target_area_code, source_id, source_corp_id, source_branch_id,
# 我要请领_手工请领_列表查询=========================== source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
headers = commonFuc().get_business_data(module, "json_headers2", pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
commonFuc().get_business_data(module, "json_contentType"), token, , create_user, create_time, last_modified, last_modified_user)
commonFuc().get_business_data(module, "X-APP-CODE")) else:
# 子表检查
check_mcms_psi_dept_batch(DR_ID, type1, order_no)
target_area_code = None
accounter = None
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_tkck3', DR_ID, order_no, target_corp_id, target_branch_id,
target_dept_id, target_dept_name, target_stock_id
, target_area_code, source_id, source_corp_id, source_branch_id,
source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
, create_user, create_time, last_modified, last_modified_user
if type == 2: )
udi_code = get_udi3(2) # 获取条码 低值1 高值2 试剂3 print('expected', expected)
print('aaaaaaaaaaaaaaaaa')
actual_value1 = get_process_list2(actual)
expected_value1 = get_process_list2(expected)
actual_value2 = actual_value1.replace(" ", "")
expected_value2 = expected_value1.replace(" ", "")
# print('actual_value2',actual_value2)
print('expected_value2')
print(expected_value2)
print('actual_value2')
print(actual_value2)
print(compare_text_index(actual_value2, expected_value2))
if actual_value2 == expected_value2:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
# 高值退库出库 def check_mcms_psi_dept_batch(DR_ID,type,order_no):
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, branch_id = get_branch_id()
"herpService_stock_pick_scan_url") sql = " select * from mcms_psi_dept_batch where pid='%s';" % (
# 从message18文件中获取信息 DR_ID)
info = FileUtils().r_info8(module, "条码信息", 'message18') actual = check_mcms_dept_buy_sql(sql)
# print('info', info) print('actual', actual)
list_a = info['list_a'] batch_main_key = get_id("select id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
stockId = commonFuc().analysis_json('stockId', list_a) pid = DR_ID
stockName = commonFuc().analysis_json('stockName', list_a) # order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
areaCode = commonFuc().analysis_json('areaCode', list_a) source_detail_id = get_pick_detail_id(branch_id,type)
areaName = commonFuc().analysis_json('areaName', list_a) pick_detail_id=source_detail_id
deptId3= FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"]
targetDeptId= FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"]
deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"]
targetStockId =get_stockId(deptName+'库房',2)
request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3,areaCode, areaName, if type == 16:
targetStockId,targetDeptId) hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
print('request_body',request_body) elif type == 20:
result = commonFuc().http_post(url, request_body, headers) hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
print('退库出库扫码result',result) else:
# 获取必要信息 hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] mdm_goods_code = get_mdm_goods_code1(hos_goods_id)
goods_code = get_goods_code1(hos_goods_id)
pkg_def_id = get_pkg_def_id(hos_goods_id)
picker_name = FileUtils().r_info8("b2_herp3_bs", "用户名信息", 'message3')['username1']
picker = get_login_user_uxid_bydb(picker_name)
source_batch_id=get_id("select source_batch_id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
target_batch_id=source_batch_id
if check_batch_id(source_batch_id)==True:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
commonFuc().check_text_exist_result_text('error', 'succees')
barcode_id=get_id("select barcode_id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
if check_barcode_id(barcode_id)==True:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
commonFuc().check_text_exist_result_text('error', 'succees')
dept_name=FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3']
shelf_code= get_stockAreaId_new_fromDb(dept_name, 2)
create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
create_time = get_create_time("select create_time from mcms_psi_dept_batch where pid='%s';" % DR_ID)
last_modified = get_create_time("select last_modified from mcms_psi_dept_batch where pid='%s';" % DR_ID)
last_modified_user = create_user
if type == 16:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_batch1', batch_main_key, pid, order_no,source_detail_id
,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
last_modified_user
data1 = commonFuc().analysis_json('data', result) )
areaCode = commonFuc().analysis_json('areaCode', data1) elif type == 20:
UTid = commonFuc().analysis_json('id', data1) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
createTime = commonFuc().analysis_json('id', data1) 'mcms_psi_dept_batch2', batch_main_key, pid, order_no,source_detail_id
stockId = commonFuc().analysis_json('stockId', data1) ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
areaCode = commonFuc().analysis_json('areaCode', data1) target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
areaName = commonFuc().analysis_json('areaName', data1) last_modified_user
shelfCode = commonFuc().analysis_json('shelfCode', data1)
codeType = commonFuc().analysis_json('codeType', data1)
tagType = commonFuc().analysis_json('tagType', data1)
hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1)
mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1)
goodsCode = commonFuc().analysis_json('goodsCode', data1)
goodsDi = commonFuc().analysis_json('goodsDi', data1)
barName = commonFuc().analysis_json('barName', data1)
batchCode = commonFuc().analysis_json('batchCode', data1)
expdtDate = commonFuc().analysis_json('expdtDate', data1)
productDate = commonFuc().analysis_json('productDate', data1)
pkgCode = commonFuc().analysis_json('pkgCode', data1)
pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1)
ssccCode = commonFuc().analysis_json('ssccCode', data1)
tbStatus = commonFuc().analysis_json('tbStatus', data1)
ext = commonFuc().analysis_json('ext', data1)
distrDetailId = commonFuc().analysis_json('distrDetailId', ext)
distrBillId = commonFuc().analysis_json('distrBillId', ext)
purBillId = commonFuc().analysis_json('purBillId', ext)
pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext)
pkgDefId = commonFuc().analysis_json('pkgDefId', ext)
pkgDefName = commonFuc().analysis_json('pkgDefName', ext)
purMode = commonFuc().analysis_json('purMode', data1)
goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1)
goodsSpec = commonFuc().analysis_json('goodsSpec', data1)
unit = commonFuc().analysis_json('unit', data1)
goodsName = commonFuc().analysis_json('goodsName', data1)
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1)
pkgDefName = commonFuc().analysis_json('pkgDefName', data1)
printNum = commonFuc().analysis_json('printNum', data1)
made = commonFuc().analysis_json('made', data1)
hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1)
sourceId = commonFuc().analysis_json('sourceId', data1)
price = commonFuc().analysis_json('price', data1)
purModeText = commonFuc().analysis_json('purModeText', data1)
version = commonFuc().analysis_json('version', data1)
unitName = commonFuc().analysis_json('unitName', data1)
# ==============================获取条码信息
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
# print('info', info)
list_a = info['list_a']
extInfo = commonFuc().analysis_json('extInfo', list_a)
print('extInfo', extInfo)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime = reGetString(extInfo, r'inStockTime": "', r'",')
print('inStockTime', inStockTime)
# 从message18文件中获取信息
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"dept_stock_out_submit_url")
)
else:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_batch3_1',batch_main_key, pid, order_no,source_detail_id
,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
last_modified_user
deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] )
deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"]
stockName2 = deptName2 + "库房"
createTime = timeUtils().get_time_hms(1)
request_body = "request_body"
mgrCorpName = get_hosname()
mgrRangeId = deptid2
mgrRangeName = deptName2
extStr1 = get_branch_name()
extStr3 = get_branch_name()
snCode = UTid
userLoginCode = username
cname = username
orgCode1 = get_orgCode()
orgName1 = get_orgName()
# print(orgCode1, orgName1)
# import pdb
# pdb.set_trace()
request_body = commonFuc().get_business_data(module, "payload50_2_3", stockId, deptId3, areaCode, print('expected', expected)
areaName,targetStockId,targetDeptId, print('aaaaaaaaaaaaaaaaa')
uxid, userLoginCode, cname, get_hosid(), get_branch_id(), actual_value1 = get_process_list2(actual)
deptid1, expected_value1 = get_process_list2(expected)
orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, actual_value2 = actual_value1.replace(" ", "")
get_branch_id(), expected_value2 = expected_value1.replace(" ", "")
get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, # print('actual_value2',actual_value2)
get_hosid(), stockId,deptId3, print('expected_value2')
areaCode, areaName, targetStockId, targetDeptId, UTid,createTime,snCode, print(expected_value2)
get_hosid(), stockId, areaCode, areaName, shelfCode, print('actual_value2')
codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi, print(actual_value2)
barName, print(compare_text_index(actual_value2, expected_value2))
batchCode, expdtDate, productDate, pkgCode, pkgCodeSee, if actual_value2 == expected_value2:
ssccCode, print('ok')
tbStatus, purBillId, commonFuc().check_text_exist_result_text('succees', 'succees')
distrBillId, else:
inStockTime, distrDetailId, purMode, price, goodsMfrsName, print('error')
goodsSpec, unit, goodsName,made, unitName, commonFuc().check_text_exist_result_text('error', 'succees')
hosGoodsCode, purModeText)
print('request_body', '高值退库出库', request_body)
# import pdb
# pdb.set_trace()
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
elif type == 1:
print('低值耗材或者试剂退库出库')
udi_code = get_udi3(1) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
# print('info', info)
list_a = info['list_a']
stockId = commonFuc().analysis_json('stockId', list_a)
stockName = commonFuc().analysis_json('stockName', list_a)
areaCode = commonFuc().analysis_json('areaCode', list_a)
areaName = commonFuc().analysis_json('areaName', list_a)
deptId3 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"]
targetDeptId = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"]
deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"]
targetStockId = get_stockId(deptName + '库房', 2)
request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3, areaCode, def check_mcms_psi_dept_batch_in(DR_ID,type,order_no):
areaName, branch_id = get_branch_id()
targetStockId, targetDeptId) sql = " select * from mcms_psi_dept_batch where pid='%s';" % (
print('request_body', request_body) DR_ID)
result = commonFuc().http_post(url, request_body, headers) actual = check_mcms_dept_buy_sql(sql)
print('退库出库扫码result', result) print('actual', actual)
batch_main_key = get_id("select id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
pid = DR_ID
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
source_detail_id = get_pick_detail_id(branch_id,type)
pick_detail_id=source_detail_id
# 获取必要信息 if type == 16:
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
data1 = commonFuc().analysis_json('data', result) elif type == 20:
areaCode = commonFuc().analysis_json('areaCode', data1) hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
UTid = commonFuc().analysis_json('id', data1) else:
createTime = commonFuc().analysis_json('id', data1) hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
stockId = commonFuc().analysis_json('stockId', data1) mdm_goods_code = get_mdm_goods_code1(hos_goods_id)
areaCode = commonFuc().analysis_json('areaCode', data1) goods_code = get_goods_code1(hos_goods_id)
areaName = commonFuc().analysis_json('areaName', data1) pkg_def_id = get_pkg_def_id(hos_goods_id)
shelfCode = commonFuc().analysis_json('shelfCode', data1) picker_name = FileUtils().r_info8("b2_herp3_bs", "用户名信息", 'message3')['username1']
codeType = commonFuc().analysis_json('codeType', data1) picker = get_login_user_uxid_bydb(picker_name)
tagType = commonFuc().analysis_json('tagType', data1) source_batch_id=get_id("select source_batch_id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1) target_batch_id=source_batch_id
mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) if check_batch_id(source_batch_id)==True:
goodsCode = commonFuc().analysis_json('goodsCode', data1) print('ok')
goodsDi = commonFuc().analysis_json('goodsDi', data1) commonFuc().check_text_exist_result_text('succees', 'succees')
barName = commonFuc().analysis_json('barName', data1) else:
batchCode = commonFuc().analysis_json('batchCode', data1) commonFuc().check_text_exist_result_text('error', 'succees')
expdtDate = commonFuc().analysis_json('expdtDate', data1) barcode_id=get_id("select barcode_id from mcms_psi_dept_batch where pid='%s';" % DR_ID)
productDate = commonFuc().analysis_json('productDate', data1) if check_barcode_id(barcode_id)==True:
pkgCode = commonFuc().analysis_json('pkgCode', data1) print('ok')
pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1) commonFuc().check_text_exist_result_text('succees', 'succees')
ssccCode = commonFuc().analysis_json('ssccCode', data1) else:
tbStatus = commonFuc().analysis_json('tbStatus', data1) commonFuc().check_text_exist_result_text('error', 'succees')
ext = commonFuc().analysis_json('ext', data1) dept_name=FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3']
distrDetailId = commonFuc().analysis_json('distrDetailId', ext) shelf_code= get_stockAreaId_new_fromDb(dept_name, 2)
distrBillId = commonFuc().analysis_json('distrBillId', ext) create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
purBillId = commonFuc().analysis_json('purBillId', ext) create_time = get_create_time("select create_time from mcms_psi_dept_batch where pid='%s';" % DR_ID)
pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext) last_modified = get_create_time("select last_modified from mcms_psi_dept_batch where pid='%s';" % DR_ID)
pkgDefId = commonFuc().analysis_json('pkgDefId', ext) last_modified_user = create_user
pkgDefName = commonFuc().analysis_json('pkgDefName', ext) if type == 16:
purMode = commonFuc().analysis_json('purMode', data1) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) 'mcms_psi_dept_batch1', batch_main_key, pid, order_no,source_detail_id
goodsSpec = commonFuc().analysis_json('goodsSpec', data1) ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
unit = commonFuc().analysis_json('unit', data1) target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
goodsName = commonFuc().analysis_json('goodsName', data1) last_modified_user
pkgDefId = commonFuc().analysis_json('pkgDefId', data1)
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1)
pkgDefName = commonFuc().analysis_json('pkgDefName', data1)
printNum = commonFuc().analysis_json('printNum', data1)
made = commonFuc().analysis_json('made', data1)
hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1)
sourceId = commonFuc().analysis_json('sourceId', data1)
price = commonFuc().analysis_json('price', data1)
purModeText = commonFuc().analysis_json('purModeText', data1)
version = commonFuc().analysis_json('version', data1)
unitName = commonFuc().analysis_json('unitName', data1)
# ==============================获取条码信息
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
# print('info', info)
list_a = info['list_a']
extInfo = commonFuc().analysis_json('extInfo', list_a)
print('extInfo', extInfo)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime = reGetString(extInfo, 'inStockTime\"\: \"', '\"\, \"distrDetailId')
print('inStockTime', inStockTime)
# 从message18文件中获取信息
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"dept_stock_out_submit_url")
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] )
deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] elif type == 20:
deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
stockName2 = deptName2 + "库房" 'mcms_psi_dept_batch2', batch_main_key, pid, order_no,source_detail_id
createTime = timeUtils().get_time_hms(1) ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
request_body = "request_body" target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
mgrCorpName = get_hosname() last_modified_user
mgrRangeId = deptid2
mgrRangeName = deptName2
extStr1 = get_branch_name()
extStr3 = get_branch_name()
snCode = UTid
userLoginCode = username
cname = username
orgCode1 = get_orgCode()
orgName1 = get_orgName()
request_body = commonFuc().get_business_data(module, "payload50_2_4", stockId, deptId3, areaCode, )
areaName,targetStockId,targetDeptId, else:
uxid, userLoginCode, cname, get_hosid(), get_branch_id(), expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
deptid1, 'mcms_psi_dept_batch3_1',batch_main_key, pid, order_no,source_detail_id
orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, ,pick_detail_id,hos_goods_id,mdm_goods_code,goods_code,source_batch_id,
get_branch_id(), target_batch_id,barcode_id,shelf_code,create_user,create_time,last_modified,
get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, last_modified_user
get_hosid(), stockId,deptId3,
areaCode, areaName, targetStockId, targetDeptId, UTid,createTime,snCode,
get_hosid(), stockId, areaCode, areaName, shelfCode,
codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi,
barName,
batchCode, expdtDate, productDate, pkgCode, pkgCodeSee,
ssccCode,
tbStatus, pkgDefId,purBillId,
distrBillId,
inStockTime, distrDetailId,purMode, price, goodsMfrsName,
goodsSpec, unit, goodsName,pkgDefId,pkgDefName,made, unitName,
hosGoodsCode, purModeText)
print('request_body', request_body) )
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('低值产品退库出库,result', result)
elif type == 3:
print('试剂产品退库出库')
udi_code = get_udi3(3) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
# print('info', info)
list_a = info['list_a']
stockId = commonFuc().analysis_json('stockId', list_a)
stockName = commonFuc().analysis_json('stockName', list_a)
areaCode = commonFuc().analysis_json('areaCode', list_a)
areaName = commonFuc().analysis_json('areaName', list_a)
deptId3 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid3"]
targetDeptId = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"]
deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"]
targetStockId = get_stockId(deptName + '库房', 2)
request_body = commonFuc().get_business_data(module, "payload65", udi_code, stockId, deptId3, areaCode, print('expected', expected)
areaName, print('aaaaaaaaaaaaaaaaa')
targetStockId, targetDeptId) actual_value1 = get_process_list2(actual)
print('request_body', request_body) expected_value1 = get_process_list2(expected)
result = commonFuc().http_post(url, request_body, headers) actual_value2 = actual_value1.replace(" ", "")
print('退库出库扫码result', result) expected_value2 = expected_value1.replace(" ", "")
# print('actual_value2',actual_value2)
print('expected_value2')
print(expected_value2)
print('actual_value2')
print(actual_value2)
print(compare_text_index(actual_value2, expected_value2))
if actual_value2 == expected_value2:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
# 获取必要信息 def check_mcms_psi_dept_in(type1=16):
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] branch_id = get_branch_id()
data1 = commonFuc().analysis_json('data', result) sql = " select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_LYTK' order by CREATE_TIME desc LIMIT 1;" % (
areaCode = commonFuc().analysis_json('areaCode', data1) branch_id, type1)
UTid = commonFuc().analysis_json('id', data1) actual = check_mcms_dept_buy_sql(sql)
createTime = commonFuc().analysis_json('id', data1) print(actual)
stockId = commonFuc().analysis_json('stockId', data1) DR_ID=get_id(" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_LYTK' order by CREATE_TIME desc LIMIT 1;" % (
areaCode = commonFuc().analysis_json('areaCode', data1) branch_id, type1))
areaName = commonFuc().analysis_json('areaName', data1) sql = "select order_no from mcms_psi_dept where id='%s';" % DR_ID
shelfCode = commonFuc().analysis_json('shelfCode', data1) order_no = get_id(sql)
codeType = commonFuc().analysis_json('codeType', data1) target_corp_id = get_hosid()
tagType = commonFuc().analysis_json('tagType', data1) target_branch_id = get_branch_id()
hosGoodsId = commonFuc().analysis_json('hosGoodsId', data1) target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
mdmGoodsCode = commonFuc().analysis_json('mdmGoodsCode', data1) target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
goodsCode = commonFuc().analysis_json('goodsCode', data1) target_stock_id = get_stockId_fromdb(target_dept_name + '库房')
goodsDi = commonFuc().analysis_json('goodsDi', data1) target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 2)
barName = commonFuc().analysis_json('barName', data1) PICK_id = get_PICK_id(branch_id, type1)
batchCode = commonFuc().analysis_json('batchCode', data1) source_id = PICK_id
expdtDate = commonFuc().analysis_json('expdtDate', data1) source_corp_id = get_hosid()
productDate = commonFuc().analysis_json('productDate', data1) source_branch_id = get_branch_id()
pkgCode = commonFuc().analysis_json('pkgCode', data1) source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3']
pkgCodeSee = commonFuc().analysis_json('pkgCodeSee', data1) source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3']
ssccCode = commonFuc().analysis_json('ssccCode', data1) source_stock_id = get_stockId_fromdb(source_dept_name + '库房')
tbStatus = commonFuc().analysis_json('tbStatus', data1) source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 2)
ext = commonFuc().analysis_json('ext', data1) buyBillId = get_buyBillId(branch_id, type1)
distrDetailId = commonFuc().analysis_json('distrDetailId', ext) pickOrderNo = get_PICK_order_no(branch_id, type1)
distrBillId = commonFuc().analysis_json('distrBillId', ext) buyOrderNo = get_buyOrderNo(branch_id, type1)
purBillId = commonFuc().analysis_json('purBillId', ext) pickBillId = get_PICK_id(branch_id, type1)
pkgDefQty = commonFuc().analysis_json('pkgDefQty', ext) psiDeptOutBillId = DR_ID
pkgDefId = commonFuc().analysis_json('pkgDefId', ext) psiDeptOutOrderNo = order_no
pkgDefName = commonFuc().analysis_json('pkgDefName', ext) create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
purMode = commonFuc().analysis_json('purMode', data1) create_time = get_create_time("select create_time from mcms_psi_dept where id='%s';" % DR_ID)
goodsMfrsName = commonFuc().analysis_json('goodsMfrsName', data1) last_modified = get_create_time("select last_modified from mcms_psi_dept where id='%s';" % DR_ID)
goodsSpec = commonFuc().analysis_json('goodsSpec', data1) last_modified_user = create_user
unit = commonFuc().analysis_json('unit', data1) accounter=create_user
goodsName = commonFuc().analysis_json('goodsName', data1) account_date = process_tuple(get_create_time("select account_date from mcms_psi_dept where id='%s';" % DR_ID))
pkgDefId = commonFuc().analysis_json('pkgDefId', data1) if type1 == 16:
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1) # 子表检查
pkgDefName = commonFuc().analysis_json('pkgDefName', data1) check_mcms_psi_dept_batch_in(DR_ID,type1,order_no)
printNum = commonFuc().analysis_json('printNum', data1) target_area_code = None
made = commonFuc().analysis_json('made', data1) accounter = None
hosGoodsCode = commonFuc().analysis_json('hosGoodsCode', data1) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
sourceId = commonFuc().analysis_json('sourceId', data1) 'mcms_psi_dept_tkck1', DR_ID, order_no, target_corp_id, target_branch_id,
price = commonFuc().analysis_json('price', data1) target_dept_id, target_dept_name, target_stock_id
purModeText = commonFuc().analysis_json('purModeText', data1) , target_area_code, source_id, source_corp_id, source_branch_id,
version = commonFuc().analysis_json('version', data1) source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
unitName = commonFuc().analysis_json('unitName', data1) pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
# ==============================获取条码信息 , create_user, create_time, last_modified, last_modified_user
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
# print('info', info)
list_a = info['list_a']
extInfo = commonFuc().analysis_json('extInfo', list_a)
print('extInfo', extInfo)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime = reGetString(extInfo, 'inStockTime\"\: \"', '\"\, \"distrDetailId')
print('inStockTime', inStockTime)
# 从message18文件中获取信息
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"dept_stock_out_submit_url")
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"] )
deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"] elif type1 == 20:
deptName2 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"] # 子表检查
stockName2 = deptName2 + "库房" check_mcms_psi_dept_batch_in(DR_ID,type1,order_no)
createTime = timeUtils().get_time_hms(1) target_area_code=None
request_body = "request_body" accounter=None
mgrCorpName = get_hosname() expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
mgrRangeId = deptid2 'mcms_psi_dept_tkck2', DR_ID, order_no, target_corp_id, target_branch_id,
mgrRangeName = deptName2 target_dept_id, target_dept_name, target_stock_id
extStr1 = get_branch_name() , target_area_code, source_id, source_corp_id, source_branch_id,
extStr3 = get_branch_name() source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
snCode = UTid pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
userLoginCode = username , create_user, create_time, last_modified, last_modified_user)
cname = username else:
orgCode1 = get_orgCode() # 子表检查
orgName1 = get_orgName() check_mcms_psi_dept_batch_in(DR_ID, type1, order_no)
target_area_code = None
request_body = commonFuc().get_business_data(module, "payload50_2_4", stockId, deptId3, areaCode, accounter = None
areaName, targetStockId, targetDeptId, expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
uxid, userLoginCode, cname, get_hosid(), get_branch_id(), 'mcms_psi_dept_tkck3', DR_ID, order_no, target_corp_id, target_branch_id,
deptid1, target_dept_id, target_dept_name, target_stock_id
orgCode1, orgName1, get_hosid(), get_hosid(), mgrCorpName, , target_area_code, source_id, source_corp_id, source_branch_id,
get_branch_id(), source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
get_branch_name(), mgrRangeId, mgrRangeName, extStr1, extStr3, pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo
get_hosid(), stockId, deptId3, , create_user, create_time, last_modified, last_modified_user
areaCode, areaName, targetStockId, targetDeptId, UTid, createTime,
snCode,
get_hosid(), stockId, areaCode, areaName, shelfCode,
codeType, hosGoodsId, mdmGoodsCode, goodsCode, goodsDi,
barName,
batchCode, expdtDate, productDate, pkgCode, pkgCodeSee,
ssccCode,
tbStatus, pkgDefId, purBillId,
distrBillId,
inStockTime, distrDetailId, purMode, price, goodsMfrsName,
goodsSpec, unit, goodsName, pkgDefId, pkgDefName, made, unitName,
hosGoodsCode, purModeText)
print('request_body', request_body)
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('试剂产品退库出库,result', result)
)
print('expected', expected)
print('aaaaaaaaaaaaaaaaa')
actual_value1 = get_process_list2(actual)
expected_value1 = get_process_list2(expected)
actual_value2 = actual_value1.replace(" ", "")
expected_value2 = expected_value1.replace(" ", "")
# print('actual_value2',actual_value2)
print('expected_value2')
print(expected_value2)
print('actual_value2')
print(actual_value2)
print(compare_text_index(actual_value2, expected_value2))
if actual_value2 == expected_value2:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
pro_path = commonFuc().get_pro_path2()
print('pro_path', pro_path)
sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b8流程十五退库业务_三级库向二级库退库.air')
using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b8流程十五退库业务_三级库向二级库退库.air')
from a_b8流程十五退库业务_三级库向二级库退库 import second_dept_return_Out_Stock
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库 # updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库
second_dept_return_Out_Stock(2) # 高值耗材退货出库 # second_dept_return_Out_Stock(2) # 高值耗材退货出库
second_dept_return_Out_Stock(1) # 低值耗材退货出库 # time.sleep(6)
second_dept_return_Out_Stock(3) # 试剂耗材退货出库 # check_mcms_psi_dept_out(20)#检查出库单(包括主表和子表)
second_dept_one_key_in(2) # time.sleep(6)
second_dept_one_key_in(2) # second_dept_return_Out_Stock(1) # 低值耗材退货出库
second_dept_one_key_in(2) # time.sleep(6)
# check_mcms_psi_dept_out(16) # 检查出库单(包括主表和子表)
# second_dept_return_Out_Stock(3) # 试剂耗材退货出库
# check_mcms_psi_dept_out(66) # 检查出库单(包括主表和子表)
# second_dept_one_key_in(2)
# second_dept_one_key_in(2)
# second_dept_one_key_in(2)
check_mcms_psi_dept_in(16) # 检查入库单(包括主表和子表)
check_mcms_psi_dept_in(20) # 检查入库单(包括主表和子表)
check_mcms_psi_dept_in(66) # 检查入库单(包括主表和子表)
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except: except Exception as e:
commonFuc().check_text_exist_result_text('error', '1') # 打印错误信息
print(f"发生错误: {e}")
commonFuc().check_text_exist_result_text('error', 'SUCCESS')
...@@ -569,5 +569,7 @@ try: ...@@ -569,5 +569,7 @@ try:
putaway()#中心库上架 putaway()#中心库上架
# ===============上面调通了================================ # ===============上面调通了================================
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except: except Exception as e:
commonFuc().check_text_exist_result_text('error', '1') # 打印错误信息
print(f"发生错误: {e}")
commonFuc().check_text_exist_result_text('error', 'SUCCESS')
\ No newline at end of file
...@@ -633,5 +633,7 @@ try: ...@@ -633,5 +633,7 @@ try:
second_center_Stock_return_Out(1) #低值耗材退货出库 second_center_Stock_return_Out(1) #低值耗材退货出库
second_center_Stock_return_Out(3) #试剂耗材退货出库 second_center_Stock_return_Out(3) #试剂耗材退货出库
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except: except Exception as e:
commonFuc().check_text_exist_result_text('error', '1') # 打印错误信息
print(f"发生错误: {e}")
commonFuc().check_text_exist_result_text('error', 'SUCCESS')
\ No newline at end of file
...@@ -369,5 +369,7 @@ try: ...@@ -369,5 +369,7 @@ try:
center_Stock_unpack(1) # 低值耗材扫码发放 center_Stock_unpack(1) # 低值耗材扫码发放
center_Stock_unpack(3) # 试剂耗材扫码发放 center_Stock_unpack(3) # 试剂耗材扫码发放
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except: except Exception as e:
commonFuc().check_text_exist_result_text('error', '1') # 打印错误信息
print(f"发生错误: {e}")
commonFuc().check_text_exist_result_text('error', 'SUCCESS')
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"upCompanyList_url": "/api/mdmService/mdmCompany/upCompanyList" "upCompanyList_url": "/api/mdmService/mdmCompany/upCompanyList"
"auditCompanyRegistBill_url": "/api/mdmService/companyRegistBill/auditCompanyRegistBill" "auditCompanyRegistBill_url": "/api/mdmService/companyRegistBill/auditCompanyRegistBill"
"updateByIdCompanyRegistBill_url": "/api/mdmService/companyRegistBill/updateById/" "updateByIdCompanyRegistBill_url": "/api/mdmService/companyRegistBill/updateById/"
"username": "test001" "username": "test_1"
"password": "1qaz!QAZ" "password": "1qaz!QAZ"
json_contentType: "application/json" json_contentType: "application/json"
......
"username": "test001" "username": "test_1"
"password": "a123456!" "password": "a123456!"
"password1": "1qaz!QAZ" "password1": "1qaz!QAZ"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"hdiFusion_getGoodsinfoAndDiLst_url": "/api/hdiFusion/supplyProvHosGoods/getGoodsinfoAndDiLst" "hdiFusion_getGoodsinfoAndDiLst_url": "/api/hdiFusion/supplyProvHosGoods/getGoodsinfoAndDiLst"
"hdiFusion_supplyProvHosGoods_add_url": "/api/hdiFusion/supplyProvHosGoods/add" "hdiFusion_supplyProvHosGoods_add_url": "/api/hdiFusion/supplyProvHosGoods/add"
"username": "test001" "username": "test_1"
"password": "a123456!" "password": "a123456!"
"password1": "1qaz!QAZ" "password1": "1qaz!QAZ"
json_contentType: "application/json" json_contentType: "application/json"
......
验收单号: 验收单号:
CHECK_NO1: CHECKh03472024080600063 CHECK_NO1: CHECKh03472024080600071
CHECK_NO2: CHECKh03472024080600063 CHECK_NO2: CHECKh03472024080600071
条码信息: 条码信息:
list_a: list_a:
- &id001 - &id001
id: '100000142024080600000644' id: '100000142024080600000751'
snCode: '100000142024080600000644' snCode: '100000142024080600000751'
ssccCode: '010839000192073021' ssccCode: '010839000192083723'
pkgCodeSee: '0101123456789012112408061725021210222241100000142024080600000644' pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000751'
hosGoodsId: h034700004777 hosGoodsId: h034700004779
hosGoodsCode: '00004777' hosGoodsCode: '00004779'
goodsCode: '00004777' goodsCode: '00004779'
goodsName: 高值牙钻机KqoFI goodsName: 新型冠状病毒检测试剂nDxo8
goodsSpec: G-31891 goodsSpec: G-31891
goodsMfrsName: 德国歌德公司 Geuder AG goodsMfrsName: 德国歌德公司 Geuder AG
unit: unit:
purMode: 20 purMode: 60
batchCode: '222' batchCode: '4444'
productDate: '2024-08-06' productDate: '2024-08-06'
expdtDate: '2025-02-12' expdtDate: '2025-02-12'
pkgDefName: pkgDefName: '100'
pkgDefQty: 1.0 pkgDefQty: 100.0
stockId: 620d61c8ac054331b669e7a979d93dba stockId: 1a570b65b3724d4c98db2a8a4163cd1c
stockName: 级检验科002库房 stockName: 级检测组003库房
areaName: 默认库区 areaName: 默认库区
areaCode: areah03472820 areaCode: areah03472821
lockStatus: 0 lockStatus: 0
unitName: 1 unitName: 100支/100
shelfCode: areah03472820-A-01-01 shelfCode: areah03472821-A-01-01
shelfNo: A01-A-01-01 shelfNo: A01-A-01-01
pkgDefId: pkgDefId: 75012af7fbea44af9dd050857dac199f
extInfo: '{"pkgDefQty": 1, "purBillId": "CG2024080622676", "distrBillId": "PSh0347202408060024", extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId":
"inStockTime": "2024-08-06 16:07:37", "useFrequency": 1, "distrDetailId": "03840787", "CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025",
"certificateCode": "", "multiChargeFlag": 0}' "inStockTime": "2024-08-07 14:22:47", "distrDetailId": "03840788", "certificateCode":
""}'
bottleId: bottleId:
pkgType: '20' pkgType: '66'
miDjmc: '' miDjmc: ''
miCode: '' miCode: ''
transferRatio: 1.0 transferRatio: 1.0
...@@ -40,13 +41,13 @@ ...@@ -40,13 +41,13 @@
shelfKindName: 普通货位 shelfKindName: 普通货位
provName: 国药集团公司uAfpK provName: 国药集团公司uAfpK
provId: p1e386 provId: p1e386
inStockDate: '2024-08-06 16:07:37' inStockDate: '2024-08-07 14:22:47'
mfrCode: mfrCode:
made: 德国 made: 德国
price: price:
barName: 1 barName: 100支/100
purModeText: 高值耗材 purModeText: 检验试剂
codeType: 20 codeType: 66
list_b: list_b:
- *id001 - *id001
list_c: list_c:
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
pkgDefName: '100' pkgDefName: '100'
pkgDefQty: 100.0 pkgDefQty: 100.0
pkgQty: pkgQty:
qty: 1100.0 qty: 1300.0
goodsImg: [] goodsImg: []
pkgDefId: 75012af7fbea44af9dd050857dac199f pkgDefId: 75012af7fbea44af9dd050857dac199f
buyPkgQty: buyPkgQty:
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
targetStockName: 东土城路院区l7B8J中心库房 targetStockName: 东土城路院区l7B8J中心库房
purchaseFlag: 1 purchaseFlag: 1
tempFlag: 0 tempFlag: 0
grantWay: 3 grantWay: 1
deptGoodsStatus: deptGoodsStatus:
codingType: 0 codingType: 0
purModeText: 检验试剂 purModeText: 检验试剂
......
...@@ -171,7 +171,21 @@ ...@@ -171,7 +171,21 @@
#消耗出库子表 #消耗出库子表
"mcms_psi_dept_batch_xhck1": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": %s, "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' "mcms_psi_dept_batch_xhck1": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": %s, "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_xhck2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' "mcms_psi_dept_batch_xhck2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_xhck3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' "mcms_psi_dept_batch_xhck3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": %s, "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
#消耗出库主表 #消耗出库主表
"mcms_psi_dept_out_xhck1": '{"id":"%s","order_no":"%s","bill_mode":"10","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":1,"patient_id":"","patient_name":"","machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}' "mcms_psi_dept_out_xhck1": '{"id":"%s","order_no":"%s","bill_mode":"10","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":1,"patient_id":"","patient_name":"","machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept_out_xhck2": '{"id":"%s","order_no":"%s","bill_mode":"67","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":21,"patient_id":"","patient_name":"","machine_id":"","machine_name":"","his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept_out_xhrk1": '{"id":"%s","order_no":"%s","bill_mode":"10","rec_type":"YND","psi_flag":1,"psi_kind":"108","stock_kind":"RK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":%s,"source_area_name":null,"consume_type":1,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept_out_xhrk2": '{"id":"%s","order_no":"%s","bill_mode":"67","rec_type":"YND","psi_flag":1,"psi_kind":"108","stock_kind":"RK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":%s,"source_area_name":null,"consume_type":1,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
#消耗入库子表
"mcms_psi_dept_batch_xhrk1": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": %s, "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}'
"mcms_psi_dept_batch_xhrk2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": %s, "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": %s, "version": 0}'
#三级科室退库出库主表
"mcms_psi_dept_tkck1": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":%s,"target_area_name":null,"source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}'
"mcms_psi_dept_tkck2": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":%s,"target_area_name":null,"source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}'
"mcms_psi_dept_tkck3": '{"id":"%s","order_no":"%s","bill_mode":"66","rec_type":"YND","psi_flag":-1,"psi_kind":"208","stock_kind":"CK_LYTK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":%s,"target_area_name":null,"source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":"","tb_status":20,"accounter":%s,"account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":0}'
...@@ -84,19 +84,19 @@ def main_text(): ...@@ -84,19 +84,19 @@ def main_text():
# sys.exit(0) # sys.exit(0)
def flow4(): def flow4():
# execute_command("python runner_test.py tag id2302-4 debug mdm3") # execute_command("python runner_test.py tag id2302-4 debug mdm3")
# from execute import flow4 from execute import flow4
# flow4() flow4()
sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') # sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air')
using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air') # using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air')
from a_a4_流程四_基础模块设置 import test1,test2,dept_query_all,grants_user,set_dept_lead1,add_StockArea,recover_dataFile # from a_a4_流程四_基础模块设置 import test1,test2,dept_query_all,grants_user,set_dept_lead1,add_StockArea,recover_dataFile
test1(2) # 参数2是新增院区后缀为6位数的参数1是老模式 # test1(2) # 参数2是新增院区后缀为6位数的参数1是老模式
test2() # 科室添加产品信息(产品是从外网同步过来的) # test2() # 科室添加产品信息(产品是从外网同步过来的)
dept_query_all() # 科室查询,将科室id写入文件中 # dept_query_all() # 科室查询,将科室id写入文件中
grants_user() # 给用户授权 # grants_user() # 给用户授权
set_dept_lead1() # 设置一级科室负责人 # set_dept_lead1() # 设置一级科室负责人
add_StockArea() # 添加库区 # add_StockArea() # 添加库区
recover_dataFile()#恢复备份的data目录 # recover_dataFile()#恢复备份的data目录
commonFuc().check_text_exist_result_text('succees', 'succees') # commonFuc().check_text_exist_result_text('succees', 'succees')
print('流程4执行完毕') print('流程4执行完毕')
# sys.exit(0) # sys.exit(0)
def flow5(): def flow5():
...@@ -272,7 +272,7 @@ def main_text(): ...@@ -272,7 +272,7 @@ def main_text():
Button(root, text='流程一\n外网企业注册审批', width=16, height=8,command=flow1).grid(row=2,column=0) 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) Button(root, text='流程二\n供货关系申请审批', anchor='center', width=16, height=8,command=flow2).grid(row=2,column=2)
Button(root, text='流程三\n流程三_产品导\n入和审批', anchor='center', width=16, height=8,command=flow3).grid(row=2,column=4) Button(root, text='流程三\n流程三_产品导\n入和审批', anchor='center', width=16, height=8,command=flow3).grid(row=2,column=4)
Button(root, text='流程\n内网基础模块设置', anchor='center', width=16, height=8,command=flow4).grid(row=2,column=6) Button(root, text='流程\n内网基础模块设置', anchor='center', width=16, height=8,command=flow4).grid(row=2,column=6)
Button(root, text='流程五\n中心库入库正结算\n开票', anchor='center', width=16, height=8,command=flow5).grid(row=2,column=8) Button(root, text='流程五\n中心库入库正结算\n开票', anchor='center', width=16, height=8,command=flow5).grid(row=2,column=8)
Button(root, text='流程六\n中心库入库负结算', anchor='center', width=16, height=8,command=flow6).grid(row=2,column=10) Button(root, text='流程六\n中心库入库负结算', anchor='center', width=16, height=8,command=flow6).grid(row=2,column=10)
Button(root, text='流程七\n中心库入库正负结算', anchor='center', width=16, height=8,command=flow7).grid(row=3,column=0) Button(root, text='流程七\n中心库入库正负结算', anchor='center', width=16, height=8,command=flow7).grid(row=3,column=0)
......
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