Commit 675a2688 authored by ='s avatar =

hungtt-commit fix bug search reallocation customer

parent 07a95c14
...@@ -463,7 +463,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom { ...@@ -463,7 +463,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
stringBuilder.append(" where rownum = 1"); stringBuilder.append(" where rownum = 1");
stringBuilder.append(" ),"); stringBuilder.append(" ),");
stringBuilder.append(" connect_status as ("); stringBuilder.append(" connect_status as (");
stringBuilder.append(" select complete_value, complete_name"); stringBuilder.append(" select complete_value, complete_name, complete_type");
stringBuilder.append(" from campaign_complete_code"); stringBuilder.append(" from campaign_complete_code");
stringBuilder.append(" where company_site_id = :p_company_site_id"); stringBuilder.append(" where company_site_id = :p_company_site_id");
stringBuilder.append(" and complete_type = 1"); stringBuilder.append(" and complete_type = 1");
...@@ -479,7 +479,8 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom { ...@@ -479,7 +479,8 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
stringBuilder.append(" b.name customerName,"); stringBuilder.append(" b.name customerName,");
stringBuilder.append(" c.contact mobileNumber,"); stringBuilder.append(" c.contact mobileNumber,");
stringBuilder.append(" to_char(a.call_time, 'DD/MM/YYYY HH24:MI:SS') connectTime,"); stringBuilder.append(" to_char(a.call_time, 'DD/MM/YYYY HH24:MI:SS') connectTime,");
stringBuilder.append(" d.complete_name connectStatus"); stringBuilder.append(" d.complete_name connectStatus,");
stringBuilder.append(" d.complete_type completeType");
stringBuilder.append(" from campaign_customer a"); stringBuilder.append(" from campaign_customer a");
stringBuilder.append(" left join customer b on a.customer_id = b.customer_id"); stringBuilder.append(" left join customer b on a.customer_id = b.customer_id");
stringBuilder.append(" left join contact c on a.customer_id = c.customer_id"); stringBuilder.append(" left join contact c on a.customer_id = c.customer_id");
...@@ -487,6 +488,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom { ...@@ -487,6 +488,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
stringBuilder.append(" where a.campaign_id = :p_campaign_id"); stringBuilder.append(" where a.campaign_id = :p_campaign_id");
stringBuilder.append(" and a.in_campaign_status = 1"); stringBuilder.append(" and a.in_campaign_status = 1");
stringBuilder.append(" and a.status in (select connect_status from connect_status_list)"); stringBuilder.append(" and a.status in (select connect_status from connect_status_list)");
stringBuilder.append(" and d.complete_type = 1");
stringBuilder.append(" order by connectTime desc, customerName"); stringBuilder.append(" order by connectTime desc, customerName");
stringBuilder.append(" ),"); stringBuilder.append(" ),");
stringBuilder.append(" final_data as ("); stringBuilder.append(" final_data as (");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment