平差上传测试完成,上传最后一步是注释状态
This commit is contained in:
Binary file not shown.
14
actions.py
14
actions.py
@@ -221,7 +221,7 @@ class DeviceAutomation:
|
||||
# task_data = apis.get_measurement_task()
|
||||
# logging.info(f"设备 {self.device_id} 获取到的测量任务: {task_data}")
|
||||
task_data = {
|
||||
"id": 53,
|
||||
"id": 21,
|
||||
"user_name": "czsczq115ykl",
|
||||
"name": "czsczq115ykl",
|
||||
"line_num": "L220076",
|
||||
@@ -236,8 +236,10 @@ class DeviceAutomation:
|
||||
# continue
|
||||
|
||||
# 设置全局变量
|
||||
global_variable.GLOBAL_USERNAME = task_data.get('user_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_ACCOUNT_ID = task_data.get('id', 0)
|
||||
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}个任务完成")
|
||||
task_count += 1
|
||||
|
||||
# +++++++++++++white+++++++++++++++++
|
||||
# # +++++++++++++white+++++++++++++++++
|
||||
|
||||
logging.info(f"设备 {self.device_id} 已完成{task_count}个任务,结束打数据流程")
|
||||
if task_count == 0:
|
||||
logging.error(f"没有完成打数据的线路,结束任务")
|
||||
return False
|
||||
# logging.info(f"设备 {self.device_id} 已完成{task_count}个任务,结束打数据流程")
|
||||
# if task_count == 0:
|
||||
# logging.error(f"没有完成打数据的线路,结束任务")
|
||||
# return False
|
||||
|
||||
# 执行打数据加转点
|
||||
if not self.check_station.run():
|
||||
|
||||
Binary file not shown.
@@ -88,7 +88,7 @@ def get_breakpoint_list():
|
||||
else:
|
||||
logging.info(f"接口返回错误: {result.get('code')}")
|
||||
return [{
|
||||
"id": 53,
|
||||
"id": 21,
|
||||
"user_name": "czsczq115ykl",
|
||||
"name": "czsczq115ykl",
|
||||
"line_num": "L220076",
|
||||
@@ -434,7 +434,7 @@ def get_user_max_variation(username: str) -> Optional[int]:
|
||||
|
||||
try:
|
||||
# 2. 发送POST请求
|
||||
logging.info(f"向接口 {api_url} 发送请求,查询用户名:{username}")
|
||||
logging.info(f"向接口 {api_url} 发送请求,查询用户名:{username},账号ID:{account_id}")
|
||||
response = requests.post(
|
||||
url=api_url,
|
||||
json=payload, # 自动将字典转为JSON字符串,无需手动json.dumps()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -2093,12 +2093,12 @@ class UploadConfigPage:
|
||||
else:
|
||||
self.logger.info("页面中包含变化量属性,继续执行后续操作")
|
||||
|
||||
user_id = global_variable.GLOBAL_USERNAME
|
||||
if user_id is None:
|
||||
self.logger.error("获取用户ID失败")
|
||||
user_name = global_variable.GLOBAL_USERNAME
|
||||
if user_name is None:
|
||||
self.logger.error("获取用户名失败")
|
||||
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:
|
||||
self.logger.error("获取用户最大变化量失败")
|
||||
return False
|
||||
|
||||
BIN
上传人员信息.xlsx
Normal file
BIN
上传人员信息.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user