소스 검색

Merge branch 'develop' of ssh://gitlab.fuxicarbon.com:1111/client_service/voice-gateway-service into develop

DavidLiu 3 달 전
부모
커밋
e0e971cc30
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      src/core/callcenter/agent.py

+ 4 - 3
src/core/callcenter/agent.py

@@ -321,8 +321,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)
@@ -639,12 +639,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()