Commit 20c231ac authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十四脚本编写

parent 093a6add
......@@ -42,8 +42,8 @@ def check_mcms_psi_dept_out(type1=16):
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')['deptid2']
source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
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)
......@@ -61,8 +61,10 @@ def check_mcms_psi_dept_out(type1=16):
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_dept4', DR_ID, order_no, target_corp_id, target_branch_id,
'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,
......@@ -73,19 +75,22 @@ def check_mcms_psi_dept_out(type1=16):
elif type1 == 20:
# 子表检查
check_mcms_psi_dept_batch(DR_ID,type1,order_no)
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_ID))
target_area_code=None
accounter=None
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept5', DR_ID, order_no, target_corp_id, target_branch_id,
'mcms_psi_dept_tkck2', 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,his_charge_no,accounter,account_date,
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)
else:
# 子表检查
check_mcms_psi_dept_batch(DR_ID,type1,order_no)
check_mcms_psi_dept_batch(DR_ID, type1, order_no)
target_area_code = None
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_psi_dept6', DR_ID, order_no, target_corp_id, target_branch_id,
'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,
......@@ -148,7 +153,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')['deptid2']
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)
......@@ -206,9 +211,9 @@ from a_b8流程十五退库业务_三级库向二级库退库 import second_dept
try:
# updateUserLoginDefaultRange(get_listUserMgrRangePage1(3)) # 设置登录账号默认权限是三级库
# second_dept_return_Out_Stock(2) # 高值耗材退货出库
check_mcms_psi_dept_out(20)#检查出库单和入库单(包括主表和子表)
check_mcms_psi_dept_out(20)#检查出库单(包括主表和子表)
second_dept_return_Out_Stock(1) # 低值耗材退货出库
check_mcms_psi_dept_out(16) # 检查出库单(包括主表和子表)
second_dept_return_Out_Stock(3) # 试剂耗材退货出库
second_dept_one_key_in(2)
second_dept_one_key_in(2)
......
验收单号:
CHECK_NO1: CHECKh03472024080600063
CHECK_NO2: CHECKh03472024080600063
CHECK_NO1: CHECKh03472024080600071
CHECK_NO2: CHECKh03472024080600071
条码信息:
list_a:
- &id001
id: '100000142024080600000644'
snCode: '100000142024080600000644'
ssccCode: '010839000192073021'
pkgCodeSee: '0101123456789012112408061725021210222241100000142024080600000644'
hosGoodsId: h034700004777
hosGoodsCode: '00004777'
goodsCode: '00004777'
goodsName: 高值牙钻机KqoFI
id: '100000142024080600000552'
snCode: '100000142024080600000552'
ssccCode: '010839000192063824'
pkgCodeSee: '0137610000047780112408061725021210333241100000142024080600000552'
hosGoodsId: h034700004778
hosGoodsCode: '00004778'
goodsCode: '00004778'
goodsName: 一次性注射器_低值rFp7&
goodsSpec: G-31891
goodsMfrsName: 德国歌德公司 Geuder AG
unit:
purMode: 20
batchCode: '222'
purMode: 10
batchCode: '333'
productDate: '2024-08-06'
expdtDate: '2025-02-12'
pkgDefName:
pkgDefQty: 1.0
stockId: 620d61c8ac054331b669e7a979d93dba
stockName: 级检验科002库房
pkgDefName: '100'
pkgDefQty: 100.0
stockId: 1a570b65b3724d4c98db2a8a4163cd1c
stockName: 级检测组003库房
areaName: 默认库区
areaCode: areah03472820
areaCode: areah03472821
lockStatus: 0
unitName: 1
shelfCode: areah03472820-A-01-01
unitName: 100支/100
shelfCode: areah03472821-A-01-01
shelfNo: A01-A-01-01
pkgDefId:
extInfo: '{"pkgDefQty": 1, "purBillId": "CG2024080622676", "distrBillId": "PSh0347202408060024",
"inStockTime": "2024-08-06 16:07:37", "useFrequency": 1, "distrDetailId": "03840787",
"certificateCode": "", "multiChargeFlag": 0}'
pkgDefId: 8abd5ced93ea47728011202ccb7c2168
extInfo: '{"pkgDefId": "8abd5ced93ea47728011202ccb7c2168", "pkgDefQty": 100, "purBillId":
"CG2024080622675", "pkgDefName": "100", "distrBillId": "PSh0347202408060023",
"inStockTime": "2024-08-07 14:22:33", "distrDetailId": "03840786", "certificateCode":
""}'
bottleId:
pkgType: '20'
pkgType: '16'
miDjmc: ''
miCode: ''
transferRatio: 1.0
......@@ -40,13 +41,13 @@
shelfKindName: 普通货位
provName: 国药集团公司uAfpK
provId: p1e386
inStockDate: '2024-08-06 16:07:37'
inStockDate: '2024-08-07 14:22:33'
mfrCode:
made: 德国
price:
barName: 1
purModeText: 值耗材
codeType: 20
barName: 100支/100
purModeText: 值耗材
codeType: 16
list_b:
- *id001
list_c:
......
......@@ -16,7 +16,7 @@
pkgDefName: '100'
pkgDefQty: 100.0
pkgQty:
qty: 1100.0
qty: 1300.0
goodsImg: []
pkgDefId: 75012af7fbea44af9dd050857dac199f
buyPkgQty:
......@@ -34,7 +34,7 @@
targetStockName: 东土城路院区l7B8J中心库房
purchaseFlag: 1
tempFlag: 0
grantWay: 3
grantWay: 1
deptGoodsStatus:
codingType: 0
purModeText: 检验试剂
......
......@@ -184,3 +184,8 @@
#消耗入库子表
"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}'
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