Subversion Repositories SmartDukaan

Rev

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

Rev 19421 Rev 23122
Line 85... Line 85...
85
 
85
 
86
	//Start:- Added/Modified by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013
86
	//Start:- Added/Modified by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013
87
	public String create(){
87
	public String create(){
88
		if(runCompleteUpdate!=null && runCompleteUpdate.equals("on")) {
88
		if(runCompleteUpdate!=null && runCompleteUpdate.equals("on")) {
89
			runCompleteUpdateValue = true;
89
			runCompleteUpdateValue = true;
-
 
90
		} else {
-
 
91
			provider = -1L;
90
		}
92
		}
91
		File fileToCreate = null;
93
		File fileToCreate = null;
92
	        try {
94
	        try {
93
	            fileToCreate = new File("/tmp/", this.recordsFile.getName());
95
	            fileToCreate = new File("/tmp/", this.recordsFile.getName());
94
	            FileUtils.copyFile(this.recordsFile, fileToCreate);
96
	            FileUtils.copyFile(this.recordsFile, fileToCreate);
Line 149... Line 151...
149
	                        System.out.print(cell.getStringCellValue() + "\t\t");
151
	                        System.out.print(cell.getStringCellValue() + "\t\t");
150
	                        break;
152
	                        break;
151
	                }
153
	                }
152
	                switch(cellCount) {
154
	                switch(cellCount) {
153
	                	case 0:
155
	                	case 0:
-
 
156
	                		long provider_id = (long) cellVal_Num;
-
 
157
	                		if (provider_id != provider) break;
154
	                		logisticsLocationInfo.setProviderId((long) cellVal_Num);
158
	                		logisticsLocationInfo.setProviderId((long) cellVal_Num);
155
	                		break;
159
	                		break;
156
	                	case 1:
160
	                	case 1:
157
	                		pincode = cellVal_Str.length() > 0 ? cellVal_Str : cellVal_Num +"";
161
	                		pincode = cellVal_Str.length() > 0 ? cellVal_Str : cellVal_Num +"";
158
	                		logisticsLocationInfo.setPinCode(pincode);
162
	                		logisticsLocationInfo.setPinCode(pincode);
Line 211... Line 215...
211
	            }
215
	            }
212
	            logisticsLocationInfoList.add(logisticsLocationInfo);
216
	            logisticsLocationInfoList.add(logisticsLocationInfo);
213
	        }
217
	        }
214
	        try{
218
	        try{
215
            	Client logisticsClient = new LogisticsClient().getClient();
219
            	Client logisticsClient = new LogisticsClient().getClient();
216
	            logisticsClient.runLogisticsLocationInfoUpdate(logisticsLocationInfoList, runCompleteUpdateValue);
220
	            logisticsClient.runLogisticsLocationInfoUpdate(logisticsLocationInfoList, runCompleteUpdateValue, provider);
217
            }
221
            }
218
            catch (TException e) {
222
            catch (TException e) {
219
                logger.error("Unable to update data", e);
223
                logger.error("Unable to update data", e);
220
                addActionError(e.getMessage());
224
                addActionError(e.getMessage());
221
            }
225
            }