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
47a97abc
Commit
47a97abc
authored
Sep 13, 2024
by
xiao-hesheng
Browse files
流程八脚本提交
parent
d1e2a9d6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程_数据库验证.air/a_b1流程八_高值跟台业务流程_数据库验证.py
View file @
47a97abc
This diff is collapsed.
Click to expand it.
common/db/sql/sql_tools.py
View file @
47a97abc
...
@@ -438,6 +438,31 @@ def get_PICK_id(branch_id, bill_mode):
...
@@ -438,6 +438,31 @@ def get_PICK_id(branch_id, bill_mode):
print
(
sql
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_PICK_id_KS_XH
(
branch_id
,
bill_mode
):
sql
=
"select id from mcms_pick where branch_id='%s' and bill_mode='%s' and pick_type='KS_XH' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
bill_mode
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_pick_detail_id_KS_XH
(
branch_id
,
bill_mode
):
main_id
=
get_PICK_id_KS_XH
(
branch_id
,
bill_mode
)
sql
=
"select id from mcms_pick_detail where pid='%s';"
%
(
main_id
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_PICK_id_KS_TK
(
branch_id
,
bill_mode
):
sql
=
"select id from mcms_pick where branch_id='%s' and bill_mode='%s' and pick_type='KS_TK' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
bill_mode
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_pick_detail_id_KS_TK
(
branch_id
,
bill_mode
):
main_id
=
get_PICK_id_KS_TK
(
branch_id
,
bill_mode
)
sql
=
"select id from mcms_pick_detail where pid='%s';"
%
(
main_id
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_pick_detail_id
(
branch_id
,
bill_mode
):
def
get_pick_detail_id
(
branch_id
,
bill_mode
):
main_id
=
get_PICK_id
(
branch_id
,
bill_mode
)
main_id
=
get_PICK_id
(
branch_id
,
bill_mode
)
...
@@ -455,6 +480,13 @@ def get_PICK_order_no(branch_id, bill_mode):
...
@@ -455,6 +480,13 @@ def get_PICK_order_no(branch_id, bill_mode):
return
process_tuple
(
get_dept_buy_id
(
sql
))
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_PICK_order_no_KS_XH
(
branch_id
,
bill_mode
):
PICK_id
=
get_PICK_id_KS_XH
(
branch_id
,
bill_mode
)
sql
=
"select order_no from mcms_pick where id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
PICK_id
)
print
(
sql
)
return
process_tuple
(
get_dept_buy_id
(
sql
))
def
get_buyBillId
(
branch_id
,
bill_mode
):
def
get_buyBillId
(
branch_id
,
bill_mode
):
sql
=
"select id from spd3_herp_test2.mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select id from spd3_herp_test2.mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
bill_mode
)
branch_id
,
bill_mode
)
...
...
data/b5_spd3_core_business_flow/message21
View file @
47a97abc
二级库请领产品信息
:
二级库请领产品信息
:
list_a
:
list_a
:
-
&id001
-
&id001
-
hosGoodsId
:
h03470000
49
07
-
hosGoodsId
:
h03470000
5
07
0
purMode
:
60
purMode
:
60
grantRule
:
grantRule
:
id
:
id
:
goodsName
:
新型冠状病毒检测试剂
C7HGi
goodsName
:
新型冠状病毒检测试剂
jGRMV
goodsSpec
:
G-31891
goodsSpec
:
G-31891
mdmGoodsCode
:
'1166
1921
'
mdmGoodsCode
:
'1166
2098
'
goodsCode
:
'0000
49
07'
goodsCode
:
'0000
5
07
0
'
unit
:
支
unit
:
支
goodsMfrsName
:
德国歌德公司 Geuder AG
goodsMfrsName
:
德国歌德公司 Geuder AG
miDjmc
:
''
miDjmc
:
''
...
@@ -16,34 +16,35 @@
...
@@ -16,34 +16,35 @@
pkgDefName
:
'100'
pkgDefName
:
'100'
pkgDefQty
:
100.0
pkgDefQty
:
100.0
pkgQty
:
pkgQty
:
qty
:
1
4
00.0
qty
:
1
0
00.0
goodsImg
:
[]
goodsImg
:
[]
pkgDefId
:
7b0c0e35ef8943abbc87ebd8540e3150
pkgDefId
:
ae9b52ae8e5b4f5aa501f8ea717180bb
buyPkgQty
:
buyPkgQty
:
unitName
:
100支/100
unitName
:
100支/100
price
:
99.9999
price
:
99.9999
hosId
:
hosId
:
branchId
:
branchId
:
deptId
:
9e693185220a45c5a9fb8328f4d45b5d
deptId
:
327ed981d695457880bc5622fa90d641
deptName
:
deptName
:
areaCode
:
areaCode
:
areaName
:
areaName
:
targetDeptId
:
0a49aab6160b4c8d98db8773eb69de05
targetDeptId
:
2c2069ed30084987b25592be25b1c1fa
targetDeptName
:
设备科001
targetDeptName
:
设备科001
targetStockId
:
4188c1ded3aa4c838904ee1cc6013645
targetStockId
:
24d5ec62951d4fe7a18bcf3c05c4af93
targetStockName
:
东土城路院区
Hyl74
中心库房
targetStockName
:
东土城路院区
E3YVe
中心库房
purchaseFlag
:
1
purchaseFlag
:
1
tempFlag
:
0
tempFlag
:
0
grantWay
:
1
grantWay
:
1
deptGoodsStatus
:
deptGoodsStatus
:
codingType
:
0
codingType
:
0
chargeFlag
:
1
purModeText
:
检验试剂
purModeText
:
检验试剂
goodsGeneralName
:
检测试剂
goodsGeneralName
:
检测试剂
goodsRegCert
:
''
goodsRegCert
:
''
applicationScope
:
applicationScope
:
provName
:
国药集团公司
lSTdZ
provName
:
国药集团公司
Dk&FX
noRecPkgQty
:
9
.0
noRecPkgQty
:
2
.0
noRecQty
:
9
00.0
noRecQty
:
2
00.0
autoUnpack
:
0
autoUnpack
:
0
consumeQty
:
consumeQty
:
consumePkgQty
:
consumePkgQty
:
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
47a97abc
...
@@ -332,3 +332,15 @@
...
@@ -332,3 +332,15 @@
"check_mcms_hos_batch_0912": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 20, "batch_price": Decimal("99.999900"), "src_batch_id": %s, "src_batch_price": Decimal("99.999900"), "settlement": 3, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 30, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "2222", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": null, "in_time": %s, "ext_info": "{"ygptCode":"","transCond":"","storageCond":"","erpCode":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}'
"check_mcms_hos_batch_0912": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "stock_id": "%s", "batch_type": 20, "batch_price": Decimal("99.999900"), "src_batch_id": %s, "src_batch_price": Decimal("99.999900"), "settlement": 3, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 30, "sub_prov_id": "%s", "sub_prov_name": "%s", "batch_code": "2222", "expdt_date": %s, "product_date": %s, "bill_type": "RK_YS", "distr_id": "%s", "distr_detail_id": "%s", "distr_price": Decimal("99.999900"), "pur_bill_id": "%s", "certificate_code": null, "in_time": %s, "ext_info": "{"ygptCode":"","transCond":"","storageCond":"","erpCode":"","contractId":"","normalContractId":"","normalDetailId":"","fcatId":"","fcatName":"","goodsKindId":"","goodsKindName":"","miTwentysevenCode":"","chargeFlag":1}", "tb_status": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None}'
#高值跟台二级库入库单主表
#高值跟台二级库入库单主表
"mcms_psi_dept_in_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": null, "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "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": "%s", "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": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
"mcms_psi_dept_in_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": null, "psi_flag": 1, "psi_kind": "102", "stock_kind": "RK_QL", "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": "%s", "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": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
#跟台消耗出库子表
"mcms_psi_dept_batch_xhck_0913": '{"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": 1, "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": 1}'
#跟台消耗出库主表
"mcms_psi_dept_out_xhck_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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":"无","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_batch_xhrk_0913": '{"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": 1, "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_xhrk_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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_0913": '{"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_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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":"自动化测试","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":null,"tb_status":40,"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":2,"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}'
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