|
@@ -1389,17 +1389,19 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
for idx, item in enumerate(config_list):
|
|
for idx, item in enumerate(config_list):
|
|
|
is_take_picture = item["take_picture"]
|
|
is_take_picture = item["take_picture"]
|
|
|
action_id = item["id"]
|
|
action_id = item["id"]
|
|
|
|
|
+ record_id = -1
|
|
|
if is_take_picture:
|
|
if is_take_picture:
|
|
|
action_names.append(item["action_name"])
|
|
action_names.append(item["action_name"])
|
|
|
image_counts += 1
|
|
image_counts += 1
|
|
|
# 批量插入
|
|
# 批量插入
|
|
|
image_deal_mode = 0 if action_info == "执行左脚程序" else 1
|
|
image_deal_mode = 0 if action_info == "执行左脚程序" else 1
|
|
|
- insert_photo_records(
|
|
|
|
|
|
|
+ state,record_id = insert_photo_records(
|
|
|
image_deal_mode=image_deal_mode,
|
|
image_deal_mode=image_deal_mode,
|
|
|
goods_art_no=goods_art_no,
|
|
goods_art_no=goods_art_no,
|
|
|
image_index=idx,
|
|
image_index=idx,
|
|
|
action_id=action_id,
|
|
action_id=action_id,
|
|
|
)
|
|
)
|
|
|
|
|
+ config_list[idx]["record_id"] = record_id
|
|
|
total_len = len(config_list)
|
|
total_len = len(config_list)
|
|
|
self.action_state = 1
|
|
self.action_state = 1
|
|
|
self.msg_type = "image_process"
|
|
self.msg_type = "image_process"
|
|
@@ -1424,9 +1426,12 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
if self.is_stop_action == True:
|
|
if self.is_stop_action == True:
|
|
|
self.is_stop_action = False
|
|
self.is_stop_action = False
|
|
|
break
|
|
break
|
|
|
- action_is_take_picture = action["take_picture"]
|
|
|
|
|
|
|
+ # action_is_take_picture = action["take_picture"]
|
|
|
|
|
+ record_id = action["record_id"]
|
|
|
image_index = -1
|
|
image_index = -1
|
|
|
- if action_is_take_picture:
|
|
|
|
|
|
|
+ if record_id == -1:
|
|
|
|
|
+ image_index = -1
|
|
|
|
|
+ else:
|
|
|
image_index = index
|
|
image_index = index
|
|
|
program_item = ProgramItem(
|
|
program_item = ProgramItem(
|
|
|
websocket_manager=self.websocket_manager,
|
|
websocket_manager=self.websocket_manager,
|
|
@@ -1434,6 +1439,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
mcu=self,
|
|
mcu=self,
|
|
|
goods_art_no=goods_art_no,
|
|
goods_art_no=goods_art_no,
|
|
|
image_index=image_index,
|
|
image_index=image_index,
|
|
|
|
|
+ record_id=record_id,
|
|
|
)
|
|
)
|
|
|
print("self.action_state===>", self.action_state)
|
|
print("self.action_state===>", self.action_state)
|
|
|
if self.action_state != 1:
|
|
if self.action_state != 1:
|