Commit 4cdce018 authored by 肖 和生's avatar 肖 和生
Browse files

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

# Conflicts:
#	data/b5_spd3_core_business_flow/message
#	data/b5_spd3_core_business_flow/message1
#	data/b5_spd3_core_business_flow/message2
parent 139068fe
...@@ -531,6 +531,11 @@ def get_distrBillId(branch_id, bill_mode): ...@@ -531,6 +531,11 @@ def get_distrBillId(branch_id, bill_mode):
branch_id, bill_mode)) branch_id, bill_mode))
return distr_main_key return distr_main_key
def get_DRID(branch_id, bill_mode):
DRID = get_id(
"select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1" % (
branch_id, bill_mode))
return DRID
def get_distr_detail_id(branch_id, bill_mode): def get_distr_detail_id(branch_id, bill_mode):
distr_main_key = get_distrBillId(branch_id, bill_mode) distr_main_key = get_distrBillId(branch_id, bill_mode)
......
条码信息: 条码信息:
list_a: list_a:
- &id001 - &id001
id: '100000142024080600000751' id: '100000142024080600000776'
snCode: '100000142024080600000751' snCode: '100000142024080600000776'
ssccCode: '010839000192083723' ssccCode: '010839000192086229'
pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000751' pkgCodeSee: '01376100000477901124080617250212104444241100000142024080600000776'
hosGoodsId: h034700004779 hosGoodsId: h034700004779
hosGoodsCode: '00004779' hosGoodsCode: '00004779'
goodsCode: '00004779' goodsCode: '00004779'
...@@ -18,18 +18,18 @@ ...@@ -18,18 +18,18 @@
expdtDate: '2025-02-12' expdtDate: '2025-02-12'
pkgDefName: '100' pkgDefName: '100'
pkgDefQty: 100.0 pkgDefQty: 100.0
stockId: 1a570b65b3724d4c98db2a8a4163cd1c stockId: 42c24f7facba4231aeda83b1348d6d1a
stockName: 三级检测组003库房 stockName: 东土城路院区l7B8J中心库房
areaName: 默认库区 areaName: 自动化测试
areaCode: areah03472821 areaCode: areah03472822
lockStatus: 0 lockStatus: 0
unitName: 100支/100 unitName: 100支/100
shelfCode: areah03472821-A-01-01 shelfCode: areah03472822-2-01-01
shelfNo: A01-A-01-01 shelfNo: 自动化测试-2-01-01
pkgDefId: 75012af7fbea44af9dd050857dac199f pkgDefId: 75012af7fbea44af9dd050857dac199f
extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId": extInfo: '{"pkgDefId": "75012af7fbea44af9dd050857dac199f", "pkgDefQty": 100, "purBillId":
"CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025", "CG2024080622677", "pkgDefName": "100", "distrBillId": "PSh0347202408060025",
"inStockTime": "2024-08-07 14:22:47", "distrDetailId": "03840788", "certificateCode": "inStockTime": "2024-08-06 14:17:06", "distrDetailId": "03840788", "certificateCode":
""}' ""}'
bottleId: bottleId:
pkgType: '66' pkgType: '66'
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
shelfKindName: 普通货位 shelfKindName: 普通货位
provName: 国药集团公司uAfpK provName: 国药集团公司uAfpK
provId: p1e386 provId: p1e386
inStockDate: '2024-08-07 14:22:47' inStockDate:
mfrCode: mfrCode:
made: 德国 made: 德国
price: price:
......
...@@ -199,3 +199,28 @@ ...@@ -199,3 +199,28 @@
"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_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_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_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}'
#二级库退货中心库入库单
"check_mcms_psi1_1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": 1, "psi_kind": "103", "stock_kind": "RK_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": %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": "默认库区", "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi1_2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "103", "stock_kind": "RK_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": %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": "默认库区", "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi1_3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "103", "stock_kind": "RK_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": %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": "默认库区", "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
#二级库退货中心库入库单子表
"mcms_psi_batch_in1_1": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"pur_mode":10,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":%s,"version":0}'
"mcms_psi_batch_in1_2": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"pur_mode":20,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":%s,"version":0}'
"mcms_psi_batch_in1_3": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"pur_mode":60,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":%s,"version":0}'
#中心库退供应商子表
"mcms_psi_batch_out1_1": '{"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","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}'
"mcms_psi_batch_out1_2": '{"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","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}'
"mcms_psi_batch_out1_3": '{"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","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}'
#中心库退供应商主表
"check_mcms_psi_out_1_1": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": -1, "psi_kind": "299", "stock_kind": "CK_TH", "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": %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": "自动化测试", "remark": "", "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi_out_1_2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": -1, "psi_kind": "299", "stock_kind": "CK_TH", "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": %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": "自动化测试", "remark": "", "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi_out_1_3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": -1, "psi_kind": "299", "stock_kind": "CK_TH", "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": %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": "自动化测试", "remark": "", "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
...@@ -14,7 +14,7 @@ curPath = os.path.abspath(os.path.dirname(__file__)) # 获取当前文件的所 ...@@ -14,7 +14,7 @@ curPath = os.path.abspath(os.path.dirname(__file__)) # 获取当前文件的所
rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素 rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素
# print('当前项目的根目录', rootPath) # print('当前项目的根目录', rootPath)
sys.path.append(rootPath) # 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本 sys.path.append(rootPath) # 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
sys.path.append(os.path.join(rootPath,'common')) sys.path.append(os.path.join(rootPath, 'common'))
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__)) # print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
from airtest.core.helper import using from airtest.core.helper import using
...@@ -36,9 +36,12 @@ import tkinter as tk ...@@ -36,9 +36,12 @@ import tkinter as tk
from tkinter import * from tkinter import *
import tkinter.messagebox import tkinter.messagebox
from common.run_cmd_script import execute_command from common.run_cmd_script import execute_command
pro_path = commonFuc().get_pro_path2() pro_path = commonFuc().get_pro_path2()
sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/execute.air') sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/execute.air')
using(pro_path + r'//air_case/b5_spd3_core_business_flow/execute.air') using(pro_path + r'//air_case/b5_spd3_core_business_flow/execute.air')
def main_text(): def main_text():
# 创建窗口 # 创建窗口
root = tk.Tk() root = tk.Tk()
...@@ -54,8 +57,9 @@ def main_text(): ...@@ -54,8 +57,9 @@ def main_text():
y = (window_height - root.winfo_height()) // 2 y = (window_height - root.winfo_height()) // 2
# 设置窗口左上角的坐标 # 设置窗口左上角的坐标
root.geometry("+{}+{}".format(x, y)) root.geometry("+{}+{}".format(x, y))
root.title (string ="核心业务流") root.title(string="核心业务流")
root.resizable(False,False) root.resizable(False, False)
# for a in ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw']: # for a in ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw']:
# Button(root, # Button(root,
# text='anchor', # text='anchor',
...@@ -69,6 +73,7 @@ def main_text(): ...@@ -69,6 +73,7 @@ def main_text():
print('流程一执行完毕') print('流程一执行完毕')
# execute_command("python runner_test.py tag id2302-1 debug mdm3") # execute_command("python runner_test.py tag id2302-1 debug mdm3")
# sys.exit(0) # sys.exit(0)
def flow2(): def flow2():
print('调用流程二') print('调用流程二')
from execute import flow2 from execute import flow2
...@@ -76,12 +81,14 @@ def main_text(): ...@@ -76,12 +81,14 @@ def main_text():
print('流程2执行完毕') print('流程2执行完毕')
# execute_command("python runner_test.py tag id2302-2 debug mdm3") # execute_command("python runner_test.py tag id2302-2 debug mdm3")
# sys.exit(0) # sys.exit(0)
def flow3(): def flow3():
from execute import flow3 from execute import flow3
flow3() flow3()
print('流程3执行完毕') print('流程3执行完毕')
# execute_command("python runner_test.py tag id2302-3 debug mdm3") # execute_command("python runner_test.py tag id2302-3 debug mdm3")
# 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
...@@ -99,91 +106,112 @@ def main_text(): ...@@ -99,91 +106,112 @@ def main_text():
# 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():
# execute_command("python runner_test.py tag id2302-5,id2302-6,id2302-7,id2302-8 debug mdm3") # execute_command("python runner_test.py tag id2302-5,id2302-6,id2302-7,id2302-8 debug mdm3")
from execute import flow5,flow6,flow7,flow8 from execute import flow5, flow6, flow7, flow8
flow5() flow5()
flow6() flow6()
flow7() flow7()
flow8() flow8()
print('流程5执行完毕') print('流程5执行完毕')
# sys.exit(0) # sys.exit(0)
def flow6(): def flow6():
from execute import flow9 from execute import flow9
flow9() flow9()
print('流程6执行完毕') print('流程6执行完毕')
# sys.exit(0) # sys.exit(0)
def flow7(): def flow7():
print('流程七开始执行') print('流程七开始执行')
from execute import flow10 from execute import flow10
flow10() flow10()
print('流程七执行完毕') print('流程七执行完毕')
# sys.exit(0) # sys.exit(0)
def flow8(): def flow8():
from execute import flow11 from execute import flow11
flow11() flow11()
print('流程八执行完毕','流程八执行完毕 ') print('流程八执行完毕', '流程八执行完毕 ')
# sys.exit(0) # sys.exit(0)
def flow9(): def flow9():
from execute import flow12 # counts=get_input()
flow12() # print(count)
print('流程9执行完毕','流程9执行完毕') counts=6
for i in range(int(counts)):
from execute import flow12
flow12()
print('流程9执行完毕', '流程9执行完毕',i)
# sys.exit(0) # sys.exit(0)
def flow10(): def flow10():
from execute import flow13 from execute import flow13
flow13() flow13()
print('流程十执行完毕','流程十执行完毕') print('流程十执行完毕', '流程十执行完毕')
# sys.exit(0) # sys.exit(0)
def flow11(): def flow11():
from execute import flow14 from execute import flow14
flow14() flow14()
print('流程11执行完毕','flow11执行完毕') print('流程11执行完毕', 'flow11执行完毕')
# sys.exit(0) # sys.exit(0)
def flow12(): def flow12():
from execute import flow15 from execute import flow15
flow15() flow15()
print('流程12执行完毕', 'flow12执行完毕') print('流程12执行完毕', 'flow12执行完毕')
# sys.exit(0) # sys.exit(0)
def flow13(): def flow13():
from execute import flow16 from execute import flow16
flow16() flow16()
print('流程13执行完毕', 'flow13执行完毕') print('流程13执行完毕', 'flow13执行完毕')
# sys.exit(0) # sys.exit(0)
def flow14(): def flow14():
from execute import flow17 from execute import flow17
flow17() flow17()
print('流程14执行完毕', 'flow14执行完毕') print('流程14执行完毕', 'flow14执行完毕')
# sys.exit(0) # sys.exit(0)
def flow15(): def flow15():
from execute import flow18 from execute import flow18
flow18() flow18()
print('流程十五执行完毕') print('流程十五执行完毕')
# sys.exit(0) # sys.exit(0)
def flow16(): def flow16():
from execute import flow19 from execute import flow19
flow19() flow19()
print('流程十六执行完毕') print('流程十六执行完毕')
# sys.exit(0) # sys.exit(0)
def flow17(): def flow17():
from execute import flow20 from execute import flow20
flow20() flow20()
print('流程十七执行完毕') print('流程十七执行完毕')
# sys.exit(0) # sys.exit(0)
def flow18(): def flow18():
from execute import flow21 from execute import flow21
flow21() flow21()
print('流程十八执行完毕') print('流程十八执行完毕')
# sys.exit(0) # sys.exit(0)
def flow0(): def flow0():
execute_command("python runner_test.py tag id2302-23 debug mdm3") execute_command("python runner_test.py tag id2302-23 debug mdm3")
sys.exit(0) sys.exit(0)
def exit(): def exit():
print('退出') print('退出')
sys.exit(0) sys.exit(0)
def del_data(): def del_data():
# 删除自动化脚本产生的数据 # 删除自动化脚本产生的数据
result=confirm() result = confirm()
if result==True: if result == True:
result1 = confirm1() result1 = confirm1()
if result1 == True: if result1 == True:
delData().Delete_branch_by_id() delData().Delete_branch_by_id()
...@@ -197,8 +225,9 @@ def main_text(): ...@@ -197,8 +225,9 @@ def main_text():
print('===================删除垃圾数据完毕============================') print('===================删除垃圾数据完毕============================')
else: else:
print('Cancel') print('Cancel')
def flow5_flow18(): def flow5_flow18():
#脚本运行前清空所有待审批数据 # 脚本运行前清空所有待审批数据
approval_center_all() approval_center_all()
try: try:
flow5() flow5()
...@@ -221,8 +250,6 @@ def main_text(): ...@@ -221,8 +250,6 @@ def main_text():
print("发生异常:", str(e)) print("发生异常:", str(e))
traceback.print_exc() traceback.print_exc()
def flow11_flow18(): def flow11_flow18():
flow11() flow11()
flow12() flow12()
...@@ -238,13 +265,16 @@ def main_text(): ...@@ -238,13 +265,16 @@ def main_text():
# print(result) # print(result)
print("用户选择了:", "OK" if result else "Cancel") print("用户选择了:", "OK" if result else "Cancel")
return result return result
def confirm1(): def confirm1():
result = tkinter.messagebox.askokcancel("再次确认", "您确定要执行此删除操作吗?数据删除后不可逆.") result = tkinter.messagebox.askokcancel("再次确认", "您确定要执行此删除操作吗?数据删除后不可逆.")
# print(result) # print(result)
print("用户选择了:", "OK" if result else "Cancel") print("用户选择了:", "OK" if result else "Cancel")
return result return result
def download_data(): def download_data():
print('从Jenkins服务器下载data数据') print('从Jenkins服务器下载data数据')
def del_brachdata_from_brachid(): def del_brachdata_from_brachid():
import tkinter as tk import tkinter as tk
from tkinter import ttk from tkinter import ttk
...@@ -268,33 +298,48 @@ def main_text(): ...@@ -268,33 +298,48 @@ def main_text():
combo.pack() combo.pack()
root.mainloop() root.mainloop()
def get_input():
import tkinter as tk
from tkinter import simpledialog
c = 6
count = tk.simpledialog.askstring("输入循环次数", "循环次数:", initialvalue="%s" % c)
return count
# 文本显示的位置。 # 文本显示的位置。
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)
Button(root, text='流程八\n高值跟台业务', anchor='center', width=16, height=8,command=flow8).grid(row=3,column=2) Button(root, text='流程八\n高值跟台业务', anchor='center', width=16, height=8, command=flow8).grid(row=3, column=2)
Button(root, text='流程九\n请领业务二级库向\n中心库', anchor='center', width=16, height=8,command=flow9).grid(row=3,column=4) Button(root, text='流程九\n请领业务二级库向\n中心库', anchor='center', width=16, height=8, command=flow9).grid(row=3, column=4)
Button(root, text='流程十\n请领业务流_二级库\n向边仓', anchor='center', width=16, height=8,command=flow10).grid(row=3,column=6) Button(root, text='流程十\n请领业务流_二级库\n向边仓', anchor='center', width=16, height=8, command=flow10).grid(row=3, column=6)
Button(root, text='流程十一\n请领业务流_二级库\n向直送', anchor='center', width=16, height=8,command=flow11).grid(row=3,column=8) Button(root, text='流程十一\n请领业务流_二级库\n向直送', anchor='center', width=16, height=8, command=flow11).grid(row=3, column=8)
Button(root, text='流程十二\n请领业务流_二级库\n向二级库', anchor='center', width=16, height=8,command=flow12).grid(row=3,column=10) Button(root, text='流程十二\n请领业务流_二级库\n向二级库', anchor='center', width=16, height=8, command=flow12).grid(row=3,
Button(root, text='流程十三\n请领业务流_三级库\n向二级库', anchor='center', width=16, height=8,command=flow13).grid(row=4,column=0) column=10)
Button(root, text='流程十四\n退库业务消耗退库', anchor='center', width=16, height=8,command=flow14).grid(row=4,column=2) Button(root, text='流程十三\n请领业务流_三级库\n向二级库', anchor='center', width=16, height=8, command=flow13).grid(row=4,
Button(root, text='流程十五\n退库业务三级库向\n二级库退库', anchor='center', width=16, height=8,command=flow15).grid(row=4,column=4) column=0)
Button(root, text='流程十六\n退库业务_二级库向\n一级库退库', anchor='center', width=16, height=8,command=flow16).grid(row=4,column=6) Button(root, text='流程十四\n退库业务消耗退库', anchor='center', width=16, height=8, command=flow14).grid(row=4, column=2)
Button(root, text='流程十七\n退库业务_中心库退\n供应商', anchor='center', width=16, height=8,command=flow17).grid(row=4,column=8) Button(root, text='流程十五\n退库业务三级库向\n二级库退库', anchor='center', width=16, height=8, command=flow15).grid(row=4,
Button(root, text='流程十八\n中心库业务_拆包功能', anchor='center', width=16, height=8,command=flow18).grid(row=4,column=10) column=4)
Button(root, text='一键执行', anchor='center', width=8, height=2,command=flow0).grid(row=5,column=0) Button(root, text='流程十六\n退库业务_二级库向\n一级库退库', anchor='center', width=16, height=8, command=flow16).grid(row=4,
Button(root, text='删除指定\n院区数据', anchor='center', width=8, height=2,command=del_brachdata_from_brachid).grid(row=5,column=2) column=6)
Button(root, text='流程五开始\n一键执行', anchor='center', width=8, height=2,command=flow5_flow18).grid(row=5,column=4) Button(root, text='流程十七\n退库业务_中心库退\n供应商', anchor='center', width=16, height=8, command=flow17).grid(row=4, column=8)
Button(root, text='删除垃圾\n数据', anchor='center', width=8, height=2,command=del_data).grid(row=5,column=6) Button(root, text='流程十八\n中心库业务_拆包功能', anchor='center', width=16, height=8, command=flow18).grid(row=4, column=10)
Button(root, text='流程十一开始\n一键执行', anchor='center', width=8, height=2,command=flow11_flow18).grid(row=5,column=8) Button(root, text='一键执行', anchor='center', width=8, height=2, command=flow0).grid(row=5, column=0)
Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2,command=download_data).grid(row=5,column=10) Button(root, text='删除指定\n院区数据', anchor='center', width=8, height=2, command=del_brachdata_from_brachid).grid(row=5,
column=2)
Button(root, text='退 出', anchor='center', width=8, height=2,command=exit).grid(row=5,column=10) Button(root, text='流程五开始\n一键执行', anchor='center', width=8, height=2, command=flow5_flow18).grid(row=5, column=4)
Button(root, text='删除垃圾\n数据', anchor='center', width=8, height=2, command=del_data).grid(row=5, column=6)
Button(root, text='流程十一开始\n一键执行', anchor='center', width=8, height=2, command=flow11_flow18).grid(row=5, column=8)
Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2, command=download_data).grid(row=5,
column=10)
Button(root, text='退 出', anchor='center', width=8, height=2, command=exit).grid(row=5, column=10)
# Button(root, text='anchor', anchor='e', width=30, height=4).pack() # Button(root, text='anchor', anchor='e', width=30, height=4).pack()
# Button(root, text='anchor', anchor='w', width=30, height=4).pack() # Button(root, text='anchor', anchor='w', width=30, height=4).pack()
...@@ -304,4 +349,6 @@ def main_text(): ...@@ -304,4 +349,6 @@ def main_text():
# Button(root, text='anchor', anchor='sw', width=30, height=4).pack() # Button(root, text='anchor', anchor='sw', width=30, height=4).pack()
root.mainloop() root.mainloop()
main_text()
\ No newline at end of file
main_text()
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