Subversion Repositories SmartDukaan

Rev

Rev 34117 | Rev 34133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34117 Rev 34129
Line 19... Line 19...
19
})
19
})
20
 
20
 
21
 
21
 
22
@NamedNativeQueries({
22
@NamedNativeQueries({
23
        @NamedNativeQuery(name = "Upsell.UpsellingReport",
23
        @NamedNativeQuery(name = "Upsell.UpsellingReport",
24
                query = "SELECT uc.agentId, ucd.agent_id as agentEmail,u.name as partnerName, uc.originalOrderId as orderId, uc.mobile as customerNumber, ucd.created_timestamp as callingDate," +
24
                query = "SELECT uc.agentId, ucd.agent_id as agentEmail,u.name as partnerName, uc.originalOrderId as orderId, uc.mobile as customerNumber, " +
-
 
25
                        "ucd.created_timestamp as callingDate, coalesce(ucd.disposition,'-') as disposition,coalesce(ucd.remark,'-') as remark," +
-
 
26
                        " coalesce(rp.payment_status, 'Not Found') as paymentStatus, " +
-
 
27
                        "(CASE WHEN ac.create_timestamp IS NOT NULL THEN 'Created' ELSE 'Not Created' END) AS insuranceStatus, " +
25
                        " coalesce(rp.payment_status, 'Not Found') as paymentStatus, (CASE WHEN ac.create_timestamp IS NOT NULL THEN 'Created' ELSE 'Not Created' END) AS insuranceStatus, coalesce(ip.sale_amount,0) as soldAmount, coalesce(ip.invoice_number,'Not Found') as invoiceNumber, coalesce(ip.serial_number,'Not Found') as serialNumber" +
28
                        "coalesce(ip.sale_amount,0) as soldAmount, coalesce(ip.invoice_number,'Not Found') as invoiceNumber, coalesce(ip.serial_number,'Not Found') as serialNumber" +
26
                        " FROM fofo.upSaleCall uc" +
29
                        " FROM fofo.upSaleCall uc" +
27
                        " JOIN fofo.upsell_call_details ucd on uc.id = ucd.upsale_call_id" +
30
                        " JOIN fofo.upsell_call_details ucd on uc.id = ucd.upsale_call_id" +
28
                        " JOIN fofo.fofo_order fo on fo.id = uc.originalOrderId" +
31
                        " JOIN fofo.fofo_order fo on fo.id = uc.originalOrderId" +
29
                        " JOIN user.user u on u.id = fo.fofo_id" +
32
                        " JOIN user.user u on u.id = fo.fofo_id" +
30
                        " LEFT JOIN fofo.upsellRazorpayPaymentStatus rp on rp.order_id = uc.originalOrderId" +
33
                        " LEFT JOIN fofo.upsellRazorpayPaymentStatus rp on rp.order_id = uc.originalOrderId" +
Line 44... Line 47...
44
                                @ColumnResult(name = "agentEmail", type = String.class),
47
                                @ColumnResult(name = "agentEmail", type = String.class),
45
                                @ColumnResult(name = "partnerName", type = String.class),
48
                                @ColumnResult(name = "partnerName", type = String.class),
46
                                @ColumnResult(name = "orderId", type = Integer.class),
49
                                @ColumnResult(name = "orderId", type = Integer.class),
47
                                @ColumnResult(name = "customerNumber ", type = String.class),
50
                                @ColumnResult(name = "customerNumber ", type = String.class),
48
                                @ColumnResult(name = "callingDate ", type = String.class),
51
                                @ColumnResult(name = "callingDate ", type = String.class),
-
 
52
                                @ColumnResult(name = "disposition ", type = String.class),
-
 
53
                                @ColumnResult(name = "remark ", type = String.class),
49
                                @ColumnResult(name = "paymentStatus ", type = String.class),
54
                                @ColumnResult(name = "paymentStatus ", type = String.class),
50
                                @ColumnResult(name = "insuranceStatus ", type = String.class),
55
                                @ColumnResult(name = "insuranceStatus ", type = String.class),
51
                                @ColumnResult(name = "soldAmount ", type = Float.class),
56
                                @ColumnResult(name = "soldAmount ", type = Float.class),
52
                                @ColumnResult(name = "invoiceNumber ", type = String.class),
57
                                @ColumnResult(name = "invoiceNumber ", type = String.class),
53
                                @ColumnResult(name = "serialNumber ", type = String.class),
58
                                @ColumnResult(name = "serialNumber ", type = String.class),