平差上传测试完成,上传最后一步是注释状态

This commit is contained in:
2026-06-06 15:10:43 +08:00
parent c7ebac49a0
commit 00091172ee
8 changed files with 14 additions and 12 deletions

View File

@@ -221,7 +221,7 @@ class DeviceAutomation:
# task_data = apis.get_measurement_task() # task_data = apis.get_measurement_task()
# logging.info(f"设备 {self.device_id} 获取到的测量任务: {task_data}") # logging.info(f"设备 {self.device_id} 获取到的测量任务: {task_data}")
task_data = { task_data = {
"id": 53, "id": 21,
"user_name": "czsczq115ykl", "user_name": "czsczq115ykl",
"name": "czsczq115ykl", "name": "czsczq115ykl",
"line_num": "L220076", "line_num": "L220076",
@@ -236,8 +236,10 @@ class DeviceAutomation:
# continue # continue
# 设置全局变量 # 设置全局变量
global_variable.GLOBAL_USERNAME = task_data.get('user_name', '')
global_variable.GLOBAL_CURRENT_PROJECT_NAME = task_data.get('line_name', '') global_variable.GLOBAL_CURRENT_PROJECT_NAME = task_data.get('line_name', '')
global_variable.GLOBAL_LINE_NUM = task_data.get('line_num', '') global_variable.GLOBAL_LINE_NUM = task_data.get('line_num', '')
global_variable.GLOBAL_ACCOUNT_ID = task_data.get('id', 0)
logging.info(f"设备 {self.device_id} 当前要处理的项目名称:{global_variable.GLOBAL_CURRENT_PROJECT_NAME}") logging.info(f"设备 {self.device_id} 当前要处理的项目名称:{global_variable.GLOBAL_CURRENT_PROJECT_NAME}")
# 执行测量操作 # 执行测量操作
@@ -263,12 +265,12 @@ class DeviceAutomation:
logging.info(f"设备 {self.device_id}{task_count}个任务完成") logging.info(f"设备 {self.device_id}{task_count}个任务完成")
task_count += 1 task_count += 1
# +++++++++++++white+++++++++++++++++ # # +++++++++++++white+++++++++++++++++
logging.info(f"设备 {self.device_id} 已完成{task_count}个任务,结束打数据流程") # logging.info(f"设备 {self.device_id} 已完成{task_count}个任务,结束打数据流程")
if task_count == 0: # if task_count == 0:
logging.error(f"没有完成打数据的线路,结束任务") # logging.error(f"没有完成打数据的线路,结束任务")
return False # return False
# 执行打数据加转点 # 执行打数据加转点
if not self.check_station.run(): if not self.check_station.run():

View File

@@ -88,7 +88,7 @@ def get_breakpoint_list():
else: else:
logging.info(f"接口返回错误: {result.get('code')}") logging.info(f"接口返回错误: {result.get('code')}")
return [{ return [{
"id": 53, "id": 21,
"user_name": "czsczq115ykl", "user_name": "czsczq115ykl",
"name": "czsczq115ykl", "name": "czsczq115ykl",
"line_num": "L220076", "line_num": "L220076",
@@ -434,7 +434,7 @@ def get_user_max_variation(username: str) -> Optional[int]:
try: try:
# 2. 发送POST请求 # 2. 发送POST请求
logging.info(f"向接口 {api_url} 发送请求,查询用户名:{username}") logging.info(f"向接口 {api_url} 发送请求,查询用户名:{username}账号ID{account_id}")
response = requests.post( response = requests.post(
url=api_url, url=api_url,
json=payload, # 自动将字典转为JSON字符串无需手动json.dumps() json=payload, # 自动将字典转为JSON字符串无需手动json.dumps()

View File

@@ -2093,12 +2093,12 @@ class UploadConfigPage:
else: else:
self.logger.info("页面中包含变化量属性,继续执行后续操作") self.logger.info("页面中包含变化量属性,继续执行后续操作")
user_id = global_variable.GLOBAL_USERNAME user_name = global_variable.GLOBAL_USERNAME
if user_id is None: if user_name is None:
self.logger.error("获取用户ID失败") self.logger.error("获取用户失败")
return False return False
max_variation = apis.get_user_max_variation(user_id) max_variation = apis.get_user_max_variation(user_name)
if max_variation is None: if max_variation is None:
self.logger.error("获取用户最大变化量失败") self.logger.error("获取用户最大变化量失败")
return False return False

BIN
上传人员信息.xlsx Normal file

Binary file not shown.