Commit baba202c authored by pborate's avatar pborate

Updated to get customer remarks & display image issue

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197694 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2650aa48
......@@ -154,7 +154,8 @@ public class CustomerInfoDao {
isLocalConn =true;
}
String custCallHistSql="";
StringBuffer custCallHistSql=new StringBuffer();
/*
custCallHistSql = "select sm.dcr_id, sm.sales_pers,sm.strg_code,sm.event_date, sm.event_time_start,sm.event_time_end, sm.call_outcome, " +
" CASE WHEN CALL_OUTCOME = '0' THEN 'Refused'" +
" WHEN CALL_OUTCOME = '5' THEN 'Supporter'" +
......@@ -166,9 +167,29 @@ public class CustomerInfoDao {
" and strg_code = '"+strgCode+"'" +
" and sm.event_date between TO_DATE('"+fromDate+"','YYYY-MM-dd') and TO_DATE('"+toDate+"','YYYY-MM-dd')" +
" order by sm.event_date desc";
*/
custCallHistSql.append("select sm.dcr_id, sm.sales_pers,sm.strg_code,sm.event_date, sm.event_time_start,sm.event_time_end, sm.call_outcome,")
.append(" CASE WHEN sm.CALL_OUTCOME = '0' THEN 'Refused'")
.append(" WHEN sm.CALL_OUTCOME = '1' THEN 'Negative'")
.append(" WHEN sm.CALL_OUTCOME = '2' THEN 'Below Average'")
.append(" WHEN sm.CALL_OUTCOME = '3' THEN 'Average'")
.append(" WHEN sm.CALL_OUTCOME = '4' THEN 'Very Positive'")
.append(" WHEN sm.CALL_OUTCOME = '5' THEN 'Supporter'")
.append(" WHEN sm.CALL_OUTCOME = '6' THEN 'Believer'")
.append(" WHEN sm.CALL_OUTCOME = '7' THEN 'Non Believer'")
.append(" WHEN sm.CALL_OUTCOME = '8' THEN 'Obj. Not Met'")
.append(" WHEN sm.CALL_OUTCOME = '9' THEN 'Obj. Met'")
.append(" END AS call_outcome_descr , ")
.append(" REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sm.meet_summ, 'type:C', 'Complaint'),'type:P', 'Compliment'),")
.append(" 'type:R', 'Request'),'type:Q', 'Query'),'type:I', 'Interested'),'type:N', 'No Response'),'type:M', 'Mini Mithas'),'type:K', 'Kiosk Activity') AS REMARKS")
.append(" from strg_meet sm")
.append(" where sm.event_type <>'PR'")
.append(" and sm.strg_code = '"+strgCode+"'")
.append(" and sm.event_date between TO_DATE('"+fromDate+"','YYYY-MM-dd') and TO_DATE('"+toDate+"','YYYY-MM-dd')")
.append(" order by sm.event_date desc");
System.out.println("custInfoSql+++"+custCallHistSql);
pstmt = conn.prepareStatement(custCallHistSql);
pstmt = conn.prepareStatement(custCallHistSql.toString());
rs = pstmt.executeQuery();
while(rs.next())
......@@ -367,7 +388,8 @@ public class CustomerInfoDao {
" and event_type <>'PR'" +
" and sm.dcr_id = '"+dcrId+"'" +
" and smo.item_code = itm.item_code" +
" and sm.strg_code = '"+strgCode+"'";
" and sm.strg_code = '"+strgCode+"'" +
" and sm.strg_code = smo.strg_code";
System.out.println("custOrdersSql+++"+custOrdersSql);
pstmt = conn.prepareStatement(custOrdersSql);
......@@ -454,7 +476,8 @@ public class CustomerInfoDao {
" where sm.dcr_id = sidisp.dcr_id" +
" and event_type <>'PR'" +
" and sm.dcr_id = '"+dcrId+"'" +
" and sm.strg_code = '"+strgCode+"'";
" and sm.strg_code = '"+strgCode+"'" +
" and sm.strg_code = sidisp.strg_code";
System.out.println("dispDetailSql+++"+dispDetailSql);
pstmt = conn.prepareStatement(dispDetailSql);
......@@ -723,7 +746,9 @@ public class CustomerInfoDao {
isLocalConn =true;
}
String custCallHistSql="";
StringBuffer custCallHistSql=new StringBuffer();
/*
custCallHistSql = "select * from ( select sm.dcr_id, sm.sales_pers,sm.strg_code,sm.event_date, sm.event_time_start,sm.event_time_end, sm.call_outcome, " +
" CASE WHEN CALL_OUTCOME = '0' THEN 'Refused'" +
" WHEN CALL_OUTCOME = '5' THEN 'Supporter'" +
......@@ -735,9 +760,30 @@ public class CustomerInfoDao {
" and strg_code = '"+strgCode+"'" +
" order by sm.event_date desc )" +
" where Rownum <= "+callsCount;
*/
custCallHistSql.append("select * from ( select sm.dcr_id, sm.sales_pers,sm.strg_code,sm.event_date, sm.event_time_start,sm.event_time_end, sm.call_outcome,")
.append(" CASE WHEN sm.CALL_OUTCOME = '0' THEN 'Refused'")
.append(" WHEN sm.CALL_OUTCOME = '1' THEN 'Negative'")
.append(" WHEN sm.CALL_OUTCOME = '2' THEN 'Below Average'")
.append(" WHEN sm.CALL_OUTCOME = '3' THEN 'Average'")
.append(" WHEN sm.CALL_OUTCOME = '4' THEN 'Very Positive'")
.append(" WHEN sm.CALL_OUTCOME = '5' THEN 'Supporter'")
.append(" WHEN sm.CALL_OUTCOME = '6' THEN 'Believer'")
.append(" WHEN sm.CALL_OUTCOME = '7' THEN 'Non Believer'")
.append(" WHEN sm.CALL_OUTCOME = '8' THEN 'Obj. Not Met'")
.append(" WHEN sm.CALL_OUTCOME = '9' THEN 'Obj. Met'")
.append(" END AS call_outcome_descr , ")
.append(" REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sm.meet_summ, 'type:C', 'Complaint'),'type:P', 'Compliment'),")
.append(" 'type:R', 'Request'),'type:Q', 'Query'),'type:I', 'Interested'),'type:N', 'No Response'),'type:M', 'Mini Mithas'),'type:K', 'Kiosk Activity') AS REMARKS")
.append(" from strg_meet sm")
.append(" where sm.event_type <>'PR'")
.append(" and sm.strg_code = '"+strgCode+"'")
.append(" order by sm.event_date desc )")
.append(" where Rownum <= "+callsCount);
System.out.println("custInfoSql+++"+custCallHistSql);
pstmt = conn.prepareStatement(custCallHistSql);
pstmt = conn.prepareStatement(custCallHistSql.toString());
rs = pstmt.executeQuery();
while(rs.next())
......
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