| | |
| | | select |
| | | ct."id", |
| | | ct."task_name" as taskName, |
| | | date_format(ct."gmt_create",'yyyy-MM-dd HH:mm:ss') as createTime, |
| | | date_format(ct."gmt_create",'%Y-%m-%d %H:%i:%s') as createTime, |
| | | ct."task_status" as taskStatus, |
| | | date_format(ct."task_schedule_time",'%Y-%m-%d %H:%i:%s') as executeTime, |
| | | ctr."calling_number" as callingNumber, |
| | | ctr."callee_number" as calleeNumber, |
| | | date_format(ctr."gmt_create",'yyyy-MM-dd HH:mm:ss') as executeTime, |
| | | ctra."callee_number_count" as calleeNumberCount, |
| | | ctra."connection_count" as connectionCount, |
| | | ctra."failure_count" as failureCount, |
| | |
| | | cs."call_scenes_name" as callScenesName |
| | | from "SJZT_ODS"."call_task" ct |
| | | left join (select * from "SJZT_ODS"."call_scenes" where "is_deleted" = 0) cs on ct."scene_id" = cs."id" |
| | | left join "SJZT_ODS"."call_task_result" ctr on ctr."task_id" = ct."id" |
| | | left join (select DISTINCT "task_id","calling_number" from "SJZT_ODS"."call_task_result") ctr on ctr."task_id" = ct."id" |
| | | left join "SJZT_ODS"."call_task_result_analyse" ctra on ctra."task_id" = ct."id" |
| | | where 1=1 |
| | | <if test="callTask.taskName!=null and callTask.taskName!=''"> |
| | |
| | | ctr."call_conversation_round" as callConversationRound, |
| | | ctr."call_hangup_direction" as callHangupDirection, |
| | | ctr."call_id" as callId, |
| | | date_format(ctr."gmt_create",'yyyy-MM-dd HH:mm:ss') as gmtCreate, |
| | | date_format(ctr."gmt_create",'%Y-%m-%d %H:%i:%s') as gmtCreate, |
| | | ctr."calling_number" as callingNumber, |
| | | ctr."callee_number" as calleeNumber, |
| | | ctr."task_id" as taskId, |
| | | ctr."call_start_time" as callStartTime, |
| | | ctr."call_end_time" as callEndTime, |
| | | date_format(ctr."call_end_time",'%Y-%m-%d %H:%i:%s') as callEndTime, |
| | | ctr."call_record_file" as callRecordFile, |
| | | ctr."intention_customer_flag" as intentionCustomerFlag, |
| | | ctr."is_deleted" as isDeleted, |
| | | ctc."call_task_callee_content" as callTaskCalleeContent |
| | | from "SJZT_ODS"."call_task_result" ctr |
| | | left join "SJZT_ODS"."call_task_callee" ctc on ctr."task_id" = ctc."task_id" |
| | | left join "SJZT_ODS"."call_task_callee" ctc on ctr."task_id" = ctc."task_id" and ctr."callee_number" = ctc."callee_number" |
| | | where 1=1 |
| | | <if test="callTaskResult.taskId!=null and callTaskResult.taskId!=''"> |
| | | and ctr."task_id" = #{callTaskResult.taskId} |
| | | </if> |
| | | <if test="callTaskResult.adName!=null and callTaskResult.adName!=''"> |
| | | and ctc."call_task_callee_content" like concat('%',#{callTaskResult.adName},'%') |
| | | </if> |
| | | <if test="callTaskResult.userName!=null and callTaskResult.userName!=''"> |
| | | and ctc."call_task_callee_content" like concat('%',#{callTaskResult.userName},'%') |
| | | </if> |
| | | <if test="callTaskResult.startTime!=null and callTaskResult.startTime!=''"> |
| | | and date_format(ctr."gmt_create",'%Y-%m-%d') >= #{callTaskResult.startTime} |
| | | </if> |
| | | <if test="callTaskResult.endTime!=null and callTaskResult.endTime!=''"> |
| | | and date_format(ctr."gmt_create",'%Y-%m-%d') <= #{callTaskResult.endTime} |
| | | </if> |
| | | order by ctr."gmt_create" desc |
| | | </select> |
| | |
| | | left join SJZT_MD."att_res_base" arb on aab."guid" = concat(arb."ad_guid",'000000') |
| | | where arb."code" = #{adCode} |
| | | </select> |
| | | |
| | | <!--通过行政区编号获取水库名称--> |
| | | <select id="getWaterNameByAreaCode" resultType="java.lang.String"> |
| | | select "name" from SJZT_MD."att_res_base" where concat("ad_guid",'000000') = #{areaCode} |
| | | </select> |
| | | </mapper> |