Commit b62f2514 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十五脚本提交

parent 8c8b3a39
......@@ -350,7 +350,6 @@ def check_mcms_psi_dept_in(type1=16):
source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo
, create_user, create_time, last_modified, last_modified_user
)
else:
# 子表检查
......@@ -362,7 +361,6 @@ def check_mcms_psi_dept_in(type1=16):
source_dept_id, source_dept_name, source_stock_id, source_area_code,accounter,account_date,
pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo,psiDeptInBillId,psiDeptInOrderNo
, create_user, create_time, last_modified, last_modified_user
)
print('expected', expected)
print('aaaaaaaaaaaaaaaaa')
......
......@@ -38,14 +38,14 @@ def check_mcms_psi_dept_out(type1=16):
target_branch_id = get_branch_id()
target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid1']
target_stock_id = get_stockId_fromdb(target_dept_name + '库房')
target_stock_id = get_stockId_fromdb(get_branch_name() + '中心库房')
target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 1)
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_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
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)
......@@ -66,7 +66,7 @@ def check_mcms_psi_dept_out(type1=16):
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,
'mcms_psi_dept_tkck1_1', 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,
......@@ -80,7 +80,7 @@ def check_mcms_psi_dept_out(type1=16):
target_area_code=None
accounter=None
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept_tkck2', DR_ID, order_no, target_corp_id, target_branch_id,
'mcms_psi_dept_tkck1_2', 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,
......@@ -92,7 +92,7 @@ def check_mcms_psi_dept_out(type1=16):
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,
'mcms_psi_dept_tkck1_3', 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,
......@@ -154,7 +154,7 @@ def check_mcms_psi_dept_batch(DR_ID,type,order_no):
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']
dept_name=FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
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)
......@@ -214,9 +214,9 @@ from a_b9流程十六退库业务_二级库向一级库退库 import second_dept
try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
second_dept_return_Out_Stock(2)#高值耗材退货出库
check_mcms_psi_dept_out(16)#检查出库单数据库数据
# updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
# second_dept_return_Out_Stock(2)#高值耗材退货出库
check_mcms_psi_dept_out(20)#检查出库单数据库数据
approval_center()#审批
putaway()#中心库上架
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2))#设置登录账号默认权限是二级库
......
......@@ -199,3 +199,8 @@
"mcms_psi_dept_tkrk1": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":1,"psi_kind":"109","stock_kind":"RK_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":"默认库区","source_id":"%s","source_no":"%s","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":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%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_tkrk2": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":1,"psi_kind":"109","stock_kind":"RK_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":"默认库区","source_id":"%s","source_no":"%s","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":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%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_tkrk3": '{"id":"%s","order_no":"%s","bill_mode":"66","rec_type":"YND","psi_flag":1,"psi_kind":"109","stock_kind":"RK_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":"默认库区","source_id":"%s","source_no":"%s","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":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%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_tkck1_1": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","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":10,"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":null}'
"mcms_psi_dept_tkck1_2": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","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":10,"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":null}'
"mcms_psi_dept_tkck1_3": '{"id":"%s","order_no":"%s","bill_mode":"66","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","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":10,"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":null}'
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