Procházet zdrojové kódy

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

Davidliu před 2 měsíci
rodič
revize
5f2d0e2f1a

+ 2 - 1
src/core/callcenter/agent.py

@@ -144,7 +144,8 @@ class AgentEventService:
                     if call_id:
                         self.cache.set_call_is_end(call_id)
                 self.agent_monitor_service.update_processing(agent_monitor)
-                self.logger.info('挂断更新')
+                self.logger.info('挂断更新:%s', agent)
+                self.data_handle_server.update_record(call_id, user_id=agent.user_id, user_name=agent.agent_name)
                 self.reprocessing_idle(AgentDelayStateData(saas_id, flow_id, agent_num, AgentServiceState.REPROCESSING, AgentScene.MANUAL))
                 self.push_handler.push_on_call_end(saas_id, flow_id, agent_num, AgentScene.MANUAL, ServiceDirect.MANUAL_CALL.service_direct, '0')
                 self.push_handler.push_on_agent_work_report(saas_id, flow_id, agent_num, call_id, AgentScene.MANUAL, WorkStatus.AGENT_HANG_REPROCESSING)

+ 4 - 4
src/core/callcenter/dao.py

@@ -111,10 +111,10 @@ class AgentActionLog(db.Model):
     pre_check_state = db.Column(db.SmallInteger, nullable=False, default=-1, comment='上一次签入或签出')
     service_state = db.Column(db.SmallInteger, nullable=False, default=-1, comment='坐席状态')
     pre_service_state = db.Column(db.SmallInteger, nullable=False, default=-1, comment='上一次坐席状态')
-    check_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime(2000, 1, 1), comment='签入或签出时间')
-    pre_check_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime(2000, 1, 1), comment='上一次签入或签出时间')
-    service_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime(2000, 1, 1), comment='坐席状态变更时间')
-    pre_service_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime(2000, 1, 1), comment='上一次坐席状态变更时间')
+    check_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime.now, comment='签入或签出时间')
+    pre_check_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime.now, comment='上一次签入或签出时间')
+    service_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime.now, comment='坐席状态变更时间')
+    pre_service_state_time = db.Column(db.TIMESTAMP, nullable=False, default=datetime.now, comment='上一次坐席状态变更时间')
     check_state_duration = db.Column(db.BigInteger, nullable=False, default=0, comment='行为持续时间')
     service_state_duration = db.Column(db.BigInteger, nullable=False, default=0, comment='状态持续时间')
     task_id = db.Column(db.String(32), nullable=False, default='', comment='任务Id')

+ 2 - 2
src/core/callcenter/esl/client.py

@@ -519,7 +519,7 @@ class OutboundClient:
                 if con.connected():
                     info = con.getInfo()
 
-                    self.logger.info(json.loads(info.serialize('json')))
+                    self.server.logger.info(json.loads(info.serialize('json')))
                     event_name = info.getHeader("Event-Name")
                     self.server.logger.info('Event-Name: %s', event_name)
                     device_id = info.getHeader("unique-id")
@@ -538,7 +538,7 @@ class OutboundClient:
                     bucket = self.server.get_bucket(call_id)
                     whitelist = self.server.get_whitelist()
                     in_whitelist_type = self.in_whitelist(caller_number, whitelist)
-                    self.server.logger.info('call incoming call_id=%s, caller_number=%s, device_id=%s, new_device_id=%s, in_whitelist=%s, bucket=%s', call_id, caller_number, device_id, new_device_id, _in_whitelist, bucket.name)
+                    self.server.logger.info('call incoming call_id=%s, caller_number=%s, device_id=%s, new_device_id=%s, in_whitelist=%s, bucket=%s', call_id, caller_number, device_id, new_device_id, in_whitelist_type, bucket.name)
                     # 检查白名单
                     if in_whitelist_type:
                         if WhiteTypeEnum.AI == in_whitelist_type: