Subversion Repositories SmartDukaan

Rev

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

Rev 22229 Rev 22230
Line 129... Line 129...
129
						throw profitMandiBusinessException;
129
						throw profitMandiBusinessException;
130
					}
130
					}
131
					if(row.getCell(8) != null && row.getCell(8).getCellTypeEnum() == CellType.NUMERIC){
131
					if(row.getCell(8) != null && row.getCell(8).getCellTypeEnum() == CellType.NUMERIC){
132
						tagListing.setMop(Double.valueOf(row.getCell(8).toString()).floatValue());
132
						tagListing.setMop(Double.valueOf(row.getCell(8).toString()).floatValue());
133
					}else{
133
					}else{
134
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(MOP, row.getCell(7), "TGLSTNG_VE_1010");
134
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(MOP, row.getCell(8), "TGLSTNG_VE_1010");
135
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
135
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
136
						throw profitMandiBusinessException;
136
						throw profitMandiBusinessException;
137
					}
137
					}
138
					if(row.getCell(9) != null && row.getCell(9).getCellTypeEnum() == CellType.NUMERIC){
138
					if(row.getCell(9) != null && row.getCell(9).getCellTypeEnum() == CellType.NUMERIC){
139
						tagListing.setSupportPrice(Double.valueOf(row.getCell(8).toString()).floatValue());
139
						tagListing.setSupportPrice(Double.valueOf(row.getCell(9).toString()).floatValue());
140
					}else{
140
					}else{
141
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SUPPORT_PRICE, row.getCell(8).toString(), "TGLSTNG_VE_1010");
141
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(SUPPORT_PRICE, row.getCell(9).toString(), "TGLSTNG_VE_1010");
142
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
142
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
143
						throw profitMandiBusinessException;
143
						throw profitMandiBusinessException;
144
					}
144
					}
145
					if(row.getCell(10) != null && HSSFDateUtil.isCellDateFormatted(row.getCell(10))){
145
					if(row.getCell(10) != null && HSSFDateUtil.isCellDateFormatted(row.getCell(10))){
146
						Date date = row.getCell(10).getDateCellValue();
146
						Date date = row.getCell(10).getDateCellValue();
147
						LocalDateTime startDate = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
147
						LocalDateTime startDate = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
148
						tagListing.setStartDate(startDate);
148
						tagListing.setStartDate(startDate);
149
					}else{
149
					}else{
150
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(START_DATE, row.getCell(9).toString(), "TGLSTNG_VE_1010");
150
						ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(START_DATE, row.getCell(10).toString(), "TGLSTNG_VE_1010");
151
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
151
						LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
152
						throw  profitMandiBusinessException;
152
						throw  profitMandiBusinessException;
153
					}
153
					}
154
					tagListings.add(tagListing);
154
					tagListings.add(tagListing);
155
				} else {
155
				} else {