改为处理最后一个,修改api
This commit is contained in:
@ -14,6 +14,7 @@ class APIClient:
|
||||
self.not_pour_info_url =f"{BASE_URL}/api/ext/mould/not_pour_rfid" #f"{BASE_URL}/api/ext/artifact/not_pour"#调试修改
|
||||
self.app_id = None
|
||||
|
||||
|
||||
def hash_password(self, password):
|
||||
"""计算SHA256密码"""
|
||||
return password
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import os
|
||||
|
||||
# API配置
|
||||
BASE_URL = "http://10.6.60.153:9155"#替换"http://127.0.0.1:5000"#https://www.shnthy.com:9154
|
||||
BASE_URL = "https://www.shnthy.com:9154"#替换"http://127.0.0.1:5000"#https://www.shnthy.com:9154
|
||||
LOGIN_DATA = {
|
||||
"Program": 11,
|
||||
"SC": "1000000001",
|
||||
|
||||
2
main.py
2
main.py
@ -51,11 +51,13 @@ def main():
|
||||
|
||||
# 步骤1:获取AppID
|
||||
app_id = api_client.login()
|
||||
|
||||
if app_id is None:
|
||||
print("无法获取AppID,将在稍后重试...")
|
||||
else:
|
||||
task_service.api_client.app_id = app_id
|
||||
|
||||
|
||||
# 存储上次获取的所有ArtifactID
|
||||
last_artifact_ids = set()
|
||||
last_artifact_list = [] # 用于存储上一次的完整artifact_list
|
||||
|
||||
@ -37,7 +37,7 @@ class TaskService:
|
||||
f_positions = f_blocks_info["f_positions"]
|
||||
|
||||
# 处理当前任务
|
||||
current_task = self._process_current_task(artifact_list[0])
|
||||
current_task = self._process_current_task(artifact_list[-1])
|
||||
|
||||
# 如果获取任务信息失败,则返回空结果
|
||||
if current_task is None:
|
||||
|
||||
Reference in New Issue
Block a user