|
@@ -297,8 +297,8 @@ class AgentOperService:
|
|
|
raise BizException(BizErrorCode.ERROR_NOT_FOLLOW_CHECK_IN)
|
|
|
phone = self.data_handle_server.get_phone(req.saas_id, agent.phone_num)
|
|
|
agent_monitor = self.data_handle_server.get_agent_monitor(req.saas_id, agent.agent_num)
|
|
|
- agent_monitor.check_scene = req.scene
|
|
|
- self.agent_monitor_service.update_checkin(agent_monitor)
|
|
|
+ # agent_monitor.check_scene = req.scene
|
|
|
+ self.agent_monitor_service.update_checkin(agent_monitor,req.scene)
|
|
|
self.agent_actionlog_service.insert_check_state(agent_monitor, AgentCheck.IN, AgentLogState.CHECKIN)
|
|
|
self.agent_state_service.checkin(agent.saas_id, agent.out_id, agent.phone_num)
|
|
|
print("checkin", agent_monitor,agent_monitor.check_state)
|
|
@@ -615,12 +615,13 @@ class AgentMonitorService:
|
|
|
return res
|
|
|
|
|
|
@with_app_context
|
|
|
- def update_checkin(self, agent_monitor):
|
|
|
+ def update_checkin(self, agent_monitor,scene=None):
|
|
|
agent_monitor = db.session.query(AgentMonitor).get(agent_monitor.id)
|
|
|
agent_monitor.check_state = AgentCheck.IN.code
|
|
|
agent_monitor.check_in_time = datetime.now()
|
|
|
agent_monitor.heart_state = AgentHeartState.NORMAL.code
|
|
|
agent_monitor.heart_time = datetime.now()
|
|
|
+ agent_monitor.check_scene = scene
|
|
|
self.logger.info("update_checkin %s", agent_monitor.check_state)
|
|
|
db.session.commit()
|
|
|
|