|
@@ -710,4 +710,26 @@ select * from order_send_back_audit WHERE "SendBackOrgId"='001023';
|
|
|
|
|
|
--更新退回申请创建部门
|
|
|
select * from order_send_back_audit WHERE "CreatorOrgId"='001023';
|
|
|
---update order_send_back_audit SET "CreatorOrgName"='珙县智慧信息服务中心' WHERE "CreatorOrgId"='001023';
|
|
|
+--update order_send_back_audit SET "CreatorOrgName"='珙县智慧信息服务中心' WHERE "CreatorOrgId"='001023';
|
|
|
+
|
|
|
+### 兴唐通讯记录查询
|
|
|
+
|
|
|
+SELECT cn."FromNo" as 主叫号码,"ToNo" as 被叫号码,o."No" as 工单编码,o."Title" AS 工单标题,cn."TelNo" as 响应分机,cn."StaffNo" as 工号,cn."CallNo" as 通话ID,cn."UserName" as 话务员,
|
|
|
+cn."GroupId" as 功能组号码,cn."Duration" as 通话时间,
|
|
|
+(CASE
|
|
|
+ WHEN cn."EndBy" = 0 THEN
|
|
|
+ '主叫方结束'
|
|
|
+ WHEN cn."EndBy" = 1 THEN
|
|
|
+ '被叫方结束'
|
|
|
+ ELSE
|
|
|
+ '其他未知情况'
|
|
|
+END) as 挂断状态,cn."BeginIvrTime" as 开始时间,cn."AnsweredTime" as 接通时间,cn."EndTime" as 挂断时间
|
|
|
+ FROM call_native cn
|
|
|
+LEFT JOIN "order" o on cn."Id" = o."CallId"
|
|
|
+WHERE cn."IsDeleted" =FALSE
|
|
|
+--呼入
|
|
|
+-- and cn."Direction" = 0 and cn."AnsweredTime" is NOT NULL and cn."FromNo" ='110' and cn."ToNo" ='12345'
|
|
|
+--呼出
|
|
|
+and cn."Direction" = 1 and cn."AnsweredTime" is NOT NULL and cn."FromNo" ='12345' and cn."ToNo" ='110'
|
|
|
+and cn."CreationTime" >= '2025-01-01' and cn."CreationTime" <'2025-04-01' ;
|
|
|
+
|