Subversion Repositories SmartDukaan

Rev

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

Rev 2042 Rev 2360
Line 43... Line 43...
43
 * 
43
 * 
44
 */
44
 */
45
public class HotspotReconciliationController implements ServletResponseAware, ServletRequestAware {
45
public class HotspotReconciliationController implements ServletResponseAware, ServletRequestAware {
46
 
46
 
47
	private enum ReportColumn{
47
	private enum ReportColumn{
-
 
48
	    ORDER_ID(0),
48
		BILLING_NUMBER(0),
49
		BILLING_NUMBER(1),
49
		BILLING_DATE(1),
50
		BILLING_DATE(2),
50
		CUSTOMER_NAME(2),
51
		CUSTOMER_NAME(3),
51
		BRAND(3),
52
		BRAND(4),
52
		MODEL_NAME(4),
53
		MODEL_NAME(5),
53
		MODEL_NUMBER(5),
54
		MODEL_NUMBER(6),
54
		COLOR(6),
55
		COLOR(7),
55
		XFER_PRICE(7),
56
		XFER_PRICE(8),
56
		SELLING_PRICE(8);
57
		SELLING_PRICE(9);
57
		
58
		
58
		private int value;
59
		private int value;
59
		
60
		
60
		ReportColumn(int value) {
61
		ReportColumn(int value) {
61
			this.value = value;
62
			this.value = value;
Line 164... Line 165...
164
	    sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 6));
165
	    sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 6));
165
	    
166
	    
166
	    sheet.createRow(serialNo ++);
167
	    sheet.createRow(serialNo ++);
167
	    
168
	    
168
	    Row headerRow = sheet.createRow(serialNo ++);
169
	    Row headerRow = sheet.createRow(serialNo ++);
-
 
170
	    headerRow.createCell(ReportColumn.ORDER_ID.getValue()).setCellValue("Order Id");
169
	    headerRow.createCell(ReportColumn.BILLING_NUMBER.getValue()).setCellValue("Billing Number");
171
	    headerRow.createCell(ReportColumn.BILLING_NUMBER.getValue()).setCellValue("Billing Number");
170
	    headerRow.createCell(ReportColumn.BILLING_DATE.getValue()).setCellValue("Billing Date");
172
	    headerRow.createCell(ReportColumn.BILLING_DATE.getValue()).setCellValue("Billing Date");
171
	    headerRow.createCell(ReportColumn.CUSTOMER_NAME.getValue()).setCellValue("Customer Name");
173
	    headerRow.createCell(ReportColumn.CUSTOMER_NAME.getValue()).setCellValue("Customer Name");
172
	    headerRow.createCell(ReportColumn.BRAND.getValue()).setCellValue("Brand");
174
	    headerRow.createCell(ReportColumn.BRAND.getValue()).setCellValue("Brand");
173
	    headerRow.createCell(ReportColumn.MODEL_NAME.getValue()).setCellValue("Model Name");
175
	    headerRow.createCell(ReportColumn.MODEL_NAME.getValue()).setCellValue("Model Name");
Line 190... Line 192...
190
		    totalTransferPrice += transferPrice;
192
		    totalTransferPrice += transferPrice;
191
 
193
 
192
            double sellingPrice = lineItem.getTotal_price();
194
            double sellingPrice = lineItem.getTotal_price();
193
            totalSellingPrice += sellingPrice;
195
            totalSellingPrice += sellingPrice;
194
 
196
 
-
 
197
            contentRow.createCell(ReportColumn.ORDER_ID.getValue()).setCellValue(order.getId());
195
		    contentRow.createCell(ReportColumn.BILLING_NUMBER.getValue()).setCellValue(order.getInvoice_number());
198
		    contentRow.createCell(ReportColumn.BILLING_NUMBER.getValue()).setCellValue(order.getInvoice_number());
196
		    contentRow.createCell(ReportColumn.BILLING_DATE.getValue()).setCellValue(dateFormat.format(new Date(order.getBilling_timestamp())));
199
		    contentRow.createCell(ReportColumn.BILLING_DATE.getValue()).setCellValue(dateFormat.format(new Date(order.getBilling_timestamp())));
197
		    contentRow.createCell(ReportColumn.CUSTOMER_NAME.getValue()).setCellValue(order.getCustomer_name());
200
		    contentRow.createCell(ReportColumn.CUSTOMER_NAME.getValue()).setCellValue(order.getCustomer_name());
198
		    contentRow.createCell(ReportColumn.BRAND.getValue()).setCellValue(getValueForEmptyString(lineItem.getBrand()));
201
		    contentRow.createCell(ReportColumn.BRAND.getValue()).setCellValue(getValueForEmptyString(lineItem.getBrand()));
199
		    contentRow.createCell(ReportColumn.MODEL_NAME.getValue()).setCellValue(getValueForEmptyString(lineItem.getModel_name()));
202
		    contentRow.createCell(ReportColumn.MODEL_NAME.getValue()).setCellValue(getValueForEmptyString(lineItem.getModel_name()));