Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
20c231ac
Commit
20c231ac
authored
Aug 07, 2024
by
xiao-hesheng
Browse files
流程十四脚本编写
parent
093a6add
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b8流程十五退库业务_三级库向二级库退库_数据库验证.air/a_b8流程十五退库业务_三级库向二级库退库_数据库验证.py
View file @
20c231ac
...
...
@@ -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'
)[
'deptid
2
'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid
2
'
]
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid
3
'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid
3
'
]
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_dept
4
'
,
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_dept
5
'
,
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_dept
6
'
,
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'
)[
'deptid
2
'
]
dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid
3
'
]
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
)
...
...
data/b5_spd3_core_business_flow/message15
View file @
20c231ac
验收单号
:
CHECK_NO1
:
CHECKh034720240806000
63
CHECK_NO2
:
CHECKh034720240806000
63
CHECK_NO1
:
CHECKh034720240806000
71
CHECK_NO2
:
CHECKh034720240806000
71
data/b5_spd3_core_business_flow/message18
View file @
20c231ac
条码信息
:
list_a
:
-
&id001
id
:
'100000142024080600000
644
'
snCode
:
'100000142024080600000
644
'
ssccCode
:
'0108390001920
73021
'
pkgCodeSee
:
'01
01123456789012
112408061725021210
222
241100000142024080600000
644
'
hosGoodsId
:
h03470000477
7
hosGoodsCode
:
'0000477
7
'
goodsCode
:
'0000477
7
'
goodsName
:
高值牙钻机KqoFI
id
:
'100000142024080600000
552
'
snCode
:
'100000142024080600000
552
'
ssccCode
:
'0108390001920
63824
'
pkgCodeSee
:
'01
37610000047780
112408061725021210
333
241100000142024080600000
552
'
hosGoodsId
:
h03470000477
8
hosGoodsCode
:
'0000477
8
'
goodsCode
:
'0000477
8
'
goodsName
:
一次性注射器_低值rFp7&
goodsSpec
:
G-31891
goodsMfrsName
:
德国歌德公司 Geuder AG
unit
:
支
purMode
:
2
0
batchCode
:
'
222
'
purMode
:
1
0
batchCode
:
'
333
'
productDate
:
'2024-08-06'
expdtDate
:
'2025-02-12'
pkgDefName
:
pkgDefQty
:
1.0
stockId
:
620d61c8ac054331b669e7a979d93dba
stockName
:
二
级检
验科
00
2
库房
pkgDefName
:
'100'
pkgDefQty
:
1
00
.0
stockId
:
1a570b65b3724d4c98db2a8a4163cd1c
stockName
:
三
级检
测组
00
3
库房
areaName
:
默认库区
areaCode
:
areah0347282
0
areaCode
:
areah0347282
1
lockStatus
:
0
unitName
:
1
支
shelfCode
:
areah0347282
0
-A-01-01
unitName
:
1
00支/100
shelfCode
:
areah0347282
1
-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-0
6
1
6:07
:3
7
'
inStockDate
:
'2024-08-0
7
1
4:22
:3
3
'
mfrCode
:
made
:
德国
price
:
barName
:
1
支
purModeText
:
高
值耗材
codeType
:
20
barName
:
1
00支/100
purModeText
:
低
值耗材
codeType
:
16
list_b
:
-
*id001
list_c
:
...
...
data/b5_spd3_core_business_flow/message21
View file @
20c231ac
...
...
@@ -16,7 +16,7 @@
pkgDefName
:
'100'
pkgDefQty
:
100.0
pkgQty
:
qty
:
1
1
00.0
qty
:
1
3
00.0
goodsImg
:
[]
pkgDefId
:
75012af7fbea44af9dd050857dac199f
buyPkgQty
:
...
...
@@ -34,7 +34,7 @@
targetStockName
:
东土城路院区l7B8J中心库房
purchaseFlag
:
1
tempFlag
:
0
grantWay
:
3
grantWay
:
1
deptGoodsStatus
:
codingType
:
0
purModeText
:
检验试剂
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
20c231ac
...
...
@@ -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}'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment