Subversion Repositories SmartDukaan

Rev

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

Rev 22230 Rev 22231
Line 56... Line 56...
56
				Row row = mySheet.getRow(rowNumber);
56
				Row row = mySheet.getRow(rowNumber);
57
				if(rowNumber == 0 && row != null){
57
				if(rowNumber == 0 && row != null){
58
					if(row.getPhysicalNumberOfCells() == 11){
58
					if(row.getPhysicalNumberOfCells() == 11){
59
						if(!(TAG_ID.equals(row.getCell(0).toString()) || row.getCell(0).getCellTypeEnum() != CellType.STRING)){
59
						if(!(TAG_ID.equals(row.getCell(0).toString()) || row.getCell(0).getCellTypeEnum() != CellType.STRING)){
60
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(TAG_ID, row.getCell(0).toString(), "TGLSTNG_VE_1000");
60
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(TAG_ID, row.getCell(0).toString(), "TGLSTNG_VE_1000");
61
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
61
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
62
							throw profitMandiBusinessException;
62
							throw profitMandiBusinessException;
63
						}
63
						}
64
						if(!(ITEM_ID.equals(row.getCell(2).toString()) || row.getCell(2).getCellTypeEnum() != CellType.STRING)){
64
						if(!(ITEM_ID.equals(row.getCell(2).toString()) || row.getCell(2).getCellTypeEnum() != CellType.STRING)){
65
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(ITEM_ID, row.getCell(2).toString(), "TGLSTNG_VE_1002");
65
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(ITEM_ID, row.getCell(2).toString(), "TGLSTNG_VE_1002");
66
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
66
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
67
							throw profitMandiBusinessException;
67
							throw profitMandiBusinessException;
68
						}
68
						}
69
						if(!(SELLING_PRICE.equals(row.getCell(7).toString()) || row.getCell(7).getCellTypeEnum() != CellType.STRING)){
69
						if(!(SELLING_PRICE.equals(row.getCell(7).toString()) || row.getCell(7).getCellTypeEnum() != CellType.STRING)){
70
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SELLING_PRICE, row.getCell(7).toString(), "TGLSTNG_VE_1007");
70
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SELLING_PRICE, row.getCell(7).toString(), "TGLSTNG_VE_1007");
71
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
71
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
72
							throw profitMandiBusinessException;
72
							throw profitMandiBusinessException;
73
						}
73
						}
74
						if(!(MOP.equals(row.getCell(8).toString()) || row.getCell(8).getCellTypeEnum() != CellType.STRING)){
74
						if(!(MOP.equals(row.getCell(8).toString()) || row.getCell(8).getCellTypeEnum() != CellType.STRING)){
75
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SELLING_PRICE, row.getCell(7).toString(), "TGLSTNG_VE_1007");
75
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SELLING_PRICE, row.getCell(7).toString(), "TGLSTNG_VE_1007");
76
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
76
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
77
							throw profitMandiBusinessException;
77
							throw profitMandiBusinessException;
78
						}
78
						}
79
						if(!(SUPPORT_PRICE.equals(row.getCell(9).toString()) || row.getCell(9).getCellTypeEnum() != CellType.STRING)){
79
						if(!(SUPPORT_PRICE.equals(row.getCell(9).toString()) || row.getCell(9).getCellTypeEnum() != CellType.STRING)){
80
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SUPPORT_PRICE, row.getCell(8).toString(), "TGLSTNG_VE_1008");
80
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SUPPORT_PRICE, row.getCell(8).toString(), "TGLSTNG_VE_1008");
81
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
81
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
82
							throw profitMandiBusinessException;
82
							throw profitMandiBusinessException;
83
						}
83
						}
84
						if(!(START_DATE.equals(row.getCell(10).toString()) || row.getCell(10).getCellTypeEnum() != CellType.STRING)){
84
						if(!(START_DATE.equals(row.getCell(10).toString()) || row.getCell(10).getCellTypeEnum() != CellType.STRING)){
85
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(START_DATE, row.getCell(9).toString(), "TGLSTNG_VE_1009");
85
							ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(START_DATE, row.getCell(9).toString(), "TGLSTNG_VE_1009");
86
							//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
86
							LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
87
							throw profitMandiBusinessException;
87
							throw profitMandiBusinessException;
88
						}
88
						}
89
					}else{
89
					}else{
90
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(TAG_LISTING, row.getPhysicalNumberOfCells(), "TGLSTNG_VE_1011");
90
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(TAG_LISTING, row.getPhysicalNumberOfCells(), "TGLSTNG_VE_1011");
91
						//LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
91
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
92
						throw profitMandiBusinessException;
92
						throw profitMandiBusinessException;
93
					}
93
					}
94
					//Headers are OK. Lets break now and iterate through first row.
94
					//Headers are OK. Lets break now and iterate through first row.
95
					break;
95
					break;
96
				}else if(rowNumber == 0 && row == null){
96
				}else if(rowNumber == 0 && row == null){