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

Merge remote-tracking branch 'remotes/origin/core_folw'

# Conflicts:
#	data/b5_spd3_core_business_flow/message10
#	data/b5_spd3_core_business_flow/message11
#	data/b5_spd3_core_business_flow/message12
#	data/b5_spd3_core_business_flow/message13
#	data/b5_spd3_core_business_flow/message14
#	data/b5_spd3_core_business_flow/message15
#	data/b5_spd3_core_business_flow/message8
#	data/b5_spd3_core_business_flow/message9
parents 6611ec65 82c7234e
......@@ -217,13 +217,13 @@ def BuyCarSubmit():
# 创建领车交易=================================================
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_buy_createBuyBill_url")
print('创建领车交易=================', url)
print('创建领车交易=================', url)
billExpdtDate = timeUtils().get_time_add(30, 2)
request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0],
list_id[1], list_id[2])
print('创建领车交易', 'request_body', request_body)
print('创建领车交易', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('创建领车交易,result', result)
currentTaskList = commonFuc().analysis_json('currentTaskList', commonFuc().analysis_json('data', result))
......
......@@ -752,20 +752,21 @@ def check_accept_order(type=1):
break
# ==============================查看订单详情==================
# ========设置验收全部合格
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "check_barcode_save_url")
print('check_barcode_save_url', url)
url2 = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "check_barcode_save_url")
print('check_barcode_save_url', url2)
sourceBillId = sourceId
request_body = commonFuc().get_business_data(module, "payload2", sourceBillId, viewId)
request_body2 = commonFuc().get_business_data(module, "payload2", sourceBillId, viewId)
print('设置验收全部合格request_body', request_body)
print('设置验收全部合格request_body2', request_body2)
# 发送请求
time.sleep(6)
while True:
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
data = commonFuc().analysis_json('data', result)
code = commonFuc().analysis_json('code', result)
result2 = commonFuc().http_post(url2, request_body2, headers)
print('result', result2)
data = commonFuc().analysis_json('data', result2)
code = commonFuc().analysis_json('code', result2)
msg= commonFuc().analysis_json('msg', result2)
print(code)
if code == 0 and len(data) >= 1:
break
......@@ -800,8 +801,23 @@ def check_accept_order(type=1):
print('result', result)
CHECK_NO = commonFuc().analysis_json('data', result)
code = commonFuc().analysis_json('code', result)
msg = commonFuc().analysis_json('msg', result)
if code == 0:
break
elif code == 14031083 and "不允许验收" in msg:
result2 = commonFuc().http_post(url2, request_body2, headers)
print('result', result2)
data = commonFuc().analysis_json('data', result2)
code = commonFuc().analysis_json('code', result2)
print(code)
if code == 0 and len(data) >= 1:
break
else:
print('设置产品合格出现问题')
time.sleep(6)
continue
info = (CHECK_NO, CHECK_NO)
titlename = ('CHECK_NO1', 'CHECK_NO2')
......@@ -839,9 +855,9 @@ def main():
check_accept_order(1) # 低值
check_accept_order(2) # 高值
check_accept_order(3) # 试剂
second_dept_one_key_in()
second_dept_one_key_in()
second_dept_one_key_in()
second_dept_one_key_in(2)
second_dept_one_key_in(2)
second_dept_one_key_in(2)
commonFuc().check_text_exist_result_text('succees', 'succees')
print('==========================流程十一结束==============================')
except:
......
......@@ -25,6 +25,27 @@ def get_process_list(request_body):
return request_body_json
def compare_text_index(text1, text2):
import difflib, re
# 创建SequenceMatcher对象
matcher = difflib.SequenceMatcher(a=text1, b=text2)
# 获取差异报告
diff_report = matcher.get_opcodes()
# 检查差异报告中是否存在关键词错误
for tag, i1, i2, j1, j2 in diff_report:
if tag == 'replace':
print("{0} with {1}".format(text1[i1:i2], text2[j1:j2]))
elif tag == 'delete':
# 检查删除操作中是否包含关键词
print("{0} with {1}".format(text1[i1:i2], text2[j1:j2]))
elif tag == 'insert':
# 检查插入操作中是否包含关键词
print("{0} with {1}".format(text1[i1:i2], text2[j1:j2]))
return None
def get_process_list2(request_body):
request_body = str(request_body)
print('request_body', request_body)
......@@ -3037,6 +3058,14 @@ def second_dept_one_key_in(type=2):
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
while True:
result = commonFuc().http_post(url, request_body, headers)
total = commonFuc().analysis_json('total', commonFuc().analysis_json('data', result))
if total>=1:
break
else:
continue
deptid = commonFuc().analysis_json('deptId',
commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
sourceId = commonFuc().analysis_json('sourceId',
......@@ -3332,3 +3361,18 @@ def dept_goods_distribute(detpid): # 科室添加产品信息(产品是从外
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
def get_login_user_uxid():
module = "b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
info = FileUtils().r_info8(module, "用户名信息", 'message3')
print(info)
username1 = info['username1']
username = username1
## print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token1, projectCode1, uxid1, corpId1, info1 = login_system(username, password).get_token()
return uxid1
\ No newline at end of file
......@@ -127,6 +127,17 @@ def get_create_time(sql):
# print(new_str1)
cursor.close()
return new_str1
def get_expdt_date(sql):
db, cursor = get_sql_conn()
cursor.execute(sql)
results = cursor.fetchone()
str1 = str(results)
new_str1 = str1.replace(',)', '')
new_str1 = new_str1.replace('(date', 'date')
# new_str1 = new_str1.replace(',', '')
# print(new_str1)
cursor.close()
return new_str1
def get_id(sql):
db, cursor = get_sql_conn()
cursor.execute(sql)
......@@ -153,5 +164,11 @@ def process_tuple(tuple1):
new_str1 = new_str1.replace("'", '')
return new_str1
def get_mdm_goods_code(sql):
db, cursor = get_sql_conn()
cursor.execute(sql)
results = cursor.fetchall()
cursor.close()
return results
# hos_goods_id = 'h034700004220'
# main2(hos_goods_id)
\ No newline at end of file
import time
import sys
import os
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
curPath = os.path.abspath(os.path.dirname(__file__)) # 获取当前文件的所在目录的绝对路径
# print('将路径中的/换成\\', curPath) # C:\Users\Administrator\Desktop\temp\dbshop99\main
# # #将当前文件的所在目录的绝对路径进行分离,分离成 ('C:\\Users\\Administrator\\Desktop\\temp\\dbshop99', 'main'),存到元组中
# print('切割路径,切割成一个元组,将路径分离', os.path.split(curPath))
rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素
# print('当前项目的根目录', rootPath)
sys.path.append(rootPath) # 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
sys.path.append(os.path.join(rootPath,'common'))
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
from airtest.core.helper import using
from common.common_func import commonFuc
from common.db.sql.sql_del_branch_info import delData
curPath = os.path.abspath(os.path.dirname(__file__)) # 获取当前文件的所在目录的绝对路径
# curPath = os.path.abspath(os.path.dirname(__file__)) # 获取当前文件的所在目录的绝对路径
# print('将路径中的/换成\\', curPath) # C:\Users\Administrator\Desktop\temp\dbshop99\main
# # #将当前文件的所在目录的绝对路径进行分离,分离成 ('C:\\Users\\Administrator\\Desktop\\temp\\dbshop99', 'main'),存到元组中
# print('切割路径,切割成一个元组,将路径分离', os.path.split(curPath))
rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素
# rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素
# print('当前项目的根目录', rootPath)
sys.path.append(rootPath) # 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
# sys.path.append(rootPath) # 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
# print('rootPath',rootPath)
# print(sys.path)
import tkinter as tk
from tkinter import *
import tkinter.messagebox
......@@ -161,7 +174,7 @@ def main_text():
delData().Delete_branch_by_id()
delData().Delete_goods_change_info()
delData().Delete_probeInfo_other()
delData().Del_supply_relation()
# delData().Del_supply_relation()
delData().Delete_business_Data()
delData().Del_reporter_data()
delData().Delete_business_Data_All()
......
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