Commit 2b9824e9 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程五脚本提交

parent 29de8abd
......@@ -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', '采购计划单号', 'message7'))
approval_center(FileUtils().r_info8('b5_spd3_core_business_flow', '采购计划单号高值', 'message11'))
#外网配送前再检查一下是否有单据未审批
approval_center_all()
order_dp(1) # 1低值
order_dp(2) # 2高值
order_dp(3) # 3试剂
......
......@@ -2431,6 +2431,8 @@ def main():
check_mcms_purchase_out_and_in(1) #1主表
print('检查同步到外网的采购订单数据跟内网的是否一致')
check_mcms_purchase_out_and_in(2) #2子表
# 外网配送前再检查一下是否有单据未审批
approval_center_all()
order_dp(1) # 1低值 配送单发货
time.sleep(6)
order_dp(2) # 2高值 配送单发货
......
......@@ -58,22 +58,34 @@ import sys
# commonFuc().check_text_exist_result_text('error', 'succees')
# 第二种方式=================================
# 备份当前data目录
pro_path = commonFuc().get_pro_path2()
src = pro_path + r'/data'
dst = pro_path + r'/data' + get_branch_name()+get_branch_id()
#将备份的目录路径写入到文件中
info = (src, dst)
titlename = ('源目录', '备份目录')
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '备份路径',titlename,'message29')
#备份目录
FileUtils().copy_folder_backup(src, dst)
dst=FileUtils().r_info8('b5_spd3_core_business_flow', '备份路径','message29')['备份目录']
#恢复目录
#先删除文件夹
import shutil,os
if os.path.exists(src):
shutil.rmtree(src)
# # 备份当前data目录
# pro_path = commonFuc().get_pro_path2()
# src = pro_path + r'/data'
# dst = pro_path + r'/data' + get_branch_name()+get_branch_id()
# #将备份的目录路径写入到文件中
# info = (src, dst)
# titlename = ('源目录', '备份目录')
# FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '备份路径',titlename,'message29')
# #备份目录
# FileUtils().copy_folder_backup(src, dst)
#
# dst=FileUtils().r_info8('b5_spd3_core_business_flow', '备份路径','message29')['备份目录']
# #恢复目录
# #先删除文件夹
# import shutil,os
# if os.path.exists(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)
......@@ -699,3 +699,14 @@ def get_last_auditor(order_no):
# except Exception as 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
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