Commit e3b2d16c authored by 肖 和生's avatar 肖 和生
Browse files

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

parents 51935eb6 3b691846
......@@ -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)
......@@ -276,6 +276,8 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
total = commonFuc().analysis_json('total', result)
if code >= 0:
commonFuc().check_text_exist(0, result)
elif code=='14070024':
commonFuc().check_text_exist('error', result)
else:
commonFuc().check_text_exist('error', result)
......
......@@ -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
......@@ -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_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}'
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