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
e3b2d16c
Commit
e3b2d16c
authored
Sep 14, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
51935eb6
3b691846
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
e3b2d16c
...
@@ -859,7 +859,8 @@ def main():
...
@@ -859,7 +859,8 @@ def main():
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
#外网配送前再检查一下是否有单据未审批
approval_center_all
()
order_dp
(
1
)
# 1低值
order_dp
(
1
)
# 1低值
order_dp
(
2
)
# 2高值
order_dp
(
2
)
# 2高值
order_dp
(
3
)
# 3试剂
order_dp
(
3
)
# 3试剂
...
...
air_case/b6_spd3_core_business_flow_database_check/a_a5流程五_中心库入库结算_正结算1_提交采购计划_数据库验证.air/a_a5流程五_中心库入库结算_正结算1_提交采购计划_数据库验证.py
View file @
e3b2d16c
This diff is collapsed.
Click to expand it.
air_case/b6_spd3_core_business_flow_database_check/a_b0流程七_中心库入库结算_正负结算_数据库验证.air/a_b0流程七_中心库入库结算_正负结算_数据库验证.py
View file @
e3b2d16c
This diff is collapsed.
Click to expand it.
air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程_数据库验证.air/a_b1流程八_高值跟台业务流程_数据库验证.py
View file @
e3b2d16c
This diff is collapsed.
Click to expand it.
air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air/a_b4流程十一请领业务流_二级库向直送_数据库验证.py
View file @
e3b2d16c
...
@@ -2431,6 +2431,8 @@ def main():
...
@@ -2431,6 +2431,8 @@ def main():
check_mcms_purchase_out_and_in
(
1
)
#1主表
check_mcms_purchase_out_and_in
(
1
)
#1主表
print
(
'检查同步到外网的采购订单数据跟内网的是否一致'
)
print
(
'检查同步到外网的采购订单数据跟内网的是否一致'
)
check_mcms_purchase_out_and_in
(
2
)
#2子表
check_mcms_purchase_out_and_in
(
2
)
#2子表
# 外网配送前再检查一下是否有单据未审批
approval_center_all
()
order_dp
(
1
)
# 1低值 配送单发货
order_dp
(
1
)
# 1低值 配送单发货
time
.
sleep
(
6
)
time
.
sleep
(
6
)
order_dp
(
2
)
# 2高值 配送单发货
order_dp
(
2
)
# 2高值 配送单发货
...
...
air_case/demo/产品检查.air/产品检查.py
View file @
e3b2d16c
...
@@ -58,22 +58,34 @@ import sys
...
@@ -58,22 +58,34 @@ import sys
# commonFuc().check_text_exist_result_text('error', 'succees')
# commonFuc().check_text_exist_result_text('error', 'succees')
# 第二种方式=================================
# 第二种方式=================================
# 备份当前data目录
# # 备份当前data目录
pro_path
=
commonFuc
().
get_pro_path2
()
# pro_path = commonFuc().get_pro_path2()
src
=
pro_path
+
r
'/data'
# src = pro_path + r'/data'
dst
=
pro_path
+
r
'/data'
+
get_branch_name
()
+
get_branch_id
()
# dst = pro_path + r'/data' + get_branch_name()+get_branch_id()
#将备份的目录路径写入到文件中
# #将备份的目录路径写入到文件中
info
=
(
src
,
dst
)
# info = (src, dst)
titlename
=
(
'源目录'
,
'备份目录'
)
# titlename = ('源目录', '备份目录')
FileUtils
().
w_info8
(
info
,
'b5_spd3_core_business_flow'
,
'备份路径'
,
titlename
,
'message29'
)
# FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '备份路径',titlename,'message29')
#备份目录
# #备份目录
FileUtils
().
copy_folder_backup
(
src
,
dst
)
# FileUtils().copy_folder_backup(src, dst)
#
dst
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'备份路径'
,
'message29'
)[
'备份目录'
]
# dst=FileUtils().r_info8('b5_spd3_core_business_flow', '备份路径','message29')['备份目录']
#恢复目录
# #恢复目录
#先删除文件夹
# #先删除文件夹
import
shutil
,
os
# import shutil,os
if
os
.
path
.
exists
(
src
):
# if os.path.exists(src):
shutil
.
rmtree
(
src
)
# shutil.rmtree(src)
#
# FileUtils().copy_folder_backup(dst,src)
FileUtils
().
copy_folder_backup
(
dst
,
src
)
list1
=
get_all_goodsinfo
()
print
(
len
(
list1
))
for
i
in
list1
:
# print(i)
# print(type(i))
str1
=
str
(
i
)
new_str1
=
str1
.
replace
(
'('
,
''
)
new_str1
=
new_str1
.
replace
(
')'
,
''
)
new_str1
=
new_str1
.
replace
(
"'"
,
'"'
)
# new_str1 = new_str1.replace("'", '')
print
(
new_str1
)
air_case/public1/public1/public1.py
View file @
e3b2d16c
...
@@ -276,6 +276,8 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
...
@@ -276,6 +276,8 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
code
>=
0
:
if
code
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
elif
code
==
'14070024'
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
else
:
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
...
...
common/db/sql/sql_tools.py
View file @
e3b2d16c
...
@@ -699,3 +699,14 @@ def get_last_auditor(order_no):
...
@@ -699,3 +699,14 @@ def get_last_auditor(order_no):
# except Exception as e:
# except Exception as e:
# # 打印错误信息
# # 打印错误信息
# print(f"发生错误: {e}")
# print(f"发生错误: {e}")
def
get_all_goodsinfo
():
db
,
cursor
=
get_sql_conn
()
sql
=
"select * from mcms_goods_info;"
res_dict
=
get_dict_data_sql
(
cursor
,
sql
)
print
(
'res_dict'
,
res_dict
)
cursor
.
close
()
db
.
close
()
return
res_dict
data/b6_spd3_core_business_flow_database_check/data
View file @
e3b2d16c
...
@@ -344,3 +344,9 @@
...
@@ -344,3 +344,9 @@
"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_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}'
"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}'
#跟台中心库出库子表
"mcms_psi_batch_out_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","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}'
#跟台中心库出库主表
"check_mcms_psi_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","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":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":"默认库区","remark":null,"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":null,"reject_remark":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_user":null,"initial_order":null,"source_type":"SG","reject_reason":null,"receipt_status":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